--- /srv/reproducible-results/rbuild-debian/r-b-build.88wrpsHl/b1/dune-localfunctions_2.9.0-2_armhf.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.88wrpsHl/b2/dune-localfunctions_2.9.0-2_armhf.changes ├── Files │ @@ -1,3 +1,3 @@ │ │ fd3212bc15e7171d7b1ffae6045db451 123748 libdevel optional libdune-localfunctions-dev_2.9.0-2_armhf.deb │ - 8594effe2870ec8db76837ef68a6fdb0 4996392 doc optional libdune-localfunctions-doc_2.9.0-2_all.deb │ + 47714f03844c3af8854056e2318ef728 5002056 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 34660 2023-01-12 22:15:36.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 4961540 2023-01-12 22:15:36.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 34668 2023-01-12 22:15:36.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 4967196 2023-01-12 22:15:36.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ │ │ │ ├── line order │ │ │ │ │ @@ -43,36 +43,28 @@ │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00065_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00068.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00068_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00071.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00071_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00074.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00074_source.html │ │ │ │ │ -usr/share/doc/libdune-localfunctions-doc/doxygen/a00077.html │ │ │ │ │ -usr/share/doc/libdune-localfunctions-doc/doxygen/a00077_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00080.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00080_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00083.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00083_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00086.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00086_source.html │ │ │ │ │ -usr/share/doc/libdune-localfunctions-doc/doxygen/a00089.html │ │ │ │ │ -usr/share/doc/libdune-localfunctions-doc/doxygen/a00089_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00092.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00092_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00095.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00095_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00098.html │ │ │ │ │ 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/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 │ │ │ │ │ @@ -267,36 +259,44 @@ │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00404_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00407.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00407_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00410.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00410_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00413.html │ │ │ │ │ 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 │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00446_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00449.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00449_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00452.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00452_source.html │ │ │ │ │ +usr/share/doc/libdune-localfunctions-doc/doxygen/a00455.html │ │ │ │ │ +usr/share/doc/libdune-localfunctions-doc/doxygen/a00455_source.html │ │ │ │ │ +usr/share/doc/libdune-localfunctions-doc/doxygen/a00458.html │ │ │ │ │ +usr/share/doc/libdune-localfunctions-doc/doxygen/a00458_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00461.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00461_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00464.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00464_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00467.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00467_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00470.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) 21598 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00011.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 274916 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) 5605 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00014.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40262 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) 5667 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00017.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 39248 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) 6316 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00020.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 96772 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) 8589 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00023.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 189048 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) 5880 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00026.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17597 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00026_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/a00029.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55095 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) 5536 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00032.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30828 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) 21998 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00035.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 60168 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) 6075 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00038.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53867 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) 6434 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00041.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53845 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) 5444 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00044.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20136 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) 12212 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00047.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 101142 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) 5592 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00050.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 57998 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) 5232 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00053.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23868 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) 6548 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00056.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 44400 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) 5061 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00059.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9362 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) 5715 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00062.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 132591 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) 5630 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00065.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 102194 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) 7362 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00068.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 42738 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) 6239 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00071.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23788 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) 5266 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00074.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7725 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) 4996 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00077.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24190 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) 5259 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00080.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20359 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) 7791 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00083.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 50578 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) 5628 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00086.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 119945 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) 5226 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00089.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7674 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) 5062 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00092.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7775 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) 5067 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00095.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11639 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) 4910 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00098.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11955 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) 5033 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00101.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19041 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) 5221 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00107.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7727 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) 5054 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00110.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7741 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) 5642 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00113.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 110872 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) 6230 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00116.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13798 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) 5063 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00119.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 33501 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) 7251 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00122.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27987 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) 5257 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00125.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7700 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) 5366 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00128.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13307 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) 5265 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00131.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7773 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) 7043 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00134.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27987 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) 5243 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00137.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7684 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) 5256 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00140.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7790 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) 4985 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00143.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14588 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) 5247 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00146.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7695 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) 5214 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00149.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10366 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) 6025 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00152.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 37712 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) 5014 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00155.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18914 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) 6951 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00158.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 51494 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) 4967 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00161.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12218 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) 5462 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00164.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12098 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) 6444 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00167.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45785 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) 5102 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00170.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13010 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) 5169 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00173.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19436 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) 5158 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00176.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34490 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) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00179.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13188 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) 5180 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00182.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 51963 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) 5181 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00185.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21322 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) 5380 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00188.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21828 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) 5461 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00191.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21521 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) 5118 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00194.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12251 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) 5016 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00197.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14897 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) 5126 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00200.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23995 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) 5400 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00203.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21863 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) 5185 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00206.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19289 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) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00209.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13244 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) 5179 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00212.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31463 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) 4911 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00011.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15970 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) 5273 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00014.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41303 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) 5015 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00017.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21493 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) 7961 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00020.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 80165 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) 5195 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00023.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20872 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) 5181 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00026.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21612 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00026_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/a00029.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 60063 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) 4912 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00032.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19133 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) 3901 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00035.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4724 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) 5149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00038.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25785 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) 4867 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00041.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13745 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) 5079 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00044.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12420 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) 5718 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00047.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41175 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) 5297 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00050.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20462 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) 5027 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00053.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16874 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) 5108 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00056.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12405 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) 5198 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00059.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29359 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) 5007 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00062.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22753 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) 6025 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00065.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 37712 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) 7727 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00068.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53428 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) 4833 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00071.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20084 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) 5559 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00074.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 61782 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) 5511 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00080.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22820 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) 8318 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00083.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 60254 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) 5635 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00086.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40032 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) 7817 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00092.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 43351 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) 4720 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00095.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8887 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) 7329 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00098.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 76679 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) 5188 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00101.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12770 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) 6301 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00113.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27028 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) 3744 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00116.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6044 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) 3691 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00119.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5776 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) 6113 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00122.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24674 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) 5053 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00125.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10752 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) 5637 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00128.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 76509 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) 5593 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00131.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 63478 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) 5147 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00134.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12107 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) 6990 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00137.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 151840 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) 5615 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00140.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67254 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) 4967 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00143.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12218 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) 6951 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00146.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 51494 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) 5014 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00149.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18914 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) 5214 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00152.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10366 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) 5033 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00155.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29438 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) 5034 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00158.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27566 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) 5079 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00161.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15535 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) 5237 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00164.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14301 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) 5162 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00167.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9899 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) 5198 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00170.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21031 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) 5768 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00173.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19910 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) 9091 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00176.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35935 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) 5389 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00179.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21879 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) 5181 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00182.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21322 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) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00185.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13188 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) 5180 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00188.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 51963 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) 5388 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00191.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21872 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) 5108 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00194.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12310 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) 5177 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00197.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24628 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) 5117 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00200.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15589 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) 5223 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00203.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 112001 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) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00206.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13542 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) 5181 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00209.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 26806 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) 6450 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00212.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40561 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) 5193 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00215.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 21017 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) 5129 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00218.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25087 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) 5016 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00221.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15467 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) 5016 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00218.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14897 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) 5126 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00221.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23995 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) 5118 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00224.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12353 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) 5389 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00227.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21879 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) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00233.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13542 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) 5181 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00236.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 26806 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) 5223 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00239.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 112001 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) 6450 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00242.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40561 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) 5356 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00245.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21678 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) 5389 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00248.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21884 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) 9091 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00251.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35935 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) 5388 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00254.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21872 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) 5189 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00257.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11956 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) 5624 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00260.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53711 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) 7053 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00263.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 102149 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) 5108 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00266.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12310 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) 5177 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00269.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24628 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) 5117 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00272.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15589 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) 5389 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00275.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21879 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) 5768 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00278.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19910 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) 5198 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00281.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21031 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) 5223 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00284.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 92562 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) 5186 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00287.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25485 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) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00290.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13457 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) 5182 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00293.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24609 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) 5176 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00296.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 90391 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) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00299.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13456 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) 5397 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00302.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21982 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) 5167 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00305.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24423 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) 5098 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00308.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12272 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) 5104 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00311.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15517 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) 5273 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00314.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41303 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) 4911 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00317.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15970 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) 5181 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00320.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21612 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) 5195 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00323.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20872 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) 5015 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00326.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21493 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) 6689 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00329.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 60063 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) 4912 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00332.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19133 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) 7961 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00335.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 80165 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) 3691 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00338.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5776 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) 5460 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00341.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22085 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) 5459 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00344.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22111 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) 6373 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00347.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19545 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) 5482 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00350.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22236 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) 5303 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00353.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 33235 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) 5224 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00356.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20220 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) 5149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00359.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12594 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) 5142 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00362.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13126 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) 5283 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00365.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 48607 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) 5455 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00371.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22139 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) 5295 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00374.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 48547 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) 5149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00377.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13614 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) 5211 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00380.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23936 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) 5142 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00383.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12553 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) 5296 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00386.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36399 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) 5217 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00389.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21160 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) 5137 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00392.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12770 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) 5085 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00395.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19690 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) 5293 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00398.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 49681 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) 5707 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00401.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15528 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) 5481 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00404.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22348 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) 5635 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00407.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40032 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) 7817 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00410.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 43351 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) 4720 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00413.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8887 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) 7329 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00419.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 76679 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) 5559 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00425.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 61782 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) 5511 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00428.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22820 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) 8318 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00431.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 60254 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) 4833 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00437.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20084 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) 5421 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00440.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18599 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) 5288 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00443.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18359 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) 4036 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00446.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5073 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) 5489 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00449.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36739 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) 3901 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00452.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4724 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) 6301 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00461.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27028 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) 3686 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00464.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6376 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) 6401 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00467.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15842 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) 5007 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00470.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22753 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) 5297 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00473.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20462 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) 5027 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00476.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16874 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) 5198 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00479.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29359 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) 5108 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00482.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12405 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) 5079 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00485.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12420 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) 4867 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00488.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13745 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) 5149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00491.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25785 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) 5718 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00494.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41175 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) 6113 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00497.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24674 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) 5053 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00500.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10752 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) 3744 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00503.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6044 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) 5188 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00506.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12770 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) 6740 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00509.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 119958 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) 5112 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00512.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13287 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) 5310 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00515.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21392 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) 5966 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00518.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30300 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) 6922 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00521.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45375 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) 7278 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00524.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45331 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) 5364 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00527.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21379 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) 5147 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00533.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12107 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) 5615 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00536.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67254 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) 6990 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00539.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 151840 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) 5637 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00542.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 76509 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) 5593 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00545.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 63478 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) 4173 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00548.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5446 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) 5162 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00551.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9899 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) 15535 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) 5033 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00557.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29438 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) 5237 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00560.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14301 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) 5034 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00563.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27566 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) 5773 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00566.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29864 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) 12251 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) 5380 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00227.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21828 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) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00230.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13456 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) 5176 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00233.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 90391 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) 5182 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00236.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24609 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) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00239.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13244 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) 5179 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00242.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31463 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) 5185 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00245.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19289 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) 5129 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00248.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25087 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) 5118 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00251.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12353 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) 5016 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00254.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15467 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) 5389 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00257.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21879 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) 5462 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00260.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12098 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) 5461 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00263.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21521 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) 5389 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00266.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21884 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) 5167 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00269.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24423 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) 5098 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00272.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12272 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) 5104 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00275.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15517 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) 6444 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00278.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45785 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) 5397 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00281.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21982 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) 5189 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00284.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11956 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) 7053 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00287.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 102149 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) 5624 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00290.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53711 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) 5400 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00293.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21863 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) 5356 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00296.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21678 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) 5223 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00302.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 92562 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) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00305.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13457 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) 5102 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00308.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13010 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) 5462 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00317.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21550 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) 5232 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00320.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23868 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) 6548 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00323.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 44400 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) 5773 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00326.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29864 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) 5112 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00329.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13287 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) 5310 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00332.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21392 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) 5966 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00335.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30300 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) 6922 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00338.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45375 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) 5364 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00341.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21379 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) 6740 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00344.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 119958 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) 7278 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00347.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45331 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) 4742 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00350.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19584 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) 7791 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00353.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 50578 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) 5259 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00356.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20359 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) 5366 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00359.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13307 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) 4910 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00362.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11955 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) 5033 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00365.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19041 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) 5067 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00368.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11639 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) 6239 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00371.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23788 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) 7362 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00374.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 42738 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) 7043 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00377.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27987 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) 5221 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00380.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7727 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) 7251 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00383.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27987 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) 5061 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00386.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9362 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) 5628 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00389.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 119945 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) 5062 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00392.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7775 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) 5257 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00395.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7700 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) 5265 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00398.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7773 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) 5247 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00401.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7695 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) 5243 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00404.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7684 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) 5266 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00407.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7725 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) 4985 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00410.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14588 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) 5226 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00413.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7674 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) 5630 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00416.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 102194 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) 5063 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00419.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 33501 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) 4996 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00422.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24190 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) 6230 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00425.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13798 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) 5715 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00428.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 132591 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) 5054 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00431.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7741 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) 5642 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00434.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 110872 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) 5256 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00437.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7790 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) 3686 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00440.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6376 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) 5489 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00443.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36739 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) 5295 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00446.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 48547 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) 5211 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00449.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23936 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) 5149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00452.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13614 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) 5455 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00455.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22139 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) 5142 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00458.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12553 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) 5217 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00461.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21160 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) 5296 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00464.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36399 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) 5142 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00467.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13126 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) 5283 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00470.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 48607 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) 5204 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00473.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23377 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) 5459 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00476.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22111 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) 6373 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00479.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19545 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) 5293 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00482.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 49681 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) 5085 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00485.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19690 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) 5137 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00488.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12770 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) 5481 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00491.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22348 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) 5707 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00494.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15528 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) 5224 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00497.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20220 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) 5149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00500.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12594 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) 5303 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00503.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 33235 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) 5460 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00506.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22085 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) 5482 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00509.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22236 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) 4036 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00512.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5073 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) 5288 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00515.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18359 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) 5421 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00518.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18599 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) 4173 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00521.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5446 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) 6461 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00524.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55095 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) 5880 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00527.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17597 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) 12212 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00530.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 101142 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) 21998 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00533.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 60168 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) 8589 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00536.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 189048 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) 5592 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00539.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 57998 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) 21598 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00542.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 274916 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) 5605 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00545.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40262 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) 5536 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00548.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30828 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) 5667 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00551.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 39248 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) 6075 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00554.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53867 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) 6316 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00557.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 96772 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) 5444 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00560.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20136 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) 6434 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00563.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53845 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) 6401 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00566.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15842 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,28 +1264,28 @@ │ │ │ │ -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) 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) 5547 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04482.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23259 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) 5919 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04485.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41305 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) 5058 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04488.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13851 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) 5184 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04491.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13538 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) 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) 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 │ │ │ │ @@ -1508,15 +1508,15 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5720 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_efe9c42b7995a789e2e3a3951e68c4dc.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4743 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_efe9c42b7995a789e2e3a3951e68c4dc_dep.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5172 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_f2cea2550179f5ef9eb9f9aa69c380e8.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4082 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_f2cea2550179f5ef9eb9f9aa69c380e8_dep.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5592 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_fae6c31a68fd74edf8214423c164f0b4.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4319 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_fae6c31a68fd74edf8214423c164f0b4_dep.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 45631 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/doxygen.css │ │ │ │ --rw-r--r-- 0 root (0) root (0) 88195 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/dune-localfunctions.tag.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 88217 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/dune-localfunctions.tag.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7704 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/dynsections.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 87492 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/files.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3948 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/form_0.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4031 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/form_0_dark.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1331 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/form_1.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 560 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/form_10.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 626 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/form_10_dark.png │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00011.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 {} │ │ │ │ │ @@ -6,139 +6,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -Classes | Namespaces | Enumerations | Functions │ │ │ │ │ -tensor.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ + * hierarchical │ │ │ │ │ + * hierarchicalprismp2 │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +hierarchicalprismp2localinterpolation.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ 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 │ │ │ │ │ -std::ostream & Dune::operator<< (std::ostream &out, const LFETensor< F, dimD, │ │ │ │ │ - deriv > &tensor) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, │ │ │ │ │ - dimD, dimR, deriv, DerivativeLayoutNS::derivative > &d) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, │ │ │ │ │ - dimD, dimR, deriv, DerivativeLayoutNS::value > &d) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, │ │ │ │ │ - dimD, dimR, 0, DerivativeLayoutNS::derivative > &d) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, │ │ │ │ │ - dimD, dimR, 0, DerivativeLayoutNS::value > &d) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -std::ostream & Dune::operator<< (std::ostream &out, const std::vector< │ │ │ │ │ - Derivatives< F, dimD, dimR, deriv, layout > > &y) │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00011_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 {} │ │ │ │ │ @@ -7,1609 +7,102 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -tensor.hh │ │ │ │ │ + * hierarchical │ │ │ │ │ + * hierarchicalprismp2 │ │ │ │ │ +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 │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 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 │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11namespace Dune │ │ │ │ │ + 12{ │ │ │ │ │ + 16 template │ │ │ │ │ +17 class HierarchicalPrismP2LocalInterpolation │ │ │ │ │ + 18 { │ │ │ │ │ + 19 public: │ │ │ │ │ + 20 │ │ │ │ │ + 21 template │ │ │ │ │ +22 void interpolate (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 │ │ │ │ │ -32 class LFETensor │ │ │ │ │ - 33 { │ │ │ │ │ - 34 typedef LFETensor This; │ │ │ │ │ - 35 typedef LFETensor BaseDim; │ │ │ │ │ - 36 typedef LFETensor 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 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 │ │ │ │ │ -56 This &operator*=( const field_type &f ) │ │ │ │ │ - 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 │ │ │ │ │ -72 Block &block() │ │ │ │ │ - 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 │ │ │ │ │ -85 void assign(const LFETensor &y) │ │ │ │ │ - 86 { │ │ │ │ │ - 87 field_cast(y.block(),block()); │ │ │ │ │ - 88 } │ │ │ │ │ -89 Block block_; │ │ │ │ │ - 90 }; │ │ │ │ │ - 91 │ │ │ │ │ - 92 // ****************************************** │ │ │ │ │ - 93 template │ │ │ │ │ -94 struct LFETensor │ │ │ │ │ - 95 { │ │ │ │ │ -96 static const int size = 0; │ │ │ │ │ - 97 }; │ │ │ │ │ - 98 │ │ │ │ │ - 99 template │ │ │ │ │ -100 struct LFETensor │ │ │ │ │ - 101 { │ │ │ │ │ -102 static const int size = 1; │ │ │ │ │ - 103 }; │ │ │ │ │ - 104 │ │ │ │ │ - 105 template │ │ │ │ │ -106 class LFETensor │ │ │ │ │ - 107 { │ │ │ │ │ - 108 typedef LFETensor This; │ │ │ │ │ - 109 │ │ │ │ │ - 110 public: │ │ │ │ │ -111 typedef F field_type; │ │ │ │ │ -112 static const int size = 1; │ │ │ │ │ -113 typedef Dune::FieldVector 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 │ │ │ │ │ -128 This &operator*=( const field_type &f ) │ │ │ │ │ - 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 │ │ │ │ │ -149 void assign(const LFETensor &y) │ │ │ │ │ - 150 { │ │ │ │ │ - 151 field_cast(y.block(),block()); │ │ │ │ │ - 152 } │ │ │ │ │ - 153 │ │ │ │ │ -154 Block &block() │ │ │ │ │ - 155 { │ │ │ │ │ - 156 return block_; │ │ │ │ │ - 157 } │ │ │ │ │ -158 const Block &block() const │ │ │ │ │ - 159 { │ │ │ │ │ - 160 return block_; │ │ │ │ │ - 161 } │ │ │ │ │ -162 Block block_; │ │ │ │ │ - 163 }; │ │ │ │ │ - 164 // *********************************************************** │ │ │ │ │ - 165 // Structure for all derivatives up to order deriv │ │ │ │ │ - 166 // for vector valued function │ │ │ │ │ -167 namespace DerivativeLayoutNS { │ │ │ │ │ -168 enum DerivativeLayout {value,derivative}; │ │ │ │ │ - 169 } │ │ │ │ │ - 170 template │ │ │ │ │ -172 struct Derivatives; │ │ │ │ │ - 173 │ │ │ │ │ - 174 // Implemnetation for valued based layout │ │ │ │ │ - 175 template │ │ │ │ │ -176 struct Derivatives │ │ │ │ │ - 177 : public Derivatives │ │ │ │ │ - 178 { │ │ │ │ │ -179 typedef Derivatives This; │ │ │ │ │ -180 typedef Derivatives Base; │ │ │ │ │ -181 typedef LFETensor ThisLFETensor; │ │ │ │ │ - 182 │ │ │ │ │ -183 typedef F Field; │ │ │ │ │ -184 typedef F field_type; │ │ │ │ │ - 185 │ │ │ │ │ -186 static const DerivativeLayoutNS::DerivativeLayout layout = │ │ │ │ │ -DerivativeLayoutNS::value; │ │ │ │ │ -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 Block; │ │ │ │ │ - 191 │ │ │ │ │ -192 This &operator=(const F& f) │ │ │ │ │ - 193 { │ │ │ │ │ - 194 block() = f; │ │ │ │ │ - 195 return *this; │ │ │ │ │ - 196 } │ │ │ │ │ -197 This &operator=(const Dune::FieldVector &t) │ │ │ │ │ - 198 { │ │ │ │ │ - 199 tensor_ = t; │ │ │ │ │ - 200 return *this; │ │ │ │ │ - 201 } │ │ │ │ │ - 202 template │ │ │ │ │ -203 This &operator=(const Dune::FieldVector,dimR> &t) │ │ │ │ │ - 204 { │ │ │ │ │ - 205 tensor() = t; │ │ │ │ │ - 206 return *this; │ │ │ │ │ - 207 } │ │ │ │ │ -208 This &operator=(const Block &t) │ │ │ │ │ - 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 │ │ │ │ │ -227 void assign(const Derivatives │ │ │ │ │ -&y) │ │ │ │ │ - 228 { │ │ │ │ │ - 229 field_cast(y.block(),block()); │ │ │ │ │ - 230 } │ │ │ │ │ - 231 // assign with different layout (same dimRange) │ │ │ │ │ - 232 template │ │ │ │ │ -233 void assign(const Derivatives &y) │ │ │ │ │ - 234 { │ │ │ │ │ - 235 Base::assign(y); │ │ │ │ │ - 236 for (int rr=0; rr()[0]; │ │ │ │ │ - 238 } │ │ │ │ │ - 239 // assign with rth component of function │ │ │ │ │ - 240 template │ │ │ │ │ -241 void assign(const Derivatives &y,unsigned int r) │ │ │ │ │ - 242 { │ │ │ │ │ - 243 assign(y.block(),r); │ │ │ │ │ - 244 } │ │ │ │ │ - 245 // assign with scalar functions to component r │ │ │ │ │ - 246 template │ │ │ │ │ -247 void assign(unsigned int r,const │ │ │ │ │ -Derivatives &y) │ │ │ │ │ - 248 { │ │ │ │ │ - 249 assign(r,y.block()); │ │ │ │ │ - 250 } │ │ │ │ │ - 251 template │ │ │ │ │ -252 void assign(unsigned int r,const │ │ │ │ │ -Derivatives &y) │ │ │ │ │ - 253 { │ │ │ │ │ - 254 assign(r,y[0]); │ │ │ │ │ - 255 } │ │ │ │ │ - 256 │ │ │ │ │ -257 Block &block() │ │ │ │ │ - 258 { │ │ │ │ │ - 259 return reinterpret_cast(*this); │ │ │ │ │ - 260 } │ │ │ │ │ -261 const Block &block() const │ │ │ │ │ - 262 { │ │ │ │ │ - 263 return reinterpret_cast(*this); │ │ │ │ │ - 264 } │ │ │ │ │ - 265 │ │ │ │ │ - 266 template │ │ │ │ │ -267 const Dune::FieldVector,dimR> &tensor() 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 │ │ │ │ │ -274 Dune::FieldVector,dimR> &tensor() │ │ │ │ │ - 275 { │ │ │ │ │ - 276 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ - 277 return tensor(std::integral_constant()); │ │ │ │ │ - 278 } │ │ │ │ │ - 279 template │ │ │ │ │ -280 const Dune::FieldVector::size*dimR> &block() │ │ │ │ │ -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 │ │ │ │ │ -287 Dune::FieldVector::size*dimR> &block() │ │ │ │ │ - 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 } │ │ │ │ │ -293 ThisLFETensor &operator[](int r) { │ │ │ │ │ - 294 return tensor_[r]; │ │ │ │ │ - 295 } │ │ │ │ │ -296 const ThisLFETensor &operator[](int r) const { │ │ │ │ │ - 297 return tensor_[r]; │ │ │ │ │ - 298 } │ │ │ │ │ - 299 protected: │ │ │ │ │ - 300 template │ │ │ │ │ -301 void assign(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 │ │ │ │ │ -307 void assign(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 │ │ │ │ │ -314 void assign(const Derivatives &y) │ │ │ │ │ - 315 { │ │ │ │ │ - 316 Base::assign(y); │ │ │ │ │ - 317 for (int rr=0; rr()[0]; │ │ │ │ │ - 319 } │ │ │ │ │ - 320 │ │ │ │ │ - 321 template │ │ │ │ │ - 322 const Dune::FieldVector,dimR> & │ │ │ │ │ -323 tensor(const std::integral_constant &dorderVar) const │ │ │ │ │ - 324 { │ │ │ │ │ - 325 return Base::tensor(dorderVar); │ │ │ │ │ - 326 } │ │ │ │ │ - 327 const Dune::FieldVector,dimR> & │ │ │ │ │ -328 tensor(const std::integral_constant &dorderVar) const │ │ │ │ │ - 329 { │ │ │ │ │ - 330 return tensor_; │ │ │ │ │ - 331 } │ │ │ │ │ - 332 template │ │ │ │ │ - 333 Dune::FieldVector,dimR> & │ │ │ │ │ -334 tensor(const std::integral_constant &dorderVar) │ │ │ │ │ - 335 { │ │ │ │ │ - 336 return Base::tensor(dorderVar); │ │ │ │ │ - 337 } │ │ │ │ │ - 338 Dune::FieldVector,dimR> & │ │ │ │ │ -339 tensor(const std::integral_constant &dorderVar) │ │ │ │ │ - 340 { │ │ │ │ │ - 341 return tensor_; │ │ │ │ │ - 342 } │ │ │ │ │ -343 Dune::FieldVector tensor_; │ │ │ │ │ - 344 }; │ │ │ │ │ - 345 │ │ │ │ │ - 346 template │ │ │ │ │ -347 struct Derivatives │ │ │ │ │ - 348 { │ │ │ │ │ -349 typedef Derivatives This; │ │ │ │ │ -350 typedef LFETensor ThisLFETensor; │ │ │ │ │ - 351 │ │ │ │ │ -352 typedef F Field; │ │ │ │ │ -353 typedef F field_type; │ │ │ │ │ - 354 │ │ │ │ │ -355 static const DerivativeLayoutNS::DerivativeLayout layout = │ │ │ │ │ -DerivativeLayoutNS::value; │ │ │ │ │ -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 Block; │ │ │ │ │ - 360 │ │ │ │ │ - 361 template │ │ │ │ │ -362 This &operator=(const FF& f) │ │ │ │ │ - 363 { │ │ │ │ │ - 364 for (int r=0; r(f); │ │ │ │ │ - 366 return *this; │ │ │ │ │ - 367 } │ │ │ │ │ -368 This &operator=(const Dune::FieldVector &t) │ │ │ │ │ - 369 { │ │ │ │ │ - 370 tensor_ = t; │ │ │ │ │ - 371 return *this; │ │ │ │ │ - 372 } │ │ │ │ │ - 373 │ │ │ │ │ -374 This &operator=(const Block &t) │ │ │ │ │ - 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 │ │ │ │ │ -391 void assign(const Derivatives &y) │ │ │ │ │ - 392 { │ │ │ │ │ - 393 field_cast(y.block(),block()); │ │ │ │ │ - 394 } │ │ │ │ │ - 395 template │ │ │ │ │ -396 void assign(const Derivatives &y) │ │ │ │ │ - 397 { │ │ │ │ │ - 398 for (int rr=0; rr()[0]; │ │ │ │ │ - 400 } │ │ │ │ │ - 401 template │ │ │ │ │ -402 void assign(const Derivatives │ │ │ │ │ -&y,unsigned int r) │ │ │ │ │ - 403 { │ │ │ │ │ - 404 assign(y.block(),r); │ │ │ │ │ - 405 } │ │ │ │ │ - 406 template │ │ │ │ │ -407 void assign(unsigned int r,const │ │ │ │ │ -Derivatives &y) │ │ │ │ │ - 408 { │ │ │ │ │ - 409 tensor_[r].assign(y[0]); │ │ │ │ │ - 410 } │ │ │ │ │ - 411 template │ │ │ │ │ -412 void assign(unsigned int r,const │ │ │ │ │ -Derivatives &y) │ │ │ │ │ - 413 { │ │ │ │ │ - 414 tensor_[r].assign(y[0][0]); │ │ │ │ │ - 415 } │ │ │ │ │ - 416 │ │ │ │ │ -417 Block &block() │ │ │ │ │ - 418 { │ │ │ │ │ - 419 return reinterpret_cast(*this); │ │ │ │ │ - 420 } │ │ │ │ │ -421 const Block &block() const │ │ │ │ │ - 422 { │ │ │ │ │ - 423 return reinterpret_cast(*this); │ │ │ │ │ - 424 } │ │ │ │ │ - 425 │ │ │ │ │ -426 ThisLFETensor &operator[](int r) { │ │ │ │ │ - 427 return tensor_[r]; │ │ │ │ │ - 428 } │ │ │ │ │ -429 const ThisLFETensor &operator[](int r) const { │ │ │ │ │ - 430 return tensor_[r]; │ │ │ │ │ - 431 } │ │ │ │ │ - 432 template │ │ │ │ │ -433 const Dune::FieldVector,dimR> &tensor() const │ │ │ │ │ - 434 { │ │ │ │ │ - 435 return tensor_; │ │ │ │ │ - 436 } │ │ │ │ │ -437 Dune::FieldVector,dimR> &tensor() │ │ │ │ │ - 438 { │ │ │ │ │ - 439 return tensor_; │ │ │ │ │ - 440 } │ │ │ │ │ - 441 template │ │ │ │ │ -442 const Dune::FieldVector::size*dimR> &block() │ │ │ │ │ -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 │ │ │ │ │ -449 Dune::FieldVector::size*dimR> &block() │ │ │ │ │ - 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> & │ │ │ │ │ -458 tensor(const std::integral_constant &dorderVar) const │ │ │ │ │ - 459 { │ │ │ │ │ - 460 return tensor_; │ │ │ │ │ - 461 } │ │ │ │ │ - 462 Dune::FieldVector,dimR> & │ │ │ │ │ -463 tensor(const std::integral_constant &dorderVar) │ │ │ │ │ - 464 { │ │ │ │ │ - 465 return tensor_; │ │ │ │ │ - 466 } │ │ │ │ │ - 467 template │ │ │ │ │ -468 void assign(const Derivatives &y) │ │ │ │ │ - 469 { │ │ │ │ │ - 470 for (int rr=0; rr()[0]; │ │ │ │ │ - 472 } │ │ │ │ │ - 473 template │ │ │ │ │ -474 void assign(const FieldVector &y,unsigned int r) │ │ │ │ │ - 475 { │ │ │ │ │ - 476 tensor_[0] = reinterpret_cast&> │ │ │ │ │ -(y[r*ThisLFETensor::size]); │ │ │ │ │ - 477 } │ │ │ │ │ - 478 template │ │ │ │ │ -479 void assign(unsigned int r,const FieldVector &y) │ │ │ │ │ - 480 { │ │ │ │ │ - 481 tensor_[r] = y; │ │ │ │ │ - 482 } │ │ │ │ │ -483 Dune::FieldVector tensor_; │ │ │ │ │ - 484 }; │ │ │ │ │ - 485 │ │ │ │ │ - 486 // Implemnetation for DerivativeLayoutNS::derivative based layout │ │ │ │ │ - 487 template │ │ │ │ │ -488 struct Derivatives │ │ │ │ │ - 489 { │ │ │ │ │ -490 typedef Derivatives This; │ │ │ │ │ -491 typedef Derivatives ScalarDeriv; │ │ │ │ │ - 492 │ │ │ │ │ -493 typedef F Field; │ │ │ │ │ -494 typedef F field_type; │ │ │ │ │ - 495 │ │ │ │ │ -496 static const DerivativeLayoutNS::DerivativeLayout layout = │ │ │ │ │ -DerivativeLayoutNS::value; │ │ │ │ │ -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 Block; │ │ │ │ │ - 501 │ │ │ │ │ - 502 template │ │ │ │ │ -503 This &operator=(const FF& f) │ │ │ │ │ - 504 { │ │ │ │ │ - 505 block() = field_cast(f); │ │ │ │ │ - 506 return *this; │ │ │ │ │ - 507 } │ │ │ │ │ -508 This &operator=(const Block &t) │ │ │ │ │ - 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 │ │ │ │ │ -521 void axpy(const FF &a, const This &y) │ │ │ │ │ - 522 { │ │ │ │ │ - 523 block().axpy(field_cast(a),y.block()); │ │ │ │ │ - 524 } │ │ │ │ │ - 525 // assign with same layout (only different Field) │ │ │ │ │ - 526 template │ │ │ │ │ -527 void assign(const Derivatives &y) │ │ │ │ │ - 528 { │ │ │ │ │ - 529 field_cast(y.block(),block()); │ │ │ │ │ - 530 } │ │ │ │ │ - 531 // assign with different layout (same dimRange) │ │ │ │ │ - 532 template │ │ │ │ │ -533 void assign(const Derivatives │ │ │ │ │ -&y) │ │ │ │ │ - 534 { │ │ │ │ │ - 535 for (unsigned int rr=0; rr │ │ │ │ │ -540 void assign(unsigned int r,const Derivatives &y) │ │ │ │ │ - 541 { │ │ │ │ │ - 542 deriv_[r].assign(r,y); │ │ │ │ │ - 543 } │ │ │ │ │ - 544 │ │ │ │ │ -545 Block &block() │ │ │ │ │ - 546 { │ │ │ │ │ - 547 return reinterpret_cast(*this); │ │ │ │ │ - 548 } │ │ │ │ │ -549 const Block &block() const │ │ │ │ │ - 550 { │ │ │ │ │ - 551 return reinterpret_cast(*this); │ │ │ │ │ - 552 } │ │ │ │ │ - 553 │ │ │ │ │ -554 ScalarDeriv &operator[](int r) { │ │ │ │ │ - 555 return deriv_[r]; │ │ │ │ │ - 556 } │ │ │ │ │ -557 const ScalarDeriv &operator[](int r) const { │ │ │ │ │ - 558 return deriv_[r]; │ │ │ │ │ - 559 } │ │ │ │ │ - 560 protected: │ │ │ │ │ -561 Dune::FieldVector deriv_; │ │ │ │ │ - 562 }; │ │ │ │ │ - 563 │ │ │ │ │ - 564 // ****************************************** │ │ │ │ │ - 565 // AXPY ************************************* │ │ │ │ │ - 566 // ****************************************** │ │ │ │ │ - 567 template │ │ │ │ │ -568 struct LFETensorAxpy │ │ │ │ │ - 569 { │ │ │ │ │ - 570 template │ │ │ │ │ -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 │ │ │ │ │ -581 struct LFETensorAxpy,Vec2,deriv> │ │ │ │ │ - 582 { │ │ │ │ │ -583 typedef Derivatives Vec1; │ │ │ │ │ - 584 template │ │ │ │ │ -585 static void apply(unsigned int r,const Field &a, │ │ │ │ │ - 586 const Vec1 &x, Vec2 &y) │ │ │ │ │ - 587 { │ │ │ │ │ - 588 const FieldVector &xx = x.template block(); │ │ │ │ │ - 589 for (int i=0; i │ │ │ │ │ -597 struct LFETensorAxpy,Vec2,deriv> │ │ │ │ │ - 598 { │ │ │ │ │ -599 typedef Derivatives Vec1; │ │ │ │ │ - 600 template │ │ │ │ │ -601 static void apply(unsigned int r,const Field &a, │ │ │ │ │ - 602 const Vec1 &x, Vec2 &y) │ │ │ │ │ - 603 { │ │ │ │ │ - 604 for (int rr=0; rr, │ │ │ │ │ - 606 Vec2,deriv>::apply(rr,a,x[rr],y); │ │ │ │ │ - 607 } │ │ │ │ │ - 608 }; │ │ │ │ │ - 609 template │ │ │ │ │ -613 struct LFETensorAxpy,Vec2,deriv> │ │ │ │ │ - 614 { │ │ │ │ │ -615 typedef Derivatives Vec1; │ │ │ │ │ - 616 template │ │ │ │ │ -617 static void apply(unsigned int r,const Field &a, │ │ │ │ │ - 618 const Vec1 &x, Vec2 &y) │ │ │ │ │ - 619 { │ │ │ │ │ - 620 LFETensorAxpy, │ │ │ │ │ - 621 Vec2,deriv>::apply(r,a,x[0],y); │ │ │ │ │ - 622 } │ │ │ │ │ - 623 }; │ │ │ │ │ - 624 template │ │ │ │ │ -628 struct LFETensorAxpy,Vec2,deriv> │ │ │ │ │ - 629 { │ │ │ │ │ -630 typedef Derivatives Vec1; │ │ │ │ │ - 631 template │ │ │ │ │ -632 static void apply(unsigned int r,const Field &a, │ │ │ │ │ - 633 const Vec1 &x, Vec2 &y) │ │ │ │ │ - 634 { │ │ │ │ │ - 635 typedef LFETensor 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 │ │ │ │ │ -647 struct DerivativeAssign │ │ │ │ │ - 648 { │ │ │ │ │ -649 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ - 650 { │ │ │ │ │ - 651 field_cast(vec1,vec2); │ │ │ │ │ - 652 } │ │ │ │ │ - 653 }; │ │ │ │ │ - 654 template │ │ │ │ │ -656 struct DerivativeAssign, │ │ │ │ │ - 657 Derivatives > │ │ │ │ │ - 658 { │ │ │ │ │ -659 typedef Derivatives Vec1; │ │ │ │ │ -660 typedef Derivatives Vec2; │ │ │ │ │ -661 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ - 662 { │ │ │ │ │ - 663 field_cast(vec1.block(),vec2.block()); │ │ │ │ │ - 664 } │ │ │ │ │ - 665 }; │ │ │ │ │ - 666 template │ │ │ │ │ -668 struct DerivativeAssign, │ │ │ │ │ - 669 Derivatives > │ │ │ │ │ - 670 { │ │ │ │ │ -671 typedef Derivatives Vec1; │ │ │ │ │ -672 typedef Derivatives │ │ │ │ │ -Vec2; │ │ │ │ │ -673 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ - 674 { │ │ │ │ │ - 675 vec2.assign(vec1); │ │ │ │ │ - 676 } │ │ │ │ │ - 677 }; │ │ │ │ │ - 678 template │ │ │ │ │ -680 struct DerivativeAssign, │ │ │ │ │ - 681 Derivatives > │ │ │ │ │ - 682 { │ │ │ │ │ -683 typedef Derivatives │ │ │ │ │ -Vec1; │ │ │ │ │ -684 typedef Derivatives Vec2; │ │ │ │ │ -685 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ - 686 { │ │ │ │ │ - 687 vec2.assign(vec1); │ │ │ │ │ - 688 } │ │ │ │ │ - 689 }; │ │ │ │ │ - 690 template │ │ │ │ │ -692 struct DerivativeAssign, │ │ │ │ │ - 693 Derivatives > │ │ │ │ │ - 694 { │ │ │ │ │ -695 typedef Derivatives Vec1; │ │ │ │ │ -696 typedef Derivatives Vec2; │ │ │ │ │ -697 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ - 698 { │ │ │ │ │ - 699 vec2.assign(r,vec1); │ │ │ │ │ - 700 } │ │ │ │ │ - 701 }; │ │ │ │ │ - 702 template │ │ │ │ │ -704 struct DerivativeAssign, │ │ │ │ │ - 705 Derivatives > │ │ │ │ │ - 706 { │ │ │ │ │ -707 typedef Derivatives Vec1; │ │ │ │ │ -708 typedef Derivatives │ │ │ │ │ -Vec2; │ │ │ │ │ -709 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ - 710 { │ │ │ │ │ - 711 vec2.assign(r,vec1); │ │ │ │ │ - 712 } │ │ │ │ │ - 713 }; │ │ │ │ │ - 714 template │ │ │ │ │ -716 struct DerivativeAssign, │ │ │ │ │ - 717 Derivatives > │ │ │ │ │ - 718 { │ │ │ │ │ -719 typedef Derivatives Vec1; │ │ │ │ │ -720 typedef Derivatives Vec2; │ │ │ │ │ -721 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ - 722 { │ │ │ │ │ - 723 field_cast(vec1.block(),vec2.block()); │ │ │ │ │ - 724 } │ │ │ │ │ - 725 }; │ │ │ │ │ - 726 template │ │ │ │ │ -728 struct DerivativeAssign, │ │ │ │ │ - 729 Derivatives > │ │ │ │ │ - 730 { │ │ │ │ │ -731 typedef Derivatives Vec1; │ │ │ │ │ -732 typedef Derivatives Vec2; │ │ │ │ │ -733 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ - 734 { │ │ │ │ │ - 735 field_cast(vec1.block(),vec2.block()); │ │ │ │ │ - 736 } │ │ │ │ │ - 737 }; │ │ │ │ │ - 738 template │ │ │ │ │ -740 struct DerivativeAssign, │ │ │ │ │ - 741 Derivatives > │ │ │ │ │ - 742 { │ │ │ │ │ -743 typedef Derivatives Vec1; │ │ │ │ │ -744 typedef Derivatives Vec2; │ │ │ │ │ -745 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ - 746 { │ │ │ │ │ - 747 field_cast(vec1.block(),vec2.block()); │ │ │ │ │ - 748 } │ │ │ │ │ - 749 }; │ │ │ │ │ - 750 template │ │ │ │ │ -752 struct DerivativeAssign, │ │ │ │ │ - 753 Derivatives > │ │ │ │ │ - 754 { │ │ │ │ │ -755 typedef Derivatives Vec1; │ │ │ │ │ -756 typedef Derivatives Vec2; │ │ │ │ │ -757 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ - 758 { │ │ │ │ │ - 759 field_cast(vec1.block(),vec2.block()); │ │ │ │ │ - 760 } │ │ │ │ │ - 761 }; │ │ │ │ │ - 762 template │ │ │ │ │ -764 struct DerivativeAssign, │ │ │ │ │ - 765 F2 > │ │ │ │ │ - 766 { │ │ │ │ │ -767 typedef Derivatives Vec1; │ │ │ │ │ -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 │ │ │ │ │ -777 struct DerivativeAssign,FieldVector > │ │ │ │ │ - 778 { │ │ │ │ │ -779 typedef Derivatives Vec1; │ │ │ │ │ -780 typedef FieldVector 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 │ │ │ │ │ -789 struct DerivativeAssign,FieldVector > │ │ │ │ │ - 790 { │ │ │ │ │ -791 typedef Derivatives │ │ │ │ │ -Vec1; │ │ │ │ │ -792 typedef FieldVector Vec2; │ │ │ │ │ -793 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ - 794 { │ │ │ │ │ - 795 for (int rr=0; rr()[0].block(),vec2[rr]); │ │ │ │ │ - 797 } │ │ │ │ │ - 798 }; │ │ │ │ │ - 799 template │ │ │ │ │ -802 struct DerivativeAssign,FieldVector > │ │ │ │ │ - 803 { │ │ │ │ │ -804 typedef Derivatives Vec1; │ │ │ │ │ -805 typedef FieldVector 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 │ │ │ │ │ -814 struct DerivativeAssign,FieldVector > │ │ │ │ │ - 815 { │ │ │ │ │ -816 typedef Derivatives Vec1; │ │ │ │ │ -817 typedef FieldVector 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 │ │ │ │ │ -826 struct DerivativeAssign,FieldVector > │ │ │ │ │ - 827 { │ │ │ │ │ -828 typedef Derivatives Vec1; │ │ │ │ │ -829 typedef FieldVector 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 │ │ │ │ │ -838 struct DerivativeAssign,FieldVector > │ │ │ │ │ - 839 { │ │ │ │ │ -840 typedef Derivatives Vec1; │ │ │ │ │ -841 typedef FieldVector 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 │ │ │ │ │ -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 │ │ │ │ │ - 858 std::ostream &operator<<( 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 &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 │ │ │ │ │ -872 std::ostream &operator<<( std::ostream &out, const Derivatives< │ │ │ │ │ -F,dimD,dimR,deriv,DerivativeLayoutNS::derivative_> &d ) │ │ │ │ │ - 873 { │ │ │ │ │ - 874 out << " ( "; │ │ │ │ │ - 875 out << d[0]; │ │ │ │ │ - 876 for (int r=1; r │ │ │ │ │ -884 std::ostream &operator<<( std::ostream &out, const Derivatives< │ │ │ │ │ -F,dimD,dimR,deriv,DerivativeLayoutNS::value_> &d ) │ │ │ │ │ - 885 { │ │ │ │ │ - 886 out << static_cast &>(d); │ │ │ │ │ - 887 out << " ( "; │ │ │ │ │ - 888 out << d[0]; │ │ │ │ │ - 889 for (int r=1; r │ │ │ │ │ -897 std::ostream &operator<<( std::ostream &out, const Derivatives< │ │ │ │ │ -F,dimD,dimR,0,DerivativeLayoutNS::derivative_> &d ) │ │ │ │ │ - 898 { │ │ │ │ │ - 899 out << " ( "; │ │ │ │ │ - 900 out << d[0]; │ │ │ │ │ - 901 for (int r=1; r │ │ │ │ │ -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 │ │ │ │ │ -921 std::ostream &operator<<( std::ostream &out, const std::vector > &y ) │ │ │ │ │ - 922 { │ │ │ │ │ - 923 out << "Number of basis functions: " << y.size() << std::endl; │ │ │ │ │ - 924 for (unsigned int i=0; i &mat) │ │ │ │ │ -Definition lfematrix.hh:152 │ │ │ │ │ -Dune::DerivativeLayoutNS::DerivativeLayout │ │ │ │ │ -DerivativeLayout │ │ │ │ │ -Definition tensor.hh:168 │ │ │ │ │ -Dune::DerivativeLayoutNS::derivative │ │ │ │ │ -@ derivative │ │ │ │ │ -Definition tensor.hh:168 │ │ │ │ │ -Dune::DerivativeLayoutNS::value │ │ │ │ │ -@ value │ │ │ │ │ -Definition tensor.hh:168 │ │ │ │ │ -Dune::LFETensor │ │ │ │ │ -Definition tensor.hh:33 │ │ │ │ │ -Dune::LFETensor::block │ │ │ │ │ -const Block & block() const │ │ │ │ │ -Definition tensor.hh:76 │ │ │ │ │ -Dune::LFETensor::operator*= │ │ │ │ │ -This & operator*=(const field_type &f) │ │ │ │ │ -Definition tensor.hh:56 │ │ │ │ │ -Dune::LFETensor::Block │ │ │ │ │ -Dune::FieldVector< F, size > Block │ │ │ │ │ -Definition tensor.hh:41 │ │ │ │ │ -Dune::LFETensor::operator= │ │ │ │ │ -This & operator=(const FF &f) │ │ │ │ │ -Definition tensor.hh:44 │ │ │ │ │ -Dune::LFETensor::block_ │ │ │ │ │ -Block block_ │ │ │ │ │ -Definition tensor.hh:89 │ │ │ │ │ -Dune::LFETensor::field_type │ │ │ │ │ -F field_type │ │ │ │ │ -Definition tensor.hh:39 │ │ │ │ │ -Dune::LFETensor::axpy │ │ │ │ │ -void axpy(const F &a, const This &y) │ │ │ │ │ -Definition tensor.hh:80 │ │ │ │ │ -Dune::LFETensor::block │ │ │ │ │ -Block & block() │ │ │ │ │ -Definition tensor.hh:72 │ │ │ │ │ -Dune::LFETensor::assign │ │ │ │ │ -void assign(const LFETensor< Fy, dimD, deriv > &y) │ │ │ │ │ -Definition tensor.hh:85 │ │ │ │ │ -Dune::LFETensor::size │ │ │ │ │ -static const unsigned int size │ │ │ │ │ -Definition tensor.hh:40 │ │ │ │ │ -Dune::LFETensor::operator[] │ │ │ │ │ -const field_type & operator[](const unsigned int i) const │ │ │ │ │ -Definition tensor.hh:62 │ │ │ │ │ -Dune::LFETensor<_F,_dimD,_0_> │ │ │ │ │ -Definition tensor.hh:107 │ │ │ │ │ -Dune::LFETensor<_F,_dimD,_0_>::block │ │ │ │ │ -Block & block() │ │ │ │ │ -Definition tensor.hh:154 │ │ │ │ │ -Dune::LFETensor<_F,_dimD,_0_>::field_type │ │ │ │ │ -F field_type │ │ │ │ │ -Definition tensor.hh:111 │ │ │ │ │ -Dune::LFETensor<_F,_dimD,_0_>::block_ │ │ │ │ │ -Block block_ │ │ │ │ │ -Definition tensor.hh:162 │ │ │ │ │ -Dune::LFETensor<_F,_dimD,_0_>::assign │ │ │ │ │ -void assign(const LFETensor< Fy, dimD, 0 > &y) │ │ │ │ │ -Definition tensor.hh:149 │ │ │ │ │ -Dune::LFETensor<_F,_dimD,_0_>::block │ │ │ │ │ -const Block & block() const │ │ │ │ │ -Definition tensor.hh:158 │ │ │ │ │ -Dune::LFETensor<_F,_dimD,_0_>::axpy │ │ │ │ │ -void axpy(const F &a, const This &y) │ │ │ │ │ -Definition tensor.hh:144 │ │ │ │ │ -Dune::LFETensor<_F,_dimD,_0_>::Block │ │ │ │ │ -Dune::FieldVector< F, size > Block │ │ │ │ │ -Definition tensor.hh:113 │ │ │ │ │ -Dune::Derivatives │ │ │ │ │ -Definition tensor.hh:172 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_> │ │ │ │ │ -Definition tensor.hh:178 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::Field │ │ │ │ │ -F Field │ │ │ │ │ -Definition tensor.hh:183 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::This │ │ │ │ │ -Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::value > This │ │ │ │ │ -Definition tensor.hh:179 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ -This & operator=(const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > │ │ │ │ │ -&t) │ │ │ │ │ -Definition tensor.hh:203 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>:: │ │ │ │ │ -field_type │ │ │ │ │ -F field_type │ │ │ │ │ -Definition tensor.hh:184 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::Base │ │ │ │ │ -Derivatives< F, dimD, dimR, deriv-1, DerivativeLayoutNS::value > Base │ │ │ │ │ -Definition tensor.hh:180 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ -const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor(const │ │ │ │ │ -std::integral_constant< int, dorder > &dorderVar) const │ │ │ │ │ -Definition tensor.hh:323 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(const FieldVector< Fy, size *dimRy > &y, unsigned int r) │ │ │ │ │ -Definition tensor.hh:301 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::value │ │ │ │ │ -> &y) │ │ │ │ │ -Definition tensor.hh:227 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, dy, DerivativeLayoutNS:: │ │ │ │ │ -derivative > &y) │ │ │ │ │ -Definition tensor.hh:314 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ -This & operator=(const F &f) │ │ │ │ │ -Definition tensor.hh:192 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::operator │ │ │ │ │ -[] │ │ │ │ │ -const ThisLFETensor & operator[](int r) const │ │ │ │ │ -Definition tensor.hh:296 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::block │ │ │ │ │ -Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block() │ │ │ │ │ -Definition tensor.hh:287 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>:: │ │ │ │ │ -ThisLFETensor │ │ │ │ │ -LFETensor< F, dimD, deriv > ThisLFETensor │ │ │ │ │ -Definition tensor.hh:181 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, │ │ │ │ │ -DerivativeLayoutNS::value > &y) │ │ │ │ │ -Definition tensor.hh:247 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::block │ │ │ │ │ -const Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block │ │ │ │ │ -() const │ │ │ │ │ -Definition tensor.hh:280 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ -Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor(const std:: │ │ │ │ │ -integral_constant< int, dorder > &dorderVar) │ │ │ │ │ -Definition tensor.hh:334 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::block │ │ │ │ │ -const Block & block() const │ │ │ │ │ -Definition tensor.hh:261 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::axpy │ │ │ │ │ -void axpy(const F &a, const This &y) │ │ │ │ │ -Definition tensor.hh:220 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS:: │ │ │ │ │ -derivative > &y) │ │ │ │ │ -Definition tensor.hh:233 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ -This & operator=(const Dune::FieldVector< ThisLFETensor, dimR > &t) │ │ │ │ │ -Definition tensor.hh:197 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, │ │ │ │ │ -DerivativeLayoutNS::derivative > &y) │ │ │ │ │ -Definition tensor.hh:252 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ -This & operator=(const Block &t) │ │ │ │ │ -Definition tensor.hh:208 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::Block │ │ │ │ │ -Dune::FieldVector< F, size > Block │ │ │ │ │ -Definition tensor.hh:190 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor_ │ │ │ │ │ -Dune::FieldVector< ThisLFETensor, dimR > tensor_ │ │ │ │ │ -Definition tensor.hh:343 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ -Dune::FieldVector< LFETensor< F, dimD, deriv >, dimR > & tensor(const std:: │ │ │ │ │ -integral_constant< int, deriv > &dorderVar) │ │ │ │ │ -Definition tensor.hh:339 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ -Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor() │ │ │ │ │ -Definition tensor.hh:274 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimRy, deriv, DerivativeLayoutNS:: │ │ │ │ │ -value > &y, unsigned int r) │ │ │ │ │ -Definition tensor.hh:241 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ -const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor() const │ │ │ │ │ -Definition tensor.hh:267 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ -const Dune::FieldVector< LFETensor< F, dimD, deriv >, dimR > & tensor(const │ │ │ │ │ -std::integral_constant< int, deriv > &dorderVar) const │ │ │ │ │ -Definition tensor.hh:328 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::operator │ │ │ │ │ -[] │ │ │ │ │ -ThisLFETensor & operator[](int r) │ │ │ │ │ -Definition tensor.hh:293 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::block │ │ │ │ │ -Block & block() │ │ │ │ │ -Definition tensor.hh:257 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(unsigned int r, const FieldVector< Fy, size/dimR > &y) │ │ │ │ │ -Definition tensor.hh:307 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_> │ │ │ │ │ -Definition tensor.hh:348 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::operator[] │ │ │ │ │ -ThisLFETensor & operator[](int r) │ │ │ │ │ -Definition tensor.hh:426 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::ThisLFETensor │ │ │ │ │ -LFETensor< F, dimD, 0 > ThisLFETensor │ │ │ │ │ -Definition tensor.hh:350 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::block │ │ │ │ │ -Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block() │ │ │ │ │ -Definition tensor.hh:449 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ -Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor(const std:: │ │ │ │ │ -integral_constant< int, 0 > &dorderVar) │ │ │ │ │ -Definition tensor.hh:463 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, 0, DerivativeLayoutNS::value > │ │ │ │ │ -&y) │ │ │ │ │ -Definition tensor.hh:391 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::Field │ │ │ │ │ -F Field │ │ │ │ │ -Definition tensor.hh:352 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::This │ │ │ │ │ -Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::value > This │ │ │ │ │ -Definition tensor.hh:349 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, dy, DerivativeLayoutNS:: │ │ │ │ │ -derivative > &y) │ │ │ │ │ -Definition tensor.hh:468 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimRy, 0, DerivativeLayoutNS::value > │ │ │ │ │ -&y, unsigned int r) │ │ │ │ │ -Definition tensor.hh:402 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ -const Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor() const │ │ │ │ │ -Definition tensor.hh:433 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ -Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor() │ │ │ │ │ -Definition tensor.hh:437 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ -This & operator=(const Block &t) │ │ │ │ │ -Definition tensor.hh:374 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::field_type │ │ │ │ │ -F field_type │ │ │ │ │ -Definition tensor.hh:353 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::operator[] │ │ │ │ │ -const ThisLFETensor & operator[](int r) const │ │ │ │ │ -Definition tensor.hh:429 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ -const Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor(const std:: │ │ │ │ │ -integral_constant< int, 0 > &dorderVar) const │ │ │ │ │ -Definition tensor.hh:458 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::Block │ │ │ │ │ -Dune::FieldVector< F, size > Block │ │ │ │ │ -Definition tensor.hh:359 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::block │ │ │ │ │ -const Block & block() const │ │ │ │ │ -Definition tensor.hh:421 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::block │ │ │ │ │ -const Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block │ │ │ │ │ -() const │ │ │ │ │ -Definition tensor.hh:442 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(unsigned int r, const Derivatives< Fy, dimD, 1, 0, │ │ │ │ │ -DerivativeLayoutNS::derivative > &y) │ │ │ │ │ -Definition tensor.hh:412 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, 0, DerivativeLayoutNS:: │ │ │ │ │ -derivative > &y) │ │ │ │ │ -Definition tensor.hh:396 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(unsigned int r, const Derivatives< Fy, dimD, 1, 0, │ │ │ │ │ -DerivativeLayoutNS::value > &y) │ │ │ │ │ -Definition tensor.hh:407 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ -This & operator=(const Dune::FieldVector< ThisLFETensor, dimR > &t) │ │ │ │ │ -Definition tensor.hh:368 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(const FieldVector< Fy, size *dimRy > &y, unsigned int r) │ │ │ │ │ -Definition tensor.hh:474 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::tensor_ │ │ │ │ │ -Dune::FieldVector< ThisLFETensor, dimR > tensor_ │ │ │ │ │ -Definition tensor.hh:483 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ -void assign(unsigned int r, const FieldVector< Fy, size/dimR > &y) │ │ │ │ │ -Definition tensor.hh:479 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ -This & operator=(const FF &f) │ │ │ │ │ -Definition tensor.hh:362 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::block │ │ │ │ │ -Block & block() │ │ │ │ │ -Definition tensor.hh:417 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::axpy │ │ │ │ │ -void axpy(const F &a, const This &y) │ │ │ │ │ -Definition tensor.hh:386 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_> │ │ │ │ │ -Definition tensor.hh:489 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -operator= │ │ │ │ │ -This & operator=(const FF &f) │ │ │ │ │ -Definition tensor.hh:503 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -block │ │ │ │ │ -Block & block() │ │ │ │ │ -Definition tensor.hh:545 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -Field │ │ │ │ │ -F Field │ │ │ │ │ -Definition tensor.hh:493 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -block │ │ │ │ │ -const Block & block() const │ │ │ │ │ -Definition tensor.hh:549 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -field_type │ │ │ │ │ -F field_type │ │ │ │ │ -Definition tensor.hh:494 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -assign │ │ │ │ │ -void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, layouty > │ │ │ │ │ -&y) │ │ │ │ │ -Definition tensor.hh:540 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -operator[] │ │ │ │ │ -ScalarDeriv & operator[](int r) │ │ │ │ │ -Definition tensor.hh:554 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -assign │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::value │ │ │ │ │ -> &y) │ │ │ │ │ -Definition tensor.hh:533 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>::This │ │ │ │ │ -Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::derivative > This │ │ │ │ │ -Definition tensor.hh:490 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -ScalarDeriv │ │ │ │ │ -Derivatives< F, dimD, 1, deriv, DerivativeLayoutNS::value > ScalarDeriv │ │ │ │ │ -Definition tensor.hh:491 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -operator[] │ │ │ │ │ -const ScalarDeriv & operator[](int r) const │ │ │ │ │ -Definition tensor.hh:557 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>::axpy │ │ │ │ │ -void axpy(const FF &a, const This &y) │ │ │ │ │ -Definition tensor.hh:521 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -operator= │ │ │ │ │ -This & operator=(const Block &t) │ │ │ │ │ -Definition tensor.hh:508 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -Block │ │ │ │ │ -Dune::FieldVector< F, size > Block │ │ │ │ │ -Definition tensor.hh:500 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -deriv_ │ │ │ │ │ -Dune::FieldVector< ScalarDeriv, dimR > deriv_ │ │ │ │ │ -Definition tensor.hh:561 │ │ │ │ │ -Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ -assign │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS:: │ │ │ │ │ -derivative > &y) │ │ │ │ │ -Definition tensor.hh:527 │ │ │ │ │ -Dune::LFETensorAxpy │ │ │ │ │ -Definition tensor.hh:569 │ │ │ │ │ -Dune::LFETensorAxpy::apply │ │ │ │ │ -static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ -Definition tensor.hh:571 │ │ │ │ │ -Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_dimR,_d,_DerivativeLayoutNS::value │ │ │ │ │ ->,_Vec2,_deriv_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ -Definition tensor.hh:585 │ │ │ │ │ -Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_dimR,_d,_DerivativeLayoutNS::value │ │ │ │ │ ->,_Vec2,_deriv_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -Definition tensor.hh:583 │ │ │ │ │ -Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_dimR,_d,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_Vec2,_deriv_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -Definition tensor.hh:599 │ │ │ │ │ -Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_dimR,_d,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_Vec2,_deriv_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ -Definition tensor.hh:601 │ │ │ │ │ -Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_1,_d,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_Vec2,_deriv_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -Definition tensor.hh:615 │ │ │ │ │ -Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_1,_d,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_Vec2,_deriv_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ -Definition tensor.hh:617 │ │ │ │ │ -Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_1,_d,_DerivativeLayoutNS::value_>, │ │ │ │ │ -Vec2,_deriv_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ -Definition tensor.hh:632 │ │ │ │ │ -Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_1,_d,_DerivativeLayoutNS::value_>, │ │ │ │ │ -Vec2,_deriv_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -Definition tensor.hh:630 │ │ │ │ │ -Dune::DerivativeAssign │ │ │ │ │ -Definition tensor.hh:648 │ │ │ │ │ -Dune::DerivativeAssign::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:649 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv,_layout_>, │ │ │ │ │ -Derivatives<_F2,_dimD,_dimR,_deriv,_layout_>_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, deriv, layout > Vec1 │ │ │ │ │ -Definition tensor.hh:659 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv,_layout_>, │ │ │ │ │ -Derivatives<_F2,_dimD,_dimR,_deriv,_layout_>_>::Vec2 │ │ │ │ │ -Derivatives< F2, dimD, dimR, deriv, layout > Vec2 │ │ │ │ │ -Definition tensor.hh:660 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv,_layout_>, │ │ │ │ │ -Derivatives<_F2,_dimD,_dimR,_deriv,_layout_>_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:661 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::value_>,_Derivatives<_F2,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::derivative_>_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -Definition tensor.hh:671 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::value_>,_Derivatives<_F2,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::derivative_>_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:673 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::value_>,_Derivatives<_F2,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::derivative_>_>::Vec2 │ │ │ │ │ -Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ -Definition tensor.hh:672 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::derivative_>,_Derivatives<_F2,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::value_>_>::Vec2 │ │ │ │ │ -Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ -Definition tensor.hh:684 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::derivative_>,_Derivatives<_F2,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::value_>_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -Definition tensor.hh:683 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::derivative_>,_Derivatives<_F2,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::value_>_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:685 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_Derivatives< │ │ │ │ │ -F2,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, layout > Vec1 │ │ │ │ │ -Definition tensor.hh:695 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_Derivatives< │ │ │ │ │ -F2,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:697 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_Derivatives< │ │ │ │ │ -F2,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>_>::Vec2 │ │ │ │ │ -Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ -Definition tensor.hh:696 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_Derivatives< │ │ │ │ │ -F2,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, layout > Vec1 │ │ │ │ │ -Definition tensor.hh:707 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_Derivatives< │ │ │ │ │ -F2,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:709 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_Derivatives< │ │ │ │ │ -F2,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>_>::Vec2 │ │ │ │ │ -Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ -Definition tensor.hh:708 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -value_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::value_>_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -Definition tensor.hh:719 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -value_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::value_>_>::Vec2 │ │ │ │ │ -Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ -Definition tensor.hh:720 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -value_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::value_>_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:721 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::derivative_> │ │ │ │ │ ->::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -Definition tensor.hh:731 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::derivative_> │ │ │ │ │ ->::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:733 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::derivative_> │ │ │ │ │ ->::Vec2 │ │ │ │ │ -Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ -Definition tensor.hh:732 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::value_>_>:: │ │ │ │ │ -Vec2 │ │ │ │ │ -Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ -Definition tensor.hh:744 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::value_>_>:: │ │ │ │ │ -apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:745 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::value_>_>:: │ │ │ │ │ -Vec1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -Definition tensor.hh:743 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -value_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::derivative_>_>:: │ │ │ │ │ -Vec2 │ │ │ │ │ -Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ -Definition tensor.hh:756 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -value_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::derivative_>_>:: │ │ │ │ │ -apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:757 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -value_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::derivative_>_>:: │ │ │ │ │ -Vec1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -Definition tensor.hh:755 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_F2_>::Vec2 │ │ │ │ │ -F2 Vec2 │ │ │ │ │ -Definition tensor.hh:768 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_F2_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:769 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_F2_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, layout > Vec1 │ │ │ │ │ -Definition tensor.hh:767 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::value_>,_FieldVector<_F2,_dimR_>_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -Definition tensor.hh:779 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::value_>,_FieldVector<_F2,_dimR_>_>::Vec2 │ │ │ │ │ -FieldVector< F2, dimR > Vec2 │ │ │ │ │ -Definition tensor.hh:780 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::value_>,_FieldVector<_F2,_dimR_>_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:781 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::derivative_>,_FieldVector<_F2,_dimR_>_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -Definition tensor.hh:791 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::derivative_>,_FieldVector<_F2,_dimR_>_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:793 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ -DerivativeLayoutNS::derivative_>,_FieldVector<_F2,_dimR_>_>::Vec2 │ │ │ │ │ -FieldVector< F2, dimR > Vec2 │ │ │ │ │ -Definition tensor.hh:792 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -value_>,_FieldVector<_F2,_dimR_>_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -Definition tensor.hh:804 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -value_>,_FieldVector<_F2,_dimR_>_>::Vec2 │ │ │ │ │ -FieldVector< F2, dimR > Vec2 │ │ │ │ │ -Definition tensor.hh:805 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -value_>,_FieldVector<_F2,_dimR_>_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:806 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_FieldVector<_F2,_dimR_>_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:818 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_FieldVector<_F2,_dimR_>_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -Definition tensor.hh:816 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_FieldVector<_F2,_dimR_>_>::Vec2 │ │ │ │ │ -FieldVector< F2, dimR > Vec2 │ │ │ │ │ -Definition tensor.hh:817 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -value_>,_FieldVector<_F2,_1_>_>::Vec2 │ │ │ │ │ -FieldVector< F2, 1 > Vec2 │ │ │ │ │ -Definition tensor.hh:829 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -value_>,_FieldVector<_F2,_1_>_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -Definition tensor.hh:828 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -value_>,_FieldVector<_F2,_1_>_>::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:830 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_FieldVector<_F2,_1_>_>::Vec1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -Definition tensor.hh:840 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_FieldVector<_F2,_1_>_>::apply │ │ │ │ │ -static void apply(unsigned int, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:842 │ │ │ │ │ -Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ -derivative_>,_FieldVector<_F2,_1_>_>::Vec2 │ │ │ │ │ -FieldVector< F2, 1 > Vec2 │ │ │ │ │ -Definition tensor.hh:841 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalInterpolation │ │ │ │ │ +Definition hierarchicalprismp2localinterpolation.hh:18 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Definition hierarchicalprismp2localinterpolation.hh:22 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00014.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lfematrix.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalprismp2localbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,47 +65,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
lfematrix.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
hierarchicalprismp2localbasis.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "field.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::LFEMatrix< F >
class  Dune::HierarchicalPrismP2LocalBasis< D, R >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

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

│ │ │ │ -Functions

template<class Field >
std::ostream & Dune::operator<< (std::ostream &out, const LFEMatrix< Field > &mat)
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Hierarchical prism p2 shape functions for the simplex.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,28 +6,28 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -Classes | Namespaces | Functions │ │ │ │ │ -lfematrix.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "field.hh" │ │ │ │ │ + * hierarchical │ │ │ │ │ + * hierarchicalprismp2 │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +hierarchicalprismp2localbasis.hh File Reference │ │ │ │ │ +Hierarchical prism p2 shape functions for the simplex. More... │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::LFEMatrix<_F_> │ │ │ │ │ +class  Dune::HierarchicalPrismP2LocalBasis<_D,_R_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Functions │ │ │ │ │ -template │ │ │ │ │ -std::ostream & Dune::operator<< (std::ostream &out, const LFEMatrix< Field > │ │ │ │ │ - &mat) │ │ │ │ │ -  │ │ │ │ │ +***** Detailed Description ***** │ │ │ │ │ +Hierarchical prism p2 shape functions for the simplex. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00014_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lfematrix.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalprismp2localbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,230 +70,271 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lfematrix.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_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include "field.hh"
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
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 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 unsigned int rows () const
│ │ │ │ -
59 {
│ │ │ │ -
60 return rows_;
│ │ │ │ -
61 }
│ │ │ │ -
│ │ │ │ -
62
│ │ │ │ -
│ │ │ │ -
63 unsigned int cols () const
│ │ │ │ -
64 {
│ │ │ │ -
65 return cols_;
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
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 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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,228 +7,284 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -lfematrix.hh │ │ │ │ │ + * hierarchical │ │ │ │ │ + * hierarchicalprismp2 │ │ │ │ │ +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_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH │ │ │ │ │ + 5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include "field.hh" │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 16 template< class F > │ │ │ │ │ -17 class LFEMatrix │ │ │ │ │ - 18 { │ │ │ │ │ - 19 typedef LFEMatrix<_F_> This; │ │ │ │ │ - 20 typedef std::vector< F > Row; │ │ │ │ │ - 21 typedef std::vector 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 │ │ │ │ │ -37 void row( const unsigned int row, Vector &vec ) const │ │ │ │ │ - 38 { │ │ │ │ │ - 39 assert(row │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16 │ │ │ │ │ + 17#include │ │ │ │ │ + 18 │ │ │ │ │ + 19namespace Dune │ │ │ │ │ + 20{ │ │ │ │ │ + 21 template │ │ │ │ │ +22 class HierarchicalPrismP2LocalBasis │ │ │ │ │ + 23 { │ │ │ │ │ + 24 public: │ │ │ │ │ +26 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, Dune::FieldMatrix > Traits; │ │ │ │ │ + 27 │ │ │ │ │ +29 unsigned int size () const │ │ │ │ │ + 30 { │ │ │ │ │ + 31 return 18; │ │ │ │ │ + 32 } │ │ │ │ │ + 33 │ │ │ │ │ +35 void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ + 36 std::vector & out) const │ │ │ │ │ + 37 { │ │ │ │ │ + 38 out.resize(18); │ │ │ │ │ + 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 unsigned int rows () const │ │ │ │ │ - 59 { │ │ │ │ │ - 60 return rows_; │ │ │ │ │ - 61 } │ │ │ │ │ - 62 │ │ │ │ │ -63 unsigned int cols () const │ │ │ │ │ - 64 { │ │ │ │ │ - 65 return cols_; │ │ │ │ │ - 66 } │ │ │ │ │ - 67 │ │ │ │ │ -68 const Field *rowPtr ( const unsigned int row ) const │ │ │ │ │ + 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& out) const //return value │ │ │ │ │ 69 { │ │ │ │ │ - 70 assert(row p(rows()); │ │ │ │ │ - 94 for (unsigned int j=0; j max ) │ │ │ │ │ - 104 { │ │ │ │ │ - 105 max = abs( (*this)(i,j) ); │ │ │ │ │ - 106 r = i; │ │ │ │ │ - 107 } │ │ │ │ │ - 108 } │ │ │ │ │ - 109 if (max == Zero()) │ │ │ │ │ - 110 return false; │ │ │ │ │ - 111 // row swap │ │ │ │ │ - 112 if (r > j) │ │ │ │ │ - 113 { │ │ │ │ │ - 114 for (unsigned int k=0; k()/(*this)(j,j); │ │ │ │ │ - 120 for (unsigned int i=0; i │ │ │ │ │ -152 inline std::ostream &operator<<(std::ostream &out, const LFEMatrix │ │ │ │ │ -&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 │ │ │ │ │ -field.hh │ │ │ │ │ + 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& order, │ │ │ │ │ + 150 const typename Traits::DomainType& in, // position │ │ │ │ │ + 151 std::vector& 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::field_cast │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -Definition field.hh:159 │ │ │ │ │ -Dune::operator<< │ │ │ │ │ -std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat) │ │ │ │ │ -Definition lfematrix.hh:152 │ │ │ │ │ -Dune::Unity │ │ │ │ │ -A class representing the unit of a given Field. │ │ │ │ │ -Definition field.hh:30 │ │ │ │ │ -Dune::Zero │ │ │ │ │ -A class representing the zero of a given Field. │ │ │ │ │ -Definition field.hh:79 │ │ │ │ │ -Dune::LFEMatrix │ │ │ │ │ -Definition lfematrix.hh:18 │ │ │ │ │ -Dune::LFEMatrix::rowPtr │ │ │ │ │ -Field * rowPtr(const unsigned int row) │ │ │ │ │ -Definition lfematrix.hh:74 │ │ │ │ │ -Dune::LFEMatrix::cols │ │ │ │ │ -unsigned int cols() const │ │ │ │ │ -Definition lfematrix.hh:63 │ │ │ │ │ -Dune::LFEMatrix::rowPtr │ │ │ │ │ -const Field * rowPtr(const unsigned int row) const │ │ │ │ │ -Definition lfematrix.hh:68 │ │ │ │ │ -Dune::LFEMatrix::resize │ │ │ │ │ -void resize(const unsigned int rows, const unsigned int cols) │ │ │ │ │ -Definition lfematrix.hh:80 │ │ │ │ │ -Dune::LFEMatrix::operator() │ │ │ │ │ -const Field & operator()(const unsigned int row, const unsigned int col) const │ │ │ │ │ -Definition lfematrix.hh:44 │ │ │ │ │ -Dune::LFEMatrix::row │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -Definition lfematrix.hh:37 │ │ │ │ │ -Dune::LFEMatrix::rows │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -Definition lfematrix.hh:58 │ │ │ │ │ -Dune::LFEMatrix::invert │ │ │ │ │ -bool invert() │ │ │ │ │ -Definition lfematrix.hh:89 │ │ │ │ │ -Dune::LFEMatrix::Field │ │ │ │ │ -F Field │ │ │ │ │ -Definition lfematrix.hh:24 │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalBasis │ │ │ │ │ +Definition hierarchicalprismp2localbasis.hh:23 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalBasis::Traits │ │ │ │ │ +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 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition hierarchicalprismp2localbasis.hh:29 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition hierarchicalprismp2localbasis.hh:231 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition hierarchicalprismp2localbasis.hh:35 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition hierarchicalprismp2localbasis.hh:67 │ │ │ │ │ +localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00017.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interpolationhelper.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalp2withelementbubble.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
interpolationhelper.hh File Reference
│ │ │ │ +
hierarchicalp2withelementbubble.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/concept.hh>
│ │ │ │ -#include <dune/localfunctions/utility/field.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.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

struct  Dune::InterpolationHelper< F, dimension >
 
struct  Dune::InterpolationHelper< F, dimension >::Helper< Func, Vector, true >
 
struct  Dune::InterpolationHelper< F, dimension >::Helper< Basis, Matrix, false >
class  Dune::HierarchicalP2WithElementBubbleLocalFiniteElement< D, R, dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,31 +6,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ + * hierarchical │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -interpolationhelper.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +hierarchicalp2withelementbubble.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  Dune::InterpolationHelper<_F,_dimension_> │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::InterpolationHelper<_F,_dimension_>::Helper<_Func,_Vector,_true │ │ │ │ │ - > │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::InterpolationHelper<_F,_dimension_>::Helper<_Basis,_Matrix, │ │ │ │ │ - false_> │ │ │ │ │ +class  Dune::HierarchicalP2WithElementBubbleLocalFiniteElement<_D,_R,_dim_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00017_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interpolationhelper.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalp2withelementbubble.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,215 +70,119 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
interpolationhelper.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 GENERIC_INTERPOLATIONHELPER_HH
│ │ │ │ -
6#define GENERIC_INTERPOLATIONHELPER_HH
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │
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);
│ │ │ │ + │ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 template <class DomainVector,
│ │ │ │ -
58 std::enable_if_t<models<Impl::FunctionWithCallOperator<DomainVector>, Func>(), int> = 0>
│ │ │ │ +
57
│ │ │ │
│ │ │ │ -
59 const Result &evaluate(const DomainVector &x) const
│ │ │ │ -
60 {
│ │ │ │ -
61 field_cast(func_(x), tmp_[0] );
│ │ │ │ -
62 return tmp_;
│ │ │ │ -
63 }
│ │ │ │ +
59 unsigned int size () const
│ │ │ │ +
60 {
│ │ │ │ +
61 return basis_.size();
│ │ │ │ +
62 }
│ │ │ │
│ │ │ │ -
64 template <class DomainVector,
│ │ │ │ -
65 std::enable_if_t<not models<Impl::FunctionWithCallOperator<DomainVector>, Func>(), int> = 0>
│ │ │ │ +
63
│ │ │ │
│ │ │ │ -
66 const Result &evaluate(const DomainVector &x) const
│ │ │ │ +
66 static constexpr GeometryType type ()
│ │ │ │
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -7,225 +7,140 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -interpolationhelper.hh │ │ │ │ │ + * hierarchical │ │ │ │ │ +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 GENERIC_INTERPOLATIONHELPER_HH │ │ │ │ │ - 6#define GENERIC_INTERPOLATIONHELPER_HH │ │ │ │ │ + 5#ifndef DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 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 > │ │ │ │ │ -21 struct InterpolationHelper │ │ │ │ │ - 22 { │ │ │ │ │ - 23 template │ │ │ │ │ -24 struct Helper; │ │ │ │ │ - 25 }; │ │ │ │ │ - 26 template │ │ │ │ │ - 27 template │ │ │ │ │ -28 struct InterpolationHelper::Helper │ │ │ │ │ - 29 // Func is of Function type │ │ │ │ │ - 30 { │ │ │ │ │ -31 typedef std::vector< Dune::FieldVector > 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 │ │ │ │ │ -42 void set(unsigned int row,unsigned int col, │ │ │ │ │ - 43 const Fy &val) │ │ │ │ │ - 44 { │ │ │ │ │ - 45 assert(col==0); │ │ │ │ │ - 46 assert(row │ │ │ │ │ -50 void add(unsigned int row,unsigned int col, │ │ │ │ │ - 51 const Fy &val) │ │ │ │ │ - 52 { │ │ │ │ │ - 53 assert(col==0); │ │ │ │ │ - 54 assert(row(val); │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13 │ │ │ │ │ + 14namespace Dune │ │ │ │ │ + 15{ │ │ │ │ │ + 16 │ │ │ │ │ + 19 template │ │ │ │ │ +20 class HierarchicalP2WithElementBubbleLocalFiniteElement │ │ │ │ │ + 21 { │ │ │ │ │ + 22 │ │ │ │ │ + 23 static_assert(dim==2, "HierarchicalP2WithElementBubbleLocalFiniteElement │ │ │ │ │ +only implemented for dim==2."); │ │ │ │ │ + 24 │ │ │ │ │ + 25 public: │ │ │ │ │ + 28 typedef │ │ │ │ │ +LocalFiniteElementTraits, │ │ │ │ │ + 29 HierarchicalSimplexP2WithElementBubbleLocalCoefficients, │ │ │ │ │ +30 │ │ │ │ │ +HierarchicalSimplexP2WithElementBubbleLocalInterpolation │ │ │ │ │ +> > Traits; │ │ │ │ │ + 31 │ │ │ │ │ +34 HierarchicalP2WithElementBubbleLocalFiniteElement () │ │ │ │ │ + 35 {} │ │ │ │ │ + 36 │ │ │ │ │ +39 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 40 { │ │ │ │ │ + 41 return basis_; │ │ │ │ │ + 42 } │ │ │ │ │ + 43 │ │ │ │ │ +46 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 47 { │ │ │ │ │ + 48 return coefficients_; │ │ │ │ │ + 49 } │ │ │ │ │ + 50 │ │ │ │ │ +53 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 54 { │ │ │ │ │ + 55 return interpolation_; │ │ │ │ │ 56 } │ │ │ │ │ - 57 template , Func> │ │ │ │ │ -(), int> = 0> │ │ │ │ │ -59 const Result &evaluate(const DomainVector &x) const │ │ │ │ │ + 57 │ │ │ │ │ +59 unsigned int size () const │ │ │ │ │ 60 { │ │ │ │ │ - 61 field_cast(func_(x), tmp_[0] ); │ │ │ │ │ - 62 return tmp_; │ │ │ │ │ - 63 } │ │ │ │ │ - 64 template , │ │ │ │ │ -Func>(), int> = 0> │ │ │ │ │ -66 const Result &evaluate(const DomainVector &x) const │ │ │ │ │ + 61 return basis_.size(); │ │ │ │ │ + 62 } │ │ │ │ │ + 63 │ │ │ │ │ +66 static constexpr GeometryType type () │ │ │ │ │ 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 │ │ │ │ │ - 84 template │ │ │ │ │ -85 struct InterpolationHelper::Helper │ │ │ │ │ - 86 // Func is of Basis type │ │ │ │ │ - 87 { │ │ │ │ │ -88 typedef std::vector< Dune::FieldVector > 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 │ │ │ │ │ -102 void set(unsigned int row,unsigned int col, │ │ │ │ │ - 103 const Fy &val) │ │ │ │ │ - 104 { │ │ │ │ │ - 105 assert(col │ │ │ │ │ -110 void add(unsigned int row,unsigned int col, │ │ │ │ │ - 111 const Fy &val) │ │ │ │ │ - 112 { │ │ │ │ │ - 113 assert(col │ │ │ │ │ -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 │ │ │ │ │ -field.hh │ │ │ │ │ + 68 return GeometryTypes::triangle; │ │ │ │ │ + 69 } │ │ │ │ │ + 70 │ │ │ │ │ + 71 private: │ │ │ │ │ + 72 HierarchicalSimplexP2WithElementBubbleLocalBasis basis_; │ │ │ │ │ + 73 │ │ │ │ │ + 74 HierarchicalSimplexP2WithElementBubbleLocalCoefficients coefficients_; │ │ │ │ │ + 75 │ │ │ │ │ + 76 │ │ │ │ │ +HierarchicalSimplexP2WithElementBubbleLocalInterpolation │ │ │ │ │ +> interpolation_; │ │ │ │ │ + 77 }; │ │ │ │ │ + 78 │ │ │ │ │ + 79} │ │ │ │ │ + 80 │ │ │ │ │ + 81#endif │ │ │ │ │ +hierarchicalsimplexp2withelementbubble.hh │ │ │ │ │ +Hierarchical p2 shape functions for the simplex. │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::field_cast │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -Definition field.hh:159 │ │ │ │ │ -Dune::InterpolationHelper │ │ │ │ │ -Definition interpolationhelper.hh:22 │ │ │ │ │ -Dune::InterpolationHelper::Helper │ │ │ │ │ -Definition interpolationhelper.hh:24 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::add │ │ │ │ │ -void add(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ -Definition interpolationhelper.hh:50 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::func_ │ │ │ │ │ -const Func & func_ │ │ │ │ │ -Definition interpolationhelper.hh:79 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::Helper │ │ │ │ │ -Helper(const Func &func, Vector &vec) │ │ │ │ │ -Definition interpolationhelper.hh:32 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::evaluate │ │ │ │ │ -const Result & evaluate(const DomainVector &x) const │ │ │ │ │ -Definition interpolationhelper.hh:59 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::Result │ │ │ │ │ -std::vector< Dune::FieldVector< F, d > > Result │ │ │ │ │ -Definition interpolationhelper.hh:31 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::size │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::HierarchicalP2WithElementBubbleLocalFiniteElement │ │ │ │ │ +Definition hierarchicalp2withelementbubble.hh:21 │ │ │ │ │ +Dune::HierarchicalP2WithElementBubbleLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< HierarchicalSimplexP2WithElementBubbleLocalBasis< D, │ │ │ │ │ +R, dim >, HierarchicalSimplexP2WithElementBubbleLocalCoefficients< dim >, │ │ │ │ │ +HierarchicalSimplexP2WithElementBubbleLocalInterpolation< │ │ │ │ │ +HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, dim > > > Traits │ │ │ │ │ +Definition hierarchicalp2withelementbubble.hh:30 │ │ │ │ │ +Dune::HierarchicalP2WithElementBubbleLocalFiniteElement::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Definition interpolationhelper.hh:75 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::vec_ │ │ │ │ │ -Vector & vec_ │ │ │ │ │ -Definition interpolationhelper.hh:80 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::set │ │ │ │ │ -void set(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ -Definition interpolationhelper.hh:42 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::tmp_ │ │ │ │ │ -Result tmp_ │ │ │ │ │ -Definition interpolationhelper.hh:81 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::operator() │ │ │ │ │ -const Vector::value_type & operator()(unsigned int row, unsigned int col) │ │ │ │ │ -Definition interpolationhelper.hh:37 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::basis_ │ │ │ │ │ -const Basis & basis_ │ │ │ │ │ -Definition interpolationhelper.hh:128 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::evaluate │ │ │ │ │ -const Result & evaluate(const DomainVector &x) const │ │ │ │ │ -Definition interpolationhelper.hh:118 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::operator() │ │ │ │ │ -F & operator()(unsigned int row, unsigned int col) │ │ │ │ │ -Definition interpolationhelper.hh:97 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::set │ │ │ │ │ -void set(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ -Definition interpolationhelper.hh:102 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::Helper │ │ │ │ │ -Helper(const Basis &basis, Matrix &matrix) │ │ │ │ │ -Definition interpolationhelper.hh:89 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Definition interpolationhelper.hh:123 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::tmp_ │ │ │ │ │ -Result tmp_ │ │ │ │ │ -Definition interpolationhelper.hh:130 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::add │ │ │ │ │ -void add(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ -Definition interpolationhelper.hh:110 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::Result │ │ │ │ │ -std::vector< Dune::FieldVector< F, d > > Result │ │ │ │ │ -Definition interpolationhelper.hh:88 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::matrix_ │ │ │ │ │ -Matrix & matrix_ │ │ │ │ │ -Definition interpolationhelper.hh:129 │ │ │ │ │ -Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::operator() │ │ │ │ │ -const F & operator()(unsigned int row, unsigned int col) const │ │ │ │ │ -Definition interpolationhelper.hh:93 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition hierarchicalp2withelementbubble.hh:59 │ │ │ │ │ +Dune::HierarchicalP2WithElementBubbleLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition hierarchicalp2withelementbubble.hh:39 │ │ │ │ │ +Dune::HierarchicalP2WithElementBubbleLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition hierarchicalp2withelementbubble.hh:46 │ │ │ │ │ +Dune::HierarchicalP2WithElementBubbleLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition hierarchicalp2withelementbubble.hh:53 │ │ │ │ │ +Dune::HierarchicalP2WithElementBubbleLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition hierarchicalp2withelementbubble.hh:66 │ │ │ │ │ +Dune::HierarchicalP2WithElementBubbleLocalFiniteElement:: │ │ │ │ │ +HierarchicalP2WithElementBubbleLocalFiniteElement │ │ │ │ │ +HierarchicalP2WithElementBubbleLocalFiniteElement() │ │ │ │ │ +Definition hierarchicalp2withelementbubble.hh:34 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:26 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients │ │ │ │ │ +The local finite element needed for the Zou-Kornhuber estimator for Signorini │ │ │ │ │ +problems. │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:414 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalInterpolation │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:456 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00020.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 {} │ │ │ │ │ @@ -6,35 +6,46 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ + * hierarchical │ │ │ │ │ + * hierarchicalp2withelementbubble │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -polynomialbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +hierarchicalsimplexp2withelementbubble.hh File Reference │ │ │ │ │ +Hierarchical p2 shape functions for the simplex. More... │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ - class  Dune::PolynomialBasis<_Eval,_CM,_D,_R_> │ │ │ │ │ +class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_dim_> │ │ │ │ │   │ │ │ │ │ -struct  Dune::PolynomialBasis<_Eval,_CM,_D,_R_>::Convert<_dummy,_DVector_> │ │ │ │ │ +class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_> │ │ │ │ │ +  Hierarchical P2 basis in 1d. More... │ │ │ │ │   │ │ │ │ │ -struct  Dune::PolynomialBasis<_Eval,_CM,_D,_R_>::Convert<_dummy,_DomainVector │ │ │ │ │ - > │ │ │ │ │ +class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_> │ │ │ │ │ +  Hierarchical P2 basis in 1d. More... │ │ │ │ │   │ │ │ │ │ - class  Dune::PolynomialBasisWithMatrix<_Eval,_CM,_D,_R_> │ │ │ │ │ +class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_> │ │ │ │ │ +  Hierarchical P2 basis in 1d. More... │ │ │ │ │ +  │ │ │ │ │ +class  Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients<_dim_> │ │ │ │ │ +  The local finite element needed for the Zou-Kornhuber estimator for │ │ │ │ │ + Signorini problems. More... │ │ │ │ │ +  │ │ │ │ │ +class  Dune::HierarchicalSimplexP2WithElementBubbleLocalInterpolation<_LB_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ +***** Detailed Description ***** │ │ │ │ │ +Hierarchical p2 shape functions for the simplex. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00020_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 {} │ │ │ │ │ @@ -7,540 +7,549 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -polynomialbasis.hh │ │ │ │ │ + * hierarchical │ │ │ │ │ + * hierarchicalp2withelementbubble │ │ │ │ │ +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 │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ 14 │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ - 19 │ │ │ │ │ - 20namespace Dune │ │ │ │ │ - 21{ │ │ │ │ │ - 22 │ │ │ │ │ - 23 // PolynomialBasis │ │ │ │ │ - 24 // --------------- │ │ │ │ │ - 25 │ │ │ │ │ - 63 template< class Eval, class CM, class D=double, class R=double > │ │ │ │ │ -64 class PolynomialBasis │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ + 17 │ │ │ │ │ + 18#include │ │ │ │ │ + 19#include │ │ │ │ │ + 20#include │ │ │ │ │ + 21 │ │ │ │ │ + 22namespace Dune │ │ │ │ │ + 23{ │ │ │ │ │ + 24 template │ │ │ │ │ +25 class HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ + 26 { │ │ │ │ │ + 27 public: │ │ │ │ │ +28 HierarchicalSimplexP2WithElementBubbleLocalBasis() │ │ │ │ │ + 29 { │ │ │ │ │ + 30 DUNE_THROW(Dune::NotImplemented,"HierarchicalSimplexP2LocalBasis not │ │ │ │ │ +implemented for dim > 3."); │ │ │ │ │ + 31 } │ │ │ │ │ + 32 }; │ │ │ │ │ + 33 │ │ │ │ │ + 48 template │ │ │ │ │ +49 class HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ + 50 { │ │ │ │ │ + 51 public: │ │ │ │ │ + 53 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +54 Dune::FieldMatrix > 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& out) const │ │ │ │ │ 65 { │ │ │ │ │ - 66 typedef PolynomialBasis<_Eval,_CM_> This; │ │ │ │ │ - 67 typedef Eval Evaluator; │ │ │ │ │ - 68 │ │ │ │ │ - 69 public: │ │ │ │ │ -70 typedef CM CoefficientMatrix; │ │ │ │ │ - 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; │ │ │ │ │ - 76 typedef LocalBasisTraits, │ │ │ │ │ - 77 R,dimRange,FieldVector, │ │ │ │ │ -78 FieldMatrix > Traits; │ │ │ │ │ -79 typedef typename Evaluator::Basis Basis; │ │ │ │ │ -80 typedef typename Evaluator::DomainVector DomainVector; │ │ │ │ │ - 81 template │ │ │ │ │ -82 using HessianFyType = │ │ │ │ │ -FieldVector,dimRange>; │ │ │ │ │ -83 using HessianType = HessianFyType; │ │ │ │ │ + 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& 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 │ │ │ │ │ -85 PolynomialBasis (const Basis &basis, │ │ │ │ │ - 86 const CoefficientMatrix &coeffMatrix, │ │ │ │ │ - 87 unsigned int size) │ │ │ │ │ - 88 : basis_(basis), │ │ │ │ │ - 89 coeffMatrix_(&coeffMatrix), │ │ │ │ │ - 90 eval_(basis), │ │ │ │ │ - 91 order_(basis.order()), │ │ │ │ │ - 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_; │ │ │ │ │ +86 void partial (const std::array& order, │ │ │ │ │ + 87 const typename Traits::DomainType& 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 │ │ │ │ │ -108 unsigned int order () const │ │ │ │ │ - 109 { │ │ │ │ │ - 110 return order_; │ │ │ │ │ - 111 } │ │ │ │ │ - 112 │ │ │ │ │ -113 unsigned int size () const │ │ │ │ │ - 114 { │ │ │ │ │ - 115 return size_; │ │ │ │ │ - 116 } │ │ │ │ │ + 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& 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& 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& out) const // return value │ │ │ │ │ - 137 { │ │ │ │ │ - 138 out.resize(size()); │ │ │ │ │ - 139 hessian(x,out); │ │ │ │ │ - 140 } │ │ │ │ │ - 141 │ │ │ │ │ -143 void partial (const std::array& order, │ │ │ │ │ - 144 const typename Traits::DomainType& in, // position │ │ │ │ │ - 145 std::vector& 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 jacs(out.size()); │ │ │ │ │ - 154 unsigned int k; │ │ │ │ │ - 155 for (unsigned int i=0;i hesss(out.size()); │ │ │ │ │ - 164 int k=-1,l=-1; │ │ │ │ │ - 165 for (unsigned int i=0;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 │ │ │ │ │ -182 void evaluate ( const DomainVector &x, F *values ) const │ │ │ │ │ - 183 { │ │ │ │ │ - 184 coeffMatrix_->mult( eval_.template evaluate( 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( bx, values ); │ │ │ │ │ - 194 } │ │ │ │ │ - 195 │ │ │ │ │ - 196 template │ │ │ │ │ -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 │ │ │ │ │ -209 struct Convert │ │ │ │ │ - 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()); │ │ │ │ │ - 220 const DomainVector &bx = Convert::apply(x); │ │ │ │ │ - 221 coeffMatrix_->mult( eval_.template evaluate( bx ), values ); │ │ │ │ │ - 222 } │ │ │ │ │ - 223 │ │ │ │ │ - 224 template │ │ │ │ │ -225 void evaluate ( const DomainVector &x, std::vector │ │ │ │ │ -> &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( eval_.template evaluate( x ), │ │ │ │ │ -values ); │ │ │ │ │ - 244 } │ │ │ │ │ - 245 template< unsigned int deriv, class Fy > │ │ │ │ │ -246 void evaluateSingle ( const DomainVector &x, │ │ │ │ │ - 247 std::vector< FieldVector:: │ │ │ │ │ -size>,dimRange> > &values) const │ │ │ │ │ - 248 { │ │ │ │ │ - 249 evaluateSingle(x,reinterpret_cast::size*dimRange> >&>(values)); │ │ │ │ │ - 250 } │ │ │ │ │ - 251 template< unsigned int deriv, class Fy > │ │ │ │ │ -252 void evaluateSingle ( const DomainVector &x, │ │ │ │ │ - 253 std::vector< FieldVector,dimRange> > │ │ │ │ │ -&values) const │ │ │ │ │ - 254 { │ │ │ │ │ - 255 evaluateSingle(x,reinterpret_cast::size*dimRange> >&>(values)); │ │ │ │ │ - 256 } │ │ │ │ │ - 257 │ │ │ │ │ - 258 template │ │ │ │ │ -259 void jacobian ( const DomainVector &x, │ │ │ │ │ - 260 std::vector > &values ) const │ │ │ │ │ - 261 { │ │ │ │ │ - 262 assert(values.size()>=size()); │ │ │ │ │ - 263 evaluateSingle<1>(x,reinterpret_cast >&>(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 │ │ │ │ │ -275 void hessian ( const DomainVector &x, │ │ │ │ │ - 276 std::vector> &values ) const │ │ │ │ │ + 138 template │ │ │ │ │ +139 class HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ + 140 { │ │ │ │ │ + 141 public: │ │ │ │ │ + 143 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +144 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ + 190 const typename Traits::DomainType& 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 │ │ │ │ │ +229 unsigned int order () const │ │ │ │ │ + 230 { │ │ │ │ │ + 231 return 3; │ │ │ │ │ + 232 } │ │ │ │ │ + 233 │ │ │ │ │ + 234 }; │ │ │ │ │ + 235 │ │ │ │ │ + 260 template │ │ │ │ │ +261 class HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ + 262 { │ │ │ │ │ + 263 public: │ │ │ │ │ + 265 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +266 Dune::FieldMatrix > Traits; │ │ │ │ │ + 267 │ │ │ │ │ +269 unsigned int size () const │ │ │ │ │ + 270 { │ │ │ │ │ + 271 return 11; │ │ │ │ │ + 272 } │ │ │ │ │ + 273 │ │ │ │ │ +275 void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ + 276 std::vector& 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, dimRange> │ │ │ │ │ - 281 const unsigned int hsize = LFETensor::size; │ │ │ │ │ - 282 std::vector< FieldVector< FieldVector, 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 >&>(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 │ │ │ │ │ -317 void integrate ( std::vector &values ) const │ │ │ │ │ - 318 { │ │ │ │ │ - 319 assert(values.size()>=size()); │ │ │ │ │ - 320 coeffMatrix_->mult( eval_.template integrate(), values ); │ │ │ │ │ - 321 } │ │ │ │ │ - 322 │ │ │ │ │ - 323 protected: │ │ │ │ │ -324 PolynomialBasis(const PolynomialBasis &other) │ │ │ │ │ - 325 : basis_(other.basis_), │ │ │ │ │ - 326 coeffMatrix_(other.coeffMatrix_), │ │ │ │ │ - 327 eval_(basis_), │ │ │ │ │ - 328 order_(basis_.order()), │ │ │ │ │ - 329 size_(other.size_) │ │ │ │ │ - 330 {} │ │ │ │ │ -331 PolynomialBasis &operator=(const PolynomialBasis&); │ │ │ │ │ -332 const Basis &basis_; │ │ │ │ │ -333 const CoefficientMatrix* coeffMatrix_; │ │ │ │ │ -334 mutable Evaluator eval_; │ │ │ │ │ -335 unsigned int order_,size_; │ │ │ │ │ - 336 }; │ │ │ │ │ - 337 │ │ │ │ │ - 344 template< class Eval, class CM = SparseCoeffMatrix, │ │ │ │ │ - 345 class D=double, class R=double> │ │ │ │ │ -346 class PolynomialBasisWithMatrix │ │ │ │ │ - 347 : public PolynomialBasis< Eval, CM, D, R > │ │ │ │ │ - 348 { │ │ │ │ │ - 349 public: │ │ │ │ │ -350 typedef CM CoefficientMatrix; │ │ │ │ │ - 351 │ │ │ │ │ - 352 private: │ │ │ │ │ - 353 typedef Eval Evaluator; │ │ │ │ │ - 354 │ │ │ │ │ - 355 typedef PolynomialBasisWithMatrix<_Evaluator,_CM_> This; │ │ │ │ │ - 356 typedef PolynomialBasis Base; │ │ │ │ │ - 357 │ │ │ │ │ - 358 public: │ │ │ │ │ -359 typedef typename Base::Basis Basis; │ │ │ │ │ - 360 │ │ │ │ │ -361 PolynomialBasisWithMatrix (const Basis &basis) │ │ │ │ │ - 362 : Base(basis,coeffMatrix_,0) │ │ │ │ │ - 363 {} │ │ │ │ │ - 364 │ │ │ │ │ - 365 template │ │ │ │ │ -366 void fill(const Matrix& matrix) │ │ │ │ │ - 367 { │ │ │ │ │ - 368 coeffMatrix_.fill(matrix); │ │ │ │ │ - 369 this->size_ = coeffMatrix_.size(); │ │ │ │ │ - 370 } │ │ │ │ │ - 371 template │ │ │ │ │ -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: │ │ │ │ │ - 380 PolynomialBasisWithMatrix(const PolynomialBasisWithMatrix &); │ │ │ │ │ - 381 PolynomialBasisWithMatrix &operator=(const PolynomialBasisWithMatrix &); │ │ │ │ │ - 382 CoefficientMatrix coeffMatrix_; │ │ │ │ │ - 383 }; │ │ │ │ │ - 384} │ │ │ │ │ - 385#endif // DUNE_POLYNOMIALBASIS_HH │ │ │ │ │ -monomialbasis.hh │ │ │ │ │ -basisevaluator.hh │ │ │ │ │ -multiindex.hh │ │ │ │ │ -coeffmatrix.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& 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& order, │ │ │ │ │ + 319 const typename Traits::DomainType& 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 │ │ │ │ │ +379 unsigned int order () const │ │ │ │ │ + 380 { │ │ │ │ │ + 381 return 4; │ │ │ │ │ + 382 } │ │ │ │ │ + 383 │ │ │ │ │ + 384 }; │ │ │ │ │ + 385 │ │ │ │ │ + 386 │ │ │ │ │ + 412 template │ │ │ │ │ +413 class HierarchicalSimplexP2WithElementBubbleLocalCoefficients │ │ │ │ │ + 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: │ │ │ │ │ +423 HierarchicalSimplexP2WithElementBubbleLocalCoefficients () │ │ │ │ │ + 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 li; │ │ │ │ │ + 452 }; │ │ │ │ │ + 453 │ │ │ │ │ + 454 template │ │ │ │ │ +455 class HierarchicalSimplexP2WithElementBubbleLocalInterpolation │ │ │ │ │ + 456 { │ │ │ │ │ + 457 public: │ │ │ │ │ + 458 │ │ │ │ │ + 460 template │ │ │ │ │ +461 void interpolate (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 HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ +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 │ │ │ │ │ +localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::field_cast │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -Definition field.hh:159 │ │ │ │ │ Dune::LocalBasisTraits │ │ │ │ │ Type traits for LocalBasisVirtualInterface. │ │ │ │ │ Definition common/localbasis.hh:34 │ │ │ │ │ Dune::LocalBasisTraits::DomainType │ │ │ │ │ D DomainType │ │ │ │ │ domain type │ │ │ │ │ Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::PolynomialBasis │ │ │ │ │ -Definition polynomialbasis.hh:65 │ │ │ │ │ -Dune::PolynomialBasis::evaluate │ │ │ │ │ -void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ -Definition polynomialbasis.hh:230 │ │ │ │ │ -Dune::PolynomialBasis::evaluate │ │ │ │ │ -void evaluate(const DomainVector &x, std::vector< FieldVector< Fy, dimRange > > │ │ │ │ │ -&values) const │ │ │ │ │ -Definition polynomialbasis.hh:225 │ │ │ │ │ -Dune::PolynomialBasis::PolynomialBasis │ │ │ │ │ -PolynomialBasis(const PolynomialBasis &other) │ │ │ │ │ -Definition polynomialbasis.hh:324 │ │ │ │ │ -Dune::PolynomialBasis::evaluate │ │ │ │ │ -void evaluate(const DVector &x, F *values) const │ │ │ │ │ -Definition polynomialbasis.hh:187 │ │ │ │ │ -Dune::PolynomialBasis::evaluateHessian │ │ │ │ │ -void evaluateHessian(const typename Traits::DomainType &x, std::vector< │ │ │ │ │ -HessianType > &out) const │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:26 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis:: │ │ │ │ │ +HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ +HierarchicalSimplexP2WithElementBubbleLocalBasis() │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:28 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_>:: │ │ │ │ │ +evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition polynomialbasis.hh:135 │ │ │ │ │ -Dune::PolynomialBasis::StorageField │ │ │ │ │ -CoefficientMatrix::Field StorageField │ │ │ │ │ -Definition polynomialbasis.hh:72 │ │ │ │ │ -Dune::PolynomialBasis::dimRange │ │ │ │ │ -static const unsigned int dimRange │ │ │ │ │ -Definition polynomialbasis.hh:75 │ │ │ │ │ -Dune::PolynomialBasis::jacobian │ │ │ │ │ -void jacobian(const DVector &x, RVector &values) const │ │ │ │ │ -Definition polynomialbasis.hh:266 │ │ │ │ │ -Dune::PolynomialBasis::DomainVector │ │ │ │ │ -Evaluator::DomainVector DomainVector │ │ │ │ │ -Definition polynomialbasis.hh:80 │ │ │ │ │ -Dune::PolynomialBasis::Basis │ │ │ │ │ -Evaluator::Basis Basis │ │ │ │ │ -Definition polynomialbasis.hh:79 │ │ │ │ │ -Dune::PolynomialBasis::evaluateSingle │ │ │ │ │ -void evaluateSingle(const DomainVector &x, Vector &values) const │ │ │ │ │ -Definition polynomialbasis.hh:240 │ │ │ │ │ -Dune::PolynomialBasis::evaluateSingle │ │ │ │ │ -void evaluateSingle(const DomainVector &x, std::vector< FieldVector< LFETensor< │ │ │ │ │ -Fy, dimension, deriv >, dimRange > > &values) const │ │ │ │ │ -Definition polynomialbasis.hh:252 │ │ │ │ │ -Dune::PolynomialBasis::jacobian │ │ │ │ │ -void jacobian(const DomainVector &x, std::vector< FieldMatrix< Fy, dimRange, │ │ │ │ │ -dimension > > &values) const │ │ │ │ │ -Definition polynomialbasis.hh:259 │ │ │ │ │ -Dune::PolynomialBasis::matrix │ │ │ │ │ -const CoefficientMatrix & matrix() const │ │ │ │ │ -Definition polynomialbasis.hh:103 │ │ │ │ │ -Dune::PolynomialBasis::basis_ │ │ │ │ │ -const Basis & basis_ │ │ │ │ │ -Definition polynomialbasis.hh:332 │ │ │ │ │ -Dune::PolynomialBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &x, std::vector< │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:75 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_>::Traits │ │ │ │ │ +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 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_>:: │ │ │ │ │ +evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ typename Traits::RangeType > &out) const │ │ │ │ │ Evaluate all shape functions. │ │ │ │ │ -Definition polynomialbasis.hh:119 │ │ │ │ │ -Dune::PolynomialBasis::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition polynomialbasis.hh:74 │ │ │ │ │ -Dune::PolynomialBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &x, std::vector< │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:63 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_>::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions (2, in this case) │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:111 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_>::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:57 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_>::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_>::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:147 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_>::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions (3 in this case) │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:229 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_>:: │ │ │ │ │ +evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:153 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_>:: │ │ │ │ │ +evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ typename Traits::JacobianType > &out) const │ │ │ │ │ Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition polynomialbasis.hh:127 │ │ │ │ │ -Dune::PolynomialBasis::operator= │ │ │ │ │ -PolynomialBasis & operator=(const PolynomialBasis &) │ │ │ │ │ -Dune::PolynomialBasis::coeffMatrix_ │ │ │ │ │ -const CoefficientMatrix * coeffMatrix_ │ │ │ │ │ -Definition polynomialbasis.hh:333 │ │ │ │ │ -Dune::PolynomialBasis::integrate │ │ │ │ │ -void integrate(std::vector< Fy > &values) const │ │ │ │ │ -Definition polynomialbasis.hh:317 │ │ │ │ │ -Dune::PolynomialBasis::size │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:170 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_>::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_>::Traits │ │ │ │ │ +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 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_>::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Definition polynomialbasis.hh:113 │ │ │ │ │ -Dune::PolynomialBasis::evaluate │ │ │ │ │ -void evaluate(const DomainVector &x, F *values) const │ │ │ │ │ -Definition polynomialbasis.hh:182 │ │ │ │ │ -Dune::PolynomialBasis::hessian │ │ │ │ │ -void hessian(const DVector &x, HVector &values) const │ │ │ │ │ -Definition polynomialbasis.hh:307 │ │ │ │ │ -Dune::PolynomialBasis::CoefficientMatrix │ │ │ │ │ -CM CoefficientMatrix │ │ │ │ │ -Definition polynomialbasis.hh:70 │ │ │ │ │ -Dune::PolynomialBasis::HessianType │ │ │ │ │ -HessianFyType< R > HessianType │ │ │ │ │ -Definition polynomialbasis.hh:83 │ │ │ │ │ -Dune::PolynomialBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, dimension, FieldVector< D, dimension >, R, dimRange, │ │ │ │ │ -FieldVector< R, dimRange >, FieldMatrix< R, dimRange, dimension > > Traits │ │ │ │ │ -Definition polynomialbasis.hh:78 │ │ │ │ │ -Dune::PolynomialBasis::order_ │ │ │ │ │ -unsigned int order_ │ │ │ │ │ -Definition polynomialbasis.hh:335 │ │ │ │ │ -Dune::PolynomialBasis::hessian │ │ │ │ │ -void hessian(const DomainVector &x, std::vector< HessianFyType< Fy > > &values) │ │ │ │ │ -const │ │ │ │ │ -Definition polynomialbasis.hh:275 │ │ │ │ │ -Dune::PolynomialBasis::evaluate │ │ │ │ │ -void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ -Definition polynomialbasis.hh:217 │ │ │ │ │ -Dune::PolynomialBasis::PolynomialBasis │ │ │ │ │ -PolynomialBasis(const Basis &basis, const CoefficientMatrix &coeffMatrix, │ │ │ │ │ -unsigned int size) │ │ │ │ │ -Definition polynomialbasis.hh:85 │ │ │ │ │ -Dune::PolynomialBasis::HessianFyType │ │ │ │ │ -FieldVector< FieldMatrix< Fy, dimension, dimension >, dimRange > HessianFyType │ │ │ │ │ -Definition polynomialbasis.hh:82 │ │ │ │ │ -Dune::PolynomialBasis::order │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:269 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_>:: │ │ │ │ │ +evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:275 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_>::order │ │ │ │ │ unsigned int order() const │ │ │ │ │ -Definition polynomialbasis.hh:108 │ │ │ │ │ -Dune::PolynomialBasis::evaluateSingle │ │ │ │ │ -void evaluateSingle(const DomainVector &x, std::vector< FieldVector< │ │ │ │ │ -FieldVector< Fy, LFETensor< Fy, dimension, deriv >::size >, dimRange > > │ │ │ │ │ -&values) const │ │ │ │ │ -Definition polynomialbasis.hh:246 │ │ │ │ │ -Dune::PolynomialBasis::basis │ │ │ │ │ -const Basis & basis() const │ │ │ │ │ -Definition polynomialbasis.hh:98 │ │ │ │ │ -Dune::PolynomialBasis::partial │ │ │ │ │ -void partial(const std::array< unsigned int, dimension > &order, const typename │ │ │ │ │ +Polynomial order of the shape functions (4 in this case) │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:379 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_>:: │ │ │ │ │ +evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:296 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_>::partial │ │ │ │ │ +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 polynomialbasis.hh:143 │ │ │ │ │ -Dune::PolynomialBasis::size_ │ │ │ │ │ -unsigned int size_ │ │ │ │ │ -Definition polynomialbasis.hh:335 │ │ │ │ │ -Dune::PolynomialBasis::eval_ │ │ │ │ │ -Evaluator eval_ │ │ │ │ │ -Definition polynomialbasis.hh:334 │ │ │ │ │ -Dune::PolynomialBasis::Convert │ │ │ │ │ -Definition polynomialbasis.hh:198 │ │ │ │ │ -Dune::PolynomialBasis::Convert::apply │ │ │ │ │ -static DomainVector apply(const DVector &x) │ │ │ │ │ -Definition polynomialbasis.hh:199 │ │ │ │ │ -Dune::PolynomialBasis::Convert<_dummy,_DomainVector_>::apply │ │ │ │ │ -static const DomainVector & apply(const DomainVector &x) │ │ │ │ │ -Definition polynomialbasis.hh:211 │ │ │ │ │ -Dune::PolynomialBasisWithMatrix │ │ │ │ │ -Definition polynomialbasis.hh:348 │ │ │ │ │ -Dune::PolynomialBasisWithMatrix::PolynomialBasisWithMatrix │ │ │ │ │ -PolynomialBasisWithMatrix(const Basis &basis) │ │ │ │ │ -Definition polynomialbasis.hh:361 │ │ │ │ │ -Dune::PolynomialBasisWithMatrix::CoefficientMatrix │ │ │ │ │ -CM CoefficientMatrix │ │ │ │ │ -Definition polynomialbasis.hh:350 │ │ │ │ │ -Dune::PolynomialBasisWithMatrix::fill │ │ │ │ │ -void fill(const Matrix &matrix, int size) │ │ │ │ │ -Definition polynomialbasis.hh:372 │ │ │ │ │ -Dune::PolynomialBasisWithMatrix::Basis │ │ │ │ │ -Base::Basis Basis │ │ │ │ │ -Definition polynomialbasis.hh:359 │ │ │ │ │ -Dune::PolynomialBasisWithMatrix::fill │ │ │ │ │ -void fill(const Matrix &matrix) │ │ │ │ │ -Definition polynomialbasis.hh:366 │ │ │ │ │ -Dune::LFETensor │ │ │ │ │ -Definition tensor.hh:33 │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:318 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_>::Traits │ │ │ │ │ +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 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients │ │ │ │ │ +The local finite element needed for the Zou-Kornhuber estimator for Signorini │ │ │ │ │ +problems. │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:414 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients::size │ │ │ │ │ +size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:439 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients::localKey │ │ │ │ │ +const Dune::LocalKey & localKey(size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:445 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients:: │ │ │ │ │ +HierarchicalSimplexP2WithElementBubbleLocalCoefficients │ │ │ │ │ +HierarchicalSimplexP2WithElementBubbleLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:423 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalInterpolation │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:456 │ │ │ │ │ +Dune::HierarchicalSimplexP2WithElementBubbleLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Local interpolation of a function. │ │ │ │ │ +Definition hierarchicalsimplexp2withelementbubble.hh:461 │ │ │ │ │ localbasis.hh │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00023.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomialbasis.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalprismp2.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,60 +65,35 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
monomialbasis.hh File Reference
│ │ │ │ +
hierarchicalprismp2.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/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::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::HierarchicalPrismP2LocalFiniteElement< D, R >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,51 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ + * hierarchical │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -monomialbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +hierarchicalprismp2.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "hierarchicalprismp2/hierarchicalprismp2localbasis.hh" │ │ │ │ │ +#include "hierarchicalprismp2/hierarchicalprismp2localinterpolation.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::HierarchicalPrismP2LocalFiniteElement<_D,_R_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00023_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomialbasis.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalprismp2.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,1025 +70,122 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
monomialbasis.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_MONOMIALBASIS_HH
│ │ │ │ -
6#define DUNE_MONOMIALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │
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 // -----------------------------
│ │ │ │ -
70
│ │ │ │ -
71 template< GeometryType::Id geometryId >
│ │ │ │ -
72 class MonomialBasisSize;
│ │ │ │ -
73
│ │ │ │ -
74 template< GeometryType::Id geometryId, class F >
│ │ │ │ -
75 class MonomialBasis;
│ │ │ │ -
76
│ │ │ │ -
77
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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 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 {}
│ │ │ │ + │ │ │ │ +
80 };
│ │ │ │
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
81
│ │ │ │ +
82}
│ │ │ │ +
83
│ │ │ │ +
84#endif
│ │ │ │ + │ │ │ │ +
Hierarchical prism 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
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,1115 +7,134 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -monomialbasis.hh │ │ │ │ │ + * hierarchical │ │ │ │ │ +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_MONOMIALBASIS_HH │ │ │ │ │ - 6#define DUNE_MONOMIALBASIS_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 │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ + 13#include "hierarchicalprismp2/hierarchicalprismp2localbasis.hh" │ │ │ │ │ + 14#include "hierarchicalprismp2/hierarchicalprismp2localinterpolation.hh" │ │ │ │ │ 15 │ │ │ │ │ - 16#include │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ + 16 │ │ │ │ │ + 17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ 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. │ │ │ │ │ - 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 // ----------------------------- │ │ │ │ │ - 70 │ │ │ │ │ - 71 template< GeometryType::Id geometryId > │ │ │ │ │ - 72 class MonomialBasisSize; │ │ │ │ │ - 73 │ │ │ │ │ - 74 template< GeometryType::Id geometryId, class F > │ │ │ │ │ - 75 class MonomialBasis; │ │ │ │ │ - 76 │ │ │ │ │ - 77 │ │ │ │ │ + 22 template │ │ │ │ │ +23 class HierarchicalPrismP2LocalFiniteElement │ │ │ │ │ + 24 { │ │ │ │ │ + 25 │ │ │ │ │ + 26 │ │ │ │ │ + 27 public: │ │ │ │ │ + 30 typedef LocalFiniteElementTraits, │ │ │ │ │ + 31 Impl::LagrangePrismLocalCoefficients<2>, │ │ │ │ │ +32 HierarchicalPrismP2LocalInterpolation > > │ │ │ │ │ +Traits; │ │ │ │ │ + 33 │ │ │ │ │ +36 HierarchicalPrismP2LocalFiniteElement () │ │ │ │ │ + 37 {} │ │ │ │ │ + 38 │ │ │ │ │ +41 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 42 { │ │ │ │ │ + 43 return basis; │ │ │ │ │ + 44 } │ │ │ │ │ + 45 │ │ │ │ │ +48 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 49 { │ │ │ │ │ + 50 return coefficients; │ │ │ │ │ + 51 } │ │ │ │ │ + 52 │ │ │ │ │ +55 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 74 HierarchicalPrismP2LocalBasis basis; │ │ │ │ │ + 75 │ │ │ │ │ + 77 Impl::LagrangePrismLocalCoefficients<2> coefficients; │ │ │ │ │ 78 │ │ │ │ │ - 79 // MonomialBasisSize │ │ │ │ │ - 80 // ----------------- │ │ │ │ │ + 79 HierarchicalPrismP2LocalInterpolation > │ │ │ │ │ +interpolation; │ │ │ │ │ + 80 }; │ │ │ │ │ 81 │ │ │ │ │ - 82 template< GeometryType::Id geometryId > │ │ │ │ │ -83 class MonomialBasisSize │ │ │ │ │ - 84 { │ │ │ │ │ - 85 typedef MonomialBasisSize<_geometryId_> This; │ │ │ │ │ - 86 │ │ │ │ │ - 87 public: │ │ │ │ │ -88 static This &instance () │ │ │ │ │ - 89 { │ │ │ │ │ - 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 │ │ │ │ │ -102 MonomialBasisSize () │ │ │ │ │ - 103 : maxOrder_( 0 ), │ │ │ │ │ - 104 sizes_( 0 ), │ │ │ │ │ - 105 numBaseFunctions_( 0 ) │ │ │ │ │ - 106 { │ │ │ │ │ - 107 computeSizes( 2 ); │ │ │ │ │ - 108 } │ │ │ │ │ - 109 │ │ │ │ │ -110 ~MonomialBasisSize () │ │ │ │ │ - 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 > │ │ │ │ │ -176 struct MonomialBasisHelper │ │ │ │ │ - 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[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(); │ │ │ │ │ - 222 } │ │ │ │ │ - 223 } │ │ │ │ │ - 224 } │ │ │ │ │ - 225 }; │ │ │ │ │ - 226 │ │ │ │ │ - 227 │ │ │ │ │ - 228 │ │ │ │ │ - 229 // MonomialBasisImpl │ │ │ │ │ - 230 // ----------------- │ │ │ │ │ - 231 │ │ │ │ │ - 232 template< GeometryType::Id geometryId, class F> │ │ │ │ │ -233 class MonomialBasisImpl │ │ │ │ │ - 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 │ │ │ │ │ - 247 MonomialBasisImpl () │ │ │ │ │ - 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(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 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 BaseSize; │ │ │ │ │ - 284 │ │ │ │ │ - 285 const BaseSize &size = BaseSize::instance(); │ │ │ │ │ - 286 const_cast(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(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(order, offsets, values); │ │ │ │ │ - 325 } │ │ │ │ │ - 326 │ │ │ │ │ - 327 template │ │ │ │ │ - 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(order, offsets, values); │ │ │ │ │ - 339 else │ │ │ │ │ - 340 integrateConical(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(order, offsets, values); │ │ │ │ │ - 351 } │ │ │ │ │ - 352 │ │ │ │ │ - 353 } │ │ │ │ │ - 354 │ │ │ │ │ - 355 template │ │ │ │ │ - 356 void integratePrismatic ( const unsigned int order, │ │ │ │ │ - 357 const unsigned int *const offsets, │ │ │ │ │ - 358 Field *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 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 │ │ │ │ │ - 394 void integrateConical ( const unsigned int order, │ │ │ │ │ - 395 const unsigned int *const offsets, │ │ │ │ │ - 396 Field *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 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 > │ │ │ │ │ -438 class MonomialBasis │ │ │ │ │ - 439 : public MonomialBasisImpl< geometryId, F > │ │ │ │ │ - 440 { │ │ │ │ │ - 441 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ - 442 typedef MonomialBasis<_geometryId,_F_> This; │ │ │ │ │ - 443 typedef MonomialBasisImpl<_geometryId,_F_> Base; │ │ │ │ │ - 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 │ │ │ │ │ -451 typedef typename Base::DomainVector DomainVector; │ │ │ │ │ - 452 │ │ │ │ │ -453 typedef Dune::FieldVector RangeVector; │ │ │ │ │ - 454 │ │ │ │ │ -455 typedef MonomialBasisSize Size; │ │ │ │ │ - 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 │ │ │ │ │ -505 void evaluate ( const DomainVector &x, │ │ │ │ │ - 506 Field *const values ) const │ │ │ │ │ - 507 { │ │ │ │ │ - 508 evaluate( deriv, x, values ); │ │ │ │ │ - 509 } │ │ │ │ │ - 510 │ │ │ │ │ - 511 template │ │ │ │ │ -512 void evaluate ( const DomainVector &x, │ │ │ │ │ - 513 Vector &values ) const │ │ │ │ │ - 514 { │ │ │ │ │ - 515 evaluate(x,&(values[0])); │ │ │ │ │ - 516 } │ │ │ │ │ - 517 template │ │ │ │ │ -518 void evaluate ( const DomainVector &x, │ │ │ │ │ - 519 Derivatives *values ) const │ │ │ │ │ - 520 { │ │ │ │ │ - 521 evaluate(x,&(values->block())); │ │ │ │ │ - 522 } │ │ │ │ │ - 523 template< unsigned int deriv > │ │ │ │ │ -524 void evaluate ( const DomainVector &x, │ │ │ │ │ - 525 FieldVector::size> *values ) const │ │ │ │ │ - 526 { │ │ │ │ │ - 527 evaluate(0,x,&(values[0][0])); │ │ │ │ │ - 528 } │ │ │ │ │ - 529 │ │ │ │ │ - 530 template │ │ │ │ │ -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 │ │ │ │ │ -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 > │ │ │ │ │ -569 class StandardMonomialBasis │ │ │ │ │ - 570 : public MonomialBasis< GeometryTypes::simplex(dim).toId() , F > │ │ │ │ │ - 571 { │ │ │ │ │ - 572 typedef StandardMonomialBasis<_dim,_F_> This; │ │ │ │ │ - 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 │ │ │ │ │ -579 StandardMonomialBasis ( unsigned int order ) │ │ │ │ │ - 580 : Base( order ) │ │ │ │ │ - 581 {} │ │ │ │ │ - 582 }; │ │ │ │ │ - 583 │ │ │ │ │ - 584 │ │ │ │ │ - 585 │ │ │ │ │ - 586 // StandardBiMonomialBasis │ │ │ │ │ - 587 // ----------------------- │ │ │ │ │ - 588 │ │ │ │ │ - 589 template< int dim, class F > │ │ │ │ │ -590 class StandardBiMonomialBasis │ │ │ │ │ - 591 : public MonomialBasis< GeometryTypes::cube(dim).toId() , F > │ │ │ │ │ - 592 { │ │ │ │ │ - 593 typedef StandardBiMonomialBasis<_dim,_F_> This; │ │ │ │ │ - 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 │ │ │ │ │ -600 StandardBiMonomialBasis ( unsigned int order ) │ │ │ │ │ - 601 : Base( order ) │ │ │ │ │ - 602 {} │ │ │ │ │ - 603 }; │ │ │ │ │ - 604 │ │ │ │ │ - 605 // ----------------------------------------------------------- │ │ │ │ │ - 606 // ----------------------------------------------------------- │ │ │ │ │ - 607 // VirtualMonomialBasis │ │ │ │ │ - 608 // ------------------- │ │ │ │ │ - 609 │ │ │ │ │ - 610 template< int dim, class F > │ │ │ │ │ -611 class VirtualMonomialBasis │ │ │ │ │ - 612 { │ │ │ │ │ - 613 typedef VirtualMonomialBasis<_dim,_F_> This; │ │ │ │ │ - 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 DomainVector; │ │ │ │ │ -622 typedef FieldVector RangeVector; │ │ │ │ │ - 623 │ │ │ │ │ -624 explicit VirtualMonomialBasis(const GeometryType& gt, │ │ │ │ │ - 625 unsigned int order) │ │ │ │ │ - 626 : order_(order), geometry_(gt) {} │ │ │ │ │ - 627 │ │ │ │ │ -628 virtual ~VirtualMonomialBasis() {} │ │ │ │ │ - 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 *const values ) const │ │ │ │ │ - 658 { │ │ │ │ │ - 659 evaluate( deriv, x, &(values[0][0]) ); │ │ │ │ │ - 660 } │ │ │ │ │ - 661 template │ │ │ │ │ -662 void evaluate ( const DomainVector &x, │ │ │ │ │ - 663 Derivatives *values ) const │ │ │ │ │ - 664 { │ │ │ │ │ - 665 evaluate(x,&(values->block())); │ │ │ │ │ - 666 } │ │ │ │ │ - 667 template │ │ │ │ │ -668 void evaluate ( const DomainVector &x, │ │ │ │ │ - 669 Vector &values ) const │ │ │ │ │ - 670 { │ │ │ │ │ - 671 evaluate( 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( bx, values ); │ │ │ │ │ - 696 } │ │ │ │ │ - 697 │ │ │ │ │ -698 virtual void integrate ( Field *const values ) const = 0; │ │ │ │ │ - 699 template │ │ │ │ │ -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 > │ │ │ │ │ -710 class VirtualMonomialBasisImpl │ │ │ │ │ - 711 : public VirtualMonomialBasis< static_cast(geometryId).dim │ │ │ │ │ -(), F > │ │ │ │ │ - 712 { │ │ │ │ │ - 713 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ - 714 typedef VirtualMonomialBasis< geometry.dim(), F > Base; │ │ │ │ │ - 715 typedef VirtualMonomialBasisImpl<_geometryId,_F_> This; │ │ │ │ │ - 716 │ │ │ │ │ - 717 public: │ │ │ │ │ -718 typedef typename Base::Field Field; │ │ │ │ │ -719 typedef typename Base::DomainVector DomainVector; │ │ │ │ │ - 720 │ │ │ │ │ -721 VirtualMonomialBasisImpl(unsigned int order) │ │ │ │ │ - 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: │ │ │ │ │ - 742 MonomialBasis basis_; │ │ │ │ │ - 743 using Base::order_; │ │ │ │ │ - 744 }; │ │ │ │ │ - 745 │ │ │ │ │ - 746 // MonomialBasisFactory │ │ │ │ │ - 747 // -------------------- │ │ │ │ │ - 748 │ │ │ │ │ - 749 template< int dim, class F > │ │ │ │ │ -750 struct MonomialBasisFactory │ │ │ │ │ - 751 { │ │ │ │ │ -752 static const unsigned int dimension = dim; │ │ │ │ │ -753 typedef F StorageField; │ │ │ │ │ - 754 │ │ │ │ │ -755 typedef unsigned int Key; │ │ │ │ │ -756 typedef const VirtualMonomialBasis<_dimension,_F_> Object; │ │ │ │ │ - 757 │ │ │ │ │ - 758 template < int dd, class FF > │ │ │ │ │ -759 struct EvaluationBasisFactory │ │ │ │ │ - 760 { │ │ │ │ │ -761 typedef MonomialBasisFactory Type; │ │ │ │ │ - 762 }; │ │ │ │ │ - 763 │ │ │ │ │ - 764 template< GeometryType::Id geometryId > │ │ │ │ │ -765 static Object* create ( const Key &order ) │ │ │ │ │ - 766 { │ │ │ │ │ - 767 return new VirtualMonomialBasisImpl<_geometryId,_StorageField_>( order ); │ │ │ │ │ - 768 } │ │ │ │ │ -769 static void release( Object *object ) { delete object; } │ │ │ │ │ - 770 }; │ │ │ │ │ - 771 │ │ │ │ │ - 772 │ │ │ │ │ - 773 │ │ │ │ │ - 774 // MonomialBasisProvider │ │ │ │ │ - 775 // --------------------- │ │ │ │ │ - 776 │ │ │ │ │ - 777 template< int dim, class SF > │ │ │ │ │ -778 struct MonomialBasisProvider │ │ │ │ │ - 779 : public TopologySingletonFactory< MonomialBasisFactory< dim, SF > > │ │ │ │ │ - 780 { │ │ │ │ │ -781 static const unsigned int dimension = dim; │ │ │ │ │ -782 typedef SF StorageField; │ │ │ │ │ - 783 template < int dd, class FF > │ │ │ │ │ -784 struct EvaluationBasisFactory │ │ │ │ │ - 785 { │ │ │ │ │ -786 typedef MonomialBasisProvider Type; │ │ │ │ │ - 787 }; │ │ │ │ │ - 788 }; │ │ │ │ │ - 789 │ │ │ │ │ - 790} │ │ │ │ │ - 791 │ │ │ │ │ - 792#endif │ │ │ │ │ -tensor.hh │ │ │ │ │ -field.hh │ │ │ │ │ -multiindex.hh │ │ │ │ │ + 82} │ │ │ │ │ + 83 │ │ │ │ │ + 84#endif │ │ │ │ │ +hierarchicalprismp2localinterpolation.hh │ │ │ │ │ +hierarchicalprismp2localbasis.hh │ │ │ │ │ +Hierarchical prism p2 shape functions for the simplex. │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ +lagrangeprism.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::field_cast │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -Definition field.hh:159 │ │ │ │ │ -Dune::Unity │ │ │ │ │ -A class representing the unit of a given Field. │ │ │ │ │ -Definition field.hh:30 │ │ │ │ │ -Dune::Zero │ │ │ │ │ -A class representing the zero of a given Field. │ │ │ │ │ -Definition field.hh:79 │ │ │ │ │ -Dune::MonomialBasisSize │ │ │ │ │ -Definition monomialbasis.hh:84 │ │ │ │ │ -Dune::MonomialBasisSize::numBaseFunctions_ │ │ │ │ │ -unsigned int * numBaseFunctions_ │ │ │ │ │ -Definition monomialbasis.hh:100 │ │ │ │ │ -Dune::MonomialBasisSize::computeSizes │ │ │ │ │ -void computeSizes(unsigned int order) │ │ │ │ │ -Definition monomialbasis.hh:126 │ │ │ │ │ -Dune::MonomialBasisSize::sizes_ │ │ │ │ │ -unsigned int * sizes_ │ │ │ │ │ -Definition monomialbasis.hh:97 │ │ │ │ │ -Dune::MonomialBasisSize::MonomialBasisSize │ │ │ │ │ -MonomialBasisSize() │ │ │ │ │ -Definition monomialbasis.hh:102 │ │ │ │ │ -Dune::MonomialBasisSize::~MonomialBasisSize │ │ │ │ │ -~MonomialBasisSize() │ │ │ │ │ -Definition monomialbasis.hh:110 │ │ │ │ │ -Dune::MonomialBasisSize::operator() │ │ │ │ │ -unsigned int operator()(const unsigned int order) const │ │ │ │ │ -Definition monomialbasis.hh:116 │ │ │ │ │ -Dune::MonomialBasisSize::maxOrder_ │ │ │ │ │ -unsigned int maxOrder_ │ │ │ │ │ -Definition monomialbasis.hh:94 │ │ │ │ │ -Dune::MonomialBasisSize::maxOrder │ │ │ │ │ -unsigned int maxOrder() const │ │ │ │ │ -Definition monomialbasis.hh:121 │ │ │ │ │ -Dune::MonomialBasisSize::instance │ │ │ │ │ -static This & instance() │ │ │ │ │ -Definition monomialbasis.hh:88 │ │ │ │ │ -Dune::MonomialBasis │ │ │ │ │ -Definition monomialbasis.hh:440 │ │ │ │ │ -Dune::MonomialBasis::size │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalFiniteElement │ │ │ │ │ +Definition hierarchicalprismp2.hh:24 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition hierarchicalprismp2.hh:68 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalFiniteElement:: │ │ │ │ │ +HierarchicalPrismP2LocalFiniteElement │ │ │ │ │ +HierarchicalPrismP2LocalFiniteElement() │ │ │ │ │ +Definition hierarchicalprismp2.hh:36 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition hierarchicalprismp2.hh:55 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< HierarchicalPrismP2LocalBasis< D, R >, Impl:: │ │ │ │ │ +LagrangePrismLocalCoefficients< 2 >, HierarchicalPrismP2LocalInterpolation< │ │ │ │ │ +HierarchicalPrismP2LocalBasis< D, R > > > Traits │ │ │ │ │ +Definition hierarchicalprismp2.hh:32 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition hierarchicalprismp2.hh:41 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalFiniteElement::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Definition monomialbasis.hh:476 │ │ │ │ │ -Dune::MonomialBasis::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition monomialbasis.hh:446 │ │ │ │ │ -Dune::MonomialBasis::RangeVector │ │ │ │ │ -Dune::FieldVector< Field, dimRange > RangeVector │ │ │ │ │ -Definition monomialbasis.hh:453 │ │ │ │ │ -Dune::MonomialBasis::evaluate │ │ │ │ │ -void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ -values) const │ │ │ │ │ -Definition monomialbasis.hh:498 │ │ │ │ │ -Dune::MonomialBasis::sizes │ │ │ │ │ -const unsigned int * sizes() const │ │ │ │ │ -Definition monomialbasis.hh:471 │ │ │ │ │ -Dune::MonomialBasis::topologyId │ │ │ │ │ -unsigned int topologyId() const │ │ │ │ │ -Definition monomialbasis.hh:493 │ │ │ │ │ -Dune::MonomialBasis::integrate │ │ │ │ │ -void integrate(Vector &values) const │ │ │ │ │ -Definition monomialbasis.hh:552 │ │ │ │ │ -Dune::MonomialBasis::Field │ │ │ │ │ -Base::Field Field │ │ │ │ │ -Definition monomialbasis.hh:449 │ │ │ │ │ -Dune::MonomialBasis::integrate │ │ │ │ │ -void integrate(Field *const values) const │ │ │ │ │ -Definition monomialbasis.hh:547 │ │ │ │ │ -Dune::MonomialBasis::dimRange │ │ │ │ │ -static const unsigned int dimRange │ │ │ │ │ -Definition monomialbasis.hh:447 │ │ │ │ │ -Dune::MonomialBasis::DomainVector │ │ │ │ │ -Base::DomainVector DomainVector │ │ │ │ │ -Definition monomialbasis.hh:451 │ │ │ │ │ -Dune::MonomialBasis::evaluate │ │ │ │ │ -void evaluate(const DomainVector &x, Field *const values) const │ │ │ │ │ -Definition monomialbasis.hh:505 │ │ │ │ │ -Dune::MonomialBasis::evaluate │ │ │ │ │ -void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ -Definition monomialbasis.hh:531 │ │ │ │ │ -Dune::MonomialBasis::evaluate │ │ │ │ │ -void evaluate(const DomainVector &x, FieldVector< Field, Derivatives< Field, │ │ │ │ │ -dimension, 1, deriv, DerivativeLayoutNS::value >::size > *values) const │ │ │ │ │ -Definition monomialbasis.hh:524 │ │ │ │ │ -Dune::MonomialBasis::evaluate │ │ │ │ │ -void evaluate(const DomainVector &x, Derivatives< Field, dimension, 1, deriv, │ │ │ │ │ -layout > *values) const │ │ │ │ │ -Definition monomialbasis.hh:518 │ │ │ │ │ -Dune::MonomialBasis::evaluate │ │ │ │ │ -void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ -Definition monomialbasis.hh:538 │ │ │ │ │ -Dune::MonomialBasis::Size │ │ │ │ │ -MonomialBasisSize< geometryId > Size │ │ │ │ │ -Definition monomialbasis.hh:455 │ │ │ │ │ -Dune::MonomialBasis::evaluate │ │ │ │ │ -void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ -Definition monomialbasis.hh:512 │ │ │ │ │ -Dune::MonomialBasis::MonomialBasis │ │ │ │ │ -MonomialBasis(unsigned int order) │ │ │ │ │ -Definition monomialbasis.hh:457 │ │ │ │ │ -Dune::MonomialBasis::derivSize │ │ │ │ │ -unsigned int derivSize(const unsigned int deriv) const │ │ │ │ │ -Definition monomialbasis.hh:482 │ │ │ │ │ -Dune::MonomialBasis::sizes │ │ │ │ │ -const unsigned int * sizes(unsigned int order) const │ │ │ │ │ -Definition monomialbasis.hh:465 │ │ │ │ │ -Dune::MonomialBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Definition monomialbasis.hh:488 │ │ │ │ │ -Dune::MonomialBasisHelper │ │ │ │ │ -Definition monomialbasis.hh:177 │ │ │ │ │ -Dune::MonomialBasisHelper::Size │ │ │ │ │ -MonomialBasisSize< GeometryTypes::simplex(dim).toId() > Size │ │ │ │ │ -Definition monomialbasis.hh:179 │ │ │ │ │ -Dune::MonomialBasisHelper::copy │ │ │ │ │ -static void copy(const unsigned int deriv, F *&wit, F *&rit, const unsigned int │ │ │ │ │ -numBaseFunctions, const F &z) │ │ │ │ │ -Definition monomialbasis.hh:181 │ │ │ │ │ -Dune::MonomialBasisHelper::MySize │ │ │ │ │ -MonomialBasisSize< GeometryTypes::simplex(mydim).toId() > MySize │ │ │ │ │ -Definition monomialbasis.hh:178 │ │ │ │ │ -Dune::MonomialBasisImpl │ │ │ │ │ -Definition monomialbasis.hh:234 │ │ │ │ │ -Dune::MonomialBasisImpl::DomainVector │ │ │ │ │ -FieldVector< Field, dimDomain > DomainVector │ │ │ │ │ -Definition monomialbasis.hh:242 │ │ │ │ │ -Dune::MonomialBasisImpl::geometry │ │ │ │ │ -static constexpr GeometryType geometry │ │ │ │ │ -Definition monomialbasis.hh:238 │ │ │ │ │ -Dune::MonomialBasisImpl::Field │ │ │ │ │ -F Field │ │ │ │ │ -Definition monomialbasis.hh:236 │ │ │ │ │ -Dune::MonomialBasisImpl::dimDomain │ │ │ │ │ -static const unsigned int dimDomain │ │ │ │ │ -Definition monomialbasis.hh:240 │ │ │ │ │ -Dune::StandardMonomialBasis │ │ │ │ │ -Definition monomialbasis.hh:571 │ │ │ │ │ -Dune::StandardMonomialBasis::geometry │ │ │ │ │ -static constexpr GeometryType geometry │ │ │ │ │ -Definition monomialbasis.hh:576 │ │ │ │ │ -Dune::StandardMonomialBasis::StandardMonomialBasis │ │ │ │ │ -StandardMonomialBasis(unsigned int order) │ │ │ │ │ -Definition monomialbasis.hh:579 │ │ │ │ │ -Dune::StandardMonomialBasis::dimension │ │ │ │ │ -static const int dimension │ │ │ │ │ -Definition monomialbasis.hh:577 │ │ │ │ │ -Dune::StandardBiMonomialBasis │ │ │ │ │ -Definition monomialbasis.hh:592 │ │ │ │ │ -Dune::StandardBiMonomialBasis::dimension │ │ │ │ │ -static const int dimension │ │ │ │ │ -Definition monomialbasis.hh:598 │ │ │ │ │ -Dune::StandardBiMonomialBasis::geometry │ │ │ │ │ -static constexpr GeometryType geometry │ │ │ │ │ -Definition monomialbasis.hh:597 │ │ │ │ │ -Dune::StandardBiMonomialBasis::StandardBiMonomialBasis │ │ │ │ │ -StandardBiMonomialBasis(unsigned int order) │ │ │ │ │ -Definition monomialbasis.hh:600 │ │ │ │ │ -Dune::VirtualMonomialBasis │ │ │ │ │ -Definition monomialbasis.hh:612 │ │ │ │ │ -Dune::VirtualMonomialBasis::geometry_ │ │ │ │ │ -GeometryType geometry_ │ │ │ │ │ -Definition monomialbasis.hh:706 │ │ │ │ │ -Dune::VirtualMonomialBasis::DomainVector │ │ │ │ │ -FieldVector< Field, dimension > DomainVector │ │ │ │ │ -Definition monomialbasis.hh:621 │ │ │ │ │ -Dune::VirtualMonomialBasis::order_ │ │ │ │ │ -unsigned int order_ │ │ │ │ │ -Definition monomialbasis.hh:705 │ │ │ │ │ -Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ -void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ -Definition monomialbasis.hh:674 │ │ │ │ │ -Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ -void evaluate(const DomainVector &x, Field *const values) const │ │ │ │ │ -Definition monomialbasis.hh:650 │ │ │ │ │ -Dune::VirtualMonomialBasis::Field │ │ │ │ │ -F Field │ │ │ │ │ -Definition monomialbasis.hh:616 │ │ │ │ │ -Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ -void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ -Definition monomialbasis.hh:668 │ │ │ │ │ -Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ -void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ -Definition monomialbasis.hh:680 │ │ │ │ │ -Dune::VirtualMonomialBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Definition monomialbasis.hh:637 │ │ │ │ │ -Dune::VirtualMonomialBasis::dimRange │ │ │ │ │ -static const unsigned int dimRange │ │ │ │ │ -Definition monomialbasis.hh:619 │ │ │ │ │ -Dune::VirtualMonomialBasis::StorageField │ │ │ │ │ -F StorageField │ │ │ │ │ -Definition monomialbasis.hh:617 │ │ │ │ │ -Dune::VirtualMonomialBasis::dimension │ │ │ │ │ -static const int dimension │ │ │ │ │ -Definition monomialbasis.hh:618 │ │ │ │ │ -Dune::VirtualMonomialBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Definition monomialbasis.hh:632 │ │ │ │ │ -Dune::VirtualMonomialBasis::RangeVector │ │ │ │ │ -FieldVector< Field, dimRange > RangeVector │ │ │ │ │ -Definition monomialbasis.hh:622 │ │ │ │ │ -Dune::VirtualMonomialBasis::~VirtualMonomialBasis │ │ │ │ │ -virtual ~VirtualMonomialBasis() │ │ │ │ │ -Definition monomialbasis.hh:628 │ │ │ │ │ -Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ -virtual void evaluate(const unsigned int deriv, const DomainVector &x, Field │ │ │ │ │ -*const values) const =0 │ │ │ │ │ -Dune::VirtualMonomialBasis::integrate │ │ │ │ │ -virtual void integrate(Field *const values) const =0 │ │ │ │ │ -Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ -void evaluate(const DomainVector &x, Dune::FieldVector< Field, size > *const │ │ │ │ │ -values) const │ │ │ │ │ -Definition monomialbasis.hh:656 │ │ │ │ │ -Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ -void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ -Definition monomialbasis.hh:689 │ │ │ │ │ -Dune::VirtualMonomialBasis::type │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -Definition monomialbasis.hh:642 │ │ │ │ │ -Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ -void evaluate(const DomainVector &x, Derivatives< Field, dimension, 1, deriv, │ │ │ │ │ -layout > *values) const │ │ │ │ │ -Definition monomialbasis.hh:662 │ │ │ │ │ -Dune::VirtualMonomialBasis::VirtualMonomialBasis │ │ │ │ │ -VirtualMonomialBasis(const GeometryType >, unsigned int order) │ │ │ │ │ -Definition monomialbasis.hh:624 │ │ │ │ │ -Dune::VirtualMonomialBasis::sizes │ │ │ │ │ -virtual const unsigned int * sizes() const =0 │ │ │ │ │ -Dune::VirtualMonomialBasis::integrate │ │ │ │ │ -void integrate(Vector &values) const │ │ │ │ │ -Definition monomialbasis.hh:700 │ │ │ │ │ -Dune::VirtualMonomialBasisImpl │ │ │ │ │ -Definition monomialbasis.hh:712 │ │ │ │ │ -Dune::VirtualMonomialBasisImpl::integrate │ │ │ │ │ -void integrate(Field *const values) const │ │ │ │ │ -Definition monomialbasis.hh:736 │ │ │ │ │ -Dune::VirtualMonomialBasisImpl::sizes │ │ │ │ │ -const unsigned int * sizes() const │ │ │ │ │ -Definition monomialbasis.hh:725 │ │ │ │ │ -Dune::VirtualMonomialBasisImpl::DomainVector │ │ │ │ │ -Base::DomainVector DomainVector │ │ │ │ │ -Definition monomialbasis.hh:719 │ │ │ │ │ -Dune::VirtualMonomialBasisImpl::Field │ │ │ │ │ -Base::Field Field │ │ │ │ │ -Definition monomialbasis.hh:718 │ │ │ │ │ -Dune::VirtualMonomialBasisImpl::evaluate │ │ │ │ │ -void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ -values) const │ │ │ │ │ -Definition monomialbasis.hh:730 │ │ │ │ │ -Dune::VirtualMonomialBasisImpl::VirtualMonomialBasisImpl │ │ │ │ │ -VirtualMonomialBasisImpl(unsigned int order) │ │ │ │ │ -Definition monomialbasis.hh:721 │ │ │ │ │ -Dune::MonomialBasisFactory │ │ │ │ │ -Definition monomialbasis.hh:751 │ │ │ │ │ -Dune::MonomialBasisFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition monomialbasis.hh:769 │ │ │ │ │ -Dune::MonomialBasisFactory::Object │ │ │ │ │ -const VirtualMonomialBasis< dimension, F > Object │ │ │ │ │ -Definition monomialbasis.hh:756 │ │ │ │ │ -Dune::MonomialBasisFactory::create │ │ │ │ │ -static Object * create(const Key &order) │ │ │ │ │ -Definition monomialbasis.hh:765 │ │ │ │ │ -Dune::MonomialBasisFactory::StorageField │ │ │ │ │ -F StorageField │ │ │ │ │ -Definition monomialbasis.hh:753 │ │ │ │ │ -Dune::MonomialBasisFactory::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition monomialbasis.hh:752 │ │ │ │ │ -Dune::MonomialBasisFactory::Key │ │ │ │ │ -unsigned int Key │ │ │ │ │ -Definition monomialbasis.hh:755 │ │ │ │ │ -Dune::MonomialBasisFactory::EvaluationBasisFactory │ │ │ │ │ -Definition monomialbasis.hh:760 │ │ │ │ │ -Dune::MonomialBasisFactory::EvaluationBasisFactory::Type │ │ │ │ │ -MonomialBasisFactory< dd, FF > Type │ │ │ │ │ -Definition monomialbasis.hh:761 │ │ │ │ │ -Dune::MonomialBasisProvider │ │ │ │ │ -Definition monomialbasis.hh:780 │ │ │ │ │ -Dune::MonomialBasisProvider::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition monomialbasis.hh:781 │ │ │ │ │ -Dune::MonomialBasisProvider::StorageField │ │ │ │ │ -SF StorageField │ │ │ │ │ -Definition monomialbasis.hh:782 │ │ │ │ │ -Dune::MonomialBasisProvider::EvaluationBasisFactory │ │ │ │ │ -Definition monomialbasis.hh:785 │ │ │ │ │ -Dune::MonomialBasisProvider::EvaluationBasisFactory::Type │ │ │ │ │ -MonomialBasisProvider< dd, FF > Type │ │ │ │ │ -Definition monomialbasis.hh:786 │ │ │ │ │ -Dune::Derivatives │ │ │ │ │ -Definition tensor.hh:172 │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition hierarchicalprismp2.hh:61 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition hierarchicalprismp2.hh:48 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalBasis │ │ │ │ │ +Definition hierarchicalprismp2localbasis.hh:23 │ │ │ │ │ +Dune::HierarchicalPrismP2LocalInterpolation │ │ │ │ │ +Definition hierarchicalprismp2localinterpolation.hh:18 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00026.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basisprint.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalp2.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,41 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
basisprint.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
hierarchicalp2.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/utility/multiindex.hh>
│ │ │ │ -#include <dune/localfunctions/utility/polynomialbasis.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::HierarchicalP2LocalFiniteElement< D, R, dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ 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 {} │ │ │ │ │ @@ -6,29 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -Namespaces | Functions │ │ │ │ │ -basisprint.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * hierarchical │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +hierarchicalp2.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "hierarchicalp2/hierarchicalsimplexp2localbasis.hh" │ │ │ │ │ +#include "hierarchicalp2/hierarchicalsimplexp2localinterpolation.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ + Classes │ │ │ │ │ +class  Dune::HierarchicalP2LocalFiniteElement<_D,_R,_dim_> │ │ │ │ │ +  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Functions │ │ │ │ │ -template │ │ │ │ │ -void Dune::basisPrint (std::ostream &out, typename BasisFactory::Object │ │ │ │ │ - &basis) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -void Dune::basisPrint (std::ostream &out, typename BasisFactory::Key &key) │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00026_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basisprint.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalp2.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,105 +70,124 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
basisprint.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 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;
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │ +
12
│ │ │ │ + │ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
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();
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
39 {}
│ │ │ │ +
│ │ │ │
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 );
│ │ │ │ +
│ │ │ │ +
43 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
44 {
│ │ │ │ +
45 return basis;
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
51 {
│ │ │ │ +
52 return coefficients;
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
58 {
│ │ │ │ +
59 return interpolation;
│ │ │ │ +
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.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,105 +7,139 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -basisprint.hh │ │ │ │ │ + * hierarchical │ │ │ │ │ +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 BASISPRINT │ │ │ │ │ - 6#define BASISPRINT │ │ │ │ │ - 7#include │ │ │ │ │ - 8#include │ │ │ │ │ - 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 │ │ │ │ │ - 22 template │ │ │ │ │ -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 │ │ │ │ │ - 29 typedef MultiIndex<_dimension,_PrintField_> Field; │ │ │ │ │ - 30 typedef typename BasisFactory::template │ │ │ │ │ -EvaluationBasisFactory::Type │ │ │ │ │ - 31 MIBasisFactory; │ │ │ │ │ - 32 typedef typename MIBasisFactory::Object MIBasis; │ │ │ │ │ - 33 typedef typename Basis::CoefficientMatrix CMatrix; │ │ │ │ │ - 34 typedef PolynomialBasis, CMatrix > PrintBasis; │ │ │ │ │ + 5#ifndef DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include "hierarchicalp2/hierarchicalsimplexp2localbasis.hh" │ │ │ │ │ + 14#include "hierarchicalp2/hierarchicalsimplexp2localinterpolation.hh" │ │ │ │ │ + 15 │ │ │ │ │ + 16namespace Dune │ │ │ │ │ + 17{ │ │ │ │ │ + 18 │ │ │ │ │ + 21 template │ │ │ │ │ +22 class HierarchicalP2LocalFiniteElement │ │ │ │ │ + 23 { │ │ │ │ │ + 24 │ │ │ │ │ + 25 static_assert(1 <= dim && dim <= 3, │ │ │ │ │ + 26 "HierarchicalP2LocalFiniteElement only implemented for dim==1, 2, 3."); │ │ │ │ │ + 27 │ │ │ │ │ + 28 public: │ │ │ │ │ + 31 typedef LocalFiniteElementTraits< │ │ │ │ │ + 32 HierarchicalSimplexP2LocalBasis, │ │ │ │ │ + 33 typename LagrangeSimplexLocalFiniteElement::Traits:: │ │ │ │ │ +LocalCoefficientsType, │ │ │ │ │ +34 │ │ │ │ │ +HierarchicalSimplexP2LocalInterpolation │ │ │ │ │ +> > Traits; │ │ │ │ │ 35 │ │ │ │ │ - 36 MIBasis *miBasis = MIBasisFactory::template create( basis.basis │ │ │ │ │ -().order()); │ │ │ │ │ - 37 PrintBasis printBasis(*miBasis,basis.matrix(),basis.size()); │ │ │ │ │ - 38 │ │ │ │ │ - 39 unsigned int size = printBasis.size(); │ │ │ │ │ +38 HierarchicalP2LocalFiniteElement () │ │ │ │ │ + 39 {} │ │ │ │ │ 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 ); │ │ │ │ │ +43 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 44 { │ │ │ │ │ + 45 return basis; │ │ │ │ │ + 46 } │ │ │ │ │ 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 │ │ │ │ │ -64 void basisPrint(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 │ │ │ │ │ -polynomialbasis.hh │ │ │ │ │ -multiindex.hh │ │ │ │ │ +50 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 51 { │ │ │ │ │ + 52 return coefficients; │ │ │ │ │ + 53 } │ │ │ │ │ + 54 │ │ │ │ │ +57 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 58 { │ │ │ │ │ + 59 return interpolation; │ │ │ │ │ + 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: │ │ │ │ │ + 76 HierarchicalSimplexP2LocalBasis basis; │ │ │ │ │ + 77 │ │ │ │ │ + 78 typename Traits::LocalCoefficientsType coefficients; │ │ │ │ │ + 79 │ │ │ │ │ + 80 │ │ │ │ │ +HierarchicalSimplexP2LocalInterpolation │ │ │ │ │ +> interpolation; │ │ │ │ │ + 81 }; │ │ │ │ │ + 82 │ │ │ │ │ + 83} │ │ │ │ │ + 84 │ │ │ │ │ + 85#endif │ │ │ │ │ +hierarchicalsimplexp2localbasis.hh │ │ │ │ │ +Hierarchical p2 shape functions for the simplex. │ │ │ │ │ +hierarchicalsimplexp2localinterpolation.hh │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::basisPrint │ │ │ │ │ -void basisPrint(std::ostream &out, typename BasisFactory::Object &basis) │ │ │ │ │ -Definition basisprint.hh:23 │ │ │ │ │ -Dune::MultiIndex │ │ │ │ │ -Definition multiindex.hh:37 │ │ │ │ │ -Dune::PolynomialBasis │ │ │ │ │ -Definition polynomialbasis.hh:65 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::HierarchicalP2LocalFiniteElement │ │ │ │ │ +Definition hierarchicalp2.hh:23 │ │ │ │ │ +Dune::HierarchicalP2LocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition hierarchicalp2.hh:43 │ │ │ │ │ +Dune::HierarchicalP2LocalFiniteElement::HierarchicalP2LocalFiniteElement │ │ │ │ │ +HierarchicalP2LocalFiniteElement() │ │ │ │ │ +Definition hierarchicalp2.hh:38 │ │ │ │ │ +Dune::HierarchicalP2LocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition hierarchicalp2.hh:63 │ │ │ │ │ +Dune::HierarchicalP2LocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition hierarchicalp2.hh:50 │ │ │ │ │ +Dune::HierarchicalP2LocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< HierarchicalSimplexP2LocalBasis< D, R, dim >, │ │ │ │ │ +typename LagrangeSimplexLocalFiniteElement< D, R, dim, 2 >::Traits:: │ │ │ │ │ +LocalCoefficientsType, HierarchicalSimplexP2LocalInterpolation< │ │ │ │ │ +HierarchicalSimplexP2LocalBasis< D, R, dim > > > Traits │ │ │ │ │ +Definition hierarchicalp2.hh:34 │ │ │ │ │ +Dune::HierarchicalP2LocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition hierarchicalp2.hh:57 │ │ │ │ │ +Dune::HierarchicalP2LocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition hierarchicalp2.hh:70 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:23 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalInterpolation │ │ │ │ │ +Definition hierarchicalsimplexp2localinterpolation.hh:18 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00029.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basismatrix.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalsimplexp2localbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,50 +65,55 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
basismatrix.hh File Reference
│ │ │ │ +
hierarchicalsimplexp2localbasis.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>
│ │ │ │ + │ │ │ │ +

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>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::BasisMatrixBase< PreBasis, Interpolation, Field >
 
struct  Dune::BasisMatrix< const MonomialBasis< geometryId, F >, Interpolation, Field >
class  Dune::HierarchicalSimplexP2LocalBasis< D, R, dim >
 
struct  Dune::BasisMatrix< const Dune::VirtualMonomialBasis< dim, F >, Interpolation, Field >
class  Dune::HierarchicalSimplexP2LocalBasis< D, R, 1 >
 Hierarchical P2 basis in 1d. More...
 
struct  Dune::BasisMatrix< const PolynomialBasis< Eval, CM, D, R >, Interpolation, Field >
class  Dune::HierarchicalSimplexP2LocalBasis< D, R, 2 >
 Hierarchical P2 basis in 2d. More...
 
struct  Dune::BasisMatrix< const PolynomialBasisWithMatrix< Eval, CM >, Interpolation, Field >
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 {} │ │ │ │ │ @@ -6,37 +6,37 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ + * hierarchical │ │ │ │ │ + * hierarchicalp2 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -basismatrix.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +hierarchicalsimplexp2localbasis.hh File Reference │ │ │ │ │ +Hierarchical p2 shape functions for the simplex. More... │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  Dune::BasisMatrixBase<_PreBasis,_Interpolation,_Field_> │ │ │ │ │ +class  Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_dim_> │ │ │ │ │   │ │ │ │ │ -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_> │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>, │ │ │ │ │ - Interpolation,_Field_> │ │ │ │ │ +class  Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_> │ │ │ │ │ +  Hierarchical P2 basis in 3d. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ +***** Detailed Description ***** │ │ │ │ │ +Hierarchical p2 shape functions for the simplex. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00029_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basismatrix.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalsimplexp2localbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,286 +70,367 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
basismatrix.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 DUNE_BASISMATRIX_HH
│ │ │ │ -
6#define DUNE_BASISMATRIX_HH
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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 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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,346 +7,405 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -basismatrix.hh │ │ │ │ │ + * hierarchical │ │ │ │ │ + * hierarchicalp2 │ │ │ │ │ +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 DUNE_BASISMATRIX_HH │ │ │ │ │ - 6#define DUNE_BASISMATRIX_HH │ │ │ │ │ + 5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 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 > │ │ │ │ │ -27 struct BasisMatrix; │ │ │ │ │ - 28 │ │ │ │ │ - 29 template< class PreBasis, class Interpolation, │ │ │ │ │ - 30 class Field > │ │ │ │ │ -31 struct BasisMatrixBase : public LFEMatrix │ │ │ │ │ - 32 { │ │ │ │ │ -33 typedef LFEMatrix Matrix; │ │ │ │ │ - 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 │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16 │ │ │ │ │ + 17#include │ │ │ │ │ + 18 │ │ │ │ │ + 19namespace Dune │ │ │ │ │ + 20{ │ │ │ │ │ + 21 template │ │ │ │ │ +22 class HierarchicalSimplexP2LocalBasis │ │ │ │ │ + 23 { │ │ │ │ │ + 24 public: │ │ │ │ │ +25 HierarchicalSimplexP2LocalBasis() │ │ │ │ │ + 26 { │ │ │ │ │ + 27 DUNE_THROW(Dune::NotImplemented,"HierarchicalSimplexP2LocalBasis not │ │ │ │ │ +implemented for dim > 3."); │ │ │ │ │ + 28 } │ │ │ │ │ + 29 }; │ │ │ │ │ + 30 │ │ │ │ │ + 45 template │ │ │ │ │ +46 class HierarchicalSimplexP2LocalBasis │ │ │ │ │ 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 { │ │ │ │ │ -64 typedef const MonomialBasis<_geometryId,_F_> PreBasis; │ │ │ │ │ -65 typedef BasisMatrixBase Base; │ │ │ │ │ -66 typedef typename Base::Matrix Matrix; │ │ │ │ │ - 67 │ │ │ │ │ -68 BasisMatrix( const PreBasis& preBasis, │ │ │ │ │ - 69 const Interpolation& localInterpolation ) │ │ │ │ │ - 70 : Base(preBasis, localInterpolation) │ │ │ │ │ - 71 {} │ │ │ │ │ - 72 template │ │ │ │ │ -73 void row( const unsigned int row, Vector &vec ) const │ │ │ │ │ + 48 public: │ │ │ │ │ + 50 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +51 Dune::FieldMatrix > 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& 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& out) const // return value │ │ │ │ │ 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 │ │ │ │ │ -86 struct BasisMatrix< const Dune::VirtualMonomialBasis< dim, F >, │ │ │ │ │ -Interpolation, Field > │ │ │ │ │ - 87 : public BasisMatrixBase< const VirtualMonomialBasis< dim, F >, │ │ │ │ │ -Interpolation, Field > │ │ │ │ │ - 88 { │ │ │ │ │ -89 typedef const VirtualMonomialBasis<_dim,_F_> PreBasis; │ │ │ │ │ -90 typedef BasisMatrixBase Base; │ │ │ │ │ -91 typedef typename Base::Matrix Matrix; │ │ │ │ │ - 92 │ │ │ │ │ -93 BasisMatrix( const PreBasis& preBasis, │ │ │ │ │ - 94 const Interpolation& localInterpolation ) │ │ │ │ │ - 95 : Base(preBasis, localInterpolation) │ │ │ │ │ - 96 {} │ │ │ │ │ - 97 template │ │ │ │ │ -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 │ │ │ │ │ -111 struct BasisMatrix< const PolynomialBasis, Interpolation, │ │ │ │ │ -Field > │ │ │ │ │ - 112 : public BasisMatrixBase< const PolynomialBasis, │ │ │ │ │ -Interpolation, Field > │ │ │ │ │ - 113 { │ │ │ │ │ -114 typedef const PolynomialBasis PreBasis; │ │ │ │ │ -115 typedef BasisMatrixBase Base; │ │ │ │ │ -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 │ │ │ │ │ -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 │ │ │ │ │ -145 struct BasisMatrix< const PolynomialBasisWithMatrix, │ │ │ │ │ -Interpolation, Field > │ │ │ │ │ - 146 : public BasisMatrixBase< const PolynomialBasisWithMatrix, │ │ │ │ │ -Interpolation, Field > │ │ │ │ │ - 147 { │ │ │ │ │ -148 typedef const PolynomialBasisWithMatrix PreBasis; │ │ │ │ │ -149 typedef BasisMatrixBase Base; │ │ │ │ │ -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 │ │ │ │ │ -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& order, │ │ │ │ │ + 84 const typename Traits::DomainType& 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 │ │ │ │ │ +108 unsigned int order () const │ │ │ │ │ + 109 { │ │ │ │ │ + 110 return 2; │ │ │ │ │ + 111 } │ │ │ │ │ + 112 │ │ │ │ │ + 113 }; │ │ │ │ │ + 114 │ │ │ │ │ + 134 template │ │ │ │ │ +135 class HierarchicalSimplexP2LocalBasis │ │ │ │ │ + 136 { │ │ │ │ │ + 137 public: │ │ │ │ │ + 139 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +140 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ + 180 const typename Traits::DomainType& 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 │ │ │ │ │ +217 unsigned int order () const │ │ │ │ │ + 218 { │ │ │ │ │ + 219 return 2; │ │ │ │ │ + 220 } │ │ │ │ │ + 221 │ │ │ │ │ + 222 }; │ │ │ │ │ + 223 │ │ │ │ │ + 247 template │ │ │ │ │ +248 class HierarchicalSimplexP2LocalBasis │ │ │ │ │ + 249 { │ │ │ │ │ + 250 public: │ │ │ │ │ + 252 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +253 Dune::FieldMatrix > Traits; │ │ │ │ │ + 254 │ │ │ │ │ +256 unsigned int size () const │ │ │ │ │ + 257 { │ │ │ │ │ + 258 return 10; │ │ │ │ │ + 259 } │ │ │ │ │ + 260 │ │ │ │ │ +262 void evaluateFunction (const typename Traits::DomainType& 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 │ │ │ │ │ +280 void evaluateJacobian (const typename Traits::DomainType& 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 │ │ │ │ │ +298 void partial (const std::array& order, │ │ │ │ │ + 299 const typename Traits::DomainType& 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 │ │ │ │ │ +356 unsigned int order () const │ │ │ │ │ + 357 { │ │ │ │ │ + 358 return 2; │ │ │ │ │ + 359 } │ │ │ │ │ + 360 │ │ │ │ │ + 361 }; │ │ │ │ │ + 362} │ │ │ │ │ + 363#endif │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::field_cast │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -Definition field.hh:159 │ │ │ │ │ -Dune::BasisMatrix │ │ │ │ │ -Definition basismatrix.hh:27 │ │ │ │ │ -Dune::BasisMatrixBase │ │ │ │ │ -Definition basismatrix.hh:32 │ │ │ │ │ -Dune::BasisMatrixBase::cols │ │ │ │ │ -unsigned int cols() const │ │ │ │ │ -Definition basismatrix.hh:46 │ │ │ │ │ -Dune::BasisMatrixBase::rows │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -Definition basismatrix.hh:50 │ │ │ │ │ -Dune::BasisMatrixBase::BasisMatrixBase │ │ │ │ │ -BasisMatrixBase(const PreBasis &preBasis, const Interpolation │ │ │ │ │ -&localInterpolation) │ │ │ │ │ -Definition basismatrix.hh:35 │ │ │ │ │ -Dune::BasisMatrixBase::Matrix │ │ │ │ │ -LFEMatrix< Field > Matrix │ │ │ │ │ -Definition basismatrix.hh:33 │ │ │ │ │ -Dune::BasisMatrix<_const_MonomialBasis<_geometryId,_F_>,_Interpolation,_Field │ │ │ │ │ ->::row │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -Definition basismatrix.hh:73 │ │ │ │ │ -Dune::BasisMatrix<_const_MonomialBasis<_geometryId,_F_>,_Interpolation,_Field │ │ │ │ │ ->::PreBasis │ │ │ │ │ -const MonomialBasis< geometryId, F > PreBasis │ │ │ │ │ -Definition basismatrix.hh:64 │ │ │ │ │ -Dune::BasisMatrix<_const_MonomialBasis<_geometryId,_F_>,_Interpolation,_Field │ │ │ │ │ ->::Matrix │ │ │ │ │ -Base::Matrix Matrix │ │ │ │ │ -Definition basismatrix.hh:66 │ │ │ │ │ -Dune::BasisMatrix<_const_MonomialBasis<_geometryId,_F_>,_Interpolation,_Field │ │ │ │ │ ->::BasisMatrix │ │ │ │ │ -BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ -Definition basismatrix.hh:68 │ │ │ │ │ -Dune::BasisMatrix<_const_MonomialBasis<_geometryId,_F_>,_Interpolation,_Field │ │ │ │ │ ->::Base │ │ │ │ │ -BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ -Definition basismatrix.hh:65 │ │ │ │ │ -Dune::BasisMatrix<_const_Dune::VirtualMonomialBasis<_dim,_F_>,_Interpolation, │ │ │ │ │ -Field_>::row │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -Definition basismatrix.hh:98 │ │ │ │ │ -Dune::BasisMatrix<_const_Dune::VirtualMonomialBasis<_dim,_F_>,_Interpolation, │ │ │ │ │ -Field_>::Base │ │ │ │ │ -BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ -Definition basismatrix.hh:90 │ │ │ │ │ -Dune::BasisMatrix<_const_Dune::VirtualMonomialBasis<_dim,_F_>,_Interpolation, │ │ │ │ │ -Field_>::Matrix │ │ │ │ │ -Base::Matrix Matrix │ │ │ │ │ -Definition basismatrix.hh:91 │ │ │ │ │ -Dune::BasisMatrix<_const_Dune::VirtualMonomialBasis<_dim,_F_>,_Interpolation, │ │ │ │ │ -Field_>::PreBasis │ │ │ │ │ -const VirtualMonomialBasis< dim, F > PreBasis │ │ │ │ │ -Definition basismatrix.hh:89 │ │ │ │ │ -Dune::BasisMatrix<_const_Dune::VirtualMonomialBasis<_dim,_F_>,_Interpolation, │ │ │ │ │ -Field_>::BasisMatrix │ │ │ │ │ -BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ -Definition basismatrix.hh:93 │ │ │ │ │ -Dune::BasisMatrix<_const_PolynomialBasis<_Eval,_CM,_D,_R_>,_Interpolation, │ │ │ │ │ -Field_>::Matrix │ │ │ │ │ -Base::Matrix Matrix │ │ │ │ │ -Definition basismatrix.hh:116 │ │ │ │ │ -Dune::BasisMatrix<_const_PolynomialBasis<_Eval,_CM,_D,_R_>,_Interpolation, │ │ │ │ │ -Field_>::Base │ │ │ │ │ -BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ -Definition basismatrix.hh:115 │ │ │ │ │ -Dune::BasisMatrix<_const_PolynomialBasis<_Eval,_CM,_D,_R_>,_Interpolation, │ │ │ │ │ -Field_>::BasisMatrix │ │ │ │ │ -BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ -Definition basismatrix.hh:118 │ │ │ │ │ -Dune::BasisMatrix<_const_PolynomialBasis<_Eval,_CM,_D,_R_>,_Interpolation, │ │ │ │ │ -Field_>::cols │ │ │ │ │ -unsigned int cols() const │ │ │ │ │ -Definition basismatrix.hh:123 │ │ │ │ │ -Dune::BasisMatrix<_const_PolynomialBasis<_Eval,_CM,_D,_R_>,_Interpolation, │ │ │ │ │ -Field_>::row │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -Definition basismatrix.hh:128 │ │ │ │ │ -Dune::BasisMatrix<_const_PolynomialBasis<_Eval,_CM,_D,_R_>,_Interpolation, │ │ │ │ │ -Field_>::PreBasis │ │ │ │ │ -const PolynomialBasis< Eval, CM, D, R > PreBasis │ │ │ │ │ -Definition basismatrix.hh:114 │ │ │ │ │ -Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ -Field_>::PreBasis │ │ │ │ │ -const PolynomialBasisWithMatrix< Eval, CM > PreBasis │ │ │ │ │ -Definition basismatrix.hh:148 │ │ │ │ │ -Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ -Field_>::Base │ │ │ │ │ -BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ -Definition basismatrix.hh:149 │ │ │ │ │ -Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ -Field_>::rows │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -Definition basismatrix.hh:161 │ │ │ │ │ -Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ -Field_>::Matrix │ │ │ │ │ -Base::Matrix Matrix │ │ │ │ │ -Definition basismatrix.hh:150 │ │ │ │ │ -Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ -Field_>::BasisMatrix │ │ │ │ │ -BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ -Definition basismatrix.hh:152 │ │ │ │ │ -Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ -Field_>::row │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -Definition basismatrix.hh:167 │ │ │ │ │ -Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ -Field_>::cols │ │ │ │ │ -unsigned int cols() const │ │ │ │ │ -Definition basismatrix.hh:157 │ │ │ │ │ -Dune::LFEMatrix │ │ │ │ │ -Definition lfematrix.hh:18 │ │ │ │ │ -Dune::LFEMatrix<_Field_>::rows │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -Definition lfematrix.hh:58 │ │ │ │ │ -Dune::LFEMatrix<_Field_>::invert │ │ │ │ │ -bool invert() │ │ │ │ │ -Definition lfematrix.hh:89 │ │ │ │ │ -Dune::LFEMatrix<_Field_>::Field │ │ │ │ │ -Field Field │ │ │ │ │ -Definition lfematrix.hh:24 │ │ │ │ │ -Dune::MonomialBasis │ │ │ │ │ -Definition monomialbasis.hh:440 │ │ │ │ │ -Dune::VirtualMonomialBasis │ │ │ │ │ -Definition monomialbasis.hh:612 │ │ │ │ │ -Dune::PolynomialBasis │ │ │ │ │ -Definition polynomialbasis.hh:65 │ │ │ │ │ -Dune::PolynomialBasisWithMatrix │ │ │ │ │ -Definition polynomialbasis.hh:348 │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:23 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis::HierarchicalSimplexP2LocalBasis │ │ │ │ │ +HierarchicalSimplexP2LocalBasis() │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:25 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_1_>::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions (2, in this case) │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:108 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_1_>::Traits │ │ │ │ │ +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 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_1_>::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_1_>::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:54 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_1_>::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:72 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_1_>::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:60 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_2_>::Traits │ │ │ │ │ +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 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_2_>::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_2_>::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:143 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_2_>::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions (2 in this case) │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:217 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_2_>::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:165 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_2_>::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:149 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_>::Traits │ │ │ │ │ +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 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_>::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:262 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_>::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:280 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_>::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:256 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_>::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_>::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions (2 in this case) │ │ │ │ │ +Definition hierarchicalsimplexp2localbasis.hh:356 │ │ │ │ │ +localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00032.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: defaultbasisfactory.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalsimplexp2localinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,37 +65,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
defaultbasisfactory.hh File Reference
│ │ │ │ +
hierarchicalsimplexp2localinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/localfunctions/utility/basismatrix.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

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 >
class  Dune::HierarchicalSimplexP2LocalInterpolation< LB >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,29 +6,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ + * hierarchical │ │ │ │ │ + * hierarchicalp2 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -defaultbasisfactory.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +hierarchicalsimplexp2localinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -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_> │ │ │ │ │ +class  Dune::HierarchicalSimplexP2LocalInterpolation<_LB_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00032_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: defaultbasisfactory.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalsimplexp2localinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,151 +70,134 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
defaultbasisfactory.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_DEFAULTBASISFACTORY_HH
│ │ │ │ -
6#define DUNE_DEFAULTBASISFACTORY_HH
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <dune/common/exceptions.hh>
│ │ │ │ +
8#include <vector>
│ │ │ │ + │ │ │ │
10
│ │ │ │ - │ │ │ │ -
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;
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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 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 );
│ │ │ │ +
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 const MonomialBasis *monomialBasis = MonomialBasisFactory::template create< geometryId >( preBasis->order() );
│ │ │ │ +
69 break;
│ │ │ │
70
│ │ │ │ -
71 Basis *basis = new Basis( *monomialBasis );
│ │ │ │ +
71 case 3 :
│ │ │ │
72
│ │ │ │ -
73 basis->fill( matrix );
│ │ │ │ +
73 out.resize(10);
│ │ │ │
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
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
│ │ │ │ +
Definition hierarchicalsimplexp2localinterpolation.hh:18
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Definition hierarchicalsimplexp2localinterpolation.hh:22
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,190 +7,128 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -defaultbasisfactory.hh │ │ │ │ │ + * hierarchical │ │ │ │ │ + * hierarchicalp2 │ │ │ │ │ +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_DEFAULTBASISFACTORY_HH │ │ │ │ │ - 6#define DUNE_DEFAULTBASISFACTORY_HH │ │ │ │ │ + 5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ -15 struct Identity │ │ │ │ │ - 16 { │ │ │ │ │ - 17 template │ │ │ │ │ -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 > │ │ │ │ │ -37 struct DefaultBasisFactory │ │ │ │ │ - 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:: │ │ │ │ │ -Type MonomialBasisFactory; │ │ │ │ │ -48 typedef typename MonomialBasisFactory::Object MonomialBasis; │ │ │ │ │ -49 typedef StandardEvaluator<_MonomialBasis_> Evaluator; │ │ │ │ │ -50 typedef PolynomialBasisWithMatrix<_Evaluator,_SparseCoeffMatrix<_SF, │ │ │ │ │ -dimRange_> > Basis; │ │ │ │ │ + 11namespace Dune │ │ │ │ │ + 12{ │ │ │ │ │ + 16 template │ │ │ │ │ +17 class HierarchicalSimplexP2LocalInterpolation │ │ │ │ │ + 18 { │ │ │ │ │ + 19 public: │ │ │ │ │ + 20 │ │ │ │ │ + 21 template │ │ │ │ │ +22 void interpolate (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 typedef const Basis Object; │ │ │ │ │ -53 typedef typename InterpolationFactory::Key Key; │ │ │ │ │ - 54 template │ │ │ │ │ -55 struct EvaluationBasisFactory │ │ │ │ │ - 56 { │ │ │ │ │ - 57 typedef typename PreBasisFactory::template EvaluationBasisFactory:: │ │ │ │ │ -Type │ │ │ │ │ -58 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 │ │ │ │ │ -( preBasisKey ); │ │ │ │ │ - 66 const Interpolation *interpol = InterpolationFactory::template │ │ │ │ │ -create( key ); │ │ │ │ │ - 67 BasisMatrix<_PreBasis,_Interpolation,_ComputeField_> matrix( *preBasis, │ │ │ │ │ -*interpol ); │ │ │ │ │ + 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 const MonomialBasis *monomialBasis = MonomialBasisFactory::template create< │ │ │ │ │ -geometryId >( preBasis->order() ); │ │ │ │ │ + 69 break; │ │ │ │ │ 70 │ │ │ │ │ - 71 Basis *basis = new Basis( *monomialBasis ); │ │ │ │ │ + 71 case 3 : │ │ │ │ │ 72 │ │ │ │ │ - 73 basis->fill( matrix ); │ │ │ │ │ + 73 out.resize(10); │ │ │ │ │ 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 │ │ │ │ │ -basismatrix.hh │ │ │ │ │ + 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::StandardEvaluator │ │ │ │ │ -Definition basisevaluator.hh:131 │ │ │ │ │ -Dune::BasisMatrix │ │ │ │ │ -Definition basismatrix.hh:27 │ │ │ │ │ -Dune::Identity │ │ │ │ │ -Definition defaultbasisfactory.hh:16 │ │ │ │ │ -Dune::Identity::apply │ │ │ │ │ -static T apply(const T &t) │ │ │ │ │ -Definition defaultbasisfactory.hh:18 │ │ │ │ │ -Dune::DefaultBasisFactory │ │ │ │ │ -Definition defaultbasisfactory.hh:38 │ │ │ │ │ -Dune::DefaultBasisFactory::Interpolation │ │ │ │ │ -InterpolationFactory::Object Interpolation │ │ │ │ │ -Definition defaultbasisfactory.hh:46 │ │ │ │ │ -Dune::DefaultBasisFactory::dimRange │ │ │ │ │ -static const unsigned int dimRange │ │ │ │ │ -Definition defaultbasisfactory.hh:40 │ │ │ │ │ -Dune::DefaultBasisFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -release the object returned by the create methods │ │ │ │ │ -Definition defaultbasisfactory.hh:81 │ │ │ │ │ -Dune::DefaultBasisFactory::ComputeField │ │ │ │ │ -CF ComputeField │ │ │ │ │ -Definition defaultbasisfactory.hh:42 │ │ │ │ │ -Dune::DefaultBasisFactory::PreBasisFactory │ │ │ │ │ -PreBFactory PreBasisFactory │ │ │ │ │ -Definition defaultbasisfactory.hh:43 │ │ │ │ │ -Dune::DefaultBasisFactory::Key │ │ │ │ │ -InterpolationFactory::Key Key │ │ │ │ │ -Definition defaultbasisfactory.hh:53 │ │ │ │ │ -Dune::DefaultBasisFactory::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition defaultbasisfactory.hh:39 │ │ │ │ │ -Dune::DefaultBasisFactory::create │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -Definition defaultbasisfactory.hh:62 │ │ │ │ │ -Dune::DefaultBasisFactory::StorageField │ │ │ │ │ -SF StorageField │ │ │ │ │ -Definition defaultbasisfactory.hh:41 │ │ │ │ │ -Dune::DefaultBasisFactory::MonomialBasis │ │ │ │ │ -MonomialBasisFactory::Object MonomialBasis │ │ │ │ │ -Definition defaultbasisfactory.hh:48 │ │ │ │ │ -Dune::DefaultBasisFactory::PreBasis │ │ │ │ │ -PreBasisFactory::Object PreBasis │ │ │ │ │ -Definition defaultbasisfactory.hh:44 │ │ │ │ │ -Dune::DefaultBasisFactory::Object │ │ │ │ │ -const Basis Object │ │ │ │ │ -Definition defaultbasisfactory.hh:52 │ │ │ │ │ -Dune::DefaultBasisFactory::Evaluator │ │ │ │ │ -StandardEvaluator< MonomialBasis > Evaluator │ │ │ │ │ -Definition defaultbasisfactory.hh:49 │ │ │ │ │ -Dune::DefaultBasisFactory::InterpolationFactory │ │ │ │ │ -InterpolFactory InterpolationFactory │ │ │ │ │ -Definition defaultbasisfactory.hh:45 │ │ │ │ │ -Dune::DefaultBasisFactory::MonomialBasisFactory │ │ │ │ │ -PreBasisFactory::template EvaluationBasisFactory< dim, SF >::Type │ │ │ │ │ -MonomialBasisFactory │ │ │ │ │ -Definition defaultbasisfactory.hh:47 │ │ │ │ │ -Dune::DefaultBasisFactory::Basis │ │ │ │ │ -PolynomialBasisWithMatrix< Evaluator, SparseCoeffMatrix< SF, dimRange > > Basis │ │ │ │ │ -Definition defaultbasisfactory.hh:50 │ │ │ │ │ -Dune::DefaultBasisFactory::EvaluationBasisFactory │ │ │ │ │ -Definition defaultbasisfactory.hh:56 │ │ │ │ │ -Dune::DefaultBasisFactory::EvaluationBasisFactory::Type │ │ │ │ │ -PreBasisFactory::template EvaluationBasisFactory< dd, FF >::Type Type │ │ │ │ │ -Definition defaultbasisfactory.hh:58 │ │ │ │ │ -Dune::VirtualMonomialBasis │ │ │ │ │ -Definition monomialbasis.hh:612 │ │ │ │ │ -Dune::MonomialBasisFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition monomialbasis.hh:769 │ │ │ │ │ -Dune::PolynomialBasisWithMatrix │ │ │ │ │ -Definition polynomialbasis.hh:348 │ │ │ │ │ -Dune::PolynomialBasisWithMatrix::fill │ │ │ │ │ -void fill(const Matrix &matrix) │ │ │ │ │ -Definition polynomialbasis.hh:366 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalInterpolation │ │ │ │ │ +Definition hierarchicalsimplexp2localinterpolation.hh:18 │ │ │ │ │ +Dune::HierarchicalSimplexP2LocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Definition hierarchicalsimplexp2localinterpolation.hh:22 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00035.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: field.hh File Reference │ │ │ │ +dune-localfunctions: rannacherturek.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,129 +65,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
field.hh File Reference
│ │ │ │ +
rannacherturek.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/gmpfield.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ + │ │ │ │ +

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

│ │ │ │ + │ │ │ │

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 >
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -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)
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Convenience header that includes all available Rannacher-Turek LocalFiniteElements.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,129 +6,18 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -Classes | Namespaces | Functions │ │ │ │ │ -field.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +rannacherturek.hh File Reference │ │ │ │ │ +Convenience header that includes all available Rannacher-Turek │ │ │ │ │ +LocalFiniteElements. More... │ │ │ │ │ +#include │ │ │ │ │ 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_> │ │ │ │ │ -  │ │ │ │ │ - Namespaces │ │ │ │ │ -namespace  Dune │ │ │ │ │ -  │ │ │ │ │ - Functions │ │ │ │ │ -template │ │ │ │ │ - Field Dune::operator+ (const Unity< Field > &u, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - Field Dune::operator- (const Unity< Field > &u, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - Field Dune::operator* (const Unity< Field > &u, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - Field Dune::operator/ (const Unity< Field > &u, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool Dune::operator== (const Zero< Field > &, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool Dune::operator== (const Field &f, const Zero< Field > │ │ │ │ │ - &z) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool Dune::operator< (const Zero< Field > &, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool Dune::operator< (const Field &f, const Zero< Field > │ │ │ │ │ - &) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool Dune::operator> (const Zero< Field > &z, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool Dune::operator> (const Field &f, const Zero< Field > │ │ │ │ │ - &z) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void Dune::field_cast (const F1 &f1, F2 &f2) │ │ │ │ │ -  a helper class to cast from one field to another │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void Dune::field_cast (const Dune::FieldVector< F1, dim > │ │ │ │ │ - &f1, Dune::FieldVector< F2, dim > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void Dune::field_cast (const Dune::FieldVector< F1, 1 > │ │ │ │ │ - &f1, F2 &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void Dune::field_cast (const F1 &f1, Dune::FieldVector< │ │ │ │ │ - F2, 1 > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void Dune::field_cast (const Dune::FieldMatrix< F1, rdim, │ │ │ │ │ - cdim > &f1, Dune::FieldMatrix< F2, rdim, cdim > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void Dune::field_cast (const Dune::FieldMatrix< F1, 1, 1 > │ │ │ │ │ - &f1, Dune::FieldMatrix< F2, 1, 1 > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void Dune::field_cast (const Dune::FieldMatrix< F1, 1, 1 > │ │ │ │ │ - &f1, F2 &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void Dune::field_cast (const F1 &f1, Dune::FieldMatrix< │ │ │ │ │ - F2, 1, 1 > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void Dune::field_cast (const Dune::FieldVector< F1, 1 > │ │ │ │ │ - &f1, Dune::FieldMatrix< F2, 1, 1 > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void Dune::field_cast (const Dune::FieldMatrix< F1, 1, 1 > │ │ │ │ │ - &f1, Dune::FieldVector< F2, 1 > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void Dune::field_cast (const Dune::FieldVector< F1, 1 > │ │ │ │ │ - &f1, Dune::FieldVector< F2, 1 > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -FieldCast< F2, V >::type Dune::field_cast (const V &f1) │ │ │ │ │ -  │ │ │ │ │ +***** Detailed Description ***** │ │ │ │ │ +Convenience header that includes all available Rannacher-Turek │ │ │ │ │ +LocalFiniteElements. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00035_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: field.hh Source File │ │ │ │ +dune-localfunctions: rannacherturek.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,385 +70,27 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
field.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_UTILITY_FIELD_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <dune/common/gmpfield.hh>
│ │ │ │ -
9#include <dune/common/fvector.hh>
│ │ │ │ -
10#include <dune/common/fmatrix.hh>
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
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< 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 }
│ │ │ │ -
│ │ │ │ -
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#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
│ │ │ │ -
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
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,353 +7,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -field.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_UTILITY_FIELD_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12namespace Dune │ │ │ │ │ - 13{ │ │ │ │ │ - 14 │ │ │ │ │ - 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< 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 } │ │ │ │ │ - 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#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::epsilon() && f > -Zero::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::epsilon(); │ │ │ │ │ - 122 } │ │ │ │ │ - 123 │ │ │ │ │ - 124 template< class Field > │ │ │ │ │ -125 inline bool operator<( const Field &f, const Zero<_Field_> & ) │ │ │ │ │ - 126 { │ │ │ │ │ - 127 return f < -Zero::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, 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, 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, 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 ) │ │ │ │ │ - 229 { │ │ │ │ │ - 230 field_cast( f1[ 0 ], f2[ 0 ] ); │ │ │ │ │ - 231 } │ │ │ │ │ - 232 │ │ │ │ │ - 233 template< class F2,class V > │ │ │ │ │ -234 struct FieldCast │ │ │ │ │ - 235 { │ │ │ │ │ -236 typedef F2 type; │ │ │ │ │ - 237 }; │ │ │ │ │ - 238 template< class F2,class F1,int dim > │ │ │ │ │ -239 struct FieldCast< F2, Dune::FieldVector > │ │ │ │ │ - 240 { │ │ │ │ │ -241 typedef Dune::FieldVector type; │ │ │ │ │ - 242 }; │ │ │ │ │ - 243 template< class F2,class F1,int dim1, int dim2> │ │ │ │ │ -244 struct FieldCast< F2, Dune::FieldMatrix > │ │ │ │ │ - 245 { │ │ │ │ │ -246 typedef Dune::FieldMatrix type; │ │ │ │ │ - 247 }; │ │ │ │ │ - 248 template< class F2,class V > │ │ │ │ │ -249 inline typename FieldCast::type field_cast ( const V &f1 ) │ │ │ │ │ - 250 { │ │ │ │ │ - 251 typename FieldCast::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 │ │ │ │ │ -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 │ │ │ │ │ -296 struct ComputeField │ │ │ │ │ - 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 Type; │ │ │ │ │ - 306 }; │ │ │ │ │ - 307#endif │ │ │ │ │ - 308} // namespace Dune │ │ │ │ │ - 309 │ │ │ │ │ - 310#endif // #ifndef DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH │ │ │ │ │ -Dune │ │ │ │ │ -Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::operator- │ │ │ │ │ -Field operator-(const Unity< Field > &u, const Field &f) │ │ │ │ │ -Definition field.hh:44 │ │ │ │ │ -Dune::field_cast │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -Definition field.hh:159 │ │ │ │ │ -Dune::operator< │ │ │ │ │ -bool operator<(const Zero< Field > &, const Field &f) │ │ │ │ │ -Definition field.hh:119 │ │ │ │ │ -Dune::operator== │ │ │ │ │ -bool operator==(const Zero< Field > &, const Field &f) │ │ │ │ │ -Definition field.hh:107 │ │ │ │ │ -Dune::operator> │ │ │ │ │ -bool operator>(const Zero< Field > &z, const Field &f) │ │ │ │ │ -Definition field.hh:131 │ │ │ │ │ -Dune::operator+ │ │ │ │ │ -Field operator+(const Unity< Field > &u, const Field &f) │ │ │ │ │ -Definition field.hh:38 │ │ │ │ │ -Dune::operator/ │ │ │ │ │ -Field operator/(const Unity< Field > &u, const Field &f) │ │ │ │ │ -Definition field.hh:56 │ │ │ │ │ -Dune::operator* │ │ │ │ │ -Field operator*(const Unity< Field > &u, const Field &f) │ │ │ │ │ -Definition field.hh:50 │ │ │ │ │ -Dune::Unity │ │ │ │ │ -A class representing the unit of a given Field. │ │ │ │ │ -Definition field.hh:30 │ │ │ │ │ -Dune::Zero │ │ │ │ │ -A class representing the zero of a given Field. │ │ │ │ │ -Definition field.hh:79 │ │ │ │ │ -Dune::Zero::epsilon │ │ │ │ │ -static const Field epsilon() │ │ │ │ │ -Definition field.hh:84 │ │ │ │ │ -Dune::FieldCast │ │ │ │ │ -Definition field.hh:235 │ │ │ │ │ -Dune::FieldCast::type │ │ │ │ │ -F2 type │ │ │ │ │ -Definition field.hh:236 │ │ │ │ │ -Dune::FieldCast<_F2,_Dune::FieldVector<_F1,_dim_>_>::type │ │ │ │ │ -Dune::FieldVector< F2, dim > type │ │ │ │ │ -Definition field.hh:241 │ │ │ │ │ -Dune::FieldCast<_F2,_Dune::FieldMatrix<_F1,_dim1,_dim2_>_>::type │ │ │ │ │ -Dune::FieldMatrix< F2, dim1, dim2 > type │ │ │ │ │ -Definition field.hh:246 │ │ │ │ │ -Dune::Precision │ │ │ │ │ -Definition field.hh:264 │ │ │ │ │ -Dune::ComputeField │ │ │ │ │ -Definition field.hh:297 │ │ │ │ │ -Dune::ComputeField::Type │ │ │ │ │ -Field Type │ │ │ │ │ -Definition field.hh:298 │ │ │ │ │ + 9#include │ │ │ │ │ +rannacherturek.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00038.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: l2interpolation.hh File Reference │ │ │ │ +dune-localfunctions: dualp1localbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
l2interpolation.hh File Reference
│ │ │ │ +
dualp1localbasis.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>
│ │ │ │ +
#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::DualP1LocalBasis< D, R, dim, faceDualT >
 Dual Lagrange shape functions on the simplex. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,32 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ + * dualp1 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -l2interpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +dualp1localbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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::DualP1LocalBasis<_D,_R,_dim,_faceDualT_> │ │ │ │ │ +  Dual Lagrange shape functions on the simplex. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00038_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: l2interpolation.hh Source File │ │ │ │ +dune-localfunctions: dualp1localbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,280 +70,147 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
l2interpolation.hh
│ │ │ │ +
dualp1localbasis.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_DUAL_P1_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_DUAL_P1_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/concept.hh>
│ │ │ │ +
8#include <numeric>
│ │ │ │
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 {
│ │ │ │ - │ │ │ │ -
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 );
│ │ │ │ +
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 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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │
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
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,316 +7,165 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -l2interpolation.hh │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ + * dualp1 │ │ │ │ │ +dualp1localbasis.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_DUAL_P1_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_DUAL_P1_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 32 template< class B, class Q, bool onb > │ │ │ │ │ -33 struct LocalL2Interpolation; │ │ │ │ │ - 34 │ │ │ │ │ - 35 template< class B, class Q > │ │ │ │ │ -36 class LocalL2InterpolationBase │ │ │ │ │ - 37 { │ │ │ │ │ - 38 typedef LocalL2InterpolationBase<_B,_Q_> This; │ │ │ │ │ - 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, 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 │ │ │ │ │ -(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 } │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14namespace Dune │ │ │ │ │ + 15{ │ │ │ │ │ + 32 template │ │ │ │ │ +33 class DualP1LocalBasis │ │ │ │ │ + 34 { │ │ │ │ │ + 35 public: │ │ │ │ │ +37 static const bool faceDual = faceDualT; │ │ │ │ │ + 39 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +40 Dune::FieldMatrix > 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& out) const │ │ │ │ │ + 51 { │ │ │ │ │ + 52 // evaluate P1 basis functions │ │ │ │ │ + 53 std::vector p1Values(size()); │ │ │ │ │ + 54 │ │ │ │ │ + 55 p1Values[0] = 1.0; │ │ │ │ │ + 56 │ │ │ │ │ + 57 for (int i=0; i, 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 ); │ │ │ │ │ + 73 } │ │ │ │ │ + 74 │ │ │ │ │ + 76 inline void │ │ │ │ │ +77 evaluateJacobian (const typename Traits::DomainType& in, │ │ │ │ │ + 78 std::vector& out) const │ │ │ │ │ + 79 { │ │ │ │ │ + 80 // evaluate P1 jacobians │ │ │ │ │ + 81 std::vector p1Jacs(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_; │ │ │ │ │ + 83 for (int i=0; i │ │ │ │ │ -120 struct LocalL2Interpolation │ │ │ │ │ - 121 : public LocalL2InterpolationBase │ │ │ │ │ - 122 { │ │ │ │ │ -123 typedef LocalL2InterpolationBase Base; │ │ │ │ │ - 124 template< class BasisFactory, bool onb > │ │ │ │ │ -125 friend class LocalL2InterpolationFactory; │ │ │ │ │ - 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 │ │ │ │ │ - 135 : public LocalL2InterpolationBase │ │ │ │ │ - 136 { │ │ │ │ │ -137 typedef LocalL2InterpolationBase Base; │ │ │ │ │ - 138 template< class BasisFactory, bool onb > │ │ │ │ │ -139 friend class LocalL2InterpolationFactory; │ │ │ │ │ - 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(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; 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 > │ │ │ │ │ -198 struct LocalL2InterpolationFactory │ │ │ │ │ - 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 Quadrature; │ │ │ │ │ -205 typedef QuadratureRules QuadratureProvider; │ │ │ │ │ -206 typedef LocalL2Interpolation<_Basis,_Quadrature,_onb_> LocalInterpolation; │ │ │ │ │ -207 typedef const LocalInterpolation Object; │ │ │ │ │ - 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 │ │ │ │ │ -lfematrix.hh │ │ │ │ │ + 103 } │ │ │ │ │ + 104 │ │ │ │ │ +106 void partial (const std::array& order, │ │ │ │ │ + 107 const typename Traits::DomainType& in, // position │ │ │ │ │ + 108 std::vector& 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::Zero │ │ │ │ │ -A class representing the zero of a given Field. │ │ │ │ │ -Definition field.hh:79 │ │ │ │ │ -Dune::LocalL2Interpolation │ │ │ │ │ -A local L2 interpolation taking a test basis and a quadrature rule. │ │ │ │ │ -Definition l2interpolation.hh:33 │ │ │ │ │ -Dune::LocalL2InterpolationBase │ │ │ │ │ -Definition l2interpolation.hh:37 │ │ │ │ │ -Dune::LocalL2InterpolationBase::LocalL2InterpolationBase │ │ │ │ │ -LocalL2InterpolationBase(const Basis &basis, const Quadrature &quadrature) │ │ │ │ │ -Definition l2interpolation.hh:110 │ │ │ │ │ -Dune::LocalL2InterpolationBase::interpolate │ │ │ │ │ -void interpolate(const Function &function, std::vector< DofField > │ │ │ │ │ -&coefficients) const │ │ │ │ │ -Interpolate a function that implements void evaluate(Domain, Range&) │ │ │ │ │ -Definition l2interpolation.hh:48 │ │ │ │ │ -Dune::LocalL2InterpolationBase::basis │ │ │ │ │ -const Basis & basis() const │ │ │ │ │ -Definition l2interpolation.hh:99 │ │ │ │ │ -Dune::LocalL2InterpolationBase::quadrature_ │ │ │ │ │ -const Quadrature & quadrature_ │ │ │ │ │ -Definition l2interpolation.hh:116 │ │ │ │ │ -Dune::LocalL2InterpolationBase::basis_ │ │ │ │ │ -const Basis & basis_ │ │ │ │ │ -Definition l2interpolation.hh:115 │ │ │ │ │ -Dune::LocalL2InterpolationBase::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition l2interpolation.hh:44 │ │ │ │ │ -Dune::LocalL2InterpolationBase::quadrature │ │ │ │ │ -const Quadrature & quadrature() const │ │ │ │ │ -Definition l2interpolation.hh:104 │ │ │ │ │ -Dune::LocalL2InterpolationBase::Quadrature │ │ │ │ │ -Q Quadrature │ │ │ │ │ -Definition l2interpolation.hh:42 │ │ │ │ │ -Dune::LocalL2InterpolationBase::Basis │ │ │ │ │ -B Basis │ │ │ │ │ -Definition l2interpolation.hh:41 │ │ │ │ │ -Dune::LocalL2Interpolation<_B,_Q,_true_>::Base │ │ │ │ │ -LocalL2InterpolationBase< B, Q > Base │ │ │ │ │ -Definition l2interpolation.hh:123 │ │ │ │ │ -Dune::LocalL2Interpolation<_B,_Q,_false_>::interpolate │ │ │ │ │ -void interpolate(const Function &function, std::vector< DofField > │ │ │ │ │ -&coefficients) const │ │ │ │ │ -Definition l2interpolation.hh:143 │ │ │ │ │ -Dune::LocalL2Interpolation<_B,_Q,_false_>::Base │ │ │ │ │ -LocalL2InterpolationBase< B, Q > Base │ │ │ │ │ -Definition l2interpolation.hh:137 │ │ │ │ │ -Dune::LocalL2InterpolationFactory │ │ │ │ │ -A factory class for the local l2 interpolations taking a basis factory. │ │ │ │ │ -Definition l2interpolation.hh:199 │ │ │ │ │ -Dune::LocalL2InterpolationFactory::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition l2interpolation.hh:200 │ │ │ │ │ -Dune::LocalL2InterpolationFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition l2interpolation.hh:217 │ │ │ │ │ -Dune::LocalL2InterpolationFactory::Basis │ │ │ │ │ -BasisFactory::Object Basis │ │ │ │ │ -Definition l2interpolation.hh:202 │ │ │ │ │ -Dune::LocalL2InterpolationFactory::Field │ │ │ │ │ -double Field │ │ │ │ │ -Definition l2interpolation.hh:203 │ │ │ │ │ -Dune::LocalL2InterpolationFactory::QuadratureProvider │ │ │ │ │ -QuadratureRules< Field, dimension > QuadratureProvider │ │ │ │ │ -Definition l2interpolation.hh:205 │ │ │ │ │ -Dune::LocalL2InterpolationFactory::Quadrature │ │ │ │ │ -QuadratureRule< Field, dimension > Quadrature │ │ │ │ │ -Definition l2interpolation.hh:204 │ │ │ │ │ -Dune::LocalL2InterpolationFactory::create │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -Definition l2interpolation.hh:210 │ │ │ │ │ -Dune::LocalL2InterpolationFactory::Key │ │ │ │ │ -BasisFactory::Key Key │ │ │ │ │ -Definition l2interpolation.hh:201 │ │ │ │ │ -Dune::LocalL2InterpolationFactory::Object │ │ │ │ │ -const LocalInterpolation Object │ │ │ │ │ -Definition l2interpolation.hh:207 │ │ │ │ │ -Dune::LocalL2InterpolationFactory::LocalInterpolation │ │ │ │ │ -LocalL2Interpolation< Basis, Quadrature, onb > LocalInterpolation │ │ │ │ │ -Definition l2interpolation.hh:206 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::DualP1LocalBasis │ │ │ │ │ +Dual Lagrange shape functions on the simplex. │ │ │ │ │ +Definition dualp1localbasis.hh:34 │ │ │ │ │ +Dune::DualP1LocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition dualp1localbasis.hh:119 │ │ │ │ │ +Dune::DualP1LocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition dualp1localbasis.hh:49 │ │ │ │ │ +Dune::DualP1LocalBasis::faceDual │ │ │ │ │ +static const bool faceDual │ │ │ │ │ +Determines if the basis is only biorthogonal on adjacent faces. │ │ │ │ │ +Definition dualp1localbasis.hh:37 │ │ │ │ │ +Dune::DualP1LocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::DualP1LocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition dualp1localbasis.hh:43 │ │ │ │ │ +Dune::DualP1LocalBasis::Traits │ │ │ │ │ +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 │ │ │ │ │ +Dune::DualP1LocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition dualp1localbasis.hh:77 │ │ │ │ │ +localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00041.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basisevaluator.hh File Reference │ │ │ │ +dune-localfunctions: dualp1localinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,46 +65,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
basisevaluator.hh File Reference
│ │ │ │ +
dualp1localinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <vector>
│ │ │ │ -#include <dune/common/fmatrix.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>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

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 >
class  Dune::DualP1LocalInterpolation< dim, LB >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,36 +6,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ + * dualp1 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -basisevaluator.hh File Reference │ │ │ │ │ +dualp1localinterpolation.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -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_> │ │ │ │ │ +class  Dune::DualP1LocalInterpolation<_dim,_LB_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00041_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basisevaluator.hh Source File │ │ │ │ +dune-localfunctions: dualp1localinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,279 +70,89 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
basisevaluator.hh
│ │ │ │ +
dualp1localinterpolation.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_DUAL_P1_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_DUAL_P1_LOCALINTERPOLATION_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 *******************************************/
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
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;
│ │ │ │ +
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);
│ │ │ │ +
40
│ │ │ │ +
41 p1Interpolation[i+1] = f(x);
│ │ │ │
42
│ │ │ │ -
43 template <unsigned int deriv>
│ │ │ │ -
│ │ │ │ -
44 struct Iterator
│ │ │ │ -
45 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
48 };
│ │ │ │ -
│ │ │ │ +
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 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 }
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │
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
│ │ │ │ +
Definition dualp1localinterpolation.hh:15
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Local interpolation of a function.
Definition dualp1localinterpolation.hh:19
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,325 +7,84 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -basisevaluator.hh │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ + * dualp1 │ │ │ │ │ +dualp1localinterpolation.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_DUAL_P1_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_DUAL_P1_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15 │ │ │ │ │ - 16#include │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ - 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 *******************************************/ │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11namespace Dune │ │ │ │ │ + 12{ │ │ │ │ │ + 13 template │ │ │ │ │ +14 class DualP1LocalInterpolation │ │ │ │ │ + 15 { │ │ │ │ │ + 16 public: │ │ │ │ │ + 18 template │ │ │ │ │ +19 void interpolate (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 │ │ │ │ │ - 29 template │ │ │ │ │ -30 struct MonomialEvaluator │ │ │ │ │ - 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 Container; │ │ │ │ │ - 39 │ │ │ │ │ - 40 template< class Deriv > │ │ │ │ │ - 41 struct BaseIterator; │ │ │ │ │ + 28 // compute P1 interpolation coefficients │ │ │ │ │ + 29 std::vector p1Interpolation(dim+1); │ │ │ │ │ + 30 │ │ │ │ │ + 31 // vertex 0 │ │ │ │ │ + 32 for (int i=0; i │ │ │ │ │ -44 struct Iterator │ │ │ │ │ - 45 { │ │ │ │ │ -46 typedef │ │ │ │ │ -BaseIterator > All; │ │ │ │ │ -47 typedef BaseIterator > Integrate; │ │ │ │ │ - 48 }; │ │ │ │ │ + 43 } │ │ │ │ │ + 44 │ │ │ │ │ + 45 // compute dual coefficients from the Lagrange ones │ │ │ │ │ + 46 out.resize(dim+1); │ │ │ │ │ + 47 for (int i=0; i │ │ │ │ │ -63 void resize() │ │ │ │ │ - 64 { │ │ │ │ │ - 65 const int totalSize = │ │ │ │ │ -Derivatives:: │ │ │ │ │ -size*size_; │ │ │ │ │ - 66 container_.resize(totalSize); │ │ │ │ │ - 67 } │ │ │ │ │ -68 MonomialEvaluator(const MonomialEvaluator&); │ │ │ │ │ -69 const Basis &basis_; │ │ │ │ │ -70 unsigned int order_,size_; │ │ │ │ │ -71 Container container_; │ │ │ │ │ - 72 }; │ │ │ │ │ - 73 │ │ │ │ │ - 74 │ │ │ │ │ - 75 template< class B > │ │ │ │ │ - 76 template< class Deriv > │ │ │ │ │ -77 struct MonomialEvaluator< B >::BaseIterator │ │ │ │ │ - 78 { │ │ │ │ │ -79 typedef Deriv Derivatives; │ │ │ │ │ -80 typedef typename Deriv::Field Field; │ │ │ │ │ -81 static const unsigned int blockSize = Deriv::size; │ │ │ │ │ -82 typedef Dune::FieldVector 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 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(*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 } │ │ │ │ │ - 122 │ │ │ │ │ - 123 private: │ │ │ │ │ - 124 CIter pos_; │ │ │ │ │ - 125 const CIter end_; │ │ │ │ │ - 126 }; │ │ │ │ │ - 127 │ │ │ │ │ - 128 template< class B > │ │ │ │ │ -129 struct StandardEvaluator │ │ │ │ │ - 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 Container; │ │ │ │ │ -136 static const int dimension = Basis::dimension; │ │ │ │ │ -137 static const int dimRange = Basis::dimRange; │ │ │ │ │ -138 typedef MonomialEvaluator Base; │ │ │ │ │ - 139 │ │ │ │ │ - 140 template │ │ │ │ │ -141 struct Iterator : public Base::template Iterator │ │ │ │ │ - 142 {}; │ │ │ │ │ - 143 │ │ │ │ │ -144 StandardEvaluator(const Basis &basis) │ │ │ │ │ - 145 : Base(basis,basis.order(),basis.size()) │ │ │ │ │ - 146 {} │ │ │ │ │ - 147 template │ │ │ │ │ -148 typename Iterator::All evaluate(const DVector &x) │ │ │ │ │ - 149 { │ │ │ │ │ - 150 Base::template resize(); │ │ │ │ │ - 151 basis_.template evaluate(x,&(container_[0])); │ │ │ │ │ - 152 return typename Iterator::All(container_); │ │ │ │ │ - 153 } │ │ │ │ │ -154 typename Iterator<0>::Integrate integrate() │ │ │ │ │ - 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: │ │ │ │ │ - 167 StandardEvaluator(const StandardEvaluator&); │ │ │ │ │ - 168 using Base::basis_; │ │ │ │ │ - 169 using Base::container_; │ │ │ │ │ - 170 }; │ │ │ │ │ - 171 │ │ │ │ │ - 172} │ │ │ │ │ - 173 │ │ │ │ │ - 174#endif │ │ │ │ │ -tensor.hh │ │ │ │ │ -field.hh │ │ │ │ │ -multiindex.hh │ │ │ │ │ + 50 for (int j=0; j &u, const Field &f) │ │ │ │ │ -Definition field.hh:50 │ │ │ │ │ -Dune::DerivativeLayoutNS::DerivativeLayout │ │ │ │ │ -DerivativeLayout │ │ │ │ │ -Definition tensor.hh:168 │ │ │ │ │ -Dune::MonomialEvaluator │ │ │ │ │ -Definition basisevaluator.hh:31 │ │ │ │ │ -Dune::MonomialEvaluator::dimRange │ │ │ │ │ -static const int dimRange │ │ │ │ │ -Definition basisevaluator.hh:36 │ │ │ │ │ -Dune::MonomialEvaluator::Basis │ │ │ │ │ -B Basis │ │ │ │ │ -Definition basisevaluator.hh:32 │ │ │ │ │ -Dune::MonomialEvaluator::order_ │ │ │ │ │ -unsigned int order_ │ │ │ │ │ -Definition basisevaluator.hh:70 │ │ │ │ │ -Dune::MonomialEvaluator::basis_ │ │ │ │ │ -const Basis & basis_ │ │ │ │ │ -Definition basisevaluator.hh:69 │ │ │ │ │ -Dune::MonomialEvaluator::MonomialEvaluator │ │ │ │ │ -MonomialEvaluator(const Basis &basis, unsigned int order, unsigned int size) │ │ │ │ │ -Definition basisevaluator.hh:56 │ │ │ │ │ -Dune::MonomialEvaluator::Field │ │ │ │ │ -Basis::Field Field │ │ │ │ │ -Definition basisevaluator.hh:33 │ │ │ │ │ -Dune::MonomialEvaluator::size_ │ │ │ │ │ -unsigned int size_ │ │ │ │ │ -Definition basisevaluator.hh:70 │ │ │ │ │ -Dune::MonomialEvaluator::DomainVector │ │ │ │ │ -Basis::DomainVector DomainVector │ │ │ │ │ -Definition basisevaluator.hh:34 │ │ │ │ │ -Dune::MonomialEvaluator::resize │ │ │ │ │ -void resize() │ │ │ │ │ -Definition basisevaluator.hh:63 │ │ │ │ │ -Dune::MonomialEvaluator::container_ │ │ │ │ │ -Container container_ │ │ │ │ │ -Definition basisevaluator.hh:71 │ │ │ │ │ -Dune::MonomialEvaluator::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Definition basisevaluator.hh:50 │ │ │ │ │ -Dune::MonomialEvaluator::Container │ │ │ │ │ -std::vector< Field > Container │ │ │ │ │ -Definition basisevaluator.hh:38 │ │ │ │ │ -Dune::MonomialEvaluator::MonomialEvaluator │ │ │ │ │ -MonomialEvaluator(const MonomialEvaluator &) │ │ │ │ │ -Dune::MonomialEvaluator::dimension │ │ │ │ │ -static const int dimension │ │ │ │ │ -Definition basisevaluator.hh:35 │ │ │ │ │ -Dune::MonomialEvaluator::BaseIterator │ │ │ │ │ -Definition basisevaluator.hh:78 │ │ │ │ │ -Dune::MonomialEvaluator::BaseIterator::BaseIterator │ │ │ │ │ -BaseIterator(Container &container) │ │ │ │ │ -Definition basisevaluator.hh:90 │ │ │ │ │ -Dune::MonomialEvaluator::BaseIterator::operator* │ │ │ │ │ -const Deriv & operator*() const │ │ │ │ │ -Definition basisevaluator.hh:95 │ │ │ │ │ -Dune::MonomialEvaluator::BaseIterator::Block │ │ │ │ │ -Dune::FieldVector< Field, blockSize > Block │ │ │ │ │ -Definition basisevaluator.hh:82 │ │ │ │ │ -Dune::MonomialEvaluator::BaseIterator::done │ │ │ │ │ -bool done() const │ │ │ │ │ -Definition basisevaluator.hh:106 │ │ │ │ │ -Dune::MonomialEvaluator::BaseIterator::CIter │ │ │ │ │ -Container::iterator CIter │ │ │ │ │ -Definition basisevaluator.hh:88 │ │ │ │ │ -Dune::MonomialEvaluator::BaseIterator::operator-> │ │ │ │ │ -const Deriv * operator->() const │ │ │ │ │ -Definition basisevaluator.hh:101 │ │ │ │ │ -Dune::MonomialEvaluator::BaseIterator::Derivatives │ │ │ │ │ -Deriv Derivatives │ │ │ │ │ -Definition basisevaluator.hh:79 │ │ │ │ │ -Dune::MonomialEvaluator::BaseIterator::Container │ │ │ │ │ -std::vector< Field > Container │ │ │ │ │ -Definition basisevaluator.hh:87 │ │ │ │ │ -Dune::MonomialEvaluator::BaseIterator::Field │ │ │ │ │ -Deriv::Field Field │ │ │ │ │ -Definition basisevaluator.hh:80 │ │ │ │ │ -Dune::MonomialEvaluator::Iterator │ │ │ │ │ -Definition basisevaluator.hh:45 │ │ │ │ │ -Dune::MonomialEvaluator::Iterator::Integrate │ │ │ │ │ -BaseIterator< Derivatives< Field, dimension, 1, 0, DerivativeLayoutNS::value > │ │ │ │ │ -> Integrate │ │ │ │ │ -Definition basisevaluator.hh:47 │ │ │ │ │ -Dune::MonomialEvaluator::Iterator::All │ │ │ │ │ -BaseIterator< Derivatives< Field, dimension, dimRange, deriv, │ │ │ │ │ -DerivativeLayoutNS::derivative > > All │ │ │ │ │ -Definition basisevaluator.hh:46 │ │ │ │ │ -Dune::StandardEvaluator │ │ │ │ │ -Definition basisevaluator.hh:131 │ │ │ │ │ -Dune::StandardEvaluator::Field │ │ │ │ │ -Basis::Field Field │ │ │ │ │ -Definition basisevaluator.hh:133 │ │ │ │ │ -Dune::StandardEvaluator::DomainVector │ │ │ │ │ -Basis::DomainVector DomainVector │ │ │ │ │ -Definition basisevaluator.hh:134 │ │ │ │ │ -Dune::StandardEvaluator::evaluate │ │ │ │ │ -Iterator< deriv >::All evaluate(const DVector &x) │ │ │ │ │ -Definition basisevaluator.hh:148 │ │ │ │ │ -Dune::StandardEvaluator::Base │ │ │ │ │ -MonomialEvaluator< B > Base │ │ │ │ │ -Definition basisevaluator.hh:138 │ │ │ │ │ -Dune::StandardEvaluator::StandardEvaluator │ │ │ │ │ -StandardEvaluator(const Basis &basis) │ │ │ │ │ -Definition basisevaluator.hh:144 │ │ │ │ │ -Dune::StandardEvaluator::dimRange │ │ │ │ │ -static const int dimRange │ │ │ │ │ -Definition basisevaluator.hh:137 │ │ │ │ │ -Dune::StandardEvaluator::Container │ │ │ │ │ -std::vector< Field > Container │ │ │ │ │ -Definition basisevaluator.hh:135 │ │ │ │ │ -Dune::StandardEvaluator::integrate │ │ │ │ │ -Iterator< 0 >::Integrate integrate() │ │ │ │ │ -Definition basisevaluator.hh:154 │ │ │ │ │ -Dune::StandardEvaluator::Basis │ │ │ │ │ -B Basis │ │ │ │ │ -Definition basisevaluator.hh:132 │ │ │ │ │ -Dune::StandardEvaluator::StandardEvaluator │ │ │ │ │ -StandardEvaluator(const Basis &basis, unsigned int size) │ │ │ │ │ -Definition basisevaluator.hh:162 │ │ │ │ │ -Dune::StandardEvaluator::dimension │ │ │ │ │ -static const int dimension │ │ │ │ │ -Definition basisevaluator.hh:136 │ │ │ │ │ -Dune::StandardEvaluator::Iterator │ │ │ │ │ -Definition basisevaluator.hh:142 │ │ │ │ │ -Dune::Derivatives │ │ │ │ │ -Definition tensor.hh:172 │ │ │ │ │ +Dune::DualP1LocalInterpolation │ │ │ │ │ +Definition dualp1localinterpolation.hh:15 │ │ │ │ │ +Dune::DualP1LocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Local interpolation of a function. │ │ │ │ │ +Definition dualp1localinterpolation.hh:19 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00044.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dglocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: dualp1localcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,37 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dglocalcoefficients.hh File Reference
│ │ │ │ +
dualp1localcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ +
#include <cstddef>
│ │ │ │ #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::DGLocalCoefficients
 A class providing local coefficients for dg spaces. More...
 
struct  Dune::DGLocalCoefficientsFactory< BasisFactory >
 A factory class for the dg local coefficients. More...
class  Dune::DualP1LocalCoefficients< dim >
 Local coefficients for dual simplex P1 elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,27 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ + * dualp1 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -dglocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +dualp1localcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ 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... │ │ │ │ │ +class  Dune::DualP1LocalCoefficients<_dim_> │ │ │ │ │ +  Local coefficients for dual simplex P1 elements. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00044_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dglocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: dualp1localcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,117 +70,78 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dglocalcoefficients.hh
│ │ │ │ +
dualp1localcoefficients.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_DUAL_P1_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_DUAL_P1_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ +
8#include <cstddef>
│ │ │ │
9#include <vector>
│ │ │ │
10
│ │ │ │ - │ │ │ │ + │ │ │ │
12
│ │ │ │
13namespace Dune
│ │ │ │
14{
│ │ │ │
15
│ │ │ │ -
16 // DGLocalCoefficients
│ │ │ │ -
17 // -------------------
│ │ │ │ -
18
│ │ │ │ +
21 template <int dim>
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
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 }
│ │ │ │ -
│ │ │ │ -
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 };
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
50#endif
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,122 +7,78 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -dglocalcoefficients.hh │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ + * dualp1 │ │ │ │ │ +dualp1localcoefficients.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_DUAL_P1_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_DUAL_P1_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9#include │ │ │ │ │ 10 │ │ │ │ │ 11#include │ │ │ │ │ 12 │ │ │ │ │ 13namespace Dune │ │ │ │ │ 14{ │ │ │ │ │ 15 │ │ │ │ │ - 16 // DGLocalCoefficients │ │ │ │ │ - 17 // ------------------- │ │ │ │ │ - 18 │ │ │ │ │ -22 class DGLocalCoefficients │ │ │ │ │ + 21 template │ │ │ │ │ +22 class DualP1LocalCoefficients │ │ │ │ │ 23 { │ │ │ │ │ - 24 typedef DGLocalCoefficients This; │ │ │ │ │ - 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 } │ │ │ │ │ - 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 }; │ │ │ │ │ + 24 public: │ │ │ │ │ +26 DualP1LocalCoefficients () : li(size()) │ │ │ │ │ + 27 { │ │ │ │ │ + 28 for (std::size_t i=0; i li; │ │ │ │ │ + 46 }; │ │ │ │ │ + 47 │ │ │ │ │ + 48} │ │ │ │ │ 49 │ │ │ │ │ - 50 │ │ │ │ │ - 51 │ │ │ │ │ - 52 // DGLocalCoefficientsFactory │ │ │ │ │ - 53 // -------------------------- │ │ │ │ │ - 57 template< class BasisFactory > │ │ │ │ │ -58 struct DGLocalCoefficientsFactory │ │ │ │ │ - 59 { │ │ │ │ │ -60 static const unsigned int dimension = BasisFactory::dimension; │ │ │ │ │ -61 typedef typename BasisFactory::Key Key; │ │ │ │ │ -62 typedef const DGLocalCoefficients Object; │ │ │ │ │ - 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 │ │ │ │ │ + 50#endif │ │ │ │ │ localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalKey │ │ │ │ │ Describe position of one degree of freedom. │ │ │ │ │ Definition localkey.hh:23 │ │ │ │ │ -Dune::DGLocalCoefficients │ │ │ │ │ -A class providing local coefficients for dg spaces. │ │ │ │ │ -Definition dglocalcoefficients.hh:23 │ │ │ │ │ -Dune::DGLocalCoefficients::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Definition dglocalcoefficients.hh:41 │ │ │ │ │ -Dune::DGLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ -Definition dglocalcoefficients.hh:35 │ │ │ │ │ -Dune::DGLocalCoefficients::DGLocalCoefficients │ │ │ │ │ -DGLocalCoefficients(const unsigned int n) │ │ │ │ │ -construct local keys for n basis functions │ │ │ │ │ -Definition dglocalcoefficients.hh:28 │ │ │ │ │ -Dune::DGLocalCoefficientsFactory │ │ │ │ │ -A factory class for the dg local coefficients. │ │ │ │ │ -Definition dglocalcoefficients.hh:59 │ │ │ │ │ -Dune::DGLocalCoefficientsFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition dglocalcoefficients.hh:73 │ │ │ │ │ -Dune::DGLocalCoefficientsFactory::Object │ │ │ │ │ -const DGLocalCoefficients Object │ │ │ │ │ -Definition dglocalcoefficients.hh:62 │ │ │ │ │ -Dune::DGLocalCoefficientsFactory::create │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -Definition dglocalcoefficients.hh:65 │ │ │ │ │ -Dune::DGLocalCoefficientsFactory::Key │ │ │ │ │ -BasisFactory::Key Key │ │ │ │ │ -Definition dglocalcoefficients.hh:61 │ │ │ │ │ -Dune::DGLocalCoefficientsFactory::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition dglocalcoefficients.hh:60 │ │ │ │ │ +Dune::DualP1LocalCoefficients │ │ │ │ │ +Local coefficients for dual simplex P1 elements. │ │ │ │ │ +Definition dualp1localcoefficients.hh:23 │ │ │ │ │ +Dune::DualP1LocalCoefficients::DualP1LocalCoefficients │ │ │ │ │ +DualP1LocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition dualp1localcoefficients.hh:26 │ │ │ │ │ +Dune::DualP1LocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition dualp1localcoefficients.hh:39 │ │ │ │ │ +Dune::DualP1LocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition dualp1localcoefficients.hh:33 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00047.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: multiindex.hh File Reference │ │ │ │ +dune-localfunctions: dualq1.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,75 +65,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
multiindex.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
dualq1.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <ostream>
│ │ │ │ +
#include <array>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/localfunctions/utility/field.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"
│ │ │ │
│ │ │ │

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::DualQ1LocalFiniteElement< D, R, dim, faceDual >
 The local dual Q1 finite element on cubes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ 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 {} │ │ │ │ │ @@ -6,67 +6,32 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -Classes | Namespaces | Functions │ │ │ │ │ -multiindex.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +dualq1.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "dualq1/dualq1localbasis.hh" │ │ │ │ │ +#include "dualq1/dualq1localcoefficients.hh" │ │ │ │ │ +#include "dualq1/dualq1localinterpolation.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::DualQ1LocalFiniteElement<_D,_R,_dim,_faceDual_> │ │ │ │ │ +  The local dual Q1 finite element on cubes. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Functions │ │ │ │ │ -template │ │ │ │ │ - std::ostream & Dune::operator<< (std::ostream &, const MultiIndex< │ │ │ │ │ - dim, Field > &) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -MultiIndex< dim, Field > Dune::operator* (const F &f, const MultiIndex< dim, │ │ │ │ │ - Field > &m) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -MultiIndex< dim, Field > Dune::operator/ (const F &f, const MultiIndex< dim, │ │ │ │ │ - Field > &m) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - std::ostream & Dune::operator<< (std::ostream &out, const std:: │ │ │ │ │ - vector< MultiIndex< d, F > > &y) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - std::ostream & Dune::operator<< (std::ostream &out, const std:: │ │ │ │ │ - vector< Dune::FieldVector< MultiIndex< d, F >, dimR > │ │ │ │ │ - > &y) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - std::ostream & Dune::operator<< (std::ostream &out, const std:: │ │ │ │ │ - vector< Dune::FieldMatrix< MultiIndex< d, F >, dimR1, │ │ │ │ │ - dimR2 > > &y) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - std::ostream & Dune::operator<< (std::ostream &out, const │ │ │ │ │ - MultiIndex< d, F > &val) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool Dune::operator< (const Zero< MultiIndex< dim, Field > │ │ │ │ │ - > &, const MultiIndex< dim, Field > &) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool Dune::operator< (const MultiIndex< dim, Field > &f, │ │ │ │ │ - const Zero< MultiIndex< dim, Field > > &) │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00047_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: multiindex.hh Source File │ │ │ │ +dune-localfunctions: dualq1.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,644 +70,264 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
multiindex.hh
│ │ │ │ +
dualq1.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_DUAL_Q1_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_DUAL_Q1_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9#include <ostream>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ +
8#include <array>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/fvector.hh>
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │
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
│ │ │ │ -
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 {}
│ │ │ │ +
13#include <dune/geometry/type.hh>
│ │ │ │ +
14#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
15#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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;
│ │ │ │ +
│ │ │ │ +
61 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
62 {
│ │ │ │ +
63 return basis;
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
69 {
│ │ │ │ +
70 return coefficients;
│ │ │ │
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;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
76 {
│ │ │ │ +
77 return interpolation;
│ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │ +
79
│ │ │ │ +
│ │ │ │ +
81 unsigned int size () const
│ │ │ │ +
82 {
│ │ │ │ +
83 return basis.size();
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
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 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 }
│ │ │ │ -
│ │ │ │ +
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 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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,622 +7,280 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -multiindex.hh │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ +dualq1.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_DUAL_Q1_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_DUAL_Q1_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 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 │ │ │ │ │ - 31 │ │ │ │ │ - 32 // MultiIndex │ │ │ │ │ - 33 // ---------- │ │ │ │ │ - 34 │ │ │ │ │ - 35 template< int dim,class Field > │ │ │ │ │ -36 class MultiIndex │ │ │ │ │ - 37 { │ │ │ │ │ - 38 typedef MultiIndex<_dim,_Field_> This; │ │ │ │ │ - 39 │ │ │ │ │ -40 friend std::ostream &operator<<<> ( std::ostream &, const This & ); │ │ │ │ │ - 41 │ │ │ │ │ - 42 public: │ │ │ │ │ -43 static const int dimension = dim; │ │ │ │ │ - 44 │ │ │ │ │ -45 MultiIndex () │ │ │ │ │ - 46 : vecZ_( 0 ), │ │ │ │ │ - 47 vecOMZ_( 0 ), │ │ │ │ │ - 48 factor_( 1. ), │ │ │ │ │ - 49 next_( 0 ) │ │ │ │ │ - 50 {} │ │ │ │ │ - 51 template │ │ │ │ │ -52 explicit MultiIndex (const F &f) │ │ │ │ │ - 53 : vecZ_( 0 ), │ │ │ │ │ - 54 vecOMZ_( 0 ), │ │ │ │ │ - 55 factor_( field_cast(f) ), │ │ │ │ │ - 56 next_( 0 ) │ │ │ │ │ - 57 {} │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16 │ │ │ │ │ + 17#include │ │ │ │ │ + 18#include │ │ │ │ │ + 19#include "dualq1/dualq1localbasis.hh" │ │ │ │ │ + 20#include "dualq1/dualq1localcoefficients.hh" │ │ │ │ │ + 21#include "dualq1/dualq1localinterpolation.hh" │ │ │ │ │ + 22 │ │ │ │ │ + 23namespace Dune │ │ │ │ │ + 24{ │ │ │ │ │ + 40 template │ │ │ │ │ +41 class DualQ1LocalFiniteElement │ │ │ │ │ + 42 { │ │ │ │ │ + 43 public: │ │ │ │ │ + 46 typedef │ │ │ │ │ +LocalFiniteElementTraits,DualQ1LocalCoefficients, │ │ │ │ │ +47 DualQ1LocalInterpolation > > Traits; │ │ │ │ │ + 48 │ │ │ │ │ +51 DualQ1LocalFiniteElement () │ │ │ │ │ + 52 { │ │ │ │ │ + 53 if (faceDual) │ │ │ │ │ + 54 setupFaceDualCoefficients(); │ │ │ │ │ + 55 else │ │ │ │ │ + 56 setupDualCoefficients(); │ │ │ │ │ + 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; │ │ │ │ │ +61 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 62 { │ │ │ │ │ + 63 return basis; │ │ │ │ │ + 64 } │ │ │ │ │ + 65 │ │ │ │ │ +68 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 69 { │ │ │ │ │ + 70 return coefficients; │ │ │ │ │ 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; │ │ │ │ │ +75 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 76 { │ │ │ │ │ + 77 return interpolation; │ │ │ │ │ + 78 } │ │ │ │ │ + 79 │ │ │ │ │ +81 unsigned int size () const │ │ │ │ │ + 82 { │ │ │ │ │ + 83 return basis.size(); │ │ │ │ │ 84 } │ │ │ │ │ 85 │ │ │ │ │ -86 ~MultiIndex() │ │ │ │ │ - 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 } │ │ │ │ │ -114 This &operator=( const Zero &f ) │ │ │ │ │ - 115 { │ │ │ │ │ - 116 remove(); │ │ │ │ │ - 117 vecZ_ = 0; │ │ │ │ │ - 118 vecOMZ_ = 0; │ │ │ │ │ - 119 factor_ = 0.; │ │ │ │ │ - 120 return *this; │ │ │ │ │ - 121 } │ │ │ │ │ -122 This &operator=( const Unity &f ) │ │ │ │ │ - 123 { │ │ │ │ │ - 124 remove(); │ │ │ │ │ - 125 vecZ_ = 0; │ │ │ │ │ - 126 vecOMZ_ = 0; │ │ │ │ │ - 127 factor_ = 1.; │ │ │ │ │ - 128 return *this; │ │ │ │ │ - 129 } │ │ │ │ │ - 130 template │ │ │ │ │ -131 This &operator=( const F &f ) │ │ │ │ │ - 132 { │ │ │ │ │ - 133 remove(); │ │ │ │ │ - 134 vecZ_ = 0; │ │ │ │ │ - 135 vecOMZ_ = 0; │ │ │ │ │ - 136 factor_ = field_cast(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 │ │ │ │ │ -147 This &operator*=( const F &f ) │ │ │ │ │ - 148 { │ │ │ │ │ - 149 factor_ *= field_cast(f); │ │ │ │ │ - 150 if (next_) │ │ │ │ │ - 151 (*next_) *= f; │ │ │ │ │ - 152 return *this; │ │ │ │ │ - 153 } │ │ │ │ │ - 154 template │ │ │ │ │ -155 This &operator/=( const F &f ) │ │ │ │ │ - 156 { │ │ │ │ │ - 157 factor_ /= field_cast(f); │ │ │ │ │ - 158 if (next_) │ │ │ │ │ - 159 (*next_) /= f; │ │ │ │ │ - 160 return *this; │ │ │ │ │ +88 static constexpr GeometryType type () │ │ │ │ │ + 89 { │ │ │ │ │ + 90 return GeometryTypes::cube(dim); │ │ │ │ │ + 91 } │ │ │ │ │ + 92 │ │ │ │ │ + 93 private: │ │ │ │ │ + 95 void setupFaceDualCoefficients(); │ │ │ │ │ + 96 │ │ │ │ │ + 98 void setupDualCoefficients(); │ │ │ │ │ + 99 │ │ │ │ │ + 100 DualQ1LocalBasis basis; │ │ │ │ │ + 101 DualQ1LocalCoefficients coefficients; │ │ │ │ │ + 102 DualQ1LocalInterpolation > 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 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 } │ │ │ │ │ + 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 template │ │ │ │ │ -225 This operator*( const F &f ) const │ │ │ │ │ - 226 { │ │ │ │ │ - 227 This z = *this; │ │ │ │ │ - 228 return (z *= f); │ │ │ │ │ - 229 } │ │ │ │ │ - 230 template │ │ │ │ │ -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 │ │ │ │ │ -312 MultiIndex operator*( const F &f, │ │ │ │ │ - 313 const MultiIndex &m) │ │ │ │ │ - 314 { │ │ │ │ │ - 315 MultiIndex z = m; │ │ │ │ │ - 316 return (z *= f); │ │ │ │ │ - 317 } │ │ │ │ │ - 318 template │ │ │ │ │ -319 MultiIndex operator/( const F &f, │ │ │ │ │ - 320 const MultiIndex &m) │ │ │ │ │ - 321 { │ │ │ │ │ - 322 MultiIndex z = m; │ │ │ │ │ - 323 return (z /= f); │ │ │ │ │ - 324 } │ │ │ │ │ - 325 │ │ │ │ │ - 326 template │ │ │ │ │ -327 std::ostream &operator<<(std::ostream& out,const std:: │ │ │ │ │ -vector >& y) { │ │ │ │ │ - 328 for (unsigned int r=0; r │ │ │ │ │ -356 std::ostream &operator<<(std::ostream& out, │ │ │ │ │ - 357 const std::vector,dimR1,dimR2> >& y) { │ │ │ │ │ - 358 out << "\\begin{eqnarray*}" << std::endl; │ │ │ │ │ - 359 for (unsigned int k=0; k │ │ │ │ │ -376 std::ostream &operator<<(std::ostream& out,const MultiIndex& val) │ │ │ │ │ - 377 { │ │ │ │ │ - 378 bool first = true; │ │ │ │ │ - 379 const MultiIndex *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(); │ │ │ │ │ - 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> │ │ │ │ │ -451 struct Unity< MultiIndex< dim, F > > │ │ │ │ │ - 452 { │ │ │ │ │ -453 typedef MultiIndex<_dim,_F_> Field; │ │ │ │ │ - 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 { │ │ │ │ │ -476 typedef MultiIndex<_dim,F_> Field; │ │ │ │ │ - 477 │ │ │ │ │ - 478 // zero does not acutally exist │ │ │ │ │ -479 operator Field () │ │ │ │ │ - 480 { │ │ │ │ │ - 481 return Field(0); │ │ │ │ │ - 482 } │ │ │ │ │ - 483 }; │ │ │ │ │ - 484 │ │ │ │ │ - 485 template< int dim, class Field > │ │ │ │ │ -486 bool operator<( const Zero< MultiIndex<_dim,Field_> > &, const MultiIndex< │ │ │ │ │ -dim,Field_> & ) │ │ │ │ │ - 487 { │ │ │ │ │ - 488 return true; │ │ │ │ │ - 489 } │ │ │ │ │ - 490 │ │ │ │ │ - 491 template< int dim, class Field > │ │ │ │ │ -492 bool operator<( const MultiIndex<_dim,_Field_> &f, const Zero< MultiIndex< │ │ │ │ │ -dim,Field_> > & ) │ │ │ │ │ - 493 { │ │ │ │ │ - 494 return true; │ │ │ │ │ - 495 } │ │ │ │ │ - 496 │ │ │ │ │ - 497} │ │ │ │ │ - 498 │ │ │ │ │ - 499#endif // #ifndef DUNE_MULTIINDEX_HH │ │ │ │ │ -field.hh │ │ │ │ │ + 224 Dune::FieldVector x(0); │ │ │ │ │ + 225 massMat.solve(x ,rhs); │ │ │ │ │ + 226 │ │ │ │ │ + 227 for (int k=0; k &u, const Field &f) │ │ │ │ │ -Definition field.hh:44 │ │ │ │ │ -Dune::field_cast │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -Definition field.hh:159 │ │ │ │ │ -Dune::operator< │ │ │ │ │ -bool operator<(const Zero< Field > &, const Field &f) │ │ │ │ │ -Definition field.hh:119 │ │ │ │ │ -Dune::operator/ │ │ │ │ │ -Field operator/(const Unity< Field > &u, const Field &f) │ │ │ │ │ -Definition field.hh:56 │ │ │ │ │ -Dune::operator<< │ │ │ │ │ -std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat) │ │ │ │ │ -Definition lfematrix.hh:152 │ │ │ │ │ -Dune::operator* │ │ │ │ │ -Field operator*(const Unity< Field > &u, const Field &f) │ │ │ │ │ -Definition field.hh:50 │ │ │ │ │ -Dune::Unity │ │ │ │ │ -A class representing the unit of a given Field. │ │ │ │ │ -Definition field.hh:30 │ │ │ │ │ -Dune::Zero │ │ │ │ │ -A class representing the zero of a given Field. │ │ │ │ │ -Definition field.hh:79 │ │ │ │ │ -Dune::MultiIndex │ │ │ │ │ -Definition multiindex.hh:37 │ │ │ │ │ -Dune::MultiIndex::operator+ │ │ │ │ │ -This operator+(const This &other) const │ │ │ │ │ -Definition multiindex.hh:248 │ │ │ │ │ -Dune::MultiIndex::absOMZ │ │ │ │ │ -int absOMZ() const │ │ │ │ │ -Definition multiindex.hh:272 │ │ │ │ │ -Dune::MultiIndex::~MultiIndex │ │ │ │ │ -~MultiIndex() │ │ │ │ │ -Definition multiindex.hh:86 │ │ │ │ │ -Dune::MultiIndex::operator-= │ │ │ │ │ -This & operator-=(const This &other) │ │ │ │ │ -Definition multiindex.hh:207 │ │ │ │ │ -Dune::MultiIndex::MultiIndex │ │ │ │ │ -MultiIndex(int, const This &other) │ │ │ │ │ -Definition multiindex.hh:59 │ │ │ │ │ -Dune::MultiIndex::dimension │ │ │ │ │ -static const int dimension │ │ │ │ │ -Definition multiindex.hh:43 │ │ │ │ │ -Dune::MultiIndex::absZ │ │ │ │ │ -int absZ() const │ │ │ │ │ -Definition multiindex.hh:264 │ │ │ │ │ -Dune::MultiIndex::omz │ │ │ │ │ -int omz(int i) const │ │ │ │ │ -Definition multiindex.hh:95 │ │ │ │ │ -Dune::MultiIndex::operator+= │ │ │ │ │ -This & operator+=(const This &other) │ │ │ │ │ -Definition multiindex.hh:184 │ │ │ │ │ -Dune::MultiIndex::operator== │ │ │ │ │ -bool operator==(const This &other) const │ │ │ │ │ -Definition multiindex.hh:140 │ │ │ │ │ -Dune::MultiIndex::sameMultiIndex │ │ │ │ │ -bool sameMultiIndex(const This &ind) │ │ │ │ │ -Definition multiindex.hh:280 │ │ │ │ │ -Dune::MultiIndex::operator= │ │ │ │ │ -This & operator=(const This &other) │ │ │ │ │ -Definition multiindex.hh:104 │ │ │ │ │ -Dune::MultiIndex::MultiIndex │ │ │ │ │ -MultiIndex(const This &other) │ │ │ │ │ -Definition multiindex.hh:73 │ │ │ │ │ -Dune::MultiIndex::operator*= │ │ │ │ │ -This & operator*=(const F &f) │ │ │ │ │ -Definition multiindex.hh:147 │ │ │ │ │ -Dune::MultiIndex::factor │ │ │ │ │ -const Field & factor() const │ │ │ │ │ -Definition multiindex.hh:99 │ │ │ │ │ -Dune::MultiIndex::operator/ │ │ │ │ │ -This operator/(const F &f) const │ │ │ │ │ -Definition multiindex.hh:231 │ │ │ │ │ -Dune::MultiIndex::MultiIndex │ │ │ │ │ -MultiIndex(const F &f) │ │ │ │ │ -Definition multiindex.hh:52 │ │ │ │ │ -Dune::MultiIndex::operator/= │ │ │ │ │ -This & operator/=(const F &f) │ │ │ │ │ -Definition multiindex.hh:155 │ │ │ │ │ -Dune::MultiIndex::operator* │ │ │ │ │ -This operator*(const F &f) const │ │ │ │ │ -Definition multiindex.hh:225 │ │ │ │ │ -Dune::MultiIndex::set │ │ │ │ │ -void set(int d, int power=1) │ │ │ │ │ -Definition multiindex.hh:259 │ │ │ │ │ -Dune::MultiIndex::operator- │ │ │ │ │ -This operator-(const This &other) const │ │ │ │ │ -Definition multiindex.hh:253 │ │ │ │ │ -Dune::MultiIndex::z │ │ │ │ │ -int z(int i) const │ │ │ │ │ -Definition multiindex.hh:91 │ │ │ │ │ -Dune::MultiIndex::MultiIndex │ │ │ │ │ -MultiIndex() │ │ │ │ │ -Definition multiindex.hh:45 │ │ │ │ │ -Dune::Unity<_MultiIndex<_dim,_F_>_>::Field │ │ │ │ │ -MultiIndex< dim, F > Field │ │ │ │ │ -Definition multiindex.hh:453 │ │ │ │ │ -Dune::Zero<_MultiIndex<_dim,_F_>_>::Field │ │ │ │ │ -MultiIndex< dim, F > Field │ │ │ │ │ -Definition multiindex.hh:476 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::DualQ1LocalFiniteElement │ │ │ │ │ +The local dual Q1 finite element on cubes. │ │ │ │ │ +Definition dualq1.hh:42 │ │ │ │ │ +Dune::DualQ1LocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< DualQ1LocalBasis< D, R, dim >, │ │ │ │ │ +DualQ1LocalCoefficients< dim >, DualQ1LocalInterpolation< dim, │ │ │ │ │ +DualQ1LocalBasis< D, R, dim > > > Traits │ │ │ │ │ +Definition dualq1.hh:47 │ │ │ │ │ +Dune::DualQ1LocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition dualq1.hh:81 │ │ │ │ │ +Dune::DualQ1LocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition dualq1.hh:75 │ │ │ │ │ +Dune::DualQ1LocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition dualq1.hh:61 │ │ │ │ │ +Dune::DualQ1LocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition dualq1.hh:68 │ │ │ │ │ +Dune::DualQ1LocalFiniteElement::DualQ1LocalFiniteElement │ │ │ │ │ +DualQ1LocalFiniteElement() │ │ │ │ │ +Definition dualq1.hh:51 │ │ │ │ │ +Dune::DualQ1LocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition dualq1.hh:88 │ │ │ │ │ +Dune::DualQ1LocalBasis │ │ │ │ │ +Dual Lagrange shape functions of order 1 on the reference cube. │ │ │ │ │ +Definition dualq1localbasis.hh:29 │ │ │ │ │ +Dune::DualQ1LocalCoefficients │ │ │ │ │ +Layout map for dual Q1 elements. │ │ │ │ │ +Definition dualq1localcoefficients.hh:25 │ │ │ │ │ +Dune::DualQ1LocalInterpolation │ │ │ │ │ +Definition dualq1localinterpolation.hh:21 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00050.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: coeffmatrix.hh File Reference │ │ │ │ +dune-localfunctions: dualp1.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,36 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
coeffmatrix.hh File Reference
│ │ │ │ +
dualp1.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 "dualp1/dualp1localbasis.hh"
│ │ │ │ +#include "dualp1/dualp1localcoefficients.hh"
│ │ │ │ +#include "dualp1/dualp1localinterpolation.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::DualP1LocalFiniteElement< D, R, dim, faceDual >
 The local dual p1 finite element on simplices. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,30 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -coeffmatrix.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +dualp1.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "dualp1/dualp1localbasis.hh" │ │ │ │ │ +#include "dualp1/dualp1localcoefficients.hh" │ │ │ │ │ +#include "dualp1/dualp1localinterpolation.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::DualP1LocalFiniteElement<_D,_R,_dim,_faceDual_> │ │ │ │ │ +  The local dual p1 finite element on simplices. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00050_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: coeffmatrix.hh Source File │ │ │ │ +dune-localfunctions: dualp1.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,338 +70,118 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
coeffmatrix.hh
│ │ │ │ +
dualp1.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;
│ │ │ │ - │ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_DUALP1_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_DUALP1_HH
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │
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 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
57 {
│ │ │ │ +
58 return coefficients;
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
64 {
│ │ │ │ +
65 return interpolation;
│ │ │ │ +
66 }
│ │ │ │
│ │ │ │ -
68
│ │ │ │ +
67
│ │ │ │
│ │ │ │ -
69 unsigned int size () const
│ │ │ │ +
69 unsigned int size () const
│ │ │ │
70 {
│ │ │ │ -
71 return numRows_/blockSize;
│ │ │ │ +
71 return basis.size();
│ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
73
│ │ │ │ +
│ │ │ │ +
76 static constexpr GeometryType type ()
│ │ │ │ +
77 {
│ │ │ │ +
78 return GeometryTypes::simplex(dim);
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
81 private:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
85 };
│ │ │ │ +
│ │ │ │ +
86
│ │ │ │ +
87
│ │ │ │ +
88
│ │ │ │ +
89}
│ │ │ │ +
90
│ │ │ │ +
91#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
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,349 +7,132 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * utility │ │ │ │ │ -coeffmatrix.hh │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ +dualp1.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 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 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 │ │ │ │ │ -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 │ │ │ │ │ -36 struct Mult< Field,FieldVector > │ │ │ │ │ - 37 { │ │ │ │ │ -38 typedef FieldVector 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 > │ │ │ │ │ -47 class SparseCoeffMatrix │ │ │ │ │ - 48 { │ │ │ │ │ - 49 public: │ │ │ │ │ -50 typedef F Field; │ │ │ │ │ -51 static const unsigned int blockSize = bSize; │ │ │ │ │ -52 typedef SparseCoeffMatrix This; │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_DUALP1_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_DUALP1_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include "dualp1/dualp1localbasis.hh" │ │ │ │ │ + 12#include "dualp1/dualp1localcoefficients.hh" │ │ │ │ │ + 13#include "dualp1/dualp1localinterpolation.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 17 │ │ │ │ │ + 33 template │ │ │ │ │ +34 class DualP1LocalFiniteElement │ │ │ │ │ + 35 { │ │ │ │ │ + 36 public: │ │ │ │ │ + 39 typedef │ │ │ │ │ +LocalFiniteElementTraits,DualP1LocalCoefficients, │ │ │ │ │ +40 DualP1LocalInterpolation > > Traits; │ │ │ │ │ + 41 │ │ │ │ │ +44 DualP1LocalFiniteElement () │ │ │ │ │ + 45 {} │ │ │ │ │ + 46 │ │ │ │ │ +49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 50 { │ │ │ │ │ + 51 return basis; │ │ │ │ │ + 52 } │ │ │ │ │ 53 │ │ │ │ │ -54 SparseCoeffMatrix() │ │ │ │ │ - 55 : coeff_(0), │ │ │ │ │ - 56 rows_(0), │ │ │ │ │ - 57 skip_(0), │ │ │ │ │ - 58 numRows_(0), │ │ │ │ │ - 59 numCols_(0) │ │ │ │ │ - 60 {} │ │ │ │ │ - 61 │ │ │ │ │ -62 ~SparseCoeffMatrix() │ │ │ │ │ - 63 { │ │ │ │ │ - 64 delete [] coeff_; │ │ │ │ │ - 65 delete [] rows_; │ │ │ │ │ - 66 delete [] skip_; │ │ │ │ │ - 67 } │ │ │ │ │ - 68 │ │ │ │ │ +56 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 57 { │ │ │ │ │ + 58 return coefficients; │ │ │ │ │ + 59 } │ │ │ │ │ + 60 │ │ │ │ │ +63 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 64 { │ │ │ │ │ + 65 return interpolation; │ │ │ │ │ + 66 } │ │ │ │ │ + 67 │ │ │ │ │ 69 unsigned int size () const │ │ │ │ │ 70 { │ │ │ │ │ - 71 return numRows_/blockSize; │ │ │ │ │ + 71 return basis.size(); │ │ │ │ │ 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::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 } │ │ │ │ │ - 127 DerivativeAssign::apply(r,val,y[i]); │ │ │ │ │ - 128 } │ │ │ │ │ - 129 } │ │ │ │ │ - 130 } │ │ │ │ │ - 131 template │ │ │ │ │ -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 │ │ │ │ │ -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; │ │ │ │ │ - 152 LFETensorAxpy::apply(r,*pos,*itx,val); │ │ │ │ │ - 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 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() || Zero() < 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 │ │ │ │ │ -223 void addRow( unsigned int k, const Field &a, Vector &b) const │ │ │ │ │ - 224 { │ │ │ │ │ - 225 assert(k( (*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 basis; │ │ │ │ │ + 83 DualP1LocalCoefficients coefficients; │ │ │ │ │ + 84 DualP1LocalInterpolation > │ │ │ │ │ +interpolation; │ │ │ │ │ + 85 }; │ │ │ │ │ + 86 │ │ │ │ │ + 87 │ │ │ │ │ + 88 │ │ │ │ │ + 89} │ │ │ │ │ + 90 │ │ │ │ │ + 91#endif │ │ │ │ │ +dualp1localbasis.hh │ │ │ │ │ +dualp1localinterpolation.hh │ │ │ │ │ +dualp1localcoefficients.hh │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::field_cast │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -Definition field.hh:159 │ │ │ │ │ -Dune::Mult │ │ │ │ │ -Definition coeffmatrix.hh:26 │ │ │ │ │ -Dune::Mult::add │ │ │ │ │ -static void add(const Field &vec1, const BasisEntry &vec2, BasisEntry &res) │ │ │ │ │ -Definition coeffmatrix.hh:28 │ │ │ │ │ -Dune::Mult::BasisEntry │ │ │ │ │ -Field2 BasisEntry │ │ │ │ │ -Definition coeffmatrix.hh:27 │ │ │ │ │ -Dune::Mult<_Field,_FieldVector<_Field2,_dimRange_>_>::BasisEntry │ │ │ │ │ -FieldVector< Field2, dimRange > BasisEntry │ │ │ │ │ -Definition coeffmatrix.hh:38 │ │ │ │ │ -Dune::Mult<_Field,_FieldVector<_Field2,_dimRange_>_>::add │ │ │ │ │ -static void add(const Field &vec1, const BasisEntry &vec2, BasisEntry &res) │ │ │ │ │ -Definition coeffmatrix.hh:39 │ │ │ │ │ -Dune::SparseCoeffMatrix │ │ │ │ │ -Definition coeffmatrix.hh:48 │ │ │ │ │ -Dune::SparseCoeffMatrix::blockSize │ │ │ │ │ -static const unsigned int blockSize │ │ │ │ │ -Definition coeffmatrix.hh:51 │ │ │ │ │ -Dune::SparseCoeffMatrix::SparseCoeffMatrix │ │ │ │ │ -SparseCoeffMatrix() │ │ │ │ │ -Definition coeffmatrix.hh:54 │ │ │ │ │ -Dune::SparseCoeffMatrix::Field │ │ │ │ │ -F Field │ │ │ │ │ -Definition coeffmatrix.hh:50 │ │ │ │ │ -Dune::SparseCoeffMatrix::baseSize │ │ │ │ │ -unsigned int baseSize() const │ │ │ │ │ -Definition coeffmatrix.hh:73 │ │ │ │ │ -Dune::SparseCoeffMatrix::This │ │ │ │ │ -SparseCoeffMatrix< Field, blockSize > This │ │ │ │ │ -Definition coeffmatrix.hh:52 │ │ │ │ │ -Dune::SparseCoeffMatrix::size │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::DualP1LocalFiniteElement │ │ │ │ │ +The local dual p1 finite element on simplices. │ │ │ │ │ +Definition dualp1.hh:35 │ │ │ │ │ +Dune::DualP1LocalFiniteElement::DualP1LocalFiniteElement │ │ │ │ │ +DualP1LocalFiniteElement() │ │ │ │ │ +Definition dualp1.hh:44 │ │ │ │ │ +Dune::DualP1LocalFiniteElement::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Definition coeffmatrix.hh:69 │ │ │ │ │ -Dune::SparseCoeffMatrix::fill │ │ │ │ │ -void fill(const RowMatrix &mat, bool verbose=false) │ │ │ │ │ -Definition coeffmatrix.hh:160 │ │ │ │ │ -Dune::SparseCoeffMatrix::addRow │ │ │ │ │ -void addRow(unsigned int k, const Field &a, Vector &b) const │ │ │ │ │ -Definition coeffmatrix.hh:223 │ │ │ │ │ -Dune::SparseCoeffMatrix::mult │ │ │ │ │ -void mult(const BasisIterator &x, unsigned int numLsg, FF *y) const │ │ │ │ │ -Definition coeffmatrix.hh:79 │ │ │ │ │ -Dune::SparseCoeffMatrix::mult │ │ │ │ │ -void mult(const BasisIterator &x, Vector &y) const │ │ │ │ │ -Definition coeffmatrix.hh:132 │ │ │ │ │ -Dune::SparseCoeffMatrix::mult │ │ │ │ │ -void mult(const BasisIterator &x, Vector &y) const │ │ │ │ │ -Definition coeffmatrix.hh:105 │ │ │ │ │ -Dune::SparseCoeffMatrix::~SparseCoeffMatrix │ │ │ │ │ -~SparseCoeffMatrix() │ │ │ │ │ -Definition coeffmatrix.hh:62 │ │ │ │ │ -Dune::Zero │ │ │ │ │ -A class representing the zero of a given Field. │ │ │ │ │ -Definition field.hh:79 │ │ │ │ │ -Dune::LFETensorAxpy::apply │ │ │ │ │ -static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ -Definition tensor.hh:571 │ │ │ │ │ -Dune::DerivativeAssign::apply │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -Definition tensor.hh:649 │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition dualp1.hh:69 │ │ │ │ │ +Dune::DualP1LocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< DualP1LocalBasis< D, R, dim, faceDual >, │ │ │ │ │ +DualP1LocalCoefficients< dim >, DualP1LocalInterpolation< dim, │ │ │ │ │ +DualP1LocalBasis< D, R, dim, faceDual > > > Traits │ │ │ │ │ +Definition dualp1.hh:40 │ │ │ │ │ +Dune::DualP1LocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition dualp1.hh:63 │ │ │ │ │ +Dune::DualP1LocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition dualp1.hh:49 │ │ │ │ │ +Dune::DualP1LocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition dualp1.hh:56 │ │ │ │ │ +Dune::DualP1LocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition dualp1.hh:76 │ │ │ │ │ +Dune::DualP1LocalBasis │ │ │ │ │ +Dual Lagrange shape functions on the simplex. │ │ │ │ │ +Definition dualp1localbasis.hh:34 │ │ │ │ │ +Dune::DualP1LocalCoefficients │ │ │ │ │ +Local coefficients for dual simplex P1 elements. │ │ │ │ │ +Definition dualp1localcoefficients.hh:23 │ │ │ │ │ +Dune::DualP1LocalInterpolation │ │ │ │ │ +Definition dualp1localinterpolation.hh:15 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00053.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: orthonormalbasis.hh File Reference │ │ │ │ +dune-localfunctions: dualq1localinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,35 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
orthonormalbasis.hh File Reference
│ │ │ │ +
dualq1localinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <sstream>
│ │ │ │ -#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │ -#include <dune/localfunctions/orthonormal/orthonormalcompute.hh>
│ │ │ │ +
#include <array>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::OrthonormalBasisFactory< dim, SF, CF >
 
struct  Dune::OrthonormalBasisFactory< dim, SF, CF >::EvaluationBasisFactory< dd, FF >
class  Dune::DualQ1LocalInterpolation< dim, LB >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * orthonormal │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ + * dualq1 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -orthonormalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +dualq1localinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  Dune::OrthonormalBasisFactory<_dim,_SF,_CF_> │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::OrthonormalBasisFactory<_dim,_SF,_CF_>::EvaluationBasisFactory< │ │ │ │ │ - dd,_FF_> │ │ │ │ │ +class  Dune::DualQ1LocalInterpolation<_dim,_LB_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00053_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: orthonormalbasis.hh Source File │ │ │ │ +dune-localfunctions: dualq1localinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,115 +70,110 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
orthonormalbasis.hh
│ │ │ │ +
dualq1localinterpolation.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_DUAL_Q1_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_DUAL_Q1_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <sstream>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ -
30
│ │ │ │ - │ │ │ │ -
32 typedef typename MonomialBasisProviderType::Object MonomialBasisType;
│ │ │ │ -
33
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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;
│ │ │ │ +
35
│ │ │ │ +
36 auto&& f = Impl::makeFunctionWithCallOperator<decltype(x)>(ff);
│ │ │ │
37
│ │ │ │ -
38 typedef unsigned int Key;
│ │ │ │ -
39 typedef const Basis Object;
│ │ │ │ -
40
│ │ │ │ -
41 static constexpr GeometryType SimplexGeometry = GeometryTypes::simplex(dim);
│ │ │ │ +
38 const int size = 1<<dim;
│ │ │ │ +
39
│ │ │ │ +
40 // compute Q1 interpolation coefficients
│ │ │ │ +
41 Dune::FieldVector<C,size> q1Coefficients;
│ │ │ │
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 );
│ │ │ │ +
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 return new Basis( monomialBasis, _coeffs, monomialBasis.size() );
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ -
57 static void release( Object *object ) { delete object; }
│ │ │ │ -
58 };
│ │ │ │ -
│ │ │ │ +
55 out.resize(size);
│ │ │ │ +
56
│ │ │ │ +
57 // solve a linear system to compute the dual coefficients
│ │ │ │ +
58 Dune::FieldMatrix<C,size,size> mat;
│ │ │ │
59
│ │ │ │ -
60}
│ │ │ │ -
61
│ │ │ │ -
62#endif // #ifndef DUNE_ORTHONORMALBASIS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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 };
│ │ │ │ +
│ │ │ │ +
77
│ │ │ │ +
78}
│ │ │ │ +
79
│ │ │ │ +
80#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
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,146 +7,108 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * orthonormal │ │ │ │ │ -orthonormalbasis.hh │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ + * dualq1 │ │ │ │ │ +dualq1localinterpolation.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_DUAL_Q1_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_DUAL_Q1_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 16 // OrthonormalBasisFactory │ │ │ │ │ - 17 // ----------------------- │ │ │ │ │ - 18 template< int dim, class SF, class CF = typename ComputeField< SF, 512 >:: │ │ │ │ │ -Type > │ │ │ │ │ -19 struct OrthonormalBasisFactory │ │ │ │ │ - 20 { │ │ │ │ │ -21 static const unsigned int dimension = dim; │ │ │ │ │ -22 typedef SF StorageField; │ │ │ │ │ -23 typedef CF ComputeField; │ │ │ │ │ - 24 │ │ │ │ │ - 25 template │ │ │ │ │ -26 struct EvaluationBasisFactory │ │ │ │ │ - 27 { │ │ │ │ │ -28 typedef MonomialBasisProvider Type; │ │ │ │ │ - 29 }; │ │ │ │ │ - 30 │ │ │ │ │ -31 typedef typename EvaluationBasisFactory<_dimension,_StorageField_>::Type │ │ │ │ │ -MonomialBasisProviderType; │ │ │ │ │ -32 typedef typename MonomialBasisProviderType::Object MonomialBasisType; │ │ │ │ │ - 33 │ │ │ │ │ -34 typedef SparseCoeffMatrix<_StorageField,_1_> CoefficientMatrix; │ │ │ │ │ -35 typedef StandardEvaluator<_MonomialBasisType_> Evaluator; │ │ │ │ │ -36 typedef PolynomialBasis<_Evaluator,_CoefficientMatrix_> Basis; │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 17 │ │ │ │ │ + 19 template │ │ │ │ │ +20 class DualQ1LocalInterpolation │ │ │ │ │ + 21 { │ │ │ │ │ + 22 public: │ │ │ │ │ + 23 │ │ │ │ │ +24 void setCoefficients(const std::array ,(1<& coefficients) │ │ │ │ │ + 25 { │ │ │ │ │ + 26 coefficients_ = coefficients; │ │ │ │ │ + 27 } │ │ │ │ │ + 28 │ │ │ │ │ + 29 │ │ │ │ │ + 31 template │ │ │ │ │ +32 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ + 33 { │ │ │ │ │ + 34 typename LB::Traits::DomainType x; │ │ │ │ │ + 35 │ │ │ │ │ + 36 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ 37 │ │ │ │ │ -38 typedef unsigned int Key; │ │ │ │ │ -39 typedef const Basis Object; │ │ │ │ │ - 40 │ │ │ │ │ -41 static constexpr GeometryType SimplexGeometry = GeometryTypes::simplex(dim); │ │ │ │ │ + 38 const int size = 1< q1Coefficients; │ │ │ │ │ 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 { │ │ │ │ │ - 51 ONBCompute::ONBMatrix<_geometryId,_ComputeField_> matrix( order ); │ │ │ │ │ - 52 _coeffs.fill( matrix ); │ │ │ │ │ + 43 for (int i=0; i< (1< mat; │ │ │ │ │ 59 │ │ │ │ │ - 60} │ │ │ │ │ - 61 │ │ │ │ │ - 62#endif // #ifndef DUNE_ORTHONORMALBASIS_HH │ │ │ │ │ -polynomialbasis.hh │ │ │ │ │ -orthonormalcompute.hh │ │ │ │ │ + 60 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 }; │ │ │ │ │ + 77 │ │ │ │ │ + 78} │ │ │ │ │ + 79 │ │ │ │ │ + 80#endif │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::OrthonormalBasisFactory │ │ │ │ │ -Definition orthonormalbasis.hh:20 │ │ │ │ │ -Dune::OrthonormalBasisFactory::CoefficientMatrix │ │ │ │ │ -SparseCoeffMatrix< StorageField, 1 > CoefficientMatrix │ │ │ │ │ -Definition orthonormalbasis.hh:34 │ │ │ │ │ -Dune::OrthonormalBasisFactory::create │ │ │ │ │ -static Object * create(const unsigned int order) │ │ │ │ │ -Definition orthonormalbasis.hh:44 │ │ │ │ │ -Dune::OrthonormalBasisFactory::Evaluator │ │ │ │ │ -StandardEvaluator< MonomialBasisType > Evaluator │ │ │ │ │ -Definition orthonormalbasis.hh:35 │ │ │ │ │ -Dune::OrthonormalBasisFactory::StorageField │ │ │ │ │ -SF StorageField │ │ │ │ │ -Definition orthonormalbasis.hh:22 │ │ │ │ │ -Dune::OrthonormalBasisFactory::SimplexGeometry │ │ │ │ │ -static constexpr GeometryType SimplexGeometry │ │ │ │ │ -Definition orthonormalbasis.hh:41 │ │ │ │ │ -Dune::OrthonormalBasisFactory::Basis │ │ │ │ │ -PolynomialBasis< Evaluator, CoefficientMatrix > Basis │ │ │ │ │ -Definition orthonormalbasis.hh:36 │ │ │ │ │ -Dune::OrthonormalBasisFactory::MonomialBasisProviderType │ │ │ │ │ -EvaluationBasisFactory< dimension, StorageField >::Type │ │ │ │ │ -MonomialBasisProviderType │ │ │ │ │ -Definition orthonormalbasis.hh:31 │ │ │ │ │ -Dune::OrthonormalBasisFactory::ComputeField │ │ │ │ │ -CF ComputeField │ │ │ │ │ -Definition orthonormalbasis.hh:23 │ │ │ │ │ -Dune::OrthonormalBasisFactory::Object │ │ │ │ │ -const Basis Object │ │ │ │ │ -Definition orthonormalbasis.hh:39 │ │ │ │ │ -Dune::OrthonormalBasisFactory::Key │ │ │ │ │ -unsigned int Key │ │ │ │ │ -Definition orthonormalbasis.hh:38 │ │ │ │ │ -Dune::OrthonormalBasisFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition orthonormalbasis.hh:57 │ │ │ │ │ -Dune::OrthonormalBasisFactory::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition orthonormalbasis.hh:21 │ │ │ │ │ -Dune::OrthonormalBasisFactory::MonomialBasisType │ │ │ │ │ -MonomialBasisProviderType::Object MonomialBasisType │ │ │ │ │ -Definition orthonormalbasis.hh:32 │ │ │ │ │ -Dune::OrthonormalBasisFactory::EvaluationBasisFactory │ │ │ │ │ -Definition orthonormalbasis.hh:27 │ │ │ │ │ -Dune::OrthonormalBasisFactory::EvaluationBasisFactory::Type │ │ │ │ │ -MonomialBasisProvider< dd, FF > Type │ │ │ │ │ -Definition orthonormalbasis.hh:28 │ │ │ │ │ -ONBCompute::ONBMatrix │ │ │ │ │ -Definition orthonormalcompute.hh:95 │ │ │ │ │ -Dune::StandardEvaluator │ │ │ │ │ -Definition basisevaluator.hh:131 │ │ │ │ │ -Dune::SparseCoeffMatrix │ │ │ │ │ -Definition coeffmatrix.hh:48 │ │ │ │ │ -Dune::SparseCoeffMatrix::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Definition coeffmatrix.hh:69 │ │ │ │ │ -Dune::SparseCoeffMatrix::fill │ │ │ │ │ -void fill(const RowMatrix &mat, bool verbose=false) │ │ │ │ │ -Definition coeffmatrix.hh:160 │ │ │ │ │ -Dune::MonomialBasisProvider │ │ │ │ │ -Definition monomialbasis.hh:780 │ │ │ │ │ -Dune::PolynomialBasis │ │ │ │ │ -Definition polynomialbasis.hh:65 │ │ │ │ │ +Dune::DualQ1LocalInterpolation │ │ │ │ │ +Definition dualq1localinterpolation.hh:21 │ │ │ │ │ +Dune::DualQ1LocalInterpolation::setCoefficients │ │ │ │ │ +void setCoefficients(const std::array< Dune::FieldVector< typename LB::Traits:: │ │ │ │ │ +RangeFieldType,(1<< dim)>,(1<< dim)> &coefficients) │ │ │ │ │ +Definition dualq1localinterpolation.hh:24 │ │ │ │ │ +Dune::DualQ1LocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Local interpolation of a function. │ │ │ │ │ +Definition dualq1localinterpolation.hh:32 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00056.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: orthonormalcompute.hh File Reference │ │ │ │ +dune-localfunctions: dualq1localcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,57 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
orthonormalcompute.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
dualq1localcoefficients.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ +
#include <cstddef>
│ │ │ │ #include <iostream>
│ │ │ │ -#include <fstream>
│ │ │ │ -#include <iomanip>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <map>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#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 <vector>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  ONBCompute::Integral< geometryId >
 
class  ONBCompute::ONBMatrix< geometryId, scalar_t >
class  Dune::DualQ1LocalCoefficients< dim >
 Layout map for dual Q1 elements. More...
 
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

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

│ │ │ │ -Functions

template<class scalar_t >
scalar_t ONBCompute::factorial (int start, int end)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,38 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * orthonormal │ │ │ │ │ -Classes | Namespaces | Functions │ │ │ │ │ -orthonormalcompute.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ + * dualq1 │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +dualq1localcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  ONBCompute::Integral<_geometryId_> │ │ │ │ │ -  │ │ │ │ │ - class  ONBCompute::ONBMatrix<_geometryId,_scalar_t_> │ │ │ │ │ +class  Dune::DualQ1LocalCoefficients<_dim_> │ │ │ │ │ +  Layout map for dual Q1 elements. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ -namespace  ONBCompute │ │ │ │ │ -  │ │ │ │ │ - Functions │ │ │ │ │ -template │ │ │ │ │ -scalar_t ONBCompute::factorial (int start, int end) │ │ │ │ │ +namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00056_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: orthonormalcompute.hh Source File │ │ │ │ +dune-localfunctions: dualq1localcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,270 +70,79 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
orthonormalcompute.hh
│ │ │ │ +
dualq1localcoefficients.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_DUAL_Q1_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_DUAL_Q1_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ +
8#include <cstddef>
│ │ │ │
9#include <iostream>
│ │ │ │ -
10#include <fstream>
│ │ │ │ -
11#include <iomanip>
│ │ │ │ -
12#include <utility>
│ │ │ │ -
13#include <map>
│ │ │ │ -
14
│ │ │ │ -
15#include <dune/common/fmatrix.hh>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │
16
│ │ │ │ -
17#include <dune/geometry/type.hh>
│ │ │ │ -
18
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
│ │ │ │ -
24namespace ONBCompute
│ │ │ │ -
25{
│ │ │ │ -
26
│ │ │ │ -
27 template< class scalar_t >
│ │ │ │ +
23 template <int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
25 {
│ │ │ │ +
26 public:
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ + │ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
46 private:
│ │ │ │ +
47 std::vector<LocalKey> li;
│ │ │ │ +
48 };
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
50}
│ │ │ │ +
51
│ │ │ │ +
52#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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,295 +7,79 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * orthonormal │ │ │ │ │ -orthonormalcompute.hh │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ + * dualq1 │ │ │ │ │ +dualq1localcoefficients.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_DUAL_Q1_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_DUAL_Q1_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14namespace Dune │ │ │ │ │ + 15{ │ │ │ │ │ 16 │ │ │ │ │ - 17#include │ │ │ │ │ - 18 │ │ │ │ │ - 19#include │ │ │ │ │ - 20#include │ │ │ │ │ - 21#include │ │ │ │ │ - 22#include │ │ │ │ │ - 23 │ │ │ │ │ -24namespace ONBCompute │ │ │ │ │ - 25{ │ │ │ │ │ - 26 │ │ │ │ │ - 27 template< class scalar_t > │ │ │ │ │ -28 scalar_t factorial( int start, int end ) │ │ │ │ │ + 23 template │ │ │ │ │ +24 class DualQ1LocalCoefficients │ │ │ │ │ + 25 { │ │ │ │ │ + 26 public: │ │ │ │ │ +28 DualQ1LocalCoefficients () : li(1< │ │ │ │ │ -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{}); │ │ │ │ │ - 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 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 } │ │ │ │ │ - 66 │ │ │ │ │ - 67 template< int step, int dim, class scalar_t > │ │ │ │ │ -68 static void computeIntegral ( const Dune::MultiIndex<_dim,_scalar_t_> │ │ │ │ │ -&alpha, │ │ │ │ │ - 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 }; │ │ │ │ │ - 87 │ │ │ │ │ - 88 │ │ │ │ │ - 89 // ONBMatrix │ │ │ │ │ - 90 // --------- │ │ │ │ │ - 91 │ │ │ │ │ - 92 template< Dune::GeometryType::Id geometryId, class scalar_t > │ │ │ │ │ -93 class ONBMatrix │ │ │ │ │ - 94 : public Dune::LFEMatrix< scalar_t > │ │ │ │ │ - 95 { │ │ │ │ │ - 96 typedef ONBMatrix<_geometryId,_scalar_t_> This; │ │ │ │ │ - 97 typedef Dune::LFEMatrix<_scalar_t_> Base; │ │ │ │ │ - 98 │ │ │ │ │ - 99 public: │ │ │ │ │ -100 typedef std::vector< scalar_t > vec_t; │ │ │ │ │ -101 typedef Dune::LFEMatrix<_scalar_t_> mat_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(); │ │ │ │ │ - 108 typedef Dune::MultiIndex<_dim,_scalar_t_> MI; │ │ │ │ │ - 109 Dune::StandardMonomialBasis<_dim,_MI_> basis( order ); │ │ │ │ │ - 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 } │ │ │ │ │ - 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 │ │ │ │ │ -lfematrix.hh │ │ │ │ │ -monomialbasis.hh │ │ │ │ │ -field.hh │ │ │ │ │ -multiindex.hh │ │ │ │ │ -Dune::field_cast │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -Definition field.hh:159 │ │ │ │ │ -ONBCompute │ │ │ │ │ -Definition orthonormalcompute.hh:25 │ │ │ │ │ -ONBCompute::factorial │ │ │ │ │ -scalar_t factorial(int start, int end) │ │ │ │ │ -Definition orthonormalcompute.hh:28 │ │ │ │ │ -ONBCompute::Integral │ │ │ │ │ -Definition orthonormalcompute.hh:43 │ │ │ │ │ -ONBCompute::Integral::compute │ │ │ │ │ -static int compute(const Dune::MultiIndex< dim, scalar_t > &alpha, scalar_t &p, │ │ │ │ │ -scalar_t &q) │ │ │ │ │ -Definition orthonormalcompute.hh:48 │ │ │ │ │ -ONBCompute::Integral::compute │ │ │ │ │ -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 │ │ │ │ │ -ONBCompute::Integral::computeIntegral │ │ │ │ │ -static void computeIntegral(const Dune::MultiIndex< dim, scalar_t > &alpha, │ │ │ │ │ -scalar_t &p, scalar_t &q, int &ord) │ │ │ │ │ -Definition orthonormalcompute.hh:68 │ │ │ │ │ -ONBCompute::Integral::dimension │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -Definition orthonormalcompute.hh:45 │ │ │ │ │ -ONBCompute::Integral::geometry │ │ │ │ │ -static constexpr Dune::GeometryType geometry │ │ │ │ │ -Definition orthonormalcompute.hh:44 │ │ │ │ │ -ONBCompute::ONBMatrix │ │ │ │ │ -Definition orthonormalcompute.hh:95 │ │ │ │ │ -ONBCompute::ONBMatrix::ONBMatrix │ │ │ │ │ -ONBMatrix(unsigned int order) │ │ │ │ │ -Definition orthonormalcompute.hh:103 │ │ │ │ │ -ONBCompute::ONBMatrix::vec_t │ │ │ │ │ -std::vector< scalar_t > vec_t │ │ │ │ │ -Definition orthonormalcompute.hh:100 │ │ │ │ │ -ONBCompute::ONBMatrix::row │ │ │ │ │ -void row(unsigned int row, Vector &vec) const │ │ │ │ │ -Definition orthonormalcompute.hh:139 │ │ │ │ │ -ONBCompute::ONBMatrix::mat_t │ │ │ │ │ -Dune::LFEMatrix< scalar_t > mat_t │ │ │ │ │ -Definition orthonormalcompute.hh:101 │ │ │ │ │ -Dune::LFEMatrix │ │ │ │ │ -Definition lfematrix.hh:18 │ │ │ │ │ -Dune::LFEMatrix<_scalar_t_>::cols │ │ │ │ │ -unsigned int cols() const │ │ │ │ │ -Definition lfematrix.hh:63 │ │ │ │ │ -Dune::LFEMatrix<_scalar_t_>::resize │ │ │ │ │ -void resize(const unsigned int rows, const unsigned int cols) │ │ │ │ │ -Definition lfematrix.hh:80 │ │ │ │ │ -Dune::LFEMatrix<_scalar_t_>::operator() │ │ │ │ │ -const Field & operator()(const unsigned int row, const unsigned int col) const │ │ │ │ │ -Definition lfematrix.hh:44 │ │ │ │ │ -Dune::LFEMatrix<_scalar_t_>::rows │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -Definition lfematrix.hh:58 │ │ │ │ │ -Dune::MonomialBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Definition monomialbasis.hh:476 │ │ │ │ │ -Dune::MonomialBasis::evaluate │ │ │ │ │ -void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ -values) const │ │ │ │ │ -Definition monomialbasis.hh:498 │ │ │ │ │ -Dune::StandardMonomialBasis │ │ │ │ │ -Definition monomialbasis.hh:571 │ │ │ │ │ -Dune::MultiIndex │ │ │ │ │ -Definition multiindex.hh:37 │ │ │ │ │ -Dune::MultiIndex::z │ │ │ │ │ -int z(int i) const │ │ │ │ │ -Definition multiindex.hh:91 │ │ │ │ │ + 30 for (std::size_t i=0; i<(1< li; │ │ │ │ │ + 48 }; │ │ │ │ │ + 49 │ │ │ │ │ + 50} │ │ │ │ │ + 51 │ │ │ │ │ + 52#endif │ │ │ │ │ +localkey.hh │ │ │ │ │ +Dune │ │ │ │ │ +Definition bdfmcube.hh:18 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::DualQ1LocalCoefficients │ │ │ │ │ +Layout map for dual Q1 elements. │ │ │ │ │ +Definition dualq1localcoefficients.hh:25 │ │ │ │ │ +Dune::DualQ1LocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition dualq1localcoefficients.hh:35 │ │ │ │ │ +Dune::DualQ1LocalCoefficients::DualQ1LocalCoefficients │ │ │ │ │ +DualQ1LocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition dualq1localcoefficients.hh:28 │ │ │ │ │ +Dune::DualQ1LocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition dualq1localcoefficients.hh:41 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00059.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangebasis.hh File Reference │ │ │ │ +dune-localfunctions: dualq1localbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
lagrangebasis.hh File Reference
│ │ │ │ +
dualq1localbasis.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 <array>
│ │ │ │ +#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

struct  Dune::LagrangeBasisFactory< LP, dim, SF, CF >
class  Dune::DualQ1LocalBasis< D, R, dim >
 Dual Lagrange shape functions of order 1 on the reference cube. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,25 +6,27 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ + * dualq1 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -lagrangebasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +dualq1localbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  Dune::LagrangeBasisFactory<_LP,_dim,_SF,_CF_> │ │ │ │ │ +class  Dune::DualQ1LocalBasis<_D,_R,_dim_> │ │ │ │ │ +  Dual Lagrange shape functions of order 1 on the reference cube. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00059_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangebasis.hh Source File │ │ │ │ +dune-localfunctions: dualq1localbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,58 +70,171 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangebasis.hh
│ │ │ │ +
dualq1localbasis.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_DUAL_Q1_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_DUAL_Q1_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <dune/common/exceptions.hh>
│ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <numeric>
│ │ │ │
10
│ │ │ │ - │ │ │ │ - │ │ │ │ +
11#include <dune/common/fvector.hh>
│ │ │ │ +
12#include <dune/common/fmatrix.hh>
│ │ │ │
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}
│ │ │ │ -
28
│ │ │ │ -
29#endif // #ifndef DUNE_LAGRANGEBASIS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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;
│ │ │ │ +
37 }
│ │ │ │ +
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ +
40 unsigned int size () const
│ │ │ │ +
41 {
│ │ │ │ +
42 return 1<<dim;
│ │ │ │ +
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
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition lagrangebasis.hh:25
│ │ │ │ -
Definition defaultbasisfactory.hh:38
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,52 +7,187 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -lagrangebasis.hh │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ + * dualq1 │ │ │ │ │ +dualq1localbasis.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_DUAL_Q1_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_DUAL_Q1_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ 13 │ │ │ │ │ - 14#include │ │ │ │ │ + 14#include │ │ │ │ │ 15 │ │ │ │ │ 16namespace Dune │ │ │ │ │ 17{ │ │ │ │ │ - 18 │ │ │ │ │ - 19 template< template class LP, │ │ │ │ │ - 20 unsigned int dim, class SF, class CF > │ │ │ │ │ -21 struct LagrangeBasisFactory │ │ │ │ │ - 22 : public DefaultBasisFactory< MonomialBasisFactory, │ │ │ │ │ - 23 LagrangeInterpolationFactory, │ │ │ │ │ - 24 dim,1,SF,CF > │ │ │ │ │ - 25 {}; │ │ │ │ │ - 26 │ │ │ │ │ - 27} │ │ │ │ │ - 28 │ │ │ │ │ - 29#endif // #ifndef DUNE_LAGRANGEBASIS_HH │ │ │ │ │ -monomialbasis.hh │ │ │ │ │ -defaultbasisfactory.hh │ │ │ │ │ + 27 template │ │ │ │ │ +28 class DualQ1LocalBasis │ │ │ │ │ + 29 { │ │ │ │ │ + 30 public: │ │ │ │ │ + 31 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +32 Dune::FieldMatrix > Traits; │ │ │ │ │ + 33 │ │ │ │ │ +34 void setCoefficients(const std::array , │ │ │ │ │ +(1<& coefficients) │ │ │ │ │ + 35 { │ │ │ │ │ + 36 coefficients_ = coefficients; │ │ │ │ │ + 37 } │ │ │ │ │ + 38 │ │ │ │ │ +40 unsigned int size () const │ │ │ │ │ + 41 { │ │ │ │ │ + 42 return 1<& out) const │ │ │ │ │ + 48 { │ │ │ │ │ + 49 // compute q1 values │ │ │ │ │ + 50 std::vector q1Values(size()); │ │ │ │ │ + 51 │ │ │ │ │ + 52 for (size_t i=0; i& out) const // return value │ │ │ │ │ + 78 { │ │ │ │ │ + 79 // compute q1 jacobians │ │ │ │ │ + 80 std::vector q1Jacs(size()); │ │ │ │ │ + 81 │ │ │ │ │ + 82 // Loop over all shape functions │ │ │ │ │ + 83 for (size_t i=0; i& order, │ │ │ │ │ + 117 const typename Traits::DomainType& in, // position │ │ │ │ │ + 118 std::vector& 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 ,(1< coefficients_; │ │ │ │ │ + 136 }; │ │ │ │ │ + 137} │ │ │ │ │ + 138#endif │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LagrangeBasisFactory │ │ │ │ │ -Definition lagrangebasis.hh:25 │ │ │ │ │ -Dune::DefaultBasisFactory │ │ │ │ │ -Definition defaultbasisfactory.hh:38 │ │ │ │ │ -interpolation.hh │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::DualQ1LocalBasis │ │ │ │ │ +Dual Lagrange shape functions of order 1 on the reference cube. │ │ │ │ │ +Definition dualq1localbasis.hh:29 │ │ │ │ │ +Dune::DualQ1LocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition dualq1localbasis.hh:40 │ │ │ │ │ +Dune::DualQ1LocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition dualq1localbasis.hh:129 │ │ │ │ │ +Dune::DualQ1LocalBasis::setCoefficients │ │ │ │ │ +void setCoefficients(const std::array< Dune::FieldVector< R,(1<< dim)>,(1<< │ │ │ │ │ +dim)> &coefficients) │ │ │ │ │ +Definition dualq1localbasis.hh:34 │ │ │ │ │ +Dune::DualQ1LocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition dualq1localbasis.hh:46 │ │ │ │ │ +Dune::DualQ1LocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune::FieldVector< │ │ │ │ │ +R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits │ │ │ │ │ +Definition dualq1localbasis.hh:32 │ │ │ │ │ +Dune::DualQ1LocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition dualq1localbasis.hh:76 │ │ │ │ │ +Dune::DualQ1LocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00062.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangesimplex.hh File Reference │ │ │ │ +dune-localfunctions: dualpq1factory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
lagrangesimplex.hh File Reference
│ │ │ │ +
dualpq1factory.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 <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::LagrangeSimplexLocalFiniteElement< D, R, d, k >
 Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order. More...
class  Dune::DualPQ1LocalFiniteElementCache< D, R, dim, faceDual >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,33 +6,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -lagrangesimplex.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +dualpq1factory.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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::DualPQ1LocalFiniteElementCache<_D,_R,_dim,_faceDual_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00062_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangesimplex.hh Source File │ │ │ │ +dune-localfunctions: dualpq1factory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,879 +70,118 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangesimplex.hh
│ │ │ │ +
dualpq1factory.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_DUAL_P1_Q1_FACTORY_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_DUAL_P1_Q1_FACTORY_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <numeric>
│ │ │ │ -
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>
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <map>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,931 +7,139 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ + * dualmortarbasis │ │ │ │ │ +dualpq1factory.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_DUAL_P1_Q1_FACTORY_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_DUAL_P1_Q1_FACTORY_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15 │ │ │ │ │ - 16#include │ │ │ │ │ - 17 │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include │ │ │ │ │ - 20#include │ │ │ │ │ - 21#include │ │ │ │ │ - 22 │ │ │ │ │ - 23namespace Dune { 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 Traits::DomainType& 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 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& 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 Traits::DomainType& 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 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 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 │ │ │ │ │ -837 class LagrangeSimplexLocalFiniteElement │ │ │ │ │ - 838 { │ │ │ │ │ - 839 public: │ │ │ │ │ -842 using Traits = LocalFiniteElementTraits, │ │ │ │ │ - 843 Impl::LagrangeSimplexLocalCoefficients, │ │ │ │ │ - 844 Impl::LagrangeSimplexLocalInterpolation > >; │ │ │ │ │ - 845 │ │ │ │ │ -847 LagrangeSimplexLocalFiniteElement() {} │ │ │ │ │ - 848 │ │ │ │ │ - 853 template │ │ │ │ │ -854 LagrangeSimplexLocalFiniteElement(const VertexMap& vertexmap) │ │ │ │ │ - 855 : coefficients_(vertexmap) │ │ │ │ │ - 856 {} │ │ │ │ │ - 857 │ │ │ │ │ -860 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 861 { │ │ │ │ │ - 862 return basis_; │ │ │ │ │ - 863 } │ │ │ │ │ - 864 │ │ │ │ │ -867 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 868 { │ │ │ │ │ - 869 return coefficients_; │ │ │ │ │ - 870 } │ │ │ │ │ - 871 │ │ │ │ │ -874 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 875 { │ │ │ │ │ - 876 return interpolation_; │ │ │ │ │ - 877 } │ │ │ │ │ - 878 │ │ │ │ │ -880 static constexpr std::size_t size () │ │ │ │ │ - 881 { │ │ │ │ │ - 882 return Impl::LagrangeSimplexLocalBasis::size(); │ │ │ │ │ - 883 } │ │ │ │ │ - 884 │ │ │ │ │ -887 static constexpr GeometryType type () │ │ │ │ │ - 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 │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -localkey.hh │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune { │ │ │ │ │ + 16 │ │ │ │ │ + 17template │ │ │ │ │ +18class DualPQ1LocalFiniteElementCache │ │ │ │ │ + 19{ │ │ │ │ │ + 20protected: │ │ │ │ │ +21 typedef Dune::DualP1LocalFiniteElement DualP1; │ │ │ │ │ +22 typedef Dune::DualQ1LocalFiniteElement DualQ1; │ │ │ │ │ +23 typedef typename DualP1::Traits::LocalBasisType::Traits T; │ │ │ │ │ +24 typedef Dune::LocalFiniteElementVirtualInterface FE; │ │ │ │ │ +25 typedef std::map FEMap; │ │ │ │ │ + 26 │ │ │ │ │ + 27public: │ │ │ │ │ +29 typedef FE FiniteElementType; │ │ │ │ │ + 30 │ │ │ │ │ +31 ~DualPQ1LocalFiniteElementCache() │ │ │ │ │ + 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()) │ │ │ │ │ + 43 return new Dune::LocalFiniteElementVirtualImp(DualP1()); │ │ │ │ │ + 44 if (gt.isCube()) │ │ │ │ │ + 45 return new Dune::LocalFiniteElementVirtualImp(DualQ1()); │ │ │ │ │ + 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 │ │ │ │ │ +virtualinterface.hh │ │ │ │ │ +virtualwrappers.hh │ │ │ │ │ +dualmortarbasis.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalBasisTraits::RangeType │ │ │ │ │ -R RangeType │ │ │ │ │ -range type │ │ │ │ │ -Definition common/localbasis.hh:51 │ │ │ │ │ Dune::LocalFiniteElementTraits │ │ │ │ │ traits helper struct │ │ │ │ │ Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -Definition lagrangesimplex.hh:838 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Returns object that evaluates degrees of freedom. │ │ │ │ │ -Definition lagrangesimplex.hh:874 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ -Definition lagrangesimplex.hh:860 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement::LagrangeSimplexLocalFiniteElement │ │ │ │ │ -LagrangeSimplexLocalFiniteElement() │ │ │ │ │ -Definition lagrangesimplex.hh:847 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement::size │ │ │ │ │ -static constexpr std::size_t size() │ │ │ │ │ -The number of shape functions. │ │ │ │ │ -Definition lagrangesimplex.hh:880 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement::LagrangeSimplexLocalFiniteElement │ │ │ │ │ -LagrangeSimplexLocalFiniteElement(const VertexMap &vertexmap) │ │ │ │ │ -Definition lagrangesimplex.hh:854 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ -Definition lagrangesimplex.hh:867 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -The reference element that the local finite element is defined on. │ │ │ │ │ -Definition lagrangesimplex.hh:887 │ │ │ │ │ -localbasis.hh │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalFiniteElementVirtualInterface │ │ │ │ │ +virtual base class for local finite elements with functions │ │ │ │ │ +Definition virtualinterface.hh:286 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp │ │ │ │ │ +class for wrapping a finite element using the virtual interface │ │ │ │ │ +Definition virtualwrappers.hh:240 │ │ │ │ │ +Dune::DualP1LocalFiniteElement │ │ │ │ │ +The local dual p1 finite element on simplices. │ │ │ │ │ +Definition dualp1.hh:35 │ │ │ │ │ +Dune::DualPQ1LocalFiniteElementCache │ │ │ │ │ +Definition dualpq1factory.hh:19 │ │ │ │ │ +Dune::DualPQ1LocalFiniteElementCache::DualP1 │ │ │ │ │ +Dune::DualP1LocalFiniteElement< D, R, dim, faceDual > DualP1 │ │ │ │ │ +Definition dualpq1factory.hh:21 │ │ │ │ │ +Dune::DualPQ1LocalFiniteElementCache::~DualPQ1LocalFiniteElementCache │ │ │ │ │ +~DualPQ1LocalFiniteElementCache() │ │ │ │ │ +Definition dualpq1factory.hh:31 │ │ │ │ │ +Dune::DualPQ1LocalFiniteElementCache::cache_ │ │ │ │ │ +FEMap cache_ │ │ │ │ │ +Definition dualpq1factory.hh:67 │ │ │ │ │ +Dune::DualPQ1LocalFiniteElementCache::T │ │ │ │ │ +DualP1::Traits::LocalBasisType::Traits T │ │ │ │ │ +Definition dualpq1factory.hh:23 │ │ │ │ │ +Dune::DualPQ1LocalFiniteElementCache::create │ │ │ │ │ +static FE * create(const Dune::GeometryType >) │ │ │ │ │ +create finite element for given GeometryType │ │ │ │ │ +Definition dualpq1factory.hh:40 │ │ │ │ │ +Dune::DualPQ1LocalFiniteElementCache::FiniteElementType │ │ │ │ │ +FE FiniteElementType │ │ │ │ │ +Type of the finite elements stored in this cache. │ │ │ │ │ +Definition dualpq1factory.hh:29 │ │ │ │ │ +Dune::DualPQ1LocalFiniteElementCache::get │ │ │ │ │ +const FiniteElementType & get(const Dune::GeometryType >) const │ │ │ │ │ +Get local finite element for given GeometryType. │ │ │ │ │ +Definition dualpq1factory.hh:50 │ │ │ │ │ +Dune::DualPQ1LocalFiniteElementCache::FE │ │ │ │ │ +Dune::LocalFiniteElementVirtualInterface< T > FE │ │ │ │ │ +Definition dualpq1factory.hh:24 │ │ │ │ │ +Dune::DualPQ1LocalFiniteElementCache::FEMap │ │ │ │ │ +std::map< Dune::GeometryType, FE * > FEMap │ │ │ │ │ +Definition dualpq1factory.hh:25 │ │ │ │ │ +Dune::DualPQ1LocalFiniteElementCache::DualQ1 │ │ │ │ │ +Dune::DualQ1LocalFiniteElement< D, R, dim, faceDual > DualQ1 │ │ │ │ │ +Definition dualpq1factory.hh:22 │ │ │ │ │ +Dune::DualQ1LocalFiniteElement │ │ │ │ │ +The local dual Q1 finite element on cubes. │ │ │ │ │ +Definition dualq1.hh:42 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00065.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangeprism.hh File Reference │ │ │ │ +dune-localfunctions: monomial.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
lagrangeprism.hh File Reference
│ │ │ │ +
monomial.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 <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"
│ │ │ │
│ │ │ │

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::MonomialLocalFiniteElement< D, R, d, p >
 Monomial basis for discontinuous Galerkin methods. More...
 
class  Dune::MonomialFiniteElementFactory< Geometry, RF, p >
 Factory for global-valued MonomFiniteElement objects. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,32 +6,34 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -lagrangeprism.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +monomial.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "common/localfiniteelementtraits.hh" │ │ │ │ │ +#include "common/localtoglobaladaptors.hh" │ │ │ │ │ +#include "monomial/monomiallocalbasis.hh" │ │ │ │ │ +#include "monomial/monomiallocalcoefficients.hh" │ │ │ │ │ +#include "monomial/monomiallocalinterpolation.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::MonomialLocalFiniteElement<_D,_R,_d,_p_> │ │ │ │ │ +  Monomial basis for discontinuous Galerkin methods. More... │ │ │ │ │ +  │ │ │ │ │ +class  Dune::MonomialFiniteElementFactory<_Geometry,_RF,_p_> │ │ │ │ │ +  Factory for global-valued MonomFiniteElement objects. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00065_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangeprism.hh Source File │ │ │ │ +dune-localfunctions: monomial.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,695 +70,223 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangeprism.hh
│ │ │ │ +
monomial.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
│ │ │ │ -
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>
│ │ │ │ +
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>
│ │ │ │
14
│ │ │ │ -
15#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
15#include <dune/geometry/type.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
│ │ │ │ -
50 {
│ │ │ │ -
51 out.resize(size());
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
22
│ │ │ │ +
23namespace Dune
│ │ │ │ +
24{
│ │ │ │ +
25
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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]);
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
75 {
│ │ │ │ +
76 return interpolation;
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │
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];
│ │ │ │ +
│ │ │ │ +
80 unsigned int size () const
│ │ │ │ +
81 {
│ │ │ │ +
82 return basis.size();
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
│ │ │ │ +
87 GeometryType type () const
│ │ │ │ +
88 {
│ │ │ │ +
89 return gt;
│ │ │ │ +
90 }
│ │ │ │ +
│ │ │ │
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];
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
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];
│ │ │ │ +
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
│ │ │ │ -
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];
│ │ │ │ +
│ │ │ │ +
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 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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
204#endif // DUNE_LOCALFUNCTIONS_MONOMIAL_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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,726 +7,250 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -lagrangeprism.hh │ │ │ │ │ +monomial.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 │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ + 5 │ │ │ │ │ + 6#ifndef DUNE_LOCALFUNCTIONS_MONOMIAL_HH │ │ │ │ │ + 7#define DUNE_LOCALFUNCTIONS_MONOMIAL_HH │ │ │ │ │ + 8 │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ 14 │ │ │ │ │ - 15#include │ │ │ │ │ + 15#include │ │ │ │ │ 16 │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include │ │ │ │ │ - 20#include │ │ │ │ │ - 21 │ │ │ │ │ - 22namespace Dune { 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 Traits::DomainType& in, │ │ │ │ │ - 49 std::vector& out) const │ │ │ │ │ - 50 { │ │ │ │ │ - 51 out.resize(size()); │ │ │ │ │ + 17#include "common/localfiniteelementtraits.hh" │ │ │ │ │ + 18#include "common/localtoglobaladaptors.hh" │ │ │ │ │ + 19#include "monomial/monomiallocalbasis.hh" │ │ │ │ │ + 20#include "monomial/monomiallocalcoefficients.hh" │ │ │ │ │ + 21#include "monomial/monomiallocalinterpolation.hh" │ │ │ │ │ + 22 │ │ │ │ │ + 23namespace Dune │ │ │ │ │ + 24{ │ │ │ │ │ + 25 │ │ │ │ │ + 26 │ │ │ │ │ + 39 template │ │ │ │ │ +40 class MonomialLocalFiniteElement │ │ │ │ │ + 41 { │ │ │ │ │ + 42 constexpr static int static_size = MonomialLocalBasis::size(); │ │ │ │ │ + 43 │ │ │ │ │ + 44 public: │ │ │ │ │ + 47 typedef LocalFiniteElementTraits< │ │ │ │ │ + 48 MonomialLocalBasis, │ │ │ │ │ + 49 MonomialLocalCoefficients, │ │ │ │ │ + 50 MonomialLocalInterpolation,static_size> │ │ │ │ │ +51 > Traits; │ │ │ │ │ 52 │ │ │ │ │ - 53 // Specialization for zero-order case │ │ │ │ │ - 54 if (k==0) │ │ │ │ │ - 55 { │ │ │ │ │ - 56 out[0] = 1; │ │ │ │ │ - 57 return; │ │ │ │ │ - 58 } │ │ │ │ │ - 59 │ │ │ │ │ - 60 if (k==1) │ │ │ │ │ +54 MonomialLocalFiniteElement (const GeometryType >_) │ │ │ │ │ + 55 : basis(), interpolation(gt_, basis), gt(gt_) │ │ │ │ │ + 56 {} │ │ │ │ │ + 57 │ │ │ │ │ +60 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ 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; │ │ │ │ │ + 62 return basis; │ │ │ │ │ + 63 } │ │ │ │ │ + 64 │ │ │ │ │ +67 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 68 { │ │ │ │ │ + 69 return coefficients; │ │ │ │ │ 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]); │ │ │ │ │ +74 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 75 { │ │ │ │ │ + 76 return interpolation; │ │ │ │ │ + 77 } │ │ │ │ │ 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]; │ │ │ │ │ +80 unsigned int size () const │ │ │ │ │ + 81 { │ │ │ │ │ + 82 return basis.size(); │ │ │ │ │ + 83 } │ │ │ │ │ + 84 │ │ │ │ │ +87 GeometryType type () const │ │ │ │ │ + 88 { │ │ │ │ │ + 89 return gt; │ │ │ │ │ + 90 } │ │ │ │ │ 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]; │ │ │ │ │ + 92 private: │ │ │ │ │ + 93 MonomialLocalBasis basis; │ │ │ │ │ + 94 MonomialLocalCoefficients coefficients; │ │ │ │ │ + 95 MonomialLocalInterpolation,static_size> │ │ │ │ │ +interpolation; │ │ │ │ │ + 96 GeometryType gt; │ │ │ │ │ + 97 }; │ │ │ │ │ + 98 │ │ │ │ │ + 100 │ │ │ │ │ + 112 template │ │ │ │ │ +113 class MonomialFiniteElementFactory { │ │ │ │ │ + 114 typedef typename Geometry::ctype DF; │ │ │ │ │ + 115 static const std::size_t dim = Geometry::mydimension; │ │ │ │ │ 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& 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 } │ │ │ │ │ + 117 typedef MonomialLocalFiniteElement LocalFE; │ │ │ │ │ + 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 LocalFE(gt)); │ │ │ │ │ + 126 } │ │ │ │ │ + 127 │ │ │ │ │ + 128 public: │ │ │ │ │ + 129 typedef ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ +130 FiniteElement; │ │ │ │ │ + 131 │ │ │ │ │ + 133 │ │ │ │ │ + 137 template │ │ │ │ │ +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 >) │ │ │ │ │ + 150 { init(gt); } │ │ │ │ │ 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]; │ │ │ │ │ + 153 │ │ │ │ │ +156 MonomialFiniteElementFactory() { │ │ │ │ │ + 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 │ │ │ │ │ - 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]; │ │ │ │ │ +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 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 Traits::DomainType& 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 Dune │ │ │ │ │ - 643{ │ │ │ │ │ - 650 template │ │ │ │ │ -651 class LagrangePrismLocalFiniteElement │ │ │ │ │ - 652 { │ │ │ │ │ - 653 public: │ │ │ │ │ -656 using Traits = LocalFiniteElementTraits, │ │ │ │ │ - 657 Impl::LagrangePrismLocalCoefficients, │ │ │ │ │ - 658 Impl::LagrangePrismLocalInterpolation │ │ │ │ │ -> >; │ │ │ │ │ - 659 │ │ │ │ │ -665 LagrangePrismLocalFiniteElement() {} │ │ │ │ │ - 666 │ │ │ │ │ -669 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 670 { │ │ │ │ │ - 671 return basis_; │ │ │ │ │ - 672 } │ │ │ │ │ - 673 │ │ │ │ │ -676 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 677 { │ │ │ │ │ - 678 return coefficients_; │ │ │ │ │ - 679 } │ │ │ │ │ - 680 │ │ │ │ │ -683 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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 basis_; │ │ │ │ │ - 703 Impl::LagrangePrismLocalCoefficients coefficients_; │ │ │ │ │ - 704 Impl::LagrangePrismLocalInterpolation │ │ │ │ │ -> interpolation_; │ │ │ │ │ - 705 }; │ │ │ │ │ - 706 │ │ │ │ │ - 707} // namespace Dune │ │ │ │ │ - 708 │ │ │ │ │ - 709#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPRISM_HH │ │ │ │ │ + 204#endif // DUNE_LOCALFUNCTIONS_MONOMIAL_HH │ │ │ │ │ +localtoglobaladaptors.hh │ │ │ │ │ localfiniteelementtraits.hh │ │ │ │ │ -localkey.hh │ │ │ │ │ +monomiallocalcoefficients.hh │ │ │ │ │ +monomiallocalbasis.hh │ │ │ │ │ +monomiallocalinterpolation.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ Dune::LocalFiniteElementTraits │ │ │ │ │ traits helper struct │ │ │ │ │ Definition localfiniteelementtraits.hh:13 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ LB LocalBasisType │ │ │ │ │ Definition localfiniteelementtraits.hh:16 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ LC LocalCoefficientsType │ │ │ │ │ Definition localfiniteelementtraits.hh:20 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ LI LocalInterpolationType │ │ │ │ │ Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::LagrangePrismLocalFiniteElement │ │ │ │ │ -Lagrange finite element for 3d prisms with arbitrary compile-time polynomial │ │ │ │ │ -order. │ │ │ │ │ -Definition lagrangeprism.hh:652 │ │ │ │ │ -Dune::LagrangePrismLocalFiniteElement::size │ │ │ │ │ -static constexpr std::size_t size() │ │ │ │ │ -The number of shape functions. │ │ │ │ │ -Definition lagrangeprism.hh:689 │ │ │ │ │ -Dune::LagrangePrismLocalFiniteElement::localInterpolation │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ +Convert a simple scalar local finite element into a global finite element. │ │ │ │ │ +Definition localtoglobaladaptors.hh:187 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptor::type │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +Definition localtoglobaladaptors.hh:229 │ │ │ │ │ +Dune::MonomialLocalFiniteElement │ │ │ │ │ +Monomial basis for discontinuous Galerkin methods. │ │ │ │ │ +Definition monomial.hh:41 │ │ │ │ │ +Dune::MonomialLocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition monomial.hh:80 │ │ │ │ │ +Dune::MonomialLocalFiniteElement::type │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +Definition monomial.hh:87 │ │ │ │ │ +Dune::MonomialLocalFiniteElement::localInterpolation │ │ │ │ │ const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Returns object that evaluates degrees of freedom. │ │ │ │ │ -Definition lagrangeprism.hh:683 │ │ │ │ │ -Dune::LagrangePrismLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -The reference element that the local finite element is defined on. │ │ │ │ │ -Definition lagrangeprism.hh:696 │ │ │ │ │ -Dune::LagrangePrismLocalFiniteElement::localCoefficients │ │ │ │ │ +Definition monomial.hh:74 │ │ │ │ │ +Dune::MonomialLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< MonomialLocalBasis< D, R, d, p >, │ │ │ │ │ +MonomialLocalCoefficients< static_size >, MonomialLocalInterpolation< │ │ │ │ │ +MonomialLocalBasis< D, R, d, p >, static_size > > Traits │ │ │ │ │ +Definition monomial.hh:51 │ │ │ │ │ +Dune::MonomialLocalFiniteElement::localCoefficients │ │ │ │ │ const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ -Definition lagrangeprism.hh:676 │ │ │ │ │ -Dune::LagrangePrismLocalFiniteElement::LagrangePrismLocalFiniteElement │ │ │ │ │ -LagrangePrismLocalFiniteElement() │ │ │ │ │ -Default constructor. │ │ │ │ │ -Definition lagrangeprism.hh:665 │ │ │ │ │ -Dune::LagrangePrismLocalFiniteElement::localBasis │ │ │ │ │ +Definition monomial.hh:67 │ │ │ │ │ +Dune::MonomialLocalFiniteElement::localBasis │ │ │ │ │ const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ -Definition lagrangeprism.hh:669 │ │ │ │ │ -localbasis.hh │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Definition monomial.hh:60 │ │ │ │ │ +Dune::MonomialLocalFiniteElement::MonomialLocalFiniteElement │ │ │ │ │ +MonomialLocalFiniteElement(const GeometryType >_) │ │ │ │ │ +Construct a MonomLocalFiniteElement. │ │ │ │ │ +Definition monomial.hh:54 │ │ │ │ │ +Dune::MonomialFiniteElementFactory │ │ │ │ │ +Factory for global-valued MonomFiniteElement objects. │ │ │ │ │ +Definition monomial.hh:113 │ │ │ │ │ +Dune::MonomialFiniteElementFactory::MonomialFiniteElementFactory │ │ │ │ │ +MonomialFiniteElementFactory(const ForwardIterator &begin, const │ │ │ │ │ +ForwardIterator &end) │ │ │ │ │ +construct a MonomialFiniteElementFactory from a list of GeometryType's │ │ │ │ │ +Definition monomial.hh:138 │ │ │ │ │ +Dune::MonomialFiniteElementFactory::MonomialFiniteElementFactory │ │ │ │ │ +MonomialFiniteElementFactory(const GeometryType >) │ │ │ │ │ +construct a MonomialFiniteElementFactory from a single GeometryType │ │ │ │ │ +Definition monomial.hh:149 │ │ │ │ │ +Dune::MonomialFiniteElementFactory::make │ │ │ │ │ +const FiniteElement make(const Geometry &geometry) │ │ │ │ │ +construct a global-valued MonomFiniteElement │ │ │ │ │ +Definition monomial.hh:196 │ │ │ │ │ +Dune::MonomialFiniteElementFactory::FiniteElement │ │ │ │ │ +ScalarLocalToGlobalFiniteElementAdaptor< LocalFE, Geometry > FiniteElement │ │ │ │ │ +Definition monomial.hh:130 │ │ │ │ │ +Dune::MonomialFiniteElementFactory::MonomialFiniteElementFactory │ │ │ │ │ +MonomialFiniteElementFactory() │ │ │ │ │ +construct a MonomFiniteElementFactory for all applicable GeometryType's │ │ │ │ │ +Definition monomial.hh:156 │ │ │ │ │ +Dune::MonomialLocalBasis │ │ │ │ │ +Constant shape function. │ │ │ │ │ +Definition monomiallocalbasis.hh:201 │ │ │ │ │ +Dune::MonomialLocalBasis::size │ │ │ │ │ +static constexpr unsigned int size() │ │ │ │ │ +Number of shape functions. │ │ │ │ │ +Definition monomiallocalbasis.hh:216 │ │ │ │ │ +Dune::MonomialLocalCoefficients │ │ │ │ │ +Layout map for monomial finite elements. │ │ │ │ │ +Definition monomiallocalcoefficients.hh:24 │ │ │ │ │ +Dune::MonomialLocalInterpolation │ │ │ │ │ +Definition monomiallocalinterpolation.hh:22 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00068.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pqkfactory.hh File Reference │ │ │ │ +dune-localfunctions: localtoglobaladaptors.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,49 +65,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
pqkfactory.hh File Reference
│ │ │ │ +
localtoglobaladaptors.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <map>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/typetraits.hh>
│ │ │ │ #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::DimSpecificPQkLocalFiniteElementFactory< D, R, d, k >
 Factory that only creates dimension specific local finite elements. More...
struct  Dune::LocalToGlobalBasisAdaptorTraits< LocalBasisTraits, dimDomainGlobal_ >
 Traits class for local-to-global basis adaptors. More...
 
struct  Dune::DimSpecificPQkLocalFiniteElementFactory< D, R, 3, k >
 Factory that only creates dimension specific local finite elements. More...
class  Dune::ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry >
 Convert a simple scalar local basis into a global basis. 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::LocalToGlobalInterpolationAdaptor< LocalInterpolation, Traits_ >
 Convert a local interpolation into a global interpolation. 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...
struct  Dune::ScalarLocalToGlobalFiniteElementAdaptor< LocalFiniteElement, Geometry >
 Convert a simple scalar local finite element into a global finite element. More...
 
struct  Dune::ScalarLocalToGlobalFiniteElementAdaptor< LocalFiniteElement, Geometry >::Traits
 
class  Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory< LocalFiniteElement, Geometry >
 Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,43 +6,46 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ + * common │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -pqkfactory.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +localtoglobaladaptors.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ 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... │ │ │ │ │ +struct  Dune::LocalToGlobalBasisAdaptorTraits<_LocalBasisTraits, │ │ │ │ │ + dimDomainGlobal__> │ │ │ │ │ +  Traits class for local-to-global basis adaptors. More... │ │ │ │ │ +  │ │ │ │ │ + class  Dune::ScalarLocalToGlobalBasisAdaptor<_LocalBasis,_Geometry_> │ │ │ │ │ +  Convert a simple scalar local basis into a global basis. More... │ │ │ │ │ +  │ │ │ │ │ + class  Dune::LocalToGlobalInterpolationAdaptor<_LocalInterpolation,_Traits__> │ │ │ │ │ +  Convert a local interpolation into a global interpolation. More... │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::ScalarLocalToGlobalFiniteElementAdaptor<_LocalFiniteElement, │ │ │ │ │ + Geometry_> │ │ │ │ │ +  Convert a simple scalar local finite element into a global finite │ │ │ │ │ + element. More... │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::ScalarLocalToGlobalFiniteElementAdaptor<_LocalFiniteElement, │ │ │ │ │ + Geometry_>::Traits │ │ │ │ │ +  │ │ │ │ │ + class  Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory< │ │ │ │ │ + LocalFiniteElement,_Geometry_> │ │ │ │ │ +  Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00068_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pqkfactory.hh Source File │ │ │ │ +dune-localfunctions: localtoglobaladaptors.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,215 +70,270 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pqkfactory.hh
│ │ │ │ +
localtoglobaladaptors.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
│ │ │ │ -
7
│ │ │ │ -
8#include <map>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/geometry/type.hh>
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_COMMON_LOCALTOGLOBALADAPTORS_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_COMMON_LOCALTOGLOBALADAPTORS_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <cstddef>
│ │ │ │ +
10#include <vector>
│ │ │ │
11
│ │ │ │ - │ │ │ │ - │ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ +
12#include <dune/common/fmatrix.hh>
│ │ │ │ +
13#include <dune/common/fvector.hh>
│ │ │ │ +
14#include <dune/common/typetraits.hh>
│ │ │ │ +
15
│ │ │ │ +
16#include <dune/geometry/type.hh>
│ │ │ │ +
17
│ │ │ │ +
18namespace Dune {
│ │ │ │ +
19
│ │ │ │ +
21
│ │ │ │ +
29 template<class LocalBasisTraits, std::size_t dimDomainGlobal_>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
32 static const std::size_t dimDomainLocal = LocalBasisTraits::dimDomain;
│ │ │ │ +
33 static const std::size_t dimDomainGlobal = dimDomainGlobal_;
│ │ │ │ + │ │ │ │ +
35 typedef FieldVector<DomainField, dimDomainGlobal> DomainGlobal;
│ │ │ │ +
36
│ │ │ │ + │ │ │ │ +
38 static const std::size_t dimRange = LocalBasisTraits::dimRange;
│ │ │ │ + │ │ │ │ +
40
│ │ │ │ +
41 typedef FieldMatrix<RangeField, dimRange, dimDomainGlobal> Jacobian;
│ │ │ │ +
42 };
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
45
│ │ │ │ +
64 template<class LocalBasis, class Geometry>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
66 static_assert(LocalBasis::Traits::dimRange == 1,
│ │ │ │ +
67 "ScalarLocalToGlobalBasisAdaptor can only wrap a "
│ │ │ │ +
68 "scalar local basis.");
│ │ │ │ +
69 static_assert((std::is_same<typename LocalBasis::Traits::DomainFieldType,
│ │ │ │ +
70 typename Geometry::ctype>::value),
│ │ │ │ +
71 "ScalarLocalToGlobalBasisAdaptor: LocalBasis must use "
│ │ │ │ +
72 "the same ctype as Geometry");
│ │ │ │ +
73 static_assert
│ │ │ │ +
74 ( static_cast<std::size_t>(LocalBasis::Traits::dimDomain) ==
│ │ │ │ +
75 static_cast<std::size_t>(Geometry::mydimension),
│ │ │ │ +
76 "ScalarLocalToGlobalBasisAdaptor: LocalBasis domain dimension must "
│ │ │ │ +
77 "match local dimension of Geometry");
│ │ │ │ +
78
│ │ │ │ +
79 const LocalBasis& localBasis;
│ │ │ │ +
80 Geometry geometry;
│ │ │ │
81
│ │ │ │ -
│ │ │ │ -
83 static FiniteElementType* create(const GeometryType& gt)
│ │ │ │ -
84 {
│ │ │ │ -
85 if (k==0)
│ │ │ │ - │ │ │ │ +
82 public:
│ │ │ │ +
83 typedef LocalToGlobalBasisAdaptorTraits<typename LocalBasis::Traits,
│ │ │ │ +
84 Geometry::coorddimension> Traits;
│ │ │ │ +
85
│ │ │ │
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
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
96 ScalarLocalToGlobalBasisAdaptor(const LocalBasis& localBasis_,
│ │ │ │ +
97 const Geometry& geometry_) :
│ │ │ │ +
98 localBasis(localBasis_), geometry(geometry_)
│ │ │ │ +
99 { }
│ │ │ │ +
│ │ │ │ +
100
│ │ │ │ +
101 std::size_t size() const { return localBasis.size(); }
│ │ │ │ +
103
│ │ │ │ +
│ │ │ │ +
110 std::size_t order() const {
│ │ │ │ +
111 if(geometry.affine())
│ │ │ │ +
112 // affine linear
│ │ │ │ +
113 return localBasis.order();
│ │ │ │ +
114 else
│ │ │ │ +
115 // assume at most order dim
│ │ │ │ +
116 return localBasis.order() + Traits::dimDomainGlobal - 1;
│ │ │ │ +
117 }
│ │ │ │ +
│ │ │ │ +
118
│ │ │ │ +
│ │ │ │ +
119 void evaluateFunction(const typename Traits::DomainLocal& in,
│ │ │ │ +
120 std::vector<typename Traits::Range>& out) const
│ │ │ │ +
121 {
│ │ │ │ +
122 localBasis.evaluateFunction(in, out);
│ │ │ │ +
123 }
│ │ │ │ +
│ │ │ │
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);
│ │ │ │ +
│ │ │ │ +
125 void evaluateJacobian(const typename Traits::DomainLocal& in,
│ │ │ │ +
126 std::vector<typename Traits::Jacobian>& out) const
│ │ │ │ +
127 {
│ │ │ │ +
128 std::vector<typename LocalBasis::Traits::JacobianType>
│ │ │ │ +
129 localJacobian(size());
│ │ │ │ +
130 localBasis.evaluateJacobian(in, localJacobian);
│ │ │ │ +
131
│ │ │ │ +
132 const typename Geometry::JacobianInverseTransposed &geoJacobian =
│ │ │ │ +
133 geometry.jacobianInverseTransposed(in);
│ │ │ │ +
134
│ │ │ │ +
135 out.resize(size());
│ │ │ │ +
136 for(std::size_t i = 0; i < size(); ++i)
│ │ │ │ +
137 geoJacobian.mv(localJacobian[i][0], out[i][0]);
│ │ │ │ +
138 }
│ │ │ │ +
│ │ │ │ +
139 };
│ │ │ │ +
│ │ │ │ +
140
│ │ │ │ +
142
│ │ │ │ +
148 template<class LocalInterpolation, class Traits_>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
150 const LocalInterpolation& localInterpolation;
│ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
152 public:
│ │ │ │ +
153 typedef Traits_ Traits;
│ │ │ │ +
154
│ │ │ │ +
156
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
165 ( const LocalInterpolation& localInterpolation_) :
│ │ │ │ +
166 localInterpolation(localInterpolation_)
│ │ │ │ +
167 { }
│ │ │ │ +
│ │ │ │ +
168
│ │ │ │ +
169 template<class Function, class Coeff>
│ │ │ │ +
│ │ │ │ +
170 void interpolate(const Function& function, std::vector<Coeff>& out) const
│ │ │ │ +
171 { localInterpolation.interpolate(function, out); }
│ │ │ │ +
│ │ │ │ +
172 };
│ │ │ │ +
│ │ │ │ +
173
│ │ │ │ +
176
│ │ │ │ +
186 template<class LocalFiniteElement, class Geometry>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
191 struct Traits {
│ │ │ │ +
192 typedef ScalarLocalToGlobalBasisAdaptor<typename LocalFiniteElement::
│ │ │ │ +
193 Traits::LocalBasisType, Geometry> Basis;
│ │ │ │ +
194 typedef LocalToGlobalInterpolationAdaptor<typename LocalFiniteElement::
│ │ │ │ +
195 Traits::LocalInterpolationType, typename Basis::Traits>
│ │ │ │ + │ │ │ │ +
197 typedef typename LocalFiniteElement::Traits::LocalCoefficientsType
│ │ │ │ + │ │ │ │ +
199 };
│ │ │ │ +
│ │ │ │ +
200
│ │ │ │ +
201 private:
│ │ │ │ +
202 const LocalFiniteElement &localFE;
│ │ │ │ +
203 typename Traits::Basis basis_;
│ │ │ │ +
204 typename Traits::Interpolation interpolation_;
│ │ │ │ +
205
│ │ │ │ +
206 public:
│ │ │ │ +
208
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
218 ( const LocalFiniteElement& localFE_, const Geometry &geometry) :
│ │ │ │ +
219 localFE(localFE_),
│ │ │ │ +
220 basis_(localFE.localBasis(), geometry),
│ │ │ │ +
221 interpolation_(localFE.localInterpolation())
│ │ │ │ +
222 { }
│ │ │ │ +
│ │ │ │ +
223
│ │ │ │ +
224 const typename Traits::Basis& basis() const { return basis_; }
│ │ │ │ +
│ │ │ │ +
225 const typename Traits::Interpolation& interpolation() const
│ │ │ │ +
226 { return interpolation_; }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
227 const typename Traits::Coefficients& coefficients() const
│ │ │ │ +
228 { return localFE.localCoefficients(); }
│ │ │ │ +
│ │ │ │ +
229 GeometryType type() const { return localFE.type(); }
│ │ │ │ +
230 };
│ │ │ │ +
│ │ │ │ +
231
│ │ │ │ +
233
│ │ │ │ +
243 template<class LocalFiniteElement, class Geometry>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
245 const LocalFiniteElement& localFE;
│ │ │ │ +
246
│ │ │ │ +
247 public:
│ │ │ │ +
248 typedef ScalarLocalToGlobalFiniteElementAdaptor<LocalFiniteElement,
│ │ │ │ +
249 Geometry> FiniteElement;
│ │ │ │ +
250
│ │ │ │ +
252
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
261 (const LocalFiniteElement &localFE_) : localFE(localFE_) {}
│ │ │ │ +
│ │ │ │ +
262
│ │ │ │ +
264
│ │ │ │ +
│ │ │ │ +
274 const FiniteElement make(const Geometry& geometry) {
│ │ │ │ +
275 return FiniteElement(localFE, geometry);
│ │ │ │ +
276 }
│ │ │ │ +
│ │ │ │ +
277 };
│ │ │ │ +
│ │ │ │ +
278
│ │ │ │ +
279} // namespace Dune
│ │ │ │ +
280
│ │ │ │ +
281#endif // DUNE_LOCALFUNCTIONS_COMMON_LOCALTOGLOBALADAPTORS_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
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
RF RangeFieldType
Export type for range field.
Definition common/localbasis.hh:45
│ │ │ │ +
static constexpr int dimRange
dimension of the range
Definition common/localbasis.hh:48
│ │ │ │ +
DF DomainFieldType
Export type for domain field.
Definition common/localbasis.hh:36
│ │ │ │ +
static constexpr int dimDomain
dimension of the domain
Definition common/localbasis.hh:39
│ │ │ │ +
R RangeType
range type
Definition common/localbasis.hh:51
│ │ │ │ +
Traits class for local-to-global basis adaptors.
Definition localtoglobaladaptors.hh:30
│ │ │ │ +
LocalBasisTraits::RangeFieldType RangeField
Definition localtoglobaladaptors.hh:37
│ │ │ │ +
LocalBasisTraits::DomainFieldType DomainField
Definition localtoglobaladaptors.hh:31
│ │ │ │ +
FieldMatrix< RangeField, dimRange, dimDomainGlobal > Jacobian
Definition localtoglobaladaptors.hh:41
│ │ │ │ +
static const std::size_t dimDomainLocal
Definition localtoglobaladaptors.hh:32
│ │ │ │ +
LocalBasisTraits::RangeType Range
Definition localtoglobaladaptors.hh:39
│ │ │ │ +
static const std::size_t dimDomainGlobal
Definition localtoglobaladaptors.hh:33
│ │ │ │ +
static const std::size_t dimRange
Definition localtoglobaladaptors.hh:38
│ │ │ │ +
FieldVector< DomainField, dimDomainGlobal > DomainGlobal
Definition localtoglobaladaptors.hh:35
│ │ │ │ +
LocalBasisTraits::DomainType DomainLocal
Definition localtoglobaladaptors.hh:34
│ │ │ │ +
Convert a simple scalar local basis into a global basis.
Definition localtoglobaladaptors.hh:65
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainLocal &in, std::vector< typename Traits::Jacobian > &out) const
Definition localtoglobaladaptors.hh:125
│ │ │ │ +
std::size_t order() const
return maximum polynomial order of the base function
Definition localtoglobaladaptors.hh:110
│ │ │ │ +
LocalToGlobalBasisAdaptorTraits< typename LocalBasis::Traits, Geometry::coorddimension > Traits
Definition localtoglobaladaptors.hh:84
│ │ │ │ +
ScalarLocalToGlobalBasisAdaptor(const LocalBasis &localBasis_, const Geometry &geometry_)
construct a ScalarLocalToGlobalBasisAdaptor
Definition localtoglobaladaptors.hh:96
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainLocal &in, std::vector< typename Traits::Range > &out) const
Definition localtoglobaladaptors.hh:119
│ │ │ │ +
std::size_t size() const
Definition localtoglobaladaptors.hh:101
│ │ │ │ +
Convert a local interpolation into a global interpolation.
Definition localtoglobaladaptors.hh:149
│ │ │ │ +
LocalToGlobalInterpolationAdaptor(const LocalInterpolation &localInterpolation_)
construct a LocalToGlobalInterpolationAdaptor
Definition localtoglobaladaptors.hh:165
│ │ │ │ +
void interpolate(const Function &function, std::vector< Coeff > &out) const
Definition localtoglobaladaptors.hh:170
│ │ │ │ +
Traits_ Traits
Definition localtoglobaladaptors.hh:153
│ │ │ │ +
Convert a simple scalar local finite element into a global finite element.
Definition localtoglobaladaptors.hh:187
│ │ │ │ +
GeometryType type() const
Definition localtoglobaladaptors.hh:229
│ │ │ │ +
const Traits::Coefficients & coefficients() const
Definition localtoglobaladaptors.hh:227
│ │ │ │ +
const Traits::Interpolation & interpolation() const
Definition localtoglobaladaptors.hh:225
│ │ │ │ +
const Traits::Basis & basis() const
Definition localtoglobaladaptors.hh:224
│ │ │ │ +
ScalarLocalToGlobalFiniteElementAdaptor(const LocalFiniteElement &localFE_, const Geometry &geometry)
construct a ScalarLocalToGlobalFiniteElementAdaptor
Definition localtoglobaladaptors.hh:218
│ │ │ │ +
Definition localtoglobaladaptors.hh:191
│ │ │ │ +
LocalToGlobalInterpolationAdaptor< typename LocalFiniteElement::Traits::LocalInterpolationType, typename Basis::Traits > Interpolation
Definition localtoglobaladaptors.hh:196
│ │ │ │ +
LocalFiniteElement::Traits::LocalCoefficientsType Coefficients
Definition localtoglobaladaptors.hh:198
│ │ │ │ +
ScalarLocalToGlobalBasisAdaptor< typename LocalFiniteElement::Traits::LocalBasisType, Geometry > Basis
Definition localtoglobaladaptors.hh:193
│ │ │ │ +
Factory for ScalarLocalToGlobalFiniteElementAdaptor objects.
Definition localtoglobaladaptors.hh:244
│ │ │ │ +
const FiniteElement make(const Geometry &geometry)
construct ScalarLocalToGlobalFiniteElementAdaptor
Definition localtoglobaladaptors.hh:274
│ │ │ │ +
ScalarLocalToGlobalFiniteElementAdaptor< LocalFiniteElement, Geometry > FiniteElement
Definition localtoglobaladaptors.hh:249
│ │ │ │ +
ScalarLocalToGlobalFiniteElementAdaptorFactory(const LocalFiniteElement &localFE_)
construct a ScalarLocalToGlobalFiniteElementAdaptorFactory
Definition localtoglobaladaptors.hh:261
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,265 +7,335 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -pqkfactory.hh │ │ │ │ │ + * common │ │ │ │ │ +localtoglobaladaptors.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 │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ + 5 │ │ │ │ │ + 6#ifndef DUNE_LOCALFUNCTIONS_COMMON_LOCALTOGLOBALADAPTORS_HH │ │ │ │ │ + 7#define DUNE_LOCALFUNCTIONS_COMMON_LOCALTOGLOBALADAPTORS_HH │ │ │ │ │ + 8 │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include │ │ │ │ │ - 20 │ │ │ │ │ - 21namespace Dune │ │ │ │ │ - 22{ │ │ │ │ │ - 23 │ │ │ │ │ - 28 template │ │ │ │ │ -29 struct DimSpecificPQkLocalFiniteElementFactory │ │ │ │ │ - 30 { │ │ │ │ │ -31 typedef typename P0LocalFiniteElement::Traits::LocalBasisType::Traits │ │ │ │ │ -T; │ │ │ │ │ - 32 │ │ │ │ │ -34 static LocalFiniteElementVirtualInterface* create(const GeometryType&) │ │ │ │ │ - 35 { │ │ │ │ │ - 36 return nullptr; │ │ │ │ │ - 37 } │ │ │ │ │ - 38 }; │ │ │ │ │ - 39 │ │ │ │ │ - 44 template │ │ │ │ │ -45 struct DimSpecificPQkLocalFiniteElementFactory │ │ │ │ │ - 46 { │ │ │ │ │ -47 typedef typename P0LocalFiniteElement::Traits::LocalBasisType::Traits │ │ │ │ │ -T; │ │ │ │ │ -48 using PrismP1 = LagrangePrismLocalFiniteElement; │ │ │ │ │ -49 using PrismP2 = LagrangePrismLocalFiniteElement; │ │ │ │ │ -50 using PyramidP1 = LagrangePyramidLocalFiniteElement; │ │ │ │ │ -51 using PyramidP2 = LagrangePyramidLocalFiniteElement; │ │ │ │ │ - 52 │ │ │ │ │ -54 static LocalFiniteElementVirtualInterface* create(const GeometryType& gt) │ │ │ │ │ - 55 { │ │ │ │ │ - 56 if ((gt.isPrism())and (k==1)) │ │ │ │ │ - 57 return new LocalFiniteElementVirtualImp(PrismP1()); │ │ │ │ │ - 58 if ((gt.isPrism())and (k==2)) │ │ │ │ │ - 59 return new LocalFiniteElementVirtualImp(PrismP2()); │ │ │ │ │ - 60 if ((gt.isPyramid())and (k==1)) │ │ │ │ │ - 61 return new LocalFiniteElementVirtualImp(PyramidP1()); │ │ │ │ │ - 62 if ((gt.isPyramid())and (k==2)) │ │ │ │ │ - 63 return new LocalFiniteElementVirtualImp(PyramidP2()); │ │ │ │ │ - 64 return nullptr; │ │ │ │ │ - 65 } │ │ │ │ │ - 66 }; │ │ │ │ │ - 67 │ │ │ │ │ - 68 │ │ │ │ │ - 72 template │ │ │ │ │ -73 struct PQkLocalFiniteElementFactory │ │ │ │ │ - 74 { │ │ │ │ │ -75 typedef typename P0LocalFiniteElement::Traits::LocalBasisType:: │ │ │ │ │ -Traits T; │ │ │ │ │ -76 typedef LocalFiniteElementVirtualInterface FiniteElementType; │ │ │ │ │ -77 using P0 = P0LocalFiniteElement; │ │ │ │ │ -78 using Pk = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ -79 using Qk = LagrangeCubeLocalFiniteElement; │ │ │ │ │ - 80 │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16#include │ │ │ │ │ + 17 │ │ │ │ │ + 18namespace Dune { │ │ │ │ │ + 19 │ │ │ │ │ + 21 │ │ │ │ │ + 29 template │ │ │ │ │ +30 struct LocalToGlobalBasisAdaptorTraits { │ │ │ │ │ +31 typedef typename LocalBasisTraits::DomainFieldType DomainField; │ │ │ │ │ +32 static const std::size_t dimDomainLocal = LocalBasisTraits::dimDomain; │ │ │ │ │ +33 static const std::size_t dimDomainGlobal = dimDomainGlobal_; │ │ │ │ │ +34 typedef typename LocalBasisTraits::DomainType DomainLocal; │ │ │ │ │ +35 typedef FieldVector DomainGlobal; │ │ │ │ │ + 36 │ │ │ │ │ +37 typedef typename LocalBasisTraits::RangeFieldType RangeField; │ │ │ │ │ +38 static const std::size_t dimRange = LocalBasisTraits::dimRange; │ │ │ │ │ +39 typedef typename LocalBasisTraits::RangeType Range; │ │ │ │ │ + 40 │ │ │ │ │ +41 typedef FieldMatrix Jacobian; │ │ │ │ │ + 42 }; │ │ │ │ │ + 43 │ │ │ │ │ + 45 │ │ │ │ │ + 64 template │ │ │ │ │ +65 class ScalarLocalToGlobalBasisAdaptor { │ │ │ │ │ + 66 static_assert(LocalBasis::Traits::dimRange == 1, │ │ │ │ │ + 67 "ScalarLocalToGlobalBasisAdaptor can only wrap a " │ │ │ │ │ + 68 "scalar local basis."); │ │ │ │ │ + 69 static_assert((std::is_same::value), │ │ │ │ │ + 71 "ScalarLocalToGlobalBasisAdaptor: LocalBasis must use " │ │ │ │ │ + 72 "the same ctype as Geometry"); │ │ │ │ │ + 73 static_assert │ │ │ │ │ + 74 ( static_cast(LocalBasis::Traits::dimDomain) == │ │ │ │ │ + 75 static_cast(Geometry::mydimension), │ │ │ │ │ + 76 "ScalarLocalToGlobalBasisAdaptor: LocalBasis domain dimension must " │ │ │ │ │ + 77 "match local dimension of Geometry"); │ │ │ │ │ + 78 │ │ │ │ │ + 79 const LocalBasis& localBasis; │ │ │ │ │ + 80 Geometry geometry; │ │ │ │ │ 81 │ │ │ │ │ -83 static FiniteElementType* create(const GeometryType& gt) │ │ │ │ │ - 84 { │ │ │ │ │ - 85 if (k==0) │ │ │ │ │ - 86 return new LocalFiniteElementVirtualImp(P0(gt)); │ │ │ │ │ + 82 public: │ │ │ │ │ + 83 typedef LocalToGlobalBasisAdaptorTraits Traits; │ │ │ │ │ + 85 │ │ │ │ │ 87 │ │ │ │ │ - 88 if (gt.isSimplex()) │ │ │ │ │ - 89 return new LocalFiniteElementVirtualImp(Pk()); │ │ │ │ │ - 90 │ │ │ │ │ - 91 if (gt.isCube()) │ │ │ │ │ - 92 return new LocalFiniteElementVirtualImp(Qk()); │ │ │ │ │ - 93 │ │ │ │ │ - 94 return DimSpecificPQkLocalFiniteElementFactory::create(gt); │ │ │ │ │ - 95 } │ │ │ │ │ - 96 }; │ │ │ │ │ - 97 │ │ │ │ │ - 98 │ │ │ │ │ - 99 │ │ │ │ │ - 110 template │ │ │ │ │ -111 class PQkLocalFiniteElementCache │ │ │ │ │ - 112 { │ │ │ │ │ - 113 protected: │ │ │ │ │ -114 typedef typename P0LocalFiniteElement::Traits::LocalBasisType:: │ │ │ │ │ -Traits T; │ │ │ │ │ -115 typedef LocalFiniteElementVirtualInterface FE; │ │ │ │ │ -116 typedef typename std::map FEMap; │ │ │ │ │ - 117 │ │ │ │ │ - 118 public: │ │ │ │ │ -120 typedef FE FiniteElementType; │ │ │ │ │ - 121 │ │ │ │ │ -123 PQkLocalFiniteElementCache() {} │ │ │ │ │ +96 ScalarLocalToGlobalBasisAdaptor(const LocalBasis& localBasis_, │ │ │ │ │ + 97 const Geometry& geometry_) : │ │ │ │ │ + 98 localBasis(localBasis_), geometry(geometry_) │ │ │ │ │ + 99 { } │ │ │ │ │ + 100 │ │ │ │ │ +101 std::size_t size() const { return localBasis.size(); } │ │ │ │ │ + 103 │ │ │ │ │ +110 std::size_t order() const { │ │ │ │ │ + 111 if(geometry.affine()) │ │ │ │ │ + 112 // affine linear │ │ │ │ │ + 113 return localBasis.order(); │ │ │ │ │ + 114 else │ │ │ │ │ + 115 // assume at most order dim │ │ │ │ │ + 116 return localBasis.order() + Traits::dimDomainGlobal - 1; │ │ │ │ │ + 117 } │ │ │ │ │ + 118 │ │ │ │ │ +119 void evaluateFunction(const typename Traits::DomainLocal& in, │ │ │ │ │ + 120 std::vector& out) const │ │ │ │ │ + 121 { │ │ │ │ │ + 122 localBasis.evaluateFunction(in, out); │ │ │ │ │ + 123 } │ │ │ │ │ 124 │ │ │ │ │ -126 PQkLocalFiniteElementCache(const PQkLocalFiniteElementCache& other) │ │ │ │ │ +125 void evaluateJacobian(const typename Traits::DomainLocal& in, │ │ │ │ │ + 126 std::vector& out) const │ │ │ │ │ 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 │ │ │ │ │ -134 ~PQkLocalFiniteElementCache() │ │ │ │ │ - 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 { │ │ │ │ │ - 148 FiniteElementType* fe = PQkLocalFiniteElementFactory::create │ │ │ │ │ -(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); │ │ │ │ │ + 128 std::vector │ │ │ │ │ + 129 localJacobian(size()); │ │ │ │ │ + 130 localBasis.evaluateJacobian(in, localJacobian); │ │ │ │ │ + 131 │ │ │ │ │ + 132 const typename Geometry::JacobianInverseTransposed &geoJacobian = │ │ │ │ │ + 133 geometry.jacobianInverseTransposed(in); │ │ │ │ │ + 134 │ │ │ │ │ + 135 out.resize(size()); │ │ │ │ │ + 136 for(std::size_t i = 0; i < size(); ++i) │ │ │ │ │ + 137 geoJacobian.mv(localJacobian[i][0], out[i][0]); │ │ │ │ │ + 138 } │ │ │ │ │ + 139 }; │ │ │ │ │ + 140 │ │ │ │ │ + 142 │ │ │ │ │ + 148 template │ │ │ │ │ +149 class LocalToGlobalInterpolationAdaptor { │ │ │ │ │ + 150 const LocalInterpolation& localInterpolation; │ │ │ │ │ 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 │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ -lagrangeprism.hh │ │ │ │ │ -p0.hh │ │ │ │ │ -lagrangepyramid.hh │ │ │ │ │ -lagrangecube.hh │ │ │ │ │ -virtualwrappers.hh │ │ │ │ │ -virtualinterface.hh │ │ │ │ │ + 152 public: │ │ │ │ │ +153 typedef Traits_ Traits; │ │ │ │ │ + 154 │ │ │ │ │ + 156 │ │ │ │ │ +164 LocalToGlobalInterpolationAdaptor │ │ │ │ │ + 165 ( const LocalInterpolation& localInterpolation_) : │ │ │ │ │ + 166 localInterpolation(localInterpolation_) │ │ │ │ │ + 167 { } │ │ │ │ │ + 168 │ │ │ │ │ + 169 template │ │ │ │ │ +170 void interpolate(const Function& function, std::vector& out) const │ │ │ │ │ + 171 { localInterpolation.interpolate(function, out); } │ │ │ │ │ + 172 }; │ │ │ │ │ + 173 │ │ │ │ │ + 176 │ │ │ │ │ + 186 template │ │ │ │ │ +187 struct ScalarLocalToGlobalFiniteElementAdaptor { │ │ │ │ │ +191 struct Traits { │ │ │ │ │ + 192 typedef ScalarLocalToGlobalBasisAdaptor Basis; │ │ │ │ │ + 194 typedef LocalToGlobalInterpolationAdaptor │ │ │ │ │ +196 Interpolation; │ │ │ │ │ + 197 typedef typename LocalFiniteElement::Traits::LocalCoefficientsType │ │ │ │ │ +198 Coefficients; │ │ │ │ │ + 199 }; │ │ │ │ │ + 200 │ │ │ │ │ + 201 private: │ │ │ │ │ + 202 const LocalFiniteElement &localFE; │ │ │ │ │ + 203 typename Traits::Basis basis_; │ │ │ │ │ + 204 typename Traits::Interpolation interpolation_; │ │ │ │ │ + 205 │ │ │ │ │ + 206 public: │ │ │ │ │ + 208 │ │ │ │ │ +217 ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ + 218 ( const LocalFiniteElement& localFE_, const Geometry &geometry) : │ │ │ │ │ + 219 localFE(localFE_), │ │ │ │ │ + 220 basis_(localFE.localBasis(), geometry), │ │ │ │ │ + 221 interpolation_(localFE.localInterpolation()) │ │ │ │ │ + 222 { } │ │ │ │ │ + 223 │ │ │ │ │ +224 const typename Traits::Basis& basis() const { return basis_; } │ │ │ │ │ +225 const typename Traits::Interpolation& interpolation() const │ │ │ │ │ + 226 { return interpolation_; } │ │ │ │ │ +227 const typename Traits::Coefficients& coefficients() const │ │ │ │ │ + 228 { return localFE.localCoefficients(); } │ │ │ │ │ +229 GeometryType type() const { return localFE.type(); } │ │ │ │ │ + 230 }; │ │ │ │ │ + 231 │ │ │ │ │ + 233 │ │ │ │ │ + 243 template │ │ │ │ │ +244 class ScalarLocalToGlobalFiniteElementAdaptorFactory { │ │ │ │ │ + 245 const LocalFiniteElement& localFE; │ │ │ │ │ + 246 │ │ │ │ │ + 247 public: │ │ │ │ │ + 248 typedef ScalarLocalToGlobalFiniteElementAdaptor FiniteElement; │ │ │ │ │ + 250 │ │ │ │ │ + 252 │ │ │ │ │ +260 ScalarLocalToGlobalFiniteElementAdaptorFactory │ │ │ │ │ + 261 (const LocalFiniteElement &localFE_) : localFE(localFE_) {} │ │ │ │ │ + 262 │ │ │ │ │ + 264 │ │ │ │ │ +274 const FiniteElement make(const Geometry& geometry) { │ │ │ │ │ + 275 return FiniteElement(localFE, geometry); │ │ │ │ │ + 276 } │ │ │ │ │ + 277 }; │ │ │ │ │ + 278 │ │ │ │ │ + 279} // namespace Dune │ │ │ │ │ + 280 │ │ │ │ │ + 281#endif // DUNE_LOCALFUNCTIONS_COMMON_LOCALTOGLOBALADAPTORS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface │ │ │ │ │ -virtual base class for local finite elements with functions │ │ │ │ │ -Definition virtualinterface.hh:286 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp │ │ │ │ │ -class for wrapping a finite element using the virtual interface │ │ │ │ │ -Definition virtualwrappers.hh:240 │ │ │ │ │ -Dune::LagrangeCubeLocalFiniteElement │ │ │ │ │ -Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -Definition lagrangecube.hh:711 │ │ │ │ │ -Dune::LagrangePrismLocalFiniteElement │ │ │ │ │ -Lagrange finite element for 3d prisms with arbitrary compile-time polynomial │ │ │ │ │ -order. │ │ │ │ │ -Definition lagrangeprism.hh:652 │ │ │ │ │ -Dune::LagrangePyramidLocalFiniteElement │ │ │ │ │ -Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ -Definition lagrangepyramid.hh:812 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -Definition lagrangesimplex.hh:838 │ │ │ │ │ -Dune::P0LocalFiniteElement │ │ │ │ │ -The local p0 finite element on all types of reference elements. │ │ │ │ │ -Definition p0.hh:25 │ │ │ │ │ -Dune::DimSpecificPQkLocalFiniteElementFactory │ │ │ │ │ -Factory that only creates dimension specific local finite elements. │ │ │ │ │ -Definition pqkfactory.hh:30 │ │ │ │ │ -Dune::DimSpecificPQkLocalFiniteElementFactory::T │ │ │ │ │ -P0LocalFiniteElement< D, R, d >::Traits::LocalBasisType::Traits T │ │ │ │ │ -Definition pqkfactory.hh:31 │ │ │ │ │ -Dune::DimSpecificPQkLocalFiniteElementFactory::create │ │ │ │ │ -static LocalFiniteElementVirtualInterface< T > * create(const GeometryType &) │ │ │ │ │ -create finite element for given GeometryType │ │ │ │ │ -Definition pqkfactory.hh:34 │ │ │ │ │ -Dune::DimSpecificPQkLocalFiniteElementFactory<_D,_R,_3,_k_>::create │ │ │ │ │ -static LocalFiniteElementVirtualInterface< T > * create(const GeometryType >) │ │ │ │ │ -create finite element for given GeometryType │ │ │ │ │ -Definition pqkfactory.hh:54 │ │ │ │ │ -Dune::DimSpecificPQkLocalFiniteElementFactory<_D,_R,_3,_k_>::T │ │ │ │ │ -P0LocalFiniteElement< D, R, 3 >::Traits::LocalBasisType::Traits T │ │ │ │ │ -Definition pqkfactory.hh:47 │ │ │ │ │ -Dune::PQkLocalFiniteElementFactory │ │ │ │ │ -Factory to create any kind of Pk/Qk like element wrapped for the virtual │ │ │ │ │ -interface. │ │ │ │ │ -Definition pqkfactory.hh:74 │ │ │ │ │ -Dune::PQkLocalFiniteElementFactory::Qk │ │ │ │ │ -LagrangeCubeLocalFiniteElement< D, R, dim, k > Qk │ │ │ │ │ -Definition pqkfactory.hh:79 │ │ │ │ │ -Dune::PQkLocalFiniteElementFactory::Pk │ │ │ │ │ -LagrangeSimplexLocalFiniteElement< D, R, dim, k > Pk │ │ │ │ │ -Definition pqkfactory.hh:78 │ │ │ │ │ -Dune::PQkLocalFiniteElementFactory::FiniteElementType │ │ │ │ │ -LocalFiniteElementVirtualInterface< T > FiniteElementType │ │ │ │ │ -Definition pqkfactory.hh:76 │ │ │ │ │ -Dune::PQkLocalFiniteElementFactory::create │ │ │ │ │ -static FiniteElementType * create(const GeometryType >) │ │ │ │ │ -create finite element for given GeometryType │ │ │ │ │ -Definition pqkfactory.hh:83 │ │ │ │ │ -Dune::PQkLocalFiniteElementFactory::T │ │ │ │ │ -P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T │ │ │ │ │ -Definition pqkfactory.hh:75 │ │ │ │ │ -Dune::PQkLocalFiniteElementFactory::P0 │ │ │ │ │ -P0LocalFiniteElement< D, R, dim > P0 │ │ │ │ │ -Definition pqkfactory.hh:77 │ │ │ │ │ -Dune::PQkLocalFiniteElementCache │ │ │ │ │ -A cache that stores all available Pk/Qk like local finite elements for the │ │ │ │ │ -given dimension and order. │ │ │ │ │ -Definition pqkfactory.hh:112 │ │ │ │ │ -Dune::PQkLocalFiniteElementCache::T │ │ │ │ │ -P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T │ │ │ │ │ -Definition pqkfactory.hh:114 │ │ │ │ │ -Dune::PQkLocalFiniteElementCache::FE │ │ │ │ │ -LocalFiniteElementVirtualInterface< T > FE │ │ │ │ │ -Definition pqkfactory.hh:115 │ │ │ │ │ -Dune::PQkLocalFiniteElementCache::PQkLocalFiniteElementCache │ │ │ │ │ -PQkLocalFiniteElementCache() │ │ │ │ │ -Default constructor. │ │ │ │ │ -Definition pqkfactory.hh:123 │ │ │ │ │ -Dune::PQkLocalFiniteElementCache::FiniteElementType │ │ │ │ │ -FE FiniteElementType │ │ │ │ │ -Type of the finite elements stored in this cache. │ │ │ │ │ -Definition pqkfactory.hh:120 │ │ │ │ │ -Dune::PQkLocalFiniteElementCache::FEMap │ │ │ │ │ -std::map< GeometryType, FE * > FEMap │ │ │ │ │ -Definition pqkfactory.hh:116 │ │ │ │ │ -Dune::PQkLocalFiniteElementCache::get │ │ │ │ │ -const FiniteElementType & get(const GeometryType >) const │ │ │ │ │ -Get local finite element for given GeometryType. │ │ │ │ │ -Definition pqkfactory.hh:143 │ │ │ │ │ -Dune::PQkLocalFiniteElementCache::cache_ │ │ │ │ │ -FEMap cache_ │ │ │ │ │ -Definition pqkfactory.hh:159 │ │ │ │ │ -Dune::PQkLocalFiniteElementCache::~PQkLocalFiniteElementCache │ │ │ │ │ -~PQkLocalFiniteElementCache() │ │ │ │ │ -Definition pqkfactory.hh:134 │ │ │ │ │ -Dune::PQkLocalFiniteElementCache::PQkLocalFiniteElementCache │ │ │ │ │ -PQkLocalFiniteElementCache(const PQkLocalFiniteElementCache &other) │ │ │ │ │ -Copy constructor. │ │ │ │ │ -Definition pqkfactory.hh:126 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LocalBasisTraits::RangeFieldType │ │ │ │ │ +RF RangeFieldType │ │ │ │ │ +Export type for range field. │ │ │ │ │ +Definition common/localbasis.hh:45 │ │ │ │ │ +Dune::LocalBasisTraits::dimRange │ │ │ │ │ +static constexpr int dimRange │ │ │ │ │ +dimension of the range │ │ │ │ │ +Definition common/localbasis.hh:48 │ │ │ │ │ +Dune::LocalBasisTraits::DomainFieldType │ │ │ │ │ +DF DomainFieldType │ │ │ │ │ +Export type for domain field. │ │ │ │ │ +Definition common/localbasis.hh:36 │ │ │ │ │ +Dune::LocalBasisTraits::dimDomain │ │ │ │ │ +static constexpr int dimDomain │ │ │ │ │ +dimension of the domain │ │ │ │ │ +Definition common/localbasis.hh:39 │ │ │ │ │ +Dune::LocalBasisTraits::RangeType │ │ │ │ │ +R RangeType │ │ │ │ │ +range type │ │ │ │ │ +Definition common/localbasis.hh:51 │ │ │ │ │ +Dune::LocalToGlobalBasisAdaptorTraits │ │ │ │ │ +Traits class for local-to-global basis adaptors. │ │ │ │ │ +Definition localtoglobaladaptors.hh:30 │ │ │ │ │ +Dune::LocalToGlobalBasisAdaptorTraits::RangeField │ │ │ │ │ +LocalBasisTraits::RangeFieldType RangeField │ │ │ │ │ +Definition localtoglobaladaptors.hh:37 │ │ │ │ │ +Dune::LocalToGlobalBasisAdaptorTraits::DomainField │ │ │ │ │ +LocalBasisTraits::DomainFieldType DomainField │ │ │ │ │ +Definition localtoglobaladaptors.hh:31 │ │ │ │ │ +Dune::LocalToGlobalBasisAdaptorTraits::Jacobian │ │ │ │ │ +FieldMatrix< RangeField, dimRange, dimDomainGlobal > Jacobian │ │ │ │ │ +Definition localtoglobaladaptors.hh:41 │ │ │ │ │ +Dune::LocalToGlobalBasisAdaptorTraits::dimDomainLocal │ │ │ │ │ +static const std::size_t dimDomainLocal │ │ │ │ │ +Definition localtoglobaladaptors.hh:32 │ │ │ │ │ +Dune::LocalToGlobalBasisAdaptorTraits::Range │ │ │ │ │ +LocalBasisTraits::RangeType Range │ │ │ │ │ +Definition localtoglobaladaptors.hh:39 │ │ │ │ │ +Dune::LocalToGlobalBasisAdaptorTraits::dimDomainGlobal │ │ │ │ │ +static const std::size_t dimDomainGlobal │ │ │ │ │ +Definition localtoglobaladaptors.hh:33 │ │ │ │ │ +Dune::LocalToGlobalBasisAdaptorTraits::dimRange │ │ │ │ │ +static const std::size_t dimRange │ │ │ │ │ +Definition localtoglobaladaptors.hh:38 │ │ │ │ │ +Dune::LocalToGlobalBasisAdaptorTraits::DomainGlobal │ │ │ │ │ +FieldVector< DomainField, dimDomainGlobal > DomainGlobal │ │ │ │ │ +Definition localtoglobaladaptors.hh:35 │ │ │ │ │ +Dune::LocalToGlobalBasisAdaptorTraits::DomainLocal │ │ │ │ │ +LocalBasisTraits::DomainType DomainLocal │ │ │ │ │ +Definition localtoglobaladaptors.hh:34 │ │ │ │ │ +Dune::ScalarLocalToGlobalBasisAdaptor │ │ │ │ │ +Convert a simple scalar local basis into a global basis. │ │ │ │ │ +Definition localtoglobaladaptors.hh:65 │ │ │ │ │ +Dune::ScalarLocalToGlobalBasisAdaptor::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainLocal &in, std::vector< │ │ │ │ │ +typename Traits::Jacobian > &out) const │ │ │ │ │ +Definition localtoglobaladaptors.hh:125 │ │ │ │ │ +Dune::ScalarLocalToGlobalBasisAdaptor::order │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +return maximum polynomial order of the base function │ │ │ │ │ +Definition localtoglobaladaptors.hh:110 │ │ │ │ │ +Dune::ScalarLocalToGlobalBasisAdaptor::Traits │ │ │ │ │ +LocalToGlobalBasisAdaptorTraits< typename LocalBasis::Traits, Geometry:: │ │ │ │ │ +coorddimension > Traits │ │ │ │ │ +Definition localtoglobaladaptors.hh:84 │ │ │ │ │ +Dune::ScalarLocalToGlobalBasisAdaptor::ScalarLocalToGlobalBasisAdaptor │ │ │ │ │ +ScalarLocalToGlobalBasisAdaptor(const LocalBasis &localBasis_, const Geometry │ │ │ │ │ +&geometry_) │ │ │ │ │ +construct a ScalarLocalToGlobalBasisAdaptor │ │ │ │ │ +Definition localtoglobaladaptors.hh:96 │ │ │ │ │ +Dune::ScalarLocalToGlobalBasisAdaptor::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainLocal &in, std::vector< │ │ │ │ │ +typename Traits::Range > &out) const │ │ │ │ │ +Definition localtoglobaladaptors.hh:119 │ │ │ │ │ +Dune::ScalarLocalToGlobalBasisAdaptor::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +Definition localtoglobaladaptors.hh:101 │ │ │ │ │ +Dune::LocalToGlobalInterpolationAdaptor │ │ │ │ │ +Convert a local interpolation into a global interpolation. │ │ │ │ │ +Definition localtoglobaladaptors.hh:149 │ │ │ │ │ +Dune::LocalToGlobalInterpolationAdaptor::LocalToGlobalInterpolationAdaptor │ │ │ │ │ +LocalToGlobalInterpolationAdaptor(const LocalInterpolation │ │ │ │ │ +&localInterpolation_) │ │ │ │ │ +construct a LocalToGlobalInterpolationAdaptor │ │ │ │ │ +Definition localtoglobaladaptors.hh:165 │ │ │ │ │ +Dune::LocalToGlobalInterpolationAdaptor::interpolate │ │ │ │ │ +void interpolate(const Function &function, std::vector< Coeff > &out) const │ │ │ │ │ +Definition localtoglobaladaptors.hh:170 │ │ │ │ │ +Dune::LocalToGlobalInterpolationAdaptor::Traits │ │ │ │ │ +Traits_ Traits │ │ │ │ │ +Definition localtoglobaladaptors.hh:153 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ +Convert a simple scalar local finite element into a global finite element. │ │ │ │ │ +Definition localtoglobaladaptors.hh:187 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptor::type │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +Definition localtoglobaladaptors.hh:229 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptor::coefficients │ │ │ │ │ +const Traits::Coefficients & coefficients() const │ │ │ │ │ +Definition localtoglobaladaptors.hh:227 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptor::interpolation │ │ │ │ │ +const Traits::Interpolation & interpolation() const │ │ │ │ │ +Definition localtoglobaladaptors.hh:225 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptor::basis │ │ │ │ │ +const Traits::Basis & basis() const │ │ │ │ │ +Definition localtoglobaladaptors.hh:224 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptor:: │ │ │ │ │ +ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ +ScalarLocalToGlobalFiniteElementAdaptor(const LocalFiniteElement &localFE_, │ │ │ │ │ +const Geometry &geometry) │ │ │ │ │ +construct a ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ +Definition localtoglobaladaptors.hh:218 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptor::Traits │ │ │ │ │ +Definition localtoglobaladaptors.hh:191 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptor::Traits::Interpolation │ │ │ │ │ +LocalToGlobalInterpolationAdaptor< typename LocalFiniteElement::Traits:: │ │ │ │ │ +LocalInterpolationType, typename Basis::Traits > Interpolation │ │ │ │ │ +Definition localtoglobaladaptors.hh:196 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptor::Traits::Coefficients │ │ │ │ │ +LocalFiniteElement::Traits::LocalCoefficientsType Coefficients │ │ │ │ │ +Definition localtoglobaladaptors.hh:198 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptor::Traits::Basis │ │ │ │ │ +ScalarLocalToGlobalBasisAdaptor< typename LocalFiniteElement::Traits:: │ │ │ │ │ +LocalBasisType, Geometry > Basis │ │ │ │ │ +Definition localtoglobaladaptors.hh:193 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory │ │ │ │ │ +Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. │ │ │ │ │ +Definition localtoglobaladaptors.hh:244 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory::make │ │ │ │ │ +const FiniteElement make(const Geometry &geometry) │ │ │ │ │ +construct ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ +Definition localtoglobaladaptors.hh:274 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory::FiniteElement │ │ │ │ │ +ScalarLocalToGlobalFiniteElementAdaptor< LocalFiniteElement, Geometry > │ │ │ │ │ +FiniteElement │ │ │ │ │ +Definition localtoglobaladaptors.hh:249 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory:: │ │ │ │ │ +ScalarLocalToGlobalFiniteElementAdaptorFactory │ │ │ │ │ +ScalarLocalToGlobalFiniteElementAdaptorFactory(const LocalFiniteElement │ │ │ │ │ +&localFE_) │ │ │ │ │ +construct a ScalarLocalToGlobalFiniteElementAdaptorFactory │ │ │ │ │ +Definition localtoglobaladaptors.hh:261 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00071.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangelfecache.hh File Reference │ │ │ │ +dune-localfunctions: localkey.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,48 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
lagrangelfecache.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
localkey.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 <array>
│ │ │ │ +#include <cstddef>
│ │ │ │ +#include <ostream>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::LocalKey
 Describe position of one degree of freedom. 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 {} │ │ │ │ │ @@ -6,34 +6,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -Namespaces | Typedefs │ │ │ │ │ -lagrangelfecache.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * common │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +localkey.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ + Classes │ │ │ │ │ +class  Dune::LocalKey │ │ │ │ │ +  Describe position of one degree of freedom. More... │ │ │ │ │ +  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Typedefs │ │ │ │ │ -template │ │ │ │ │ -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. │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00071_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangelfecache.hh Source File │ │ │ │ +dune-localfunctions: localkey.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,145 +70,122 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangelfecache.hh
│ │ │ │ +
localkey.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_LOCALKEY_HH
│ │ │ │ +
6#define DUNE_LOCALKEY_HH
│ │ │ │
7
│ │ │ │ -
8#include <tuple>
│ │ │ │ -
9#include <utility>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/geometry/type.hh>
│ │ │ │ -
12#include <dune/geometry/typeindex.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
20
│ │ │ │ -
21
│ │ │ │ -
22namespace Dune {
│ │ │ │ -
23
│ │ │ │ -
24
│ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <cstddef>
│ │ │ │ +
10#include <ostream>
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 {
│ │ │ │ +
24 public:
│ │ │ │
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 );
│ │ │ │ -
40 }
│ │ │ │ -
41 };
│ │ │ │ +
27 enum {
│ │ │ │ + │ │ │ │ +
37 };
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
48 LocalKey (unsigned int s, unsigned int c, unsigned int i)
│ │ │ │ +
49 {
│ │ │ │ +
50 values_[0] = s;
│ │ │ │ +
51 values_[1] = c;
│ │ │ │ +
52 values_[2] = i;
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ +
56 inline unsigned int subEntity () const
│ │ │ │ +
57 {
│ │ │ │ +
58 return values_[0];
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ +
62 inline unsigned int codim () const
│ │ │ │ +
63 {
│ │ │ │ +
64 return values_[1];
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
│ │ │ │ +
68 inline unsigned int index () const
│ │ │ │ +
69 {
│ │ │ │ +
70 return values_[2];
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
│ │ │ │ +
74 void index (unsigned int i)
│ │ │ │ +
75 {
│ │ │ │ +
76 values_[2] = i;
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
│ │ │ │ +
80 bool operator< (const LocalKey& other) const
│ │ │ │ +
81 {
│ │ │ │ +
82 return values_ < other.values_;
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
│ │ │ │ +
86 friend std::ostream& operator<< (std::ostream& s, const LocalKey& localKey)
│ │ │ │ +
87 {
│ │ │ │ +
88 return s << "[ subEntity: " << localKey.subEntity()
│ │ │ │ +
89 << ", codim: " << localKey.codim()
│ │ │ │ +
90 << ", index: " << localKey.index() << " ]";
│ │ │ │ +
91 }
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │ +
93 private:
│ │ │ │ +
94
│ │ │ │ +
95 // We use an array to store the values in order to be able to use the array::operator< implementation
│ │ │ │ +
96 std::array<unsigned int,3> values_;
│ │ │ │ +
97
│ │ │ │ +
98 };
│ │ │ │ +
│ │ │ │ +
99
│ │ │ │ +
100}
│ │ │ │ +
101#endif
│ │ │ │
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
│ │ │ │ +
LocalKey()
Standard constructor for uninitialized local index.
Definition localkey.hh:40
│ │ │ │ +
unsigned int index() const
Return offset within subentity.
Definition localkey.hh:68
│ │ │ │ +
unsigned int codim() const
Return codim of associated entity.
Definition localkey.hh:62
│ │ │ │ +
unsigned int subEntity() const
Return number of associated subentity.
Definition localkey.hh:56
│ │ │ │ +
LocalKey(unsigned int s, unsigned int c, unsigned int i)
Initialize all components.
Definition localkey.hh:48
│ │ │ │ +
bool operator<(const LocalKey &other) const
Less-than operator so we can use this class as a key type in stl containers.
Definition localkey.hh:80
│ │ │ │ +
@ intersectionCodim
Codimension returned by LocalKey::codim() for degrees of freedom attached to an intersection.
Definition localkey.hh:36
│ │ │ │ +
void index(unsigned int i)
Set index component.
Definition localkey.hh:74
│ │ │ │ +
friend std::ostream & operator<<(std::ostream &s, const LocalKey &localKey)
Write LocalKey object to output stream.
Definition localkey.hh:86
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,166 +7,129 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -lagrangelfecache.hh │ │ │ │ │ + * common │ │ │ │ │ +localkey.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_LOCALKEY_HH │ │ │ │ │ + 6#define DUNE_LOCALKEY_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include │ │ │ │ │ - 20 │ │ │ │ │ - 21 │ │ │ │ │ - 22namespace Dune { │ │ │ │ │ - 23 │ │ │ │ │ - 24 │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12namespace Dune │ │ │ │ │ + 13{ │ │ │ │ │ +22 class LocalKey │ │ │ │ │ + 23 { │ │ │ │ │ + 24 public: │ │ │ │ │ 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 ); │ │ │ │ │ - 40 } │ │ │ │ │ - 41 }; │ │ │ │ │ + 27 enum { │ │ │ │ │ + 36 intersectionCodim=666 │ │ │ │ │ +37 }; │ │ │ │ │ + 38 │ │ │ │ │ +40 LocalKey () │ │ │ │ │ + 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 │ │ │ │ │ -118using LagrangeLocalFiniteElementCache = │ │ │ │ │ -LocalFiniteElementVariantCache>; │ │ │ │ │ - 119 │ │ │ │ │ - 120 │ │ │ │ │ - 121 │ │ │ │ │ - 122} // namespace Dune │ │ │ │ │ - 123 │ │ │ │ │ - 124 │ │ │ │ │ - 125 │ │ │ │ │ - 126 │ │ │ │ │ - 127#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ -lagrangeprism.hh │ │ │ │ │ -p0.hh │ │ │ │ │ -lagrangepyramid.hh │ │ │ │ │ -lagrangecube.hh │ │ │ │ │ -localfiniteelementvariantcache.hh │ │ │ │ │ +48 LocalKey (unsigned int s, unsigned int c, unsigned int i) │ │ │ │ │ + 49 { │ │ │ │ │ + 50 values_[0] = s; │ │ │ │ │ + 51 values_[1] = c; │ │ │ │ │ + 52 values_[2] = i; │ │ │ │ │ + 53 } │ │ │ │ │ + 54 │ │ │ │ │ +56 inline unsigned int subEntity () const │ │ │ │ │ + 57 { │ │ │ │ │ + 58 return values_[0]; │ │ │ │ │ + 59 } │ │ │ │ │ + 60 │ │ │ │ │ +62 inline unsigned int codim () const │ │ │ │ │ + 63 { │ │ │ │ │ + 64 return values_[1]; │ │ │ │ │ + 65 } │ │ │ │ │ + 66 │ │ │ │ │ +68 inline unsigned int index () const │ │ │ │ │ + 69 { │ │ │ │ │ + 70 return values_[2]; │ │ │ │ │ + 71 } │ │ │ │ │ + 72 │ │ │ │ │ +74 void index (unsigned int i) │ │ │ │ │ + 75 { │ │ │ │ │ + 76 values_[2] = i; │ │ │ │ │ + 77 } │ │ │ │ │ + 78 │ │ │ │ │ +80 bool operator<(const LocalKey& other) const │ │ │ │ │ + 81 { │ │ │ │ │ + 82 return values_ < other.values_; │ │ │ │ │ + 83 } │ │ │ │ │ + 84 │ │ │ │ │ +86 friend std::ostream& operator<<(std::ostream& s, const LocalKey& localKey) │ │ │ │ │ + 87 { │ │ │ │ │ + 88 return s << "[ subEntity: " << localKey.subEntity() │ │ │ │ │ + 89 << ", codim: " << localKey.codim() │ │ │ │ │ + 90 << ", index: " << localKey.index() << " ]"; │ │ │ │ │ + 91 } │ │ │ │ │ + 92 │ │ │ │ │ + 93 private: │ │ │ │ │ + 94 │ │ │ │ │ + 95 // We use an array to store the values in order to be able to use the │ │ │ │ │ +array::operator< implementation │ │ │ │ │ + 96 std::array values_; │ │ │ │ │ + 97 │ │ │ │ │ + 98 }; │ │ │ │ │ + 99 │ │ │ │ │ + 100} │ │ │ │ │ + 101#endif │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementVariantCache │ │ │ │ │ -A cache storing a compile time selection of local finite element │ │ │ │ │ -implementations. │ │ │ │ │ -Definition localfiniteelementvariantcache.hh:68 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::LocalKey::LocalKey │ │ │ │ │ +LocalKey() │ │ │ │ │ +Standard constructor for uninitialized local index. │ │ │ │ │ +Definition localkey.hh:40 │ │ │ │ │ +Dune::LocalKey::index │ │ │ │ │ +unsigned int index() const │ │ │ │ │ +Return offset within subentity. │ │ │ │ │ +Definition localkey.hh:68 │ │ │ │ │ +Dune::LocalKey::codim │ │ │ │ │ +unsigned int codim() const │ │ │ │ │ +Return codim of associated entity. │ │ │ │ │ +Definition localkey.hh:62 │ │ │ │ │ +Dune::LocalKey::subEntity │ │ │ │ │ +unsigned int subEntity() const │ │ │ │ │ +Return number of associated subentity. │ │ │ │ │ +Definition localkey.hh:56 │ │ │ │ │ +Dune::LocalKey::LocalKey │ │ │ │ │ +LocalKey(unsigned int s, unsigned int c, unsigned int i) │ │ │ │ │ +Initialize all components. │ │ │ │ │ +Definition localkey.hh:48 │ │ │ │ │ +Dune::LocalKey::operator< │ │ │ │ │ +bool operator<(const LocalKey &other) const │ │ │ │ │ +Less-than operator so we can use this class as a key type in stl containers. │ │ │ │ │ +Definition localkey.hh:80 │ │ │ │ │ +Dune::LocalKey::intersectionCodim │ │ │ │ │ +@ intersectionCodim │ │ │ │ │ +Codimension returned by LocalKey::codim() for degrees of freedom attached to an │ │ │ │ │ +intersection. │ │ │ │ │ +Definition localkey.hh:36 │ │ │ │ │ +Dune::LocalKey::index │ │ │ │ │ +void index(unsigned int i) │ │ │ │ │ +Set index component. │ │ │ │ │ +Definition localkey.hh:74 │ │ │ │ │ +Dune::LocalKey::operator<< │ │ │ │ │ +friend std::ostream & operator<<(std::ostream &s, const LocalKey &localKey) │ │ │ │ │ +Write LocalKey object to output stream. │ │ │ │ │ +Definition localkey.hh:86 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00074.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p2.hh File Reference │ │ │ │ +dune-localfunctions: localfiniteelementvariant.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
p2.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
localfiniteelementvariant.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <type_traits>
│ │ │ │ +#include <variant>
│ │ │ │ +#include <dune/common/typeutilities.hh>
│ │ │ │ +#include <dune/common/std/type_traits.hh>
│ │ │ │ +#include <dune/common/overloadset.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::LocalFiniteElementVariant< Implementations >
 Type erasure class for wrapping LocalFiniteElement classes. 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 {} │ │ │ │ │ @@ -6,25 +6,31 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -Namespaces | Typedefs │ │ │ │ │ -p2.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ + * common │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +localfiniteelementvariant.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ + Classes │ │ │ │ │ +class  Dune::LocalFiniteElementVariant<_Implementations_> │ │ │ │ │ +  Type erasure class for wrapping LocalFiniteElement classes. More... │ │ │ │ │ +  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Typedefs │ │ │ │ │ -template │ │ │ │ │ -using Dune::P2LocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, d, │ │ │ │ │ - 2 > │ │ │ │ │ -  Second-order Lagrange finite element on the reference simplex with │ │ │ │ │ - compile-time dimension. │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00074_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p2.hh Source File │ │ │ │ +dune-localfunctions: localfiniteelementvariant.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,387 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
p2.hh
│ │ │ │ +
localfiniteelementvariant.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_COMMON_LOCALFINITEELEMENTVARIANT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANT_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
10#warning This header is deprecated
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <type_traits>
│ │ │ │ +
10#include <variant>
│ │ │ │
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
19 template<class D, class R, int d>
│ │ │ │ - │ │ │ │ -
21 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
24}
│ │ │ │ -
25
│ │ │ │ -
26#endif
│ │ │ │ - │ │ │ │ +
12#include <dune/common/typeutilities.hh>
│ │ │ │ +
13#include <dune/common/std/type_traits.hh>
│ │ │ │ +
14#include <dune/common/overloadset.hh>
│ │ │ │ +
15
│ │ │ │ +
16#include <dune/geometry/type.hh>
│ │ │ │ +
17
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
21
│ │ │ │ +
22
│ │ │ │ +
23namespace Dune {
│ │ │ │ +
24
│ │ │ │ +
25namespace Impl {
│ │ │ │ +
26
│ │ │ │ +
27 // Helper for visiting a variant containing monostate.
│ │ │ │ +
28 // Since a generic lambda will in most cases not compile
│ │ │ │ +
29 // for monostate, we add special empty overloads for monostate.
│ │ │ │ +
30 // Hence visitIf will simply do nothing in the case of a
│ │ │ │ +
31 // monostate value.
│ │ │ │ +
32 template<class Visitor, class Variant>
│ │ │ │ +
33 void visitIf(Visitor&& visitor, Variant&& variant)
│ │ │ │ +
34 {
│ │ │ │ +
35 auto visitorWithFallback = overload([&](std::monostate&) {}, [&](const std::monostate&) {}, visitor);
│ │ │ │ +
36 std::visit(visitorWithFallback, variant);
│ │ │ │ +
37 }
│ │ │ │ +
38
│ │ │ │ +
39 template<class... Implementations>
│ │ │ │ +
40 class LocalBasisVariant
│ │ │ │ +
41 {
│ │ │ │ +
42
│ │ │ │ +
43 template<class I0, class... II>
│ │ │ │ +
44 struct FirstType
│ │ │ │ +
45 { using type = I0; };
│ │ │ │ +
46
│ │ │ │ +
47 using FirstImpTraits = typename FirstType<Implementations...>::type::Traits;
│ │ │ │ +
48
│ │ │ │ +
49 public:
│ │ │ │ +
50
│ │ │ │ +
51 // We do not simply copy Implementation::LocalBasisTraits because this
│ │ │ │ +
52 // may be implementation specific. To stay clean, we simply put all its
│ │ │ │ +
53 // data into the default LocalBasisTraits.
│ │ │ │ +
54 using Traits = typename Dune::LocalBasisTraits<
│ │ │ │ +
55 typename FirstImpTraits::DomainFieldType,
│ │ │ │ +
56 FirstImpTraits::dimDomain,
│ │ │ │ +
57 typename FirstImpTraits::DomainType,
│ │ │ │ +
58 typename FirstImpTraits::RangeFieldType,
│ │ │ │ +
59 FirstImpTraits::dimRange,
│ │ │ │ +
60 typename FirstImpTraits::RangeType,
│ │ │ │ +
61 typename FirstImpTraits::JacobianType>;
│ │ │ │ +
62
│ │ │ │ +
63 template<class Implementation>
│ │ │ │ +
64 LocalBasisVariant(const Implementation& impl) :
│ │ │ │ +
65 impl_(&impl),
│ │ │ │ +
66 size_(impl.size()),
│ │ │ │ +
67 order_(impl.order())
│ │ │ │ +
68 {}
│ │ │ │ +
69
│ │ │ │ +
70 LocalBasisVariant() = default;
│ │ │ │ +
71 LocalBasisVariant(const LocalBasisVariant& other) = default;
│ │ │ │ +
72 LocalBasisVariant(LocalBasisVariant&& other) = default;
│ │ │ │ +
73 LocalBasisVariant& operator=(const LocalBasisVariant& other) = default;
│ │ │ │ +
74 LocalBasisVariant& operator=(LocalBasisVariant&& other) = default;
│ │ │ │ +
75
│ │ │ │ +
79 unsigned int size() const
│ │ │ │ +
80 {
│ │ │ │ +
81 return size_;
│ │ │ │ +
82 }
│ │ │ │ +
83
│ │ │ │ +
87 unsigned int order() const
│ │ │ │ +
88 {
│ │ │ │ +
89 return order_;
│ │ │ │ +
90 }
│ │ │ │ +
91
│ │ │ │ +
95 inline void evaluateFunction(
│ │ │ │ +
96 const typename Traits::DomainType& x,
│ │ │ │ +
97 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
98 {
│ │ │ │ +
99 Impl::visitIf([&](const auto* impl) { impl->evaluateFunction(x, out); }, impl_);
│ │ │ │ +
100 }
│ │ │ │ +
101
│ │ │ │ +
105 inline void evaluateJacobian(
│ │ │ │ +
106 const typename Traits::DomainType& x,
│ │ │ │ +
107 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
108 {
│ │ │ │ +
109 Impl::visitIf([&](const auto* impl) { impl->evaluateJacobian(x, out); }, impl_);
│ │ │ │ +
110 }
│ │ │ │ +
111
│ │ │ │ +
119 void partial(
│ │ │ │ +
120 const std::array<unsigned int,Traits::dimDomain>& order,
│ │ │ │ +
121 const typename Traits::DomainType& x,
│ │ │ │ +
122 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
123 {
│ │ │ │ +
124 Impl::visitIf([&](const auto* impl) { impl->partial(order, x, out); }, impl_);
│ │ │ │ +
125 }
│ │ │ │ +
126
│ │ │ │ +
127 private:
│ │ │ │ +
128 std::variant<std::monostate, const Implementations*...> impl_;
│ │ │ │ +
129 std::size_t size_;
│ │ │ │ +
130 std::size_t order_;
│ │ │ │ +
131 };
│ │ │ │ +
132
│ │ │ │ +
133
│ │ │ │ +
134 template<class... Implementations>
│ │ │ │ +
135 class LocalCoefficientsVariant
│ │ │ │ +
136 {
│ │ │ │ +
137 public:
│ │ │ │ +
138
│ │ │ │ +
139 template<class Implementation>
│ │ │ │ +
140 LocalCoefficientsVariant(const Implementation& impl) :
│ │ │ │ +
141 impl_(&impl),
│ │ │ │ +
142 size_(impl.size())
│ │ │ │ +
143 {}
│ │ │ │ +
144
│ │ │ │ +
145 LocalCoefficientsVariant() = default;
│ │ │ │ +
146 LocalCoefficientsVariant(const LocalCoefficientsVariant& other) = default;
│ │ │ │ +
147 LocalCoefficientsVariant(LocalCoefficientsVariant&& other) = default;
│ │ │ │ +
148 LocalCoefficientsVariant& operator=(const LocalCoefficientsVariant& other) = default;
│ │ │ │ +
149 LocalCoefficientsVariant& operator=(LocalCoefficientsVariant&& other) = default;
│ │ │ │ +
150
│ │ │ │ +
154 unsigned int size() const
│ │ │ │ +
155 {
│ │ │ │ +
156 return size_;
│ │ │ │ +
157 }
│ │ │ │ +
158
│ │ │ │ +
159 const Dune::LocalKey& localKey (std::size_t i) const
│ │ │ │ +
160 {
│ │ │ │ +
161 // We can't use visitIf since we have to return something
│ │ │ │ +
162 // even for a monostate value. Since the return type is
│ │ │ │ +
163 // an l-value reference, we use a default constructed
│ │ │ │ +
164 // dummy LocalKey value.
│ │ │ │ +
165 static const Dune::LocalKey dummyLocalKey;
│ │ │ │ +
166 return std::visit(overload(
│ │ │ │ +
167 [&](const std::monostate&) -> decltype(auto) { return (dummyLocalKey);},
│ │ │ │ +
168 [&](const auto* impl) -> decltype(auto) { return impl->localKey(i); }), impl_);
│ │ │ │ +
169 }
│ │ │ │ +
170
│ │ │ │ +
171 private:
│ │ │ │ +
172 std::variant<std::monostate, const Implementations*...> impl_;
│ │ │ │ +
173 std::size_t size_;
│ │ │ │ +
174 };
│ │ │ │ +
175
│ │ │ │ +
176
│ │ │ │ +
177 template<class... Implementations>
│ │ │ │ +
178 class LocalInterpolationVariant
│ │ │ │ +
179 {
│ │ │ │ +
180 public:
│ │ │ │ +
181
│ │ │ │ +
182 template<class Implementation>
│ │ │ │ +
183 LocalInterpolationVariant(const Implementation& impl) :
│ │ │ │ +
184 impl_(&impl)
│ │ │ │ +
185 {}
│ │ │ │ +
186
│ │ │ │ +
187 LocalInterpolationVariant() = default;
│ │ │ │ +
188 LocalInterpolationVariant(const LocalInterpolationVariant& other) = default;
│ │ │ │ +
189 LocalInterpolationVariant(LocalInterpolationVariant&& other) = default;
│ │ │ │ +
190 LocalInterpolationVariant& operator=(const LocalInterpolationVariant& other) = default;
│ │ │ │ +
191 LocalInterpolationVariant& operator=(LocalInterpolationVariant&& other) = default;
│ │ │ │ +
192
│ │ │ │ +
193 template<typename F, typename C>
│ │ │ │ +
194 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
195 {
│ │ │ │ +
196 Impl::visitIf([&](const auto* impl) { impl->interpolate(ff, out); }, impl_);
│ │ │ │ +
197 }
│ │ │ │ +
198
│ │ │ │ +
199 private:
│ │ │ │ +
200 std::variant<std::monostate, const Implementations*...> impl_;
│ │ │ │ +
201 };
│ │ │ │ +
202
│ │ │ │ +
203} // namespace Impl
│ │ │ │ +
204
│ │ │ │ +
205
│ │ │ │ +
234 template<class... Implementations>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
236 {
│ │ │ │ +
237
│ │ │ │ +
238 // In each LocalFooVariant we store a std::variant<std::monostate, const FooImpl*...>, i.e. a std::variant
│ │ │ │ +
239 // with the pointer to the Foo implementation unless LocalFiniteElementVariant stores a monostate. In this
│ │ │ │ +
240 // case each LocalFooVariant also stores a monostate (and not a monostate*).
│ │ │ │ +
241 using LocalBasis = Impl::LocalBasisVariant<typename Implementations::Traits::LocalBasisType...>;
│ │ │ │ +
242 using LocalCoefficients = Impl::LocalCoefficientsVariant<typename Implementations::Traits::LocalCoefficientsType...>;
│ │ │ │ +
243 using LocalInterpolation = Impl::LocalInterpolationVariant<typename Implementations::Traits::LocalInterpolationType...>;
│ │ │ │ +
244
│ │ │ │ +
245 // Update members after changing impl_
│ │ │ │ +
246 void updateMembers()
│ │ │ │ +
247 {
│ │ │ │ +
248 std::visit(overload(
│ │ │ │ +
249 [&](std::monostate&) {
│ │ │ │ +
250 localBasis_ = LocalBasis();
│ │ │ │ +
251 localCoefficients_ = LocalCoefficients();
│ │ │ │ +
252 localInterpolation_ = LocalInterpolation();
│ │ │ │ +
253 size_ = 0;
│ │ │ │ +
254 geometryType_ = GeometryType{};
│ │ │ │ +
255 }, [&](auto&& impl) {
│ │ │ │ +
256 localBasis_ = LocalBasis(impl.localBasis());
│ │ │ │ +
257 localCoefficients_ = LocalCoefficients(impl.localCoefficients());
│ │ │ │ +
258 localInterpolation_ = LocalInterpolation(impl.localInterpolation());
│ │ │ │ +
259 size_ = impl.size();
│ │ │ │ +
260 geometryType_ = impl.type();
│ │ │ │ +
261 }), impl_);
│ │ │ │ +
262 }
│ │ │ │ +
263
│ │ │ │ +
264 public:
│ │ │ │ +
265
│ │ │ │ + │ │ │ │ +
270
│ │ │ │ + │ │ │ │ +
275
│ │ │ │ +
│ │ │ │ +
279 LocalFiniteElementVariant(const std::monostate& monostate)
│ │ │ │ +
280 {}
│ │ │ │ +
│ │ │ │ +
281
│ │ │ │ +
288 template<class Implementation,
│ │ │ │ +
289 std::enable_if_t<std::disjunction<std::is_same<std::decay_t<Implementation>, Implementations>...>::value, int> = 0>
│ │ │ │ +
│ │ │ │ +
290 LocalFiniteElementVariant(Implementation&& impl) :
│ │ │ │ +
291 impl_(std::forward<Implementation>(impl))
│ │ │ │ +
292 {
│ │ │ │ +
293 updateMembers();
│ │ │ │ +
294 }
│ │ │ │ +
│ │ │ │ +
295
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
300 impl_(other.impl_)
│ │ │ │ +
301 {
│ │ │ │ +
302 updateMembers();
│ │ │ │ +
303 }
│ │ │ │ +
│ │ │ │ +
304
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
309 impl_(std::move(other.impl_))
│ │ │ │ +
310 {
│ │ │ │ +
311 updateMembers();
│ │ │ │ +
312 }
│ │ │ │ +
│ │ │ │ +
313
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
318 {
│ │ │ │ +
319 impl_ = other.impl_;
│ │ │ │ +
320 updateMembers();
│ │ │ │ +
321 return *this;
│ │ │ │ +
322 }
│ │ │ │ +
│ │ │ │ +
323
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
328 {
│ │ │ │ +
329 impl_ = std::move(other.impl_);
│ │ │ │ +
330 updateMembers();
│ │ │ │ +
331 return *this;
│ │ │ │ +
332 }
│ │ │ │ +
│ │ │ │ +
333
│ │ │ │ +
337 template<class Implementation,
│ │ │ │ +
338 std::enable_if_t<std::disjunction<std::is_same<std::decay_t<Implementation>, Implementations>...>::value, int> = 0>
│ │ │ │ +
│ │ │ │ +
339 LocalFiniteElementVariant& operator=(Implementation&& impl)
│ │ │ │ +
340 {
│ │ │ │ +
341 impl_ = std::forward<Implementation>(impl);
│ │ │ │ +
342 updateMembers();
│ │ │ │ +
343 return *this;
│ │ │ │ +
344 }
│ │ │ │ +
│ │ │ │ +
345
│ │ │ │ +
346
│ │ │ │ +
│ │ │ │ +
350 const typename Traits::LocalBasisType& localBasis() const
│ │ │ │ +
351 {
│ │ │ │ +
352 return localBasis_;
│ │ │ │ +
353 }
│ │ │ │ +
│ │ │ │ +
354
│ │ │ │ +
│ │ │ │ +
358 const typename Traits::LocalCoefficientsType& localCoefficients() const
│ │ │ │ +
359 {
│ │ │ │ +
360 return localCoefficients_;
│ │ │ │ +
361 }
│ │ │ │ +
│ │ │ │ +
362
│ │ │ │ +
│ │ │ │ +
366 const typename Traits::LocalInterpolationType& localInterpolation() const
│ │ │ │ +
367 {
│ │ │ │ +
368 return localInterpolation_;
│ │ │ │ +
369 }
│ │ │ │ +
│ │ │ │ +
370
│ │ │ │ +
│ │ │ │ +
374 unsigned int size() const
│ │ │ │ +
375 {
│ │ │ │ +
376 return size_;
│ │ │ │ +
377 }
│ │ │ │ +
│ │ │ │ +
378
│ │ │ │ +
│ │ │ │ +
382 constexpr GeometryType type() const
│ │ │ │ +
383 {
│ │ │ │ +
384 return geometryType_;
│ │ │ │ +
385 }
│ │ │ │ +
│ │ │ │ +
386
│ │ │ │ +
│ │ │ │ +
398 const auto& variant() const
│ │ │ │ +
399 {
│ │ │ │ +
400 return impl_;
│ │ │ │ +
401 }
│ │ │ │ +
│ │ │ │ +
402
│ │ │ │ +
│ │ │ │ +
408 operator bool () const
│ │ │ │ +
409 {
│ │ │ │ +
410 return not(std::holds_alternative<std::monostate>(variant()));
│ │ │ │ +
411 }
│ │ │ │ +
│ │ │ │ +
412
│ │ │ │ +
413 private:
│ │ │ │ +
414 std::variant<std::monostate, Implementations...> impl_;
│ │ │ │ +
415 std::size_t size_;
│ │ │ │ +
416 GeometryType geometryType_;
│ │ │ │ +
417 LocalBasis localBasis_;
│ │ │ │ +
418 LocalCoefficients localCoefficients_;
│ │ │ │ +
419 LocalInterpolation localInterpolation_;
│ │ │ │ +
420 };
│ │ │ │ +
│ │ │ │ +
421
│ │ │ │ +
422} // end namespace Dune
│ │ │ │ +
423
│ │ │ │ +
424#endif // DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
Type erasure class for wrapping LocalFiniteElement classes.
Definition localfiniteelementvariant.hh:236
│ │ │ │ +
typename Dune::LocalFiniteElementTraits< LocalBasis, LocalCoefficients, LocalInterpolation > Traits
Export LocalFiniteElementTraits.
Definition localfiniteelementvariant.hh:269
│ │ │ │ +
const auto & variant() const
Provide access to underlying std::variant.
Definition localfiniteelementvariant.hh:398
│ │ │ │ +
unsigned int size() const
Number of shape functions.
Definition localfiniteelementvariant.hh:374
│ │ │ │ +
constexpr GeometryType type() const
Number of shape functions.
Definition localfiniteelementvariant.hh:382
│ │ │ │ +
LocalFiniteElementVariant(LocalFiniteElementVariant &&other)
Move constructor.
Definition localfiniteelementvariant.hh:308
│ │ │ │ +
LocalFiniteElementVariant & operator=(Implementation &&impl)
Assignment from implementation.
Definition localfiniteelementvariant.hh:339
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Provide access to LocalBasis implementation of this LocalFiniteElement.
Definition localfiniteelementvariant.hh:350
│ │ │ │ +
LocalFiniteElementVariant & operator=(const LocalFiniteElementVariant &other)
Copy assignment.
Definition localfiniteelementvariant.hh:317
│ │ │ │ +
LocalFiniteElementVariant(const std::monostate &monostate)
Construct empty LocalFiniteElementVariant.
Definition localfiniteelementvariant.hh:279
│ │ │ │ +
LocalFiniteElementVariant(const LocalFiniteElementVariant &other)
Copy constructor.
Definition localfiniteelementvariant.hh:299
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Provide access to LocalCoefficients implementation of this LocalFiniteElement.
Definition localfiniteelementvariant.hh:358
│ │ │ │ +
LocalFiniteElementVariant(Implementation &&impl)
Construct LocalFiniteElementVariant.
Definition localfiniteelementvariant.hh:290
│ │ │ │ +
LocalFiniteElementVariant & operator=(LocalFiniteElementVariant &&other)
Move assignment.
Definition localfiniteelementvariant.hh:327
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Provide access to LocalInterpolation implementation of this LocalFiniteElement.
Definition localfiniteelementvariant.hh:366
│ │ │ │ +
LocalFiniteElementVariant()=default
Construct empty LocalFiniteElementVariant.
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,43 +7,426 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -p2.hh │ │ │ │ │ + * common │ │ │ │ │ +localfiniteelementvariant.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_COMMON_LOCALFINITEELEMENTVARIANT_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#warning This header is deprecated │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ 11 │ │ │ │ │ - 12namespace Dune │ │ │ │ │ - 13{ │ │ │ │ │ - 14 │ │ │ │ │ - 19 template │ │ │ │ │ -20 using P2LocalFiniteElement │ │ │ │ │ - 21 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ - 22 = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ - 23 │ │ │ │ │ - 24} │ │ │ │ │ - 25 │ │ │ │ │ - 26#endif │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16#include │ │ │ │ │ + 17 │ │ │ │ │ + 18#include │ │ │ │ │ + 19#include │ │ │ │ │ + 20#include │ │ │ │ │ + 21 │ │ │ │ │ + 22 │ │ │ │ │ + 23namespace Dune { │ │ │ │ │ + 24 │ │ │ │ │ + 25namespace Impl { │ │ │ │ │ + 26 │ │ │ │ │ + 27 // Helper for visiting a variant containing monostate. │ │ │ │ │ + 28 // Since a generic lambda will in most cases not compile │ │ │ │ │ + 29 // for monostate, we add special empty overloads for monostate. │ │ │ │ │ + 30 // Hence visitIf will simply do nothing in the case of a │ │ │ │ │ + 31 // monostate value. │ │ │ │ │ + 32 template │ │ │ │ │ + 33 void visitIf(Visitor&& visitor, Variant&& variant) │ │ │ │ │ + 34 { │ │ │ │ │ + 35 auto visitorWithFallback = overload([&](std::monostate&) {}, [&](const │ │ │ │ │ +std::monostate&) {}, visitor); │ │ │ │ │ + 36 std::visit(visitorWithFallback, variant); │ │ │ │ │ + 37 } │ │ │ │ │ + 38 │ │ │ │ │ + 39 template │ │ │ │ │ + 40 class LocalBasisVariant │ │ │ │ │ + 41 { │ │ │ │ │ + 42 │ │ │ │ │ + 43 template │ │ │ │ │ + 44 struct FirstType │ │ │ │ │ + 45 { using type = I0; }; │ │ │ │ │ + 46 │ │ │ │ │ + 47 using FirstImpTraits = typename FirstType::type:: │ │ │ │ │ +Traits; │ │ │ │ │ + 48 │ │ │ │ │ + 49 public: │ │ │ │ │ + 50 │ │ │ │ │ + 51 // We do not simply copy Implementation::LocalBasisTraits because this │ │ │ │ │ + 52 // may be implementation specific. To stay clean, we simply put all its │ │ │ │ │ + 53 // data into the default LocalBasisTraits. │ │ │ │ │ + 54 using Traits = typename Dune::LocalBasisTraits< │ │ │ │ │ + 55 typename FirstImpTraits::DomainFieldType, │ │ │ │ │ + 56 FirstImpTraits::dimDomain, │ │ │ │ │ + 57 typename FirstImpTraits::DomainType, │ │ │ │ │ + 58 typename FirstImpTraits::RangeFieldType, │ │ │ │ │ + 59 FirstImpTraits::dimRange, │ │ │ │ │ + 60 typename FirstImpTraits::RangeType, │ │ │ │ │ + 61 typename FirstImpTraits::JacobianType>; │ │ │ │ │ + 62 │ │ │ │ │ + 63 template │ │ │ │ │ + 64 LocalBasisVariant(const Implementation& impl) : │ │ │ │ │ + 65 impl_(&impl), │ │ │ │ │ + 66 size_(impl.size()), │ │ │ │ │ + 67 order_(impl.order()) │ │ │ │ │ + 68 {} │ │ │ │ │ + 69 │ │ │ │ │ + 70 LocalBasisVariant() = default; │ │ │ │ │ + 71 LocalBasisVariant(const LocalBasisVariant& other) = default; │ │ │ │ │ + 72 LocalBasisVariant(LocalBasisVariant&& other) = default; │ │ │ │ │ + 73 LocalBasisVariant& operator=(const LocalBasisVariant& other) = default; │ │ │ │ │ + 74 LocalBasisVariant& operator=(LocalBasisVariant&& other) = default; │ │ │ │ │ + 75 │ │ │ │ │ + 79 unsigned int size() const │ │ │ │ │ + 80 { │ │ │ │ │ + 81 return size_; │ │ │ │ │ + 82 } │ │ │ │ │ + 83 │ │ │ │ │ + 87 unsigned int order() const │ │ │ │ │ + 88 { │ │ │ │ │ + 89 return order_; │ │ │ │ │ + 90 } │ │ │ │ │ + 91 │ │ │ │ │ + 95 inline void evaluateFunction( │ │ │ │ │ + 96 const typename Traits::DomainType& x, │ │ │ │ │ + 97 std::vector& out) const │ │ │ │ │ + 98 { │ │ │ │ │ + 99 Impl::visitIf([&](const auto* impl) { impl->evaluateFunction(x, out); }, │ │ │ │ │ +impl_); │ │ │ │ │ + 100 } │ │ │ │ │ + 101 │ │ │ │ │ + 105 inline void evaluateJacobian( │ │ │ │ │ + 106 const typename Traits::DomainType& x, │ │ │ │ │ + 107 std::vector& out) const │ │ │ │ │ + 108 { │ │ │ │ │ + 109 Impl::visitIf([&](const auto* impl) { impl->evaluateJacobian(x, out); }, │ │ │ │ │ +impl_); │ │ │ │ │ + 110 } │ │ │ │ │ + 111 │ │ │ │ │ + 119 void partial( │ │ │ │ │ + 120 const std::array& order, │ │ │ │ │ + 121 const typename Traits::DomainType& x, │ │ │ │ │ + 122 std::vector& out) const │ │ │ │ │ + 123 { │ │ │ │ │ + 124 Impl::visitIf([&](const auto* impl) { impl->partial(order, x, out); }, │ │ │ │ │ +impl_); │ │ │ │ │ + 125 } │ │ │ │ │ + 126 │ │ │ │ │ + 127 private: │ │ │ │ │ + 128 std::variant impl_; │ │ │ │ │ + 129 std::size_t size_; │ │ │ │ │ + 130 std::size_t order_; │ │ │ │ │ + 131 }; │ │ │ │ │ + 132 │ │ │ │ │ + 133 │ │ │ │ │ + 134 template │ │ │ │ │ + 135 class LocalCoefficientsVariant │ │ │ │ │ + 136 { │ │ │ │ │ + 137 public: │ │ │ │ │ + 138 │ │ │ │ │ + 139 template │ │ │ │ │ + 140 LocalCoefficientsVariant(const Implementation& impl) : │ │ │ │ │ + 141 impl_(&impl), │ │ │ │ │ + 142 size_(impl.size()) │ │ │ │ │ + 143 {} │ │ │ │ │ + 144 │ │ │ │ │ + 145 LocalCoefficientsVariant() = default; │ │ │ │ │ + 146 LocalCoefficientsVariant(const LocalCoefficientsVariant& other) = default; │ │ │ │ │ + 147 LocalCoefficientsVariant(LocalCoefficientsVariant&& other) = default; │ │ │ │ │ + 148 LocalCoefficientsVariant& operator=(const LocalCoefficientsVariant& other) │ │ │ │ │ += default; │ │ │ │ │ + 149 LocalCoefficientsVariant& operator=(LocalCoefficientsVariant&& other) = │ │ │ │ │ +default; │ │ │ │ │ + 150 │ │ │ │ │ + 154 unsigned int size() const │ │ │ │ │ + 155 { │ │ │ │ │ + 156 return size_; │ │ │ │ │ + 157 } │ │ │ │ │ + 158 │ │ │ │ │ + 159 const Dune::LocalKey& localKey (std::size_t i) const │ │ │ │ │ + 160 { │ │ │ │ │ + 161 // We can't use visitIf since we have to return something │ │ │ │ │ + 162 // even for a monostate value. Since the return type is │ │ │ │ │ + 163 // an l-value reference, we use a default constructed │ │ │ │ │ + 164 // dummy LocalKey value. │ │ │ │ │ + 165 static const Dune::LocalKey dummyLocalKey; │ │ │ │ │ + 166 return std::visit(overload( │ │ │ │ │ + 167 [&](const std::monostate&) -> decltype(auto) { return (dummyLocalKey);}, │ │ │ │ │ + 168 [&](const auto* impl) -> decltype(auto) { return impl->localKey(i); }), │ │ │ │ │ +impl_); │ │ │ │ │ + 169 } │ │ │ │ │ + 170 │ │ │ │ │ + 171 private: │ │ │ │ │ + 172 std::variant impl_; │ │ │ │ │ + 173 std::size_t size_; │ │ │ │ │ + 174 }; │ │ │ │ │ + 175 │ │ │ │ │ + 176 │ │ │ │ │ + 177 template │ │ │ │ │ + 178 class LocalInterpolationVariant │ │ │ │ │ + 179 { │ │ │ │ │ + 180 public: │ │ │ │ │ + 181 │ │ │ │ │ + 182 template │ │ │ │ │ + 183 LocalInterpolationVariant(const Implementation& impl) : │ │ │ │ │ + 184 impl_(&impl) │ │ │ │ │ + 185 {} │ │ │ │ │ + 186 │ │ │ │ │ + 187 LocalInterpolationVariant() = default; │ │ │ │ │ + 188 LocalInterpolationVariant(const LocalInterpolationVariant& other) = │ │ │ │ │ +default; │ │ │ │ │ + 189 LocalInterpolationVariant(LocalInterpolationVariant&& other) = default; │ │ │ │ │ + 190 LocalInterpolationVariant& operator=(const LocalInterpolationVariant& │ │ │ │ │ +other) = default; │ │ │ │ │ + 191 LocalInterpolationVariant& operator=(LocalInterpolationVariant&& other) = │ │ │ │ │ +default; │ │ │ │ │ + 192 │ │ │ │ │ + 193 template │ │ │ │ │ + 194 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ + 195 { │ │ │ │ │ + 196 Impl::visitIf([&](const auto* impl) { impl->interpolate(ff, out); }, │ │ │ │ │ +impl_); │ │ │ │ │ + 197 } │ │ │ │ │ + 198 │ │ │ │ │ + 199 private: │ │ │ │ │ + 200 std::variant impl_; │ │ │ │ │ + 201 }; │ │ │ │ │ + 202 │ │ │ │ │ + 203} // namespace Impl │ │ │ │ │ + 204 │ │ │ │ │ + 205 │ │ │ │ │ + 234 template │ │ │ │ │ +235 class LocalFiniteElementVariant │ │ │ │ │ + 236 { │ │ │ │ │ + 237 │ │ │ │ │ + 238 // In each LocalFooVariant we store a std::variant, i.e. a std::variant │ │ │ │ │ + 239 // with the pointer to the Foo implementation unless │ │ │ │ │ +LocalFiniteElementVariant stores a monostate. In this │ │ │ │ │ + 240 // case each LocalFooVariant also stores a monostate (and not a │ │ │ │ │ +monostate*). │ │ │ │ │ + 241 using LocalBasis = Impl::LocalBasisVariant; │ │ │ │ │ + 242 using LocalCoefficients = Impl::LocalCoefficientsVariant; │ │ │ │ │ + 243 using LocalInterpolation = Impl::LocalInterpolationVariant; │ │ │ │ │ + 244 │ │ │ │ │ + 245 // Update members after changing impl_ │ │ │ │ │ + 246 void updateMembers() │ │ │ │ │ + 247 { │ │ │ │ │ + 248 std::visit(overload( │ │ │ │ │ + 249 [&](std::monostate&) { │ │ │ │ │ + 250 localBasis_ = LocalBasis(); │ │ │ │ │ + 251 localCoefficients_ = LocalCoefficients(); │ │ │ │ │ + 252 localInterpolation_ = LocalInterpolation(); │ │ │ │ │ + 253 size_ = 0; │ │ │ │ │ + 254 geometryType_ = GeometryType{}; │ │ │ │ │ + 255 }, [&](auto&& impl) { │ │ │ │ │ + 256 localBasis_ = LocalBasis(impl.localBasis()); │ │ │ │ │ + 257 localCoefficients_ = LocalCoefficients(impl.localCoefficients()); │ │ │ │ │ + 258 localInterpolation_ = LocalInterpolation(impl.localInterpolation()); │ │ │ │ │ + 259 size_ = impl.size(); │ │ │ │ │ + 260 geometryType_ = impl.type(); │ │ │ │ │ + 261 }), impl_); │ │ │ │ │ + 262 } │ │ │ │ │ + 263 │ │ │ │ │ + 264 public: │ │ │ │ │ + 265 │ │ │ │ │ +269 using Traits = typename Dune::LocalFiniteElementTraits; │ │ │ │ │ + 270 │ │ │ │ │ +274 LocalFiniteElementVariant() = default; │ │ │ │ │ + 275 │ │ │ │ │ +279 LocalFiniteElementVariant(const std::monostate& monostate) │ │ │ │ │ + 280 {} │ │ │ │ │ + 281 │ │ │ │ │ + 288 template, Implementations>...>::value, int> = 0> │ │ │ │ │ +290 LocalFiniteElementVariant(Implementation&& impl) : │ │ │ │ │ + 291 impl_(std::forward(impl)) │ │ │ │ │ + 292 { │ │ │ │ │ + 293 updateMembers(); │ │ │ │ │ + 294 } │ │ │ │ │ + 295 │ │ │ │ │ +299 LocalFiniteElementVariant(const LocalFiniteElementVariant& other) : │ │ │ │ │ + 300 impl_(other.impl_) │ │ │ │ │ + 301 { │ │ │ │ │ + 302 updateMembers(); │ │ │ │ │ + 303 } │ │ │ │ │ + 304 │ │ │ │ │ +308 LocalFiniteElementVariant(LocalFiniteElementVariant&& other) : │ │ │ │ │ + 309 impl_(std::move(other.impl_)) │ │ │ │ │ + 310 { │ │ │ │ │ + 311 updateMembers(); │ │ │ │ │ + 312 } │ │ │ │ │ + 313 │ │ │ │ │ +317 LocalFiniteElementVariant& operator=(const LocalFiniteElementVariant& │ │ │ │ │ +other) │ │ │ │ │ + 318 { │ │ │ │ │ + 319 impl_ = other.impl_; │ │ │ │ │ + 320 updateMembers(); │ │ │ │ │ + 321 return *this; │ │ │ │ │ + 322 } │ │ │ │ │ + 323 │ │ │ │ │ +327 LocalFiniteElementVariant& operator=(LocalFiniteElementVariant&& other) │ │ │ │ │ + 328 { │ │ │ │ │ + 329 impl_ = std::move(other.impl_); │ │ │ │ │ + 330 updateMembers(); │ │ │ │ │ + 331 return *this; │ │ │ │ │ + 332 } │ │ │ │ │ + 333 │ │ │ │ │ + 337 template, Implementations>...>::value, int> = 0> │ │ │ │ │ +339 LocalFiniteElementVariant& operator=(Implementation&& impl) │ │ │ │ │ + 340 { │ │ │ │ │ + 341 impl_ = std::forward(impl); │ │ │ │ │ + 342 updateMembers(); │ │ │ │ │ + 343 return *this; │ │ │ │ │ + 344 } │ │ │ │ │ + 345 │ │ │ │ │ + 346 │ │ │ │ │ +350 const typename Traits::LocalBasisType& localBasis() const │ │ │ │ │ + 351 { │ │ │ │ │ + 352 return localBasis_; │ │ │ │ │ + 353 } │ │ │ │ │ + 354 │ │ │ │ │ +358 const typename Traits::LocalCoefficientsType& localCoefficients() const │ │ │ │ │ + 359 { │ │ │ │ │ + 360 return localCoefficients_; │ │ │ │ │ + 361 } │ │ │ │ │ + 362 │ │ │ │ │ +366 const typename Traits::LocalInterpolationType& localInterpolation() const │ │ │ │ │ + 367 { │ │ │ │ │ + 368 return localInterpolation_; │ │ │ │ │ + 369 } │ │ │ │ │ + 370 │ │ │ │ │ +374 unsigned int size() const │ │ │ │ │ + 375 { │ │ │ │ │ + 376 return size_; │ │ │ │ │ + 377 } │ │ │ │ │ + 378 │ │ │ │ │ +382 constexpr GeometryType type() const │ │ │ │ │ + 383 { │ │ │ │ │ + 384 return geometryType_; │ │ │ │ │ + 385 } │ │ │ │ │ + 386 │ │ │ │ │ +398 const auto& variant() const │ │ │ │ │ + 399 { │ │ │ │ │ + 400 return impl_; │ │ │ │ │ + 401 } │ │ │ │ │ + 402 │ │ │ │ │ +408 operator bool () const │ │ │ │ │ + 409 { │ │ │ │ │ + 410 return not(std::holds_alternative(variant())); │ │ │ │ │ + 411 } │ │ │ │ │ + 412 │ │ │ │ │ + 413 private: │ │ │ │ │ + 414 std::variant impl_; │ │ │ │ │ + 415 std::size_t size_; │ │ │ │ │ + 416 GeometryType geometryType_; │ │ │ │ │ + 417 LocalBasis localBasis_; │ │ │ │ │ + 418 LocalCoefficients localCoefficients_; │ │ │ │ │ + 419 LocalInterpolation localInterpolation_; │ │ │ │ │ + 420 }; │ │ │ │ │ + 421 │ │ │ │ │ + 422} // end namespace Dune │ │ │ │ │ + 423 │ │ │ │ │ + 424#endif // DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANT_HH │ │ │ │ │ +localkey.hh │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -Definition lagrangesimplex.hh:838 │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementVariant │ │ │ │ │ +Type erasure class for wrapping LocalFiniteElement classes. │ │ │ │ │ +Definition localfiniteelementvariant.hh:236 │ │ │ │ │ +Dune::LocalFiniteElementVariant::Traits │ │ │ │ │ +typename Dune::LocalFiniteElementTraits< LocalBasis, LocalCoefficients, │ │ │ │ │ +LocalInterpolation > Traits │ │ │ │ │ +Export LocalFiniteElementTraits. │ │ │ │ │ +Definition localfiniteelementvariant.hh:269 │ │ │ │ │ +Dune::LocalFiniteElementVariant::variant │ │ │ │ │ +const auto & variant() const │ │ │ │ │ +Provide access to underlying std::variant. │ │ │ │ │ +Definition localfiniteelementvariant.hh:398 │ │ │ │ │ +Dune::LocalFiniteElementVariant::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions. │ │ │ │ │ +Definition localfiniteelementvariant.hh:374 │ │ │ │ │ +Dune::LocalFiniteElementVariant::type │ │ │ │ │ +constexpr GeometryType type() const │ │ │ │ │ +Number of shape functions. │ │ │ │ │ +Definition localfiniteelementvariant.hh:382 │ │ │ │ │ +Dune::LocalFiniteElementVariant::LocalFiniteElementVariant │ │ │ │ │ +LocalFiniteElementVariant(LocalFiniteElementVariant &&other) │ │ │ │ │ +Move constructor. │ │ │ │ │ +Definition localfiniteelementvariant.hh:308 │ │ │ │ │ +Dune::LocalFiniteElementVariant::operator= │ │ │ │ │ +LocalFiniteElementVariant & operator=(Implementation &&impl) │ │ │ │ │ +Assignment from implementation. │ │ │ │ │ +Definition localfiniteelementvariant.hh:339 │ │ │ │ │ +Dune::LocalFiniteElementVariant::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Provide access to LocalBasis implementation of this LocalFiniteElement. │ │ │ │ │ +Definition localfiniteelementvariant.hh:350 │ │ │ │ │ +Dune::LocalFiniteElementVariant::operator= │ │ │ │ │ +LocalFiniteElementVariant & operator=(const LocalFiniteElementVariant &other) │ │ │ │ │ +Copy assignment. │ │ │ │ │ +Definition localfiniteelementvariant.hh:317 │ │ │ │ │ +Dune::LocalFiniteElementVariant::LocalFiniteElementVariant │ │ │ │ │ +LocalFiniteElementVariant(const std::monostate &monostate) │ │ │ │ │ +Construct empty LocalFiniteElementVariant. │ │ │ │ │ +Definition localfiniteelementvariant.hh:279 │ │ │ │ │ +Dune::LocalFiniteElementVariant::LocalFiniteElementVariant │ │ │ │ │ +LocalFiniteElementVariant(const LocalFiniteElementVariant &other) │ │ │ │ │ +Copy constructor. │ │ │ │ │ +Definition localfiniteelementvariant.hh:299 │ │ │ │ │ +Dune::LocalFiniteElementVariant::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Provide access to LocalCoefficients implementation of this LocalFiniteElement. │ │ │ │ │ +Definition localfiniteelementvariant.hh:358 │ │ │ │ │ +Dune::LocalFiniteElementVariant::LocalFiniteElementVariant │ │ │ │ │ +LocalFiniteElementVariant(Implementation &&impl) │ │ │ │ │ +Construct LocalFiniteElementVariant. │ │ │ │ │ +Definition localfiniteelementvariant.hh:290 │ │ │ │ │ +Dune::LocalFiniteElementVariant::operator= │ │ │ │ │ +LocalFiniteElementVariant & operator=(LocalFiniteElementVariant &&other) │ │ │ │ │ +Move assignment. │ │ │ │ │ +Definition localfiniteelementvariant.hh:327 │ │ │ │ │ +Dune::LocalFiniteElementVariant::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Provide access to LocalInterpolation implementation of this LocalFiniteElement. │ │ │ │ │ +Definition localfiniteelementvariant.hh:366 │ │ │ │ │ +Dune::LocalFiniteElementVariant::LocalFiniteElementVariant │ │ │ │ │ +LocalFiniteElementVariant()=default │ │ │ │ │ +Construct empty LocalFiniteElementVariant. │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00080.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0.hh File Reference │ │ │ │ +dune-localfunctions: localfiniteelementvariantcache.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
p0.hh File Reference
│ │ │ │ +
localfiniteelementvariantcache.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 <vector>
│ │ │ │ +#include <tuple>
│ │ │ │ +#include <utility>
│ │ │ │ +#include <type_traits>
│ │ │ │ +#include <dune/common/std/type_traits.hh>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/typelist.hh>
│ │ │ │ +#include <dune/common/hybridutilities.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/geometry/typeindex.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementvariant.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::LocalFiniteElementVariantCache< Base >
 A cache storing a compile time selection of local finite element implementations. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,33 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ + * common │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -p0.hh File Reference │ │ │ │ │ +localfiniteelementvariantcache.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include "p0/p0localbasis.hh" │ │ │ │ │ -#include "p0/p0localcoefficients.hh" │ │ │ │ │ -#include "p0/p0localinterpolation.hh" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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::LocalFiniteElementVariantCache<_Base_> │ │ │ │ │ +  A cache storing a compile time selection of local finite element │ │ │ │ │ + implementations. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00080_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0.hh Source File │ │ │ │ +dune-localfunctions: localfiniteelementvariantcache.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,118 +70,138 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
p0.hh
│ │ │ │ +
localfiniteelementvariantcache.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_COMMON_LOCALFINITEELEMENTVARIANTCACHE_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANTCACHE_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11#include "p0/p0localbasis.hh"
│ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9#include <tuple>
│ │ │ │ +
10#include <utility>
│ │ │ │ +
11#include <type_traits>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/common/std/type_traits.hh>
│ │ │ │ +
14#include <dune/common/exceptions.hh>
│ │ │ │ +
15#include <dune/common/typelist.hh>
│ │ │ │ +
16#include <dune/common/hybridutilities.hh>
│ │ │ │
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;
│ │ │ │ +
18#include <dune/geometry/type.hh>
│ │ │ │ +
19#include <dune/geometry/typeindex.hh>
│ │ │ │ +
20
│ │ │ │ + │ │ │ │ +
22
│ │ │ │ +
23
│ │ │ │ +
24namespace Dune {
│ │ │ │ +
25
│ │ │ │ +
26namespace Impl {
│ │ │ │ +
27
│ │ │ │ +
28 // This class provides the index method of LocalGeometryTypeIndex
│ │ │ │ +
29 // but throws a Dune::RangeError if the dimension does not match.
│ │ │ │ +
30 // This can be helpful to catch errors in a LocalFiniteElementVariantCache
│ │ │ │ +
31 // instance based on dimension specific GeometryType indices.
│ │ │ │ +
32 template<std::size_t dim>
│ │ │ │ +
33 struct FixedDimLocalGeometryTypeIndex {
│ │ │ │ +
34 inline static std::size_t index(const GeometryType &gt)
│ │ │ │ +
35 {
│ │ │ │ +
36 if (gt.dim() != dim)
│ │ │ │ +
37 DUNE_THROW(Dune::RangeError, "Asking for dim=" << dim << " specific index of GeometryType with dimension " << gt.dim());
│ │ │ │ +
38 return LocalGeometryTypeIndex::index(gt);
│ │ │ │ +
39 }
│ │ │ │ +
40 };
│ │ │ │ +
41
│ │ │ │ +
42} // end namespace Impl
│ │ │ │ +
43
│ │ │ │ +
66template<class Base>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
68{
│ │ │ │ +
69
│ │ │ │ +
70 template<class LFEImplTuple>
│ │ │ │ +
71 struct GenerateLFEVariant;
│ │ │ │ +
72
│ │ │ │ +
73 template<class Index, class... LFEImpl>
│ │ │ │ +
74 struct GenerateLFEVariant<std::tuple<std::pair<Index, LFEImpl>...>>
│ │ │ │ +
75 {
│ │ │ │ +
76 using type = UniqueTypes_t<LocalFiniteElementVariant, decltype(std::declval<LFEImpl>()())...>;
│ │ │ │
77 };
│ │ │ │ -
│ │ │ │
78
│ │ │ │ -
79}
│ │ │ │ -
80
│ │ │ │ -
81#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
79 using Base::getImplementations;
│ │ │ │ +
80 using Base::index;
│ │ │ │ +
81 using Implementations = decltype(std::declval<Base>().getImplementations());
│ │ │ │ +
82
│ │ │ │ +
83public:
│ │ │ │ +
84
│ │ │ │ +
92 using FiniteElementType = typename GenerateLFEVariant<Implementations>::type;
│ │ │ │ +
93
│ │ │ │ +
98 template<class... Args>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
100 Base(std::forward<Args>(args)...)
│ │ │ │ +
101 {
│ │ │ │ +
102 Dune::Hybrid::forEach(getImplementations(), [&,this](auto feImpl) {
│ │ │ │ +
103 auto implIndex = feImpl.first;
│ │ │ │ +
104 if (cache_.size() < implIndex+1)
│ │ │ │ +
105 cache_.resize(implIndex+1);
│ │ │ │ +
106 cache_[implIndex] = feImpl.second();
│ │ │ │ +
107 });
│ │ │ │ +
108 }
│ │ │ │ +
│ │ │ │ +
109
│ │ │ │ + │ │ │ │ +
112
│ │ │ │ + │ │ │ │ +
115
│ │ │ │ +
120 template<class... Key>
│ │ │ │ +
│ │ │ │ +
121 const auto& get(const Key&... key) const
│ │ │ │ +
122 {
│ │ │ │ +
123 auto implIndex = index(key...);
│ │ │ │ +
124 if (implIndex >= cache_.size())
│ │ │ │ +
125 DUNE_THROW(Dune::RangeError,"There is no LocalFiniteElement of the requested type.");
│ │ │ │ +
126 if (not(cache_[implIndex]))
│ │ │ │ +
127 DUNE_THROW(Dune::RangeError,"There is no LocalFiniteElement of the requested type.");
│ │ │ │ +
128 return cache_[implIndex];
│ │ │ │ +
129 }
│ │ │ │ +
│ │ │ │ +
130
│ │ │ │ +
131private:
│ │ │ │ +
132 std::vector<FiniteElementType> cache_;
│ │ │ │ +
133};
│ │ │ │ +
│ │ │ │ +
134
│ │ │ │ +
135
│ │ │ │ +
136
│ │ │ │ +
137} // namespace Dune
│ │ │ │ +
138
│ │ │ │ +
139
│ │ │ │ +
140
│ │ │ │ +
141
│ │ │ │ +
142#endif // DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANT_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
│ │ │ │ +
A cache storing a compile time selection of local finite element implementations.
Definition localfiniteelementvariantcache.hh:68
│ │ │ │ +
LocalFiniteElementVariantCache(Args &&... args)
Default constructor.
Definition localfiniteelementvariantcache.hh:99
│ │ │ │ +
LocalFiniteElementVariantCache(LocalFiniteElementVariantCache &&other)=default
Move constructor.
│ │ │ │ +
const auto & get(const Key &... key) const
Get the LocalFiniteElement for the given key data.
Definition localfiniteelementvariantcache.hh:121
│ │ │ │ +
LocalFiniteElementVariantCache(const LocalFiniteElementVariantCache &other)=default
Copy constructor.
│ │ │ │ +
typename GenerateLFEVariant< Implementations >::type FiniteElementType
Type of exported LocalFiniteElement's.
Definition localfiniteelementvariantcache.hh:92
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,129 +7,151 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -p0.hh │ │ │ │ │ + * common │ │ │ │ │ +localfiniteelementvariantcache.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_COMMON_LOCALFINITEELEMENTVARIANTCACHE_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANTCACHE_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include "p0/p0localbasis.hh" │ │ │ │ │ - 12#include "p0/p0localcoefficients.hh" │ │ │ │ │ - 13#include "p0/p0localinterpolation.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ 17 │ │ │ │ │ - 23 template │ │ │ │ │ -24 class P0LocalFiniteElement │ │ │ │ │ - 25 { │ │ │ │ │ - 26 public: │ │ │ │ │ - 29 typedef LocalFiniteElementTraits, P0LocalCoefficients, │ │ │ │ │ -30 P0LocalInterpolation > > Traits; │ │ │ │ │ - 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 │ │ │ │ │ -47 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 48 { │ │ │ │ │ - 49 return coefficients; │ │ │ │ │ - 50 } │ │ │ │ │ - 51 │ │ │ │ │ -54 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 73 P0LocalBasis basis; │ │ │ │ │ - 74 P0LocalCoefficients coefficients; │ │ │ │ │ - 75 P0LocalInterpolation > interpolation; │ │ │ │ │ - 76 GeometryType gt; │ │ │ │ │ + 18#include │ │ │ │ │ + 19#include │ │ │ │ │ + 20 │ │ │ │ │ + 21#include │ │ │ │ │ + 22 │ │ │ │ │ + 23 │ │ │ │ │ + 24namespace Dune { │ │ │ │ │ + 25 │ │ │ │ │ + 26namespace Impl { │ │ │ │ │ + 27 │ │ │ │ │ + 28 // This class provides the index method of LocalGeometryTypeIndex │ │ │ │ │ + 29 // but throws a Dune::RangeError if the dimension does not match. │ │ │ │ │ + 30 // This can be helpful to catch errors in a LocalFiniteElementVariantCache │ │ │ │ │ + 31 // instance based on dimension specific GeometryType indices. │ │ │ │ │ + 32 template │ │ │ │ │ + 33 struct FixedDimLocalGeometryTypeIndex { │ │ │ │ │ + 34 inline static std::size_t index(const GeometryType >) │ │ │ │ │ + 35 { │ │ │ │ │ + 36 if (gt.dim() != dim) │ │ │ │ │ + 37 DUNE_THROW(Dune::RangeError, "Asking for dim=" << dim << " specific index │ │ │ │ │ +of GeometryType with dimension " << gt.dim()); │ │ │ │ │ + 38 return LocalGeometryTypeIndex::index(gt); │ │ │ │ │ + 39 } │ │ │ │ │ + 40 }; │ │ │ │ │ + 41 │ │ │ │ │ + 42} // end namespace Impl │ │ │ │ │ + 43 │ │ │ │ │ + 66template │ │ │ │ │ +67class LocalFiniteElementVariantCache : Base │ │ │ │ │ + 68{ │ │ │ │ │ + 69 │ │ │ │ │ + 70 template │ │ │ │ │ + 71 struct GenerateLFEVariant; │ │ │ │ │ + 72 │ │ │ │ │ + 73 template │ │ │ │ │ + 74 struct GenerateLFEVariant...>> │ │ │ │ │ + 75 { │ │ │ │ │ + 76 using type = UniqueTypes_t()())...>; │ │ │ │ │ 77 }; │ │ │ │ │ 78 │ │ │ │ │ - 79} │ │ │ │ │ - 80 │ │ │ │ │ - 81#endif │ │ │ │ │ -p0localcoefficients.hh │ │ │ │ │ -p0localinterpolation.hh │ │ │ │ │ -p0localbasis.hh │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ + 79 using Base::getImplementations; │ │ │ │ │ + 80 using Base::index; │ │ │ │ │ + 81 using Implementations = decltype(std::declval().getImplementations │ │ │ │ │ +()); │ │ │ │ │ + 82 │ │ │ │ │ + 83public: │ │ │ │ │ + 84 │ │ │ │ │ +92 using FiniteElementType = typename GenerateLFEVariant:: │ │ │ │ │ +type; │ │ │ │ │ + 93 │ │ │ │ │ + 98 template │ │ │ │ │ +99 LocalFiniteElementVariantCache(Args&&... args) : │ │ │ │ │ + 100 Base(std::forward(args)...) │ │ │ │ │ + 101 { │ │ │ │ │ + 102 Dune::Hybrid::forEach(getImplementations(), [&,this](auto feImpl) { │ │ │ │ │ + 103 auto implIndex = feImpl.first; │ │ │ │ │ + 104 if (cache_.size() < implIndex+1) │ │ │ │ │ + 105 cache_.resize(implIndex+1); │ │ │ │ │ + 106 cache_[implIndex] = feImpl.second(); │ │ │ │ │ + 107 }); │ │ │ │ │ + 108 } │ │ │ │ │ + 109 │ │ │ │ │ +111 LocalFiniteElementVariantCache(const LocalFiniteElementVariantCache& other) │ │ │ │ │ += default; │ │ │ │ │ + 112 │ │ │ │ │ +114 LocalFiniteElementVariantCache(LocalFiniteElementVariantCache&& other) = │ │ │ │ │ +default; │ │ │ │ │ + 115 │ │ │ │ │ + 120 template │ │ │ │ │ +121 const auto& get(const Key&... key) const │ │ │ │ │ + 122 { │ │ │ │ │ + 123 auto implIndex = index(key...); │ │ │ │ │ + 124 if (implIndex >= cache_.size()) │ │ │ │ │ + 125 DUNE_THROW(Dune::RangeError,"There is no LocalFiniteElement of the │ │ │ │ │ +requested type."); │ │ │ │ │ + 126 if (not(cache_[implIndex])) │ │ │ │ │ + 127 DUNE_THROW(Dune::RangeError,"There is no LocalFiniteElement of the │ │ │ │ │ +requested type."); │ │ │ │ │ + 128 return cache_[implIndex]; │ │ │ │ │ + 129 } │ │ │ │ │ + 130 │ │ │ │ │ + 131private: │ │ │ │ │ + 132 std::vector cache_; │ │ │ │ │ + 133}; │ │ │ │ │ + 134 │ │ │ │ │ + 135 │ │ │ │ │ + 136 │ │ │ │ │ + 137} // namespace Dune │ │ │ │ │ + 138 │ │ │ │ │ + 139 │ │ │ │ │ + 140 │ │ │ │ │ + 141 │ │ │ │ │ + 142#endif // DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANT_HH │ │ │ │ │ +localfiniteelementvariant.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::P0LocalFiniteElement │ │ │ │ │ -The local p0 finite element on all types of reference elements. │ │ │ │ │ -Definition p0.hh:25 │ │ │ │ │ -Dune::P0LocalFiniteElement::P0LocalFiniteElement │ │ │ │ │ -P0LocalFiniteElement(const GeometryType &type) │ │ │ │ │ -Definition p0.hh:34 │ │ │ │ │ -Dune::P0LocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -The number of shape functions – here: 1. │ │ │ │ │ -Definition p0.hh:60 │ │ │ │ │ -Dune::P0LocalFiniteElement::type │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -Definition p0.hh:67 │ │ │ │ │ -Dune::P0LocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition p0.hh:40 │ │ │ │ │ -Dune::P0LocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< P0LocalBasis< D, R, d >, P0LocalCoefficients, │ │ │ │ │ -P0LocalInterpolation< P0LocalBasis< D, R, d > > > Traits │ │ │ │ │ -Definition p0.hh:30 │ │ │ │ │ -Dune::P0LocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition p0.hh:47 │ │ │ │ │ -Dune::P0LocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition p0.hh:54 │ │ │ │ │ -Dune::P0LocalBasis │ │ │ │ │ -Constant shape function. │ │ │ │ │ -Definition p0localbasis.hh:30 │ │ │ │ │ -Dune::P0LocalCoefficients │ │ │ │ │ -Layout map for P0 elements. │ │ │ │ │ -Definition p0localcoefficients.hh:24 │ │ │ │ │ -Dune::P0LocalInterpolation │ │ │ │ │ -Definition p0localinterpolation.hh:18 │ │ │ │ │ +Dune::LocalFiniteElementVariantCache │ │ │ │ │ +A cache storing a compile time selection of local finite element │ │ │ │ │ +implementations. │ │ │ │ │ +Definition localfiniteelementvariantcache.hh:68 │ │ │ │ │ +Dune::LocalFiniteElementVariantCache::LocalFiniteElementVariantCache │ │ │ │ │ +LocalFiniteElementVariantCache(Args &&... args) │ │ │ │ │ +Default constructor. │ │ │ │ │ +Definition localfiniteelementvariantcache.hh:99 │ │ │ │ │ +Dune::LocalFiniteElementVariantCache::LocalFiniteElementVariantCache │ │ │ │ │ +LocalFiniteElementVariantCache(LocalFiniteElementVariantCache &&other)=default │ │ │ │ │ +Move constructor. │ │ │ │ │ +Dune::LocalFiniteElementVariantCache::get │ │ │ │ │ +const auto & get(const Key &... key) const │ │ │ │ │ +Get the LocalFiniteElement for the given key data. │ │ │ │ │ +Definition localfiniteelementvariantcache.hh:121 │ │ │ │ │ +Dune::LocalFiniteElementVariantCache::LocalFiniteElementVariantCache │ │ │ │ │ +LocalFiniteElementVariantCache(const LocalFiniteElementVariantCache │ │ │ │ │ +&other)=default │ │ │ │ │ +Copy constructor. │ │ │ │ │ +Dune::LocalFiniteElementVariantCache::FiniteElementType │ │ │ │ │ +typename GenerateLFEVariant< Implementations >::type FiniteElementType │ │ │ │ │ +Type of exported LocalFiniteElement's. │ │ │ │ │ +Definition localfiniteelementvariantcache.hh:92 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00083.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: equidistantpoints.hh File Reference │ │ │ │ +dune-localfunctions: virtualinterface.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,57 +65,63 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
equidistantpoints.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
virtualinterface.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <algorithm>
│ │ │ │ +
#include <type_traits>
│ │ │ │ +#include <array>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <functional>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/emptypoints.hh>
│ │ │ │ -#include <dune/localfunctions/utility/field.hh>
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::EquidistantPointSet< F, dim >
class  Dune::LocalFiniteElementFunctionBase< FE >
 Return a proper base class for functions to use with LocalInterpolation. More...
 
struct  Dune::LocalFiniteElementFunctionBase< FE >::FunctionBaseDummy::Traits
 
class  Dune::LocalBasisVirtualInterface< T >
 virtual base class for a local basis More...
 
class  Dune::LocalInterpolationVirtualInterfaceBase< DomainType, RangeType >
 virtual base class for a local interpolation More...
 
class  Dune::LocalInterpolationVirtualInterface< DomainType, RangeType >
 virtual base class for a local interpolation More...
 
class  Dune::LocalCoefficientsVirtualInterface
 virtual base class for local coefficients More...
 
class  Dune::LocalFiniteElementVirtualInterface< T >
 virtual base class for local finite elements with functions 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 {} │ │ │ │ │ @@ -6,44 +6,48 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -Classes | Namespaces | Functions │ │ │ │ │ -equidistantpoints.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * common │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +virtualinterface.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::EquidistantPointSet<_F,_dim_> │ │ │ │ │ + class  Dune::LocalFiniteElementFunctionBase<_FE_> │ │ │ │ │ +  Return a proper base class for functions to use with │ │ │ │ │ + LocalInterpolation. More... │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::LocalFiniteElementFunctionBase<_FE_>::FunctionBaseDummy::Traits │ │ │ │ │ +  │ │ │ │ │ + class  Dune::LocalBasisVirtualInterface<_T_> │ │ │ │ │ +  virtual base class for a local basis More... │ │ │ │ │ +  │ │ │ │ │ + class  Dune::LocalInterpolationVirtualInterfaceBase<_DomainType,_RangeType_> │ │ │ │ │ +  virtual base class for a local interpolation More... │ │ │ │ │ +  │ │ │ │ │ + class  Dune::LocalInterpolationVirtualInterface<_DomainType,_RangeType_> │ │ │ │ │ +  virtual base class for a local interpolation More... │ │ │ │ │ +  │ │ │ │ │ + class  Dune::LocalCoefficientsVirtualInterface │ │ │ │ │ +  virtual base class for local coefficients More... │ │ │ │ │ +  │ │ │ │ │ + class  Dune::LocalFiniteElementVirtualInterface<_T_> │ │ │ │ │ +  virtual base class for local finite elements with functions More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Functions │ │ │ │ │ - std::size_t Dune::numLagrangePoints (const GeometryType >, std:: │ │ │ │ │ - size_t order) │ │ │ │ │ -  │ │ │ │ │ - std::size_t Dune::numLagrangePoints (unsigned int topologyId, unsigned │ │ │ │ │ - int dim, std::size_t order) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -static unsigned int Dune::equidistantLagrangePoints (const GeometryType >, │ │ │ │ │ - unsigned int codim, std::size_t order, unsigned int │ │ │ │ │ - *count, LagrangePoint< ct, cdim > *points) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -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) │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00083_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: equidistantpoints.hh Source File │ │ │ │ +dune-localfunctions: virtualinterface.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,276 +70,300 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
equidistantpoints.hh
│ │ │ │ +
virtualinterface.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_COMMON_VIRTUALINTERFACE_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_COMMON_VIRTUALINTERFACE_HH
│ │ │ │
7
│ │ │ │ -
8#include <algorithm>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
12#include <dune/geometry/type.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ - │ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ +
8#include <type_traits>
│ │ │ │ +
9#include <array>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11#include <functional>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/geometry/type.hh>
│ │ │ │ +
14
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
19
│ │ │ │ -
20 // numLagrangePoints
│ │ │ │ -
21 // -----------------
│ │ │ │ +
20namespace Dune
│ │ │ │ +
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
│ │ │ │ +
23 // forward declaration needed by the helper traits
│ │ │ │ +
24 template<class DomainType, class RangeType>
│ │ │ │ +
25 class LocalInterpolationVirtualInterface;
│ │ │ │ +
26
│ │ │ │ +
27 // -----------------------------------------------------------------
│ │ │ │ +
28 // Helper traits classes
│ │ │ │ +
29 // -----------------------------------------------------------------
│ │ │ │ +
30
│ │ │ │ +
43 template<class FE>
│ │ │ │ +
│ │ │ │ +
44 class
│ │ │ │ +
45 [[deprecated("Dune::LocalFiniteElementFunctionBase is deprecated after Dune 2.7. You can now pass functions providing operator() to interpolate.")]]
│ │ │ │ + │ │ │ │ +
47 {
│ │ │ │ +
48 typedef typename FE::Traits::LocalBasisType::Traits::DomainType Domain;
│ │ │ │ +
49 typedef typename FE::Traits::LocalBasisType::Traits::RangeType Range;
│ │ │ │
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) );
│ │ │ │ -
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 }
│ │ │ │ +
51 // Hack: Keep a copy of Dune::Function here. This allows to avoid depending
│ │ │ │ +
52 // on the deprecated dune-common header while still keeping the LocalFiniteElementFunctionBase
│ │ │ │ +
53 // mechanism working during its deprecation period.
│ │ │ │ +
54 class FunctionBaseDummy
│ │ │ │ +
55 {
│ │ │ │ +
56 public:
│ │ │ │ +
57
│ │ │ │ +
58 using RangeType = Range;
│ │ │ │ +
59 using DomainType = Domain;
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ +
61 struct Traits
│ │ │ │ +
62 {
│ │ │ │ +
63 using RangeType = Range;
│ │ │ │ +
64 using DomainType = Domain;
│ │ │ │ +
65 };
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
67 void evaluate(const DomainType& x, RangeType& y) const;
│ │ │ │ +
68 };
│ │ │ │ +
69
│ │ │ │ +
70 public:
│ │ │ │ +
71
│ │ │ │ +
72 using VirtualFunctionBase = FunctionBaseDummy;
│ │ │ │ +
73 using FunctionBase = FunctionBaseDummy;
│ │ │ │ +
74
│ │ │ │ +
80 using type = FunctionBaseDummy;
│ │ │ │ +
81 };
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
85 // -----------------------------------------------------------------
│ │ │ │ +
86 // Basis
│ │ │ │ +
87 // -----------------------------------------------------------------
│ │ │ │ +
88
│ │ │ │ +
95 template<class T>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
97 {
│ │ │ │ +
98 public:
│ │ │ │ +
99 using Traits = T;
│ │ │ │
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() );
│ │ │ │ +
101
│ │ │ │ + │ │ │ │ +
103
│ │ │ │ +
105 virtual unsigned int size () const = 0;
│ │ │ │ +
106
│ │ │ │ +
108 virtual unsigned int order () const = 0;
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ +
115 virtual void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
116 std::vector<typename Traits::RangeType>& out) const = 0;
│ │ │ │ +
117
│ │ │ │ +
126 virtual void evaluateJacobian(const typename Traits::DomainType& in, // position
│ │ │ │ +
127 std::vector<typename Traits::JacobianType>& out) const = 0;
│ │ │ │ +
128
│ │ │ │ +
134 virtual void partial(const std::array<unsigned int,Traits::dimDomain>& order,
│ │ │ │ +
135 const typename Traits::DomainType& in,
│ │ │ │ +
136 std::vector<typename Traits::RangeType>& out) const = 0;
│ │ │ │ +
137 };
│ │ │ │ +
│ │ │ │ +
138
│ │ │ │ +
139
│ │ │ │ +
140
│ │ │ │ +
141 // -----------------------------------------------------------------
│ │ │ │ +
142 // Interpolation
│ │ │ │ +
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 >
│ │ │ │ +
157 template<class DomainType, class RangeType>
│ │ │ │
│ │ │ │ - │ │ │ │ -
159 : public EmptyPointSet< F, dim >
│ │ │ │ -
160 {
│ │ │ │ - │ │ │ │ -
162
│ │ │ │ -
163 public:
│ │ │ │ -
164 static const unsigned int dimension = dim;
│ │ │ │ -
165
│ │ │ │ -
166 using Base::order;
│ │ │ │ + │ │ │ │ +
159 {
│ │ │ │ +
160 public:
│ │ │ │ +
161
│ │ │ │ +
163 using FunctionType = std::function<RangeType(DomainType)>;
│ │ │ │ +
164
│ │ │ │ +
166 typedef typename RangeType::field_type CoefficientType;
│ │ │ │
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 }
│ │ │ │ +
177 virtual void interpolate (const FunctionType& f, std::vector<CoefficientType>& out) const = 0;
│ │ │ │ +
178 };
│ │ │ │
│ │ │ │ +
179
│ │ │ │ +
187 template<class DomainType, class RangeType>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
189 : public LocalInterpolationVirtualInterfaceBase<DomainType, RangeType>
│ │ │ │ +
190 {
│ │ │ │ +
191 public:
│ │ │ │ +
192
│ │ │ │ +
194 using FunctionType = std::function<RangeType(DomainType)>;
│ │ │ │
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
│ │ │ │ +
197 typedef typename RangeType::field_type CoefficientType;
│ │ │ │ +
198
│ │ │ │ +
199
│ │ │ │ + │ │ │ │ +
201
│ │ │ │ +
202 // This method is only noted again for to make the documentation complete.
│ │ │ │ +
203
│ │ │ │ +
211 virtual void interpolate (const FunctionType& f, std::vector<CoefficientType>& out) const = 0;
│ │ │ │
212
│ │ │ │ -
213#endif // #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
218 template<class F,
│ │ │ │ +
219 std::enable_if_t<not std::is_base_of<FunctionType, F>::value, int> = 0>
│ │ │ │ +
│ │ │ │ +
220 void interpolate (const F& ff, std::vector<CoefficientType>& out) const
│ │ │ │ +
221 {
│ │ │ │ +
222 const auto& f = Impl::makeFunctionWithCallOperator<DomainType>(ff);
│ │ │ │ +
223
│ │ │ │ + │ │ │ │ +
225 asBase.interpolate(FunctionType(std::cref(f)),out);
│ │ │ │ +
226 }
│ │ │ │ +
│ │ │ │ +
227
│ │ │ │ +
233 template<class F, class C>
│ │ │ │ +
│ │ │ │ +
234 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
235 {
│ │ │ │ +
236 const auto& f = Impl::makeFunctionWithCallOperator<DomainType>(ff);
│ │ │ │ +
237
│ │ │ │ +
238 std::vector<CoefficientType> outDummy;
│ │ │ │ + │ │ │ │ +
240 asBase.interpolate(FunctionType(std::cref(f)),outDummy);
│ │ │ │ +
241 out.resize(outDummy.size());
│ │ │ │ +
242 for(typename std::vector<CoefficientType>::size_type i=0; i<outDummy.size(); ++i)
│ │ │ │ +
243 out[i] = outDummy[i];
│ │ │ │ +
244 }
│ │ │ │ +
│ │ │ │ +
245 };
│ │ │ │ +
│ │ │ │ +
246
│ │ │ │ +
247
│ │ │ │ +
248
│ │ │ │ +
249 // -----------------------------------------------------------------
│ │ │ │ +
250 // Coefficients
│ │ │ │ +
251 // -----------------------------------------------------------------
│ │ │ │ +
252
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
259 {
│ │ │ │ +
260 public:
│ │ │ │ +
261
│ │ │ │ + │ │ │ │ +
263
│ │ │ │ +
265 virtual std::size_t size () const = 0;
│ │ │ │ +
266
│ │ │ │ +
268 const virtual LocalKey& localKey (std::size_t i) const = 0;
│ │ │ │ +
269
│ │ │ │ +
270 };
│ │ │ │ +
│ │ │ │ +
271
│ │ │ │ +
272
│ │ │ │ +
273
│ │ │ │ +
274 // -----------------------------------------------------------------
│ │ │ │ +
275 // Finite Element
│ │ │ │ +
276 // -----------------------------------------------------------------
│ │ │ │ +
277
│ │ │ │ +
278
│ │ │ │ +
284 template<class T>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
286 {
│ │ │ │ +
287 using LocalBasisTraits = T;
│ │ │ │ +
288 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
295
│ │ │ │ + │ │ │ │ +
297
│ │ │ │ +
299 virtual const typename Traits::LocalBasisType& localBasis () const = 0;
│ │ │ │ +
300
│ │ │ │ +
302 virtual const typename Traits::LocalCoefficientsType& localCoefficients () const = 0;
│ │ │ │ +
303
│ │ │ │ +
305 virtual const typename Traits::LocalInterpolationType& localInterpolation () const = 0;
│ │ │ │ +
306
│ │ │ │ +
308 virtual unsigned int size () const = 0;
│ │ │ │ +
309
│ │ │ │ +
311 virtual const GeometryType type () const = 0;
│ │ │ │ +
312
│ │ │ │ + │ │ │ │ +
314 };
│ │ │ │ +
│ │ │ │ +
315}
│ │ │ │ +
316#endif
│ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ +
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
│ │ │ │
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
│ │ │ │ +
virtual base class for a local interpolation
Definition virtualinterface.hh:190
│ │ │ │ +
virtual ~LocalInterpolationVirtualInterface()
Definition virtualinterface.hh:200
│ │ │ │ +
std::function< RangeType(DomainType)> FunctionType
type of function to interpolate
Definition virtualinterface.hh:194
│ │ │ │ +
RangeType::field_type CoefficientType
type of the coefficient vector in the interpolate method
Definition virtualinterface.hh:197
│ │ │ │ +
void interpolate(const F &ff, std::vector< CoefficientType > &out) const
determine coefficients interpolating a given function
Definition virtualinterface.hh:220
│ │ │ │ +
virtual void interpolate(const FunctionType &f, std::vector< CoefficientType > &out) const =0
determine coefficients interpolating a given function
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
determine coefficients interpolating a given function
Definition virtualinterface.hh:234
│ │ │ │ +
Return a proper base class for functions to use with LocalInterpolation.
Definition virtualinterface.hh:47
│ │ │ │ +
FunctionBaseDummy FunctionBase
Definition virtualinterface.hh:73
│ │ │ │ +
FunctionBaseDummy VirtualFunctionBase
Definition virtualinterface.hh:72
│ │ │ │ +
FunctionBaseDummy type
Base class type for functions to use with LocalInterpolation.
Definition virtualinterface.hh:80
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Domain DomainType
Definition virtualinterface.hh:64
│ │ │ │ +
virtual base class for a local basis
Definition virtualinterface.hh:97
│ │ │ │ +
virtual unsigned int order() const =0
Polynomial order of the shape functions.
│ │ │ │ +
virtual void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const =0
Evaluate jacobian of all shape functions at given position.
│ │ │ │ +
virtual unsigned int size() const =0
Number of shape functions.
│ │ │ │ +
T Traits
Definition virtualinterface.hh:99
│ │ │ │ +
virtual void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const =0
Evaluate all basis function at given position.
│ │ │ │ +
virtual ~LocalBasisVirtualInterface()
Definition virtualinterface.hh:102
│ │ │ │ +
virtual void partial(const std::array< unsigned int, Traits::dimDomain > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const =0
Evaluate partial derivatives of any order of all shape functions.
│ │ │ │ +
virtual base class for a local interpolation
Definition virtualinterface.hh:159
│ │ │ │ +
std::function< RangeType(DomainType)> FunctionType
type of function to interpolate
Definition virtualinterface.hh:163
│ │ │ │ +
RangeType::field_type CoefficientType
type of the coefficient vector in the interpolate method
Definition virtualinterface.hh:166
│ │ │ │ +
virtual ~LocalInterpolationVirtualInterfaceBase()
Definition virtualinterface.hh:168
│ │ │ │ +
virtual void interpolate(const FunctionType &f, std::vector< CoefficientType > &out) const =0
determine coefficients interpolating a given function
│ │ │ │ +
virtual base class for local coefficients
Definition virtualinterface.hh:259
│ │ │ │ +
virtual ~LocalCoefficientsVirtualInterface()
Definition virtualinterface.hh:262
│ │ │ │ +
virtual std::size_t size() const =0
number of coefficients
│ │ │ │ +
virtual const LocalKey & localKey(std::size_t i) const =0
get i'th index
│ │ │ │ +
virtual base class for local finite elements with functions
Definition virtualinterface.hh:286
│ │ │ │ +
virtual LocalFiniteElementVirtualInterface< T > * clone() const =0
│ │ │ │ +
virtual const Traits::LocalInterpolationType & localInterpolation() const =0
│ │ │ │ +
virtual unsigned int size() const =0
│ │ │ │ +
virtual const Traits::LocalBasisType & localBasis() const =0
│ │ │ │ +
virtual const GeometryType type() const =0
│ │ │ │ +
LocalFiniteElementTraits< LocalBasisVirtualInterface< LocalBasisTraits >, LocalCoefficientsVirtualInterface, LocalInterpolationVirtualInterface< typename LocalBasisTraits::DomainType, typename LocalBasisTraits::RangeType > > Traits
Definition virtualinterface.hh:294
│ │ │ │ +
virtual ~LocalFiniteElementVirtualInterface()
Definition virtualinterface.hh:296
│ │ │ │ +
virtual const Traits::LocalCoefficientsType & localCoefficients() const =0
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,315 +7,392 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -equidistantpoints.hh │ │ │ │ │ + * common │ │ │ │ │ +virtualinterface.hh │ │ │ │ │ Go_to_the_documentation_of_this_file. │ │ │ │ │ - 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_COMMON_VIRTUALINTERFACE_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_COMMON_VIRTUALINTERFACE_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16 │ │ │ │ │ - 17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ + 17#include │ │ │ │ │ + 18#include │ │ │ │ │ 19 │ │ │ │ │ - 20 // numLagrangePoints │ │ │ │ │ - 21 // ----------------- │ │ │ │ │ + 20namespace Dune │ │ │ │ │ + 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 │ │ │ │ │ + 23 // forward declaration needed by the helper traits │ │ │ │ │ + 24 template │ │ │ │ │ + 25 class LocalInterpolationVirtualInterface; │ │ │ │ │ + 26 │ │ │ │ │ + 27 // ----------------------------------------------------------------- │ │ │ │ │ + 28 // Helper traits classes │ │ │ │ │ + 29 // ----------------------------------------------------------------- │ │ │ │ │ + 30 │ │ │ │ │ + 43 template │ │ │ │ │ +44 class │ │ │ │ │ + 45 [[deprecated("Dune::LocalFiniteElementFunctionBase is deprecated after Dune │ │ │ │ │ +2.7. You can now pass functions providing operator() to interpolate.")]] │ │ │ │ │ + 46 LocalFiniteElementFunctionBase │ │ │ │ │ + 47 { │ │ │ │ │ + 48 typedef typename FE::Traits::LocalBasisType::Traits::DomainType Domain; │ │ │ │ │ + 49 typedef typename FE::Traits::LocalBasisType::Traits::RangeType Range; │ │ │ │ │ 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) ); │ │ │ │ │ - 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 } │ │ │ │ │ + 51 // Hack: Keep a copy of Dune::Function here. This allows to avoid depending │ │ │ │ │ + 52 // on the deprecated dune-common header while still keeping the │ │ │ │ │ +LocalFiniteElementFunctionBase │ │ │ │ │ + 53 // mechanism working during its deprecation period. │ │ │ │ │ + 54 class FunctionBaseDummy │ │ │ │ │ + 55 { │ │ │ │ │ + 56 public: │ │ │ │ │ + 57 │ │ │ │ │ + 58 using RangeType = Range; │ │ │ │ │ + 59 using DomainType = Domain; │ │ │ │ │ + 60 │ │ │ │ │ +61 struct Traits │ │ │ │ │ + 62 { │ │ │ │ │ +63 using RangeType = Range; │ │ │ │ │ +64 using DomainType = Domain; │ │ │ │ │ + 65 }; │ │ │ │ │ + 66 │ │ │ │ │ + 67 void evaluate(const DomainType& x, RangeType& y) const; │ │ │ │ │ + 68 }; │ │ │ │ │ + 69 │ │ │ │ │ + 70 public: │ │ │ │ │ + 71 │ │ │ │ │ +72 using VirtualFunctionBase = FunctionBaseDummy; │ │ │ │ │ +73 using FunctionBase = FunctionBaseDummy; │ │ │ │ │ + 74 │ │ │ │ │ +80 using type = FunctionBaseDummy; │ │ │ │ │ + 81 }; │ │ │ │ │ + 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 } │ │ │ │ │ + 85 // ----------------------------------------------------------------- │ │ │ │ │ + 86 // Basis │ │ │ │ │ + 87 // ----------------------------------------------------------------- │ │ │ │ │ + 88 │ │ │ │ │ + 95 template │ │ │ │ │ +96 class LocalBasisVirtualInterface │ │ │ │ │ + 97 { │ │ │ │ │ + 98 public: │ │ │ │ │ +99 using Traits = T; │ │ │ │ │ 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() ); │ │ │ │ │ + 101 │ │ │ │ │ +102 virtual ~LocalBasisVirtualInterface() {} │ │ │ │ │ + 103 │ │ │ │ │ +105 virtual unsigned int size () const = 0; │ │ │ │ │ + 106 │ │ │ │ │ +108 virtual unsigned int order () const = 0; │ │ │ │ │ 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 } │ │ │ │ │ +115 virtual void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ + 116 std::vector& out) const = 0; │ │ │ │ │ + 117 │ │ │ │ │ +126 virtual void evaluateJacobian(const typename Traits::DomainType& in, / │ │ │ │ │ +/ position │ │ │ │ │ + 127 std::vector& out) const = 0; │ │ │ │ │ + 128 │ │ │ │ │ +134 virtual void partial(const std::array& │ │ │ │ │ +order, │ │ │ │ │ + 135 const typename Traits::DomainType& in, │ │ │ │ │ + 136 std::vector& out) const = 0; │ │ │ │ │ + 137 }; │ │ │ │ │ + 138 │ │ │ │ │ + 139 │ │ │ │ │ + 140 │ │ │ │ │ + 141 // ----------------------------------------------------------------- │ │ │ │ │ + 142 // Interpolation │ │ │ │ │ + 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 > │ │ │ │ │ -158 class EquidistantPointSet │ │ │ │ │ - 159 : public EmptyPointSet< F, dim > │ │ │ │ │ - 160 { │ │ │ │ │ - 161 typedef EmptyPointSet<_F,_dim_> Base; │ │ │ │ │ - 162 │ │ │ │ │ - 163 public: │ │ │ │ │ -164 static const unsigned int dimension = dim; │ │ │ │ │ - 165 │ │ │ │ │ - 166 using Base::order; │ │ │ │ │ + 157 template │ │ │ │ │ +158 class LocalInterpolationVirtualInterfaceBase │ │ │ │ │ + 159 { │ │ │ │ │ + 160 public: │ │ │ │ │ + 161 │ │ │ │ │ +163 using FunctionType = std::function; │ │ │ │ │ + 164 │ │ │ │ │ +166 typedef typename RangeType::field_type CoefficientType; │ │ │ │ │ 167 │ │ │ │ │ -168 EquidistantPointSet ( std::size_t order ) : Base( order ) {} │ │ │ │ │ +168 virtual ~LocalInterpolationVirtualInterfaceBase() {} │ │ │ │ │ 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(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 } │ │ │ │ │ +177 virtual void interpolate (const FunctionType& f, std:: │ │ │ │ │ +vector& out) const = 0; │ │ │ │ │ + 178 }; │ │ │ │ │ + 179 │ │ │ │ │ + 187 template │ │ │ │ │ +188 class LocalInterpolationVirtualInterface │ │ │ │ │ + 189 : public LocalInterpolationVirtualInterfaceBase │ │ │ │ │ + 190 { │ │ │ │ │ + 191 public: │ │ │ │ │ + 192 │ │ │ │ │ +194 using FunctionType = std::function; │ │ │ │ │ 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 │ │ │ │ │ +197 typedef typename RangeType::field_type CoefficientType; │ │ │ │ │ + 198 │ │ │ │ │ + 199 │ │ │ │ │ +200 virtual ~LocalInterpolationVirtualInterface() {} │ │ │ │ │ + 201 │ │ │ │ │ + 202 // This method is only noted again for to make the documentation complete. │ │ │ │ │ + 203 │ │ │ │ │ +211 virtual void interpolate (const FunctionType& f, std:: │ │ │ │ │ +vector& out) const = 0; │ │ │ │ │ 212 │ │ │ │ │ - 213#endif // #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH │ │ │ │ │ -field.hh │ │ │ │ │ -emptypoints.hh │ │ │ │ │ + 218 template::value, int> = 0> │ │ │ │ │ +220 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ + 221 { │ │ │ │ │ + 222 const auto& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ + 223 │ │ │ │ │ + 224 const LocalInterpolationVirtualInterfaceBase& │ │ │ │ │ +asBase = *this; │ │ │ │ │ + 225 asBase.interpolate(FunctionType(std::cref(f)),out); │ │ │ │ │ + 226 } │ │ │ │ │ + 227 │ │ │ │ │ + 233 template │ │ │ │ │ +234 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ + 235 { │ │ │ │ │ + 236 const auto& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ + 237 │ │ │ │ │ + 238 std::vector outDummy; │ │ │ │ │ + 239 const LocalInterpolationVirtualInterfaceBase& │ │ │ │ │ +asBase = *this; │ │ │ │ │ + 240 asBase.interpolate(FunctionType(std::cref(f)),outDummy); │ │ │ │ │ + 241 out.resize(outDummy.size()); │ │ │ │ │ + 242 for(typename std::vector::size_type i=0; i │ │ │ │ │ +285 class LocalFiniteElementVirtualInterface │ │ │ │ │ + 286 { │ │ │ │ │ + 287 using LocalBasisTraits = T; │ │ │ │ │ + 288 public: │ │ │ │ │ + 289 typedef LocalFiniteElementTraits< │ │ │ │ │ + 290 LocalBasisVirtualInterface, │ │ │ │ │ + 291 LocalCoefficientsVirtualInterface, │ │ │ │ │ + 292 LocalInterpolationVirtualInterface< │ │ │ │ │ + 293 typename LocalBasisTraits::DomainType, │ │ │ │ │ +294 typename LocalBasisTraits::RangeType> > Traits; │ │ │ │ │ + 295 │ │ │ │ │ +296 virtual ~LocalFiniteElementVirtualInterface() {} │ │ │ │ │ + 297 │ │ │ │ │ +299 virtual const typename Traits::LocalBasisType& localBasis () const = 0; │ │ │ │ │ + 300 │ │ │ │ │ +302 virtual const typename Traits::LocalCoefficientsType& localCoefficients () │ │ │ │ │ +const = 0; │ │ │ │ │ + 303 │ │ │ │ │ +305 virtual const typename Traits::LocalInterpolationType& localInterpolation │ │ │ │ │ +() const = 0; │ │ │ │ │ + 306 │ │ │ │ │ +308 virtual unsigned int size () const = 0; │ │ │ │ │ + 309 │ │ │ │ │ +311 virtual const GeometryType type () const = 0; │ │ │ │ │ + 312 │ │ │ │ │ +313 virtual LocalFiniteElementVirtualInterface* clone() const = 0; │ │ │ │ │ + 314 }; │ │ │ │ │ + 315} │ │ │ │ │ + 316#endif │ │ │ │ │ +localkey.hh │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::numLagrangePoints │ │ │ │ │ -std::size_t numLagrangePoints(const GeometryType >, std::size_t order) │ │ │ │ │ -Definition equidistantpoints.hh:23 │ │ │ │ │ -Dune::equidistantLagrangePoints │ │ │ │ │ -static unsigned int equidistantLagrangePoints(const GeometryType >, unsigned │ │ │ │ │ -int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > │ │ │ │ │ -*points) │ │ │ │ │ -Definition equidistantpoints.hh:55 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LocalBasisTraits::RangeType │ │ │ │ │ +R RangeType │ │ │ │ │ +range type │ │ │ │ │ +Definition common/localbasis.hh:51 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ Dune::LocalKey │ │ │ │ │ Describe position of one degree of freedom. │ │ │ │ │ Definition localkey.hh:23 │ │ │ │ │ -Dune::LocalKey::index │ │ │ │ │ -unsigned int index() const │ │ │ │ │ -Return offset within subentity. │ │ │ │ │ -Definition localkey.hh:68 │ │ │ │ │ -Dune::LocalKey::subEntity │ │ │ │ │ -unsigned int subEntity() const │ │ │ │ │ -Return number of associated subentity. │ │ │ │ │ -Definition localkey.hh:56 │ │ │ │ │ -Dune::LagrangePoint │ │ │ │ │ -Definition emptypoints.hh:18 │ │ │ │ │ -Dune::LagrangePoint::weight_ │ │ │ │ │ -Field weight_ │ │ │ │ │ -Definition emptypoints.hh:48 │ │ │ │ │ -Dune::LagrangePoint::point_ │ │ │ │ │ -Vector point_ │ │ │ │ │ -Definition emptypoints.hh:46 │ │ │ │ │ -Dune::LagrangePoint::localKey_ │ │ │ │ │ -LocalKey localKey_ │ │ │ │ │ -Definition emptypoints.hh:47 │ │ │ │ │ -Dune::EmptyPointSet │ │ │ │ │ -Definition emptypoints.hh:56 │ │ │ │ │ -Dune::EmptyPointSet::order │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -Definition emptypoints.hh:95 │ │ │ │ │ -Dune::EmptyPointSet::points_ │ │ │ │ │ -std::vector< LagrangePoint > points_ │ │ │ │ │ -Definition emptypoints.hh:107 │ │ │ │ │ -Dune::EquidistantPointSet │ │ │ │ │ -Definition equidistantpoints.hh:160 │ │ │ │ │ -Dune::EquidistantPointSet::order │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -Definition emptypoints.hh:95 │ │ │ │ │ -Dune::EquidistantPointSet::build │ │ │ │ │ -bool build() │ │ │ │ │ -Definition equidistantpoints.hh:190 │ │ │ │ │ -Dune::EquidistantPointSet::supports │ │ │ │ │ -static bool supports(std::size_t order) │ │ │ │ │ -Definition equidistantpoints.hh:203 │ │ │ │ │ -Dune::EquidistantPointSet::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition equidistantpoints.hh:164 │ │ │ │ │ -Dune::EquidistantPointSet::supports │ │ │ │ │ -static bool supports(GeometryType, std::size_t) │ │ │ │ │ -Definition equidistantpoints.hh:201 │ │ │ │ │ -Dune::EquidistantPointSet::build │ │ │ │ │ -void build(GeometryType gt) │ │ │ │ │ -Definition equidistantpoints.hh:170 │ │ │ │ │ -Dune::EquidistantPointSet::buildCube │ │ │ │ │ -bool buildCube() │ │ │ │ │ -Definition equidistantpoints.hh:196 │ │ │ │ │ -Dune::EquidistantPointSet::EquidistantPointSet │ │ │ │ │ -EquidistantPointSet(std::size_t order) │ │ │ │ │ -Definition equidistantpoints.hh:168 │ │ │ │ │ +Dune::LocalInterpolationVirtualInterface │ │ │ │ │ +virtual base class for a local interpolation │ │ │ │ │ +Definition virtualinterface.hh:190 │ │ │ │ │ +Dune::LocalInterpolationVirtualInterface::~LocalInterpolationVirtualInterface │ │ │ │ │ +virtual ~LocalInterpolationVirtualInterface() │ │ │ │ │ +Definition virtualinterface.hh:200 │ │ │ │ │ +Dune::LocalInterpolationVirtualInterface::FunctionType │ │ │ │ │ +std::function< RangeType(DomainType)> FunctionType │ │ │ │ │ +type of function to interpolate │ │ │ │ │ +Definition virtualinterface.hh:194 │ │ │ │ │ +Dune::LocalInterpolationVirtualInterface::CoefficientType │ │ │ │ │ +RangeType::field_type CoefficientType │ │ │ │ │ +type of the coefficient vector in the interpolate method │ │ │ │ │ +Definition virtualinterface.hh:197 │ │ │ │ │ +Dune::LocalInterpolationVirtualInterface::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< CoefficientType > &out) const │ │ │ │ │ +determine coefficients interpolating a given function │ │ │ │ │ +Definition virtualinterface.hh:220 │ │ │ │ │ +Dune::LocalInterpolationVirtualInterface::interpolate │ │ │ │ │ +virtual void interpolate(const FunctionType &f, std::vector< CoefficientType > │ │ │ │ │ +&out) const =0 │ │ │ │ │ +determine coefficients interpolating a given function │ │ │ │ │ +Dune::LocalInterpolationVirtualInterface::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +determine coefficients interpolating a given function │ │ │ │ │ +Definition virtualinterface.hh:234 │ │ │ │ │ +Dune::LocalFiniteElementFunctionBase │ │ │ │ │ +Return a proper base class for functions to use with LocalInterpolation. │ │ │ │ │ +Definition virtualinterface.hh:47 │ │ │ │ │ +Dune::LocalFiniteElementFunctionBase::FunctionBase │ │ │ │ │ +FunctionBaseDummy FunctionBase │ │ │ │ │ +Definition virtualinterface.hh:73 │ │ │ │ │ +Dune::LocalFiniteElementFunctionBase::VirtualFunctionBase │ │ │ │ │ +FunctionBaseDummy VirtualFunctionBase │ │ │ │ │ +Definition virtualinterface.hh:72 │ │ │ │ │ +Dune::LocalFiniteElementFunctionBase::type │ │ │ │ │ +FunctionBaseDummy type │ │ │ │ │ +Base class type for functions to use with LocalInterpolation. │ │ │ │ │ +Definition virtualinterface.hh:80 │ │ │ │ │ +Dune::LocalFiniteElementFunctionBase::FunctionBaseDummy::Traits │ │ │ │ │ +Definition virtualinterface.hh:62 │ │ │ │ │ +Dune::LocalFiniteElementFunctionBase::FunctionBaseDummy::Traits::RangeType │ │ │ │ │ +Range RangeType │ │ │ │ │ +Definition virtualinterface.hh:63 │ │ │ │ │ +Dune::LocalFiniteElementFunctionBase::FunctionBaseDummy::Traits::DomainType │ │ │ │ │ +Domain DomainType │ │ │ │ │ +Definition virtualinterface.hh:64 │ │ │ │ │ +Dune::LocalBasisVirtualInterface │ │ │ │ │ +virtual base class for a local basis │ │ │ │ │ +Definition virtualinterface.hh:97 │ │ │ │ │ +Dune::LocalBasisVirtualInterface::order │ │ │ │ │ +virtual unsigned int order() const =0 │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Dune::LocalBasisVirtualInterface::evaluateJacobian │ │ │ │ │ +virtual void evaluateJacobian(const typename Traits::DomainType &in, std:: │ │ │ │ │ +vector< typename Traits::JacobianType > &out) const =0 │ │ │ │ │ +Evaluate jacobian of all shape functions at given position. │ │ │ │ │ +Dune::LocalBasisVirtualInterface::size │ │ │ │ │ +virtual unsigned int size() const =0 │ │ │ │ │ +Number of shape functions. │ │ │ │ │ +Dune::LocalBasisVirtualInterface::Traits │ │ │ │ │ +T Traits │ │ │ │ │ +Definition virtualinterface.hh:99 │ │ │ │ │ +Dune::LocalBasisVirtualInterface::evaluateFunction │ │ │ │ │ +virtual void evaluateFunction(const typename Traits::DomainType &in, std:: │ │ │ │ │ +vector< typename Traits::RangeType > &out) const =0 │ │ │ │ │ +Evaluate all basis function at given position. │ │ │ │ │ +Dune::LocalBasisVirtualInterface::~LocalBasisVirtualInterface │ │ │ │ │ +virtual ~LocalBasisVirtualInterface() │ │ │ │ │ +Definition virtualinterface.hh:102 │ │ │ │ │ +Dune::LocalBasisVirtualInterface::partial │ │ │ │ │ +virtual void partial(const std::array< unsigned int, Traits::dimDomain > │ │ │ │ │ +&order, const typename Traits::DomainType &in, std::vector< typename Traits:: │ │ │ │ │ +RangeType > &out) const =0 │ │ │ │ │ +Evaluate partial derivatives of any order of all shape functions. │ │ │ │ │ +Dune::LocalInterpolationVirtualInterfaceBase │ │ │ │ │ +virtual base class for a local interpolation │ │ │ │ │ +Definition virtualinterface.hh:159 │ │ │ │ │ +Dune::LocalInterpolationVirtualInterfaceBase::FunctionType │ │ │ │ │ +std::function< RangeType(DomainType)> FunctionType │ │ │ │ │ +type of function to interpolate │ │ │ │ │ +Definition virtualinterface.hh:163 │ │ │ │ │ +Dune::LocalInterpolationVirtualInterfaceBase::CoefficientType │ │ │ │ │ +RangeType::field_type CoefficientType │ │ │ │ │ +type of the coefficient vector in the interpolate method │ │ │ │ │ +Definition virtualinterface.hh:166 │ │ │ │ │ +Dune::LocalInterpolationVirtualInterfaceBase:: │ │ │ │ │ +~LocalInterpolationVirtualInterfaceBase │ │ │ │ │ +virtual ~LocalInterpolationVirtualInterfaceBase() │ │ │ │ │ +Definition virtualinterface.hh:168 │ │ │ │ │ +Dune::LocalInterpolationVirtualInterfaceBase::interpolate │ │ │ │ │ +virtual void interpolate(const FunctionType &f, std::vector< CoefficientType > │ │ │ │ │ +&out) const =0 │ │ │ │ │ +determine coefficients interpolating a given function │ │ │ │ │ +Dune::LocalCoefficientsVirtualInterface │ │ │ │ │ +virtual base class for local coefficients │ │ │ │ │ +Definition virtualinterface.hh:259 │ │ │ │ │ +Dune::LocalCoefficientsVirtualInterface::~LocalCoefficientsVirtualInterface │ │ │ │ │ +virtual ~LocalCoefficientsVirtualInterface() │ │ │ │ │ +Definition virtualinterface.hh:262 │ │ │ │ │ +Dune::LocalCoefficientsVirtualInterface::size │ │ │ │ │ +virtual std::size_t size() const =0 │ │ │ │ │ +number of coefficients │ │ │ │ │ +Dune::LocalCoefficientsVirtualInterface::localKey │ │ │ │ │ +virtual const LocalKey & localKey(std::size_t i) const =0 │ │ │ │ │ +get i'th index │ │ │ │ │ +Dune::LocalFiniteElementVirtualInterface │ │ │ │ │ +virtual base class for local finite elements with functions │ │ │ │ │ +Definition virtualinterface.hh:286 │ │ │ │ │ +Dune::LocalFiniteElementVirtualInterface::clone │ │ │ │ │ +virtual LocalFiniteElementVirtualInterface< T > * clone() const =0 │ │ │ │ │ +Dune::LocalFiniteElementVirtualInterface::localInterpolation │ │ │ │ │ +virtual const Traits::LocalInterpolationType & localInterpolation() const =0 │ │ │ │ │ +Dune::LocalFiniteElementVirtualInterface::size │ │ │ │ │ +virtual unsigned int size() const =0 │ │ │ │ │ +Dune::LocalFiniteElementVirtualInterface::localBasis │ │ │ │ │ +virtual const Traits::LocalBasisType & localBasis() const =0 │ │ │ │ │ +Dune::LocalFiniteElementVirtualInterface::type │ │ │ │ │ +virtual const GeometryType type() const =0 │ │ │ │ │ +Dune::LocalFiniteElementVirtualInterface::Traits │ │ │ │ │ +LocalFiniteElementTraits< LocalBasisVirtualInterface< LocalBasisTraits >, │ │ │ │ │ +LocalCoefficientsVirtualInterface, LocalInterpolationVirtualInterface< typename │ │ │ │ │ +LocalBasisTraits::DomainType, typename LocalBasisTraits::RangeType > > Traits │ │ │ │ │ +Definition virtualinterface.hh:294 │ │ │ │ │ +Dune::LocalFiniteElementVirtualInterface::~LocalFiniteElementVirtualInterface │ │ │ │ │ +virtual ~LocalFiniteElementVirtualInterface() │ │ │ │ │ +Definition virtualinterface.hh:296 │ │ │ │ │ +Dune::LocalFiniteElementVirtualInterface::localCoefficients │ │ │ │ │ +virtual const Traits::LocalCoefficientsType & localCoefficients() const =0 │ │ │ │ │ +localbasis.hh │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00086.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangepyramid.hh File Reference │ │ │ │ +dune-localfunctions: interfaceswitch.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,40 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
lagrangepyramid.hh File Reference
│ │ │ │ +
interfaceswitch.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <numeric>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <memory>
│ │ │ │ +#include <vector>
│ │ │ │ #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/common/typetraits.hh>
│ │ │ │ +#include <dune/common/shared_ptr.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...
struct  Dune::FiniteElementInterfaceSwitch< FiniteElement, Dummy >
 Switch for uniform treatment of finite element with either the local or the global interface. More...
 
struct  Dune::BasisInterfaceSwitch< Basis, Dummy >
 Switch for uniform treatment of local and global basis classes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,32 +6,32 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ + * common │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -lagrangepyramid.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +interfaceswitch.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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... │ │ │ │ │ +struct  Dune::FiniteElementInterfaceSwitch<_FiniteElement,_Dummy_> │ │ │ │ │ +  Switch for uniform treatment of finite element with either the local │ │ │ │ │ + or the global interface. More... │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::BasisInterfaceSwitch<_Basis,_Dummy_> │ │ │ │ │ +  Switch for uniform treatment of local and global basis classes. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00086_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangepyramid.hh Source File │ │ │ │ +dune-localfunctions: interfaceswitch.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,831 +70,198 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangepyramid.hh
│ │ │ │ +
interfaceswitch.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
│ │ │ │ -
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>
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_COMMON_INTERFACESWITCH_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_COMMON_INTERFACESWITCH_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <cstddef>
│ │ │ │ +
10#include <memory>
│ │ │ │ +
11#include <vector>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/common/fmatrix.hh>
│ │ │ │ +
14#include <dune/common/typetraits.hh>
│ │ │ │ +
15#include <dune/common/shared_ptr.hh>
│ │ │ │
16
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
17namespace Dune {
│ │ │ │ +
18
│ │ │ │
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 out[4] = in[2];
│ │ │ │ +
29 template<class FiniteElement, class Dummy = void>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
32 typedef typename FiniteElement::Traits::Basis Basis;
│ │ │ │ +
34 typedef typename FiniteElement::Traits::Interpolation Interpolation;
│ │ │ │ +
36 typedef typename FiniteElement::Traits::Coefficients Coefficients;
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ +
39 static const Basis &basis(const FiniteElement& fe)
│ │ │ │ +
40 { return fe.basis(); }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
42 static const Interpolation &interpolation(const FiniteElement& fe)
│ │ │ │ +
43 { return fe.interpolation(); }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
45 static const Coefficients &coefficients(const FiniteElement& fe)
│ │ │ │ +
46 { return fe.coefficients(); }
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
49
│ │ │ │ +
78 typedef std::shared_ptr<const FiniteElement> Store;
│ │ │ │
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];
│ │ │ │ +
│ │ │ │ +
85 static void setStore(Store& store, const FiniteElement& fe)
│ │ │ │ +
86 { store = std::make_shared<const FiniteElement>(fe); }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
88 static void setStore(Store& store, FiniteElement&& fe)
│ │ │ │ +
89 { store = std::make_shared<const FiniteElement>(std::move(fe)); }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
91 static void setStore(Store& store, const Store& fe)
│ │ │ │ +
92 { store = fe; }
│ │ │ │ +
│ │ │ │ +
93 };
│ │ │ │ +
│ │ │ │ +
94
│ │ │ │ +
95#ifndef DOXYGEN
│ │ │ │ +
98 template<class FiniteElement>
│ │ │ │ +
99 struct FiniteElementInterfaceSwitch<
│ │ │ │ +
100 FiniteElement,
│ │ │ │ +
101 typename std::enable_if<AlwaysTrue<typename FiniteElement::Traits::
│ │ │ │ +
102 LocalBasisType>::value>::type
│ │ │ │ +
103 >
│ │ │ │ +
104 {
│ │ │ │ +
106 typedef typename FiniteElement::Traits::LocalBasisType Basis;
│ │ │ │ +
108 typedef typename FiniteElement::Traits::LocalInterpolationType
│ │ │ │ + │ │ │ │ +
111 typedef typename FiniteElement::Traits::LocalCoefficientsType Coefficients;
│ │ │ │ +
112
│ │ │ │ +
114 static const Basis &basis(const FiniteElement& fe)
│ │ │ │ +
115 { return fe.localBasis(); }
│ │ │ │ +
117 static const Interpolation &interpolation(const FiniteElement& fe)
│ │ │ │ +
118 { return fe.localInterpolation(); }
│ │ │ │ +
120 static const Coefficients &coefficients(const FiniteElement& fe)
│ │ │ │ +
121 { return fe.localCoefficients(); }
│ │ │ │ +
122
│ │ │ │ +
124 typedef std::shared_ptr<const FiniteElement> Store;
│ │ │ │ +
126 static void setStore(Store& store, const FiniteElement& fe)
│ │ │ │ +
127 { store = stackobject_to_shared_ptr<const FiniteElement>(fe); }
│ │ │ │ +
129 static void setStore(Store& store, FiniteElement&& fe)
│ │ │ │ +
130 { store = std::make_shared<const FiniteElement>(std::move(fe)); }
│ │ │ │ +
132 static void setStore(Store& store, const Store& fe)
│ │ │ │ +
133 { store = fe; }
│ │ │ │ +
134 };
│ │ │ │ +
135#endif // !DOXYGEN
│ │ │ │ +
136
│ │ │ │ +
138
│ │ │ │ +
153 template<class Basis, class Dummy = void>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
156 typedef typename Basis::Traits::DomainField DomainField;
│ │ │ │ +
158 static const std::size_t dimDomainLocal = Basis::Traits::dimDomainLocal;
│ │ │ │ +
160 typedef typename Basis::Traits::DomainLocal DomainLocal;
│ │ │ │ +
161
│ │ │ │ +
163 typedef typename Basis::Traits::RangeField RangeField;
│ │ │ │ +
165 static const std::size_t dimRange = Basis::Traits::dimRange;
│ │ │ │ +
167 typedef typename Basis::Traits::Range Range;
│ │ │ │ +
168
│ │ │ │ +
170
│ │ │ │ +
180 template<typename Geometry>
│ │ │ │ +
│ │ │ │ +
181 static void gradient(const Basis& basis, const Geometry& geometry,
│ │ │ │ +
182 const DomainLocal& xl,
│ │ │ │ +
183 std::vector<FieldMatrix<RangeField, 1,
│ │ │ │ +
184 Geometry::coorddimension> >& grad)
│ │ │ │ +
185 {
│ │ │ │ +
186 grad.resize(basis.size());
│ │ │ │ +
187 basis.evaluateJacobian(xl, grad);
│ │ │ │ +
188 }
│ │ │ │ +
│ │ │ │ +
189 };
│ │ │ │ +
│ │ │ │
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);
│ │ │ │ +
191#ifndef DOXYGEN
│ │ │ │ +
193 template<class Basis>
│ │ │ │ +
194 struct BasisInterfaceSwitch<Basis,
│ │ │ │ +
195 typename std::enable_if<
│ │ │ │ +
196 AlwaysTrue<
│ │ │ │ +
197 std::integral_constant<
│ │ │ │ +
198 std::size_t,
│ │ │ │ +
199 Basis::Traits::dimDomain
│ │ │ │ +
200 >
│ │ │ │ +
201 >::value
│ │ │ │ +
202 >::type
│ │ │ │ +
203 >
│ │ │ │ +
204 {
│ │ │ │ +
206 typedef typename Basis::Traits::DomainFieldType DomainField;
│ │ │ │ +
208 static const std::size_t dimDomainLocal = Basis::Traits::dimDomain;
│ │ │ │ +
210 typedef typename Basis::Traits::DomainType DomainLocal;
│ │ │ │
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));
│ │ │ │ +
213 typedef typename Basis::Traits::RangeFieldType RangeField;
│ │ │ │ +
215 static const std::size_t dimRange = Basis::Traits::dimRange;
│ │ │ │ +
217 typedef typename Basis::Traits::RangeType Range;
│ │ │ │ +
218
│ │ │ │ +
220 template<typename Geometry>
│ │ │ │ +
221 static void gradient(const Basis& basis, const Geometry& geometry,
│ │ │ │ +
222 const DomainLocal& xl,
│ │ │ │ +
223 std::vector<FieldMatrix<RangeField, 1,
│ │ │ │ +
224 Geometry::coorddimension> >& grad)
│ │ │ │ +
225 {
│ │ │ │ +
226 std::vector<typename Basis::Traits::JacobianType> lgrad(basis.size());
│ │ │ │ +
227 basis.evaluateJacobian(xl, lgrad);
│ │ │ │ +
228
│ │ │ │ +
229 const typename Geometry::JacobianInverseTransposed& jac =
│ │ │ │ +
230 geometry.jacobianInverseTransposed(xl);
│ │ │ │ +
231
│ │ │ │ +
232 grad.resize(basis.size());
│ │ │ │ +
233 for(std::size_t i = 0; i < basis.size(); ++i)
│ │ │ │ +
234 jac.mv(lgrad[i][0], grad[i][0]);
│ │ │ │ +
235 }
│ │ │ │ +
236 };
│ │ │ │ +
237#endif // !DOXYGEN
│ │ │ │ +
238
│ │ │ │ +
239} // namespace Dune
│ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
241#endif // DUNE_LOCALFUNCTIONS_COMMON_INTERFACESWITCH_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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
Switch for uniform treatment of finite element with either the local or the global interface.
Definition interfaceswitch.hh:30
│ │ │ │ +
static const Coefficients & coefficients(const FiniteElement &fe)
access coefficients
Definition interfaceswitch.hh:45
│ │ │ │ +
static void setStore(Store &store, FiniteElement &&fe)
Store a finite element in the store.
Definition interfaceswitch.hh:88
│ │ │ │ +
FiniteElement::Traits::Coefficients Coefficients
export the type of the coefficients
Definition interfaceswitch.hh:36
│ │ │ │ +
static void setStore(Store &store, const Store &fe)
Store a finite element in the store.
Definition interfaceswitch.hh:91
│ │ │ │ +
static void setStore(Store &store, const FiniteElement &fe)
Store a finite element in the store.
Definition interfaceswitch.hh:85
│ │ │ │ +
FiniteElement::Traits::Interpolation Interpolation
export the type of the interpolation
Definition interfaceswitch.hh:34
│ │ │ │ +
std::shared_ptr< const FiniteElement > Store
Type for storing finite elements.
Definition interfaceswitch.hh:78
│ │ │ │ +
static const Basis & basis(const FiniteElement &fe)
access basis
Definition interfaceswitch.hh:39
│ │ │ │ +
FiniteElement::Traits::Basis Basis
export the type of the basis
Definition interfaceswitch.hh:32
│ │ │ │ +
static const Interpolation & interpolation(const FiniteElement &fe)
access interpolation
Definition interfaceswitch.hh:42
│ │ │ │ +
Switch for uniform treatment of local and global basis classes.
Definition interfaceswitch.hh:154
│ │ │ │ +
static const std::size_t dimRange
export dimension of the values
Definition interfaceswitch.hh:165
│ │ │ │ +
static const std::size_t dimDomainLocal
export dimension of local coordinates
Definition interfaceswitch.hh:158
│ │ │ │ +
Basis::Traits::RangeField RangeField
export field type of the values
Definition interfaceswitch.hh:163
│ │ │ │ +
Basis::Traits::Range Range
export vector type of the values
Definition interfaceswitch.hh:167
│ │ │ │ +
static void gradient(const Basis &basis, const Geometry &geometry, const DomainLocal &xl, std::vector< FieldMatrix< RangeField, 1, Geometry::coorddimension > > &grad)
Compute global gradient for scalar valued bases.
Definition interfaceswitch.hh:181
│ │ │ │ +
Basis::Traits::DomainLocal DomainLocal
export vector type of the local coordinates
Definition interfaceswitch.hh:160
│ │ │ │ +
Basis::Traits::DomainField DomainField
export field types of the coordinates
Definition interfaceswitch.hh:156
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,874 +7,233 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -lagrangepyramid.hh │ │ │ │ │ + * common │ │ │ │ │ +interfaceswitch.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 │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include │ │ │ │ │ + 5 │ │ │ │ │ + 6#ifndef DUNE_LOCALFUNCTIONS_COMMON_INTERFACESWITCH_HH │ │ │ │ │ + 7#define DUNE_LOCALFUNCTIONS_COMMON_INTERFACESWITCH_HH │ │ │ │ │ + 8 │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ 16 │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include │ │ │ │ │ - 20#include │ │ │ │ │ + 17namespace Dune { │ │ │ │ │ + 18 │ │ │ │ │ 21 │ │ │ │ │ - 22namespace Dune { 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 Traits::DomainType& 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 out[4] = in[2]; │ │ │ │ │ + 29 template │ │ │ │ │ +30 struct FiniteElementInterfaceSwitch { │ │ │ │ │ +32 typedef typename FiniteElement::Traits::Basis Basis; │ │ │ │ │ +34 typedef typename FiniteElement::Traits::Interpolation Interpolation; │ │ │ │ │ +36 typedef typename FiniteElement::Traits::Coefficients Coefficients; │ │ │ │ │ + 37 │ │ │ │ │ +39 static const Basis &basis(const FiniteElement& fe) │ │ │ │ │ + 40 { return fe.basis(); } │ │ │ │ │ +42 static const Interpolation &interpolation(const FiniteElement& fe) │ │ │ │ │ + 43 { return fe.interpolation(); } │ │ │ │ │ +45 static const Coefficients &coefficients(const FiniteElement& fe) │ │ │ │ │ + 46 { return fe.coefficients(); } │ │ │ │ │ + 47 │ │ │ │ │ + 49 │ │ │ │ │ +78 typedef std::shared_ptr Store; │ │ │ │ │ 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& 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) │ │ │ │ │ +85 static void setStore(Store& store, const FiniteElement& fe) │ │ │ │ │ + 86 { store = std::make_shared(fe); } │ │ │ │ │ +88 static void setStore(Store& store, FiniteElement&& fe) │ │ │ │ │ + 89 { store = std::make_shared(std::move(fe)); } │ │ │ │ │ +91 static void setStore(Store& store, const Store& fe) │ │ │ │ │ + 92 { store = fe; } │ │ │ │ │ + 93 }; │ │ │ │ │ + 94 │ │ │ │ │ + 95#ifndef DOXYGEN │ │ │ │ │ + 98 template │ │ │ │ │ + 99 struct FiniteElementInterfaceSwitch< │ │ │ │ │ + 100 FiniteElement, │ │ │ │ │ + 101 typename std::enable_if::value>::type │ │ │ │ │ + 103 > │ │ │ │ │ + 104 { │ │ │ │ │ + 106 typedef typename FiniteElement::Traits::LocalBasisType Basis; │ │ │ │ │ + 108 typedef typename FiniteElement::Traits::LocalInterpolationType │ │ │ │ │ + 109 Interpolation; │ │ │ │ │ + 111 typedef typename FiniteElement::Traits::LocalCoefficientsType │ │ │ │ │ +Coefficients; │ │ │ │ │ + 112 │ │ │ │ │ + 114 static const Basis &basis(const FiniteElement& fe) │ │ │ │ │ + 115 { return fe.localBasis(); } │ │ │ │ │ + 117 static const Interpolation &interpolation(const FiniteElement& fe) │ │ │ │ │ + 118 { return fe.localInterpolation(); } │ │ │ │ │ + 120 static const Coefficients &coefficients(const FiniteElement& fe) │ │ │ │ │ + 121 { return fe.localCoefficients(); } │ │ │ │ │ + 122 │ │ │ │ │ + 124 typedef std::shared_ptr Store; │ │ │ │ │ + 126 static void setStore(Store& store, const FiniteElement& fe) │ │ │ │ │ + 127 { store = stackobject_to_shared_ptr(fe); } │ │ │ │ │ + 129 static void setStore(Store& store, FiniteElement&& fe) │ │ │ │ │ + 130 { store = std::make_shared(std::move(fe)); } │ │ │ │ │ + 132 static void setStore(Store& store, const Store& fe) │ │ │ │ │ + 133 { store = fe; } │ │ │ │ │ + 134 }; │ │ │ │ │ + 135#endif // !DOXYGEN │ │ │ │ │ + 136 │ │ │ │ │ + 138 │ │ │ │ │ + 153 template │ │ │ │ │ +154 struct BasisInterfaceSwitch { │ │ │ │ │ +156 typedef typename Basis::Traits::DomainField DomainField; │ │ │ │ │ +158 static const std::size_t dimDomainLocal = Basis::Traits::dimDomainLocal; │ │ │ │ │ +160 typedef typename Basis::Traits::DomainLocal DomainLocal; │ │ │ │ │ + 161 │ │ │ │ │ +163 typedef typename Basis::Traits::RangeField RangeField; │ │ │ │ │ +165 static const std::size_t dimRange = Basis::Traits::dimRange; │ │ │ │ │ +167 typedef typename Basis::Traits::Range Range; │ │ │ │ │ + 168 │ │ │ │ │ + 170 │ │ │ │ │ + 180 template │ │ │ │ │ +181 static void gradient(const Basis& basis, const Geometry& geometry, │ │ │ │ │ + 182 const DomainLocal& xl, │ │ │ │ │ + 183 std::vector >& grad) │ │ │ │ │ 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]; │ │ │ │ │ + 186 grad.resize(basis.size()); │ │ │ │ │ + 187 basis.evaluateJacobian(xl, grad); │ │ │ │ │ + 188 } │ │ │ │ │ + 189 }; │ │ │ │ │ 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); │ │ │ │ │ + 191#ifndef DOXYGEN │ │ │ │ │ + 193 template │ │ │ │ │ + 194 struct BasisInterfaceSwitch │ │ │ │ │ + 201 >::value │ │ │ │ │ + 202 >::type │ │ │ │ │ + 203 > │ │ │ │ │ + 204 { │ │ │ │ │ + 206 typedef typename Basis::Traits::DomainFieldType DomainField; │ │ │ │ │ + 208 static const std::size_t dimDomainLocal = Basis::Traits::dimDomain; │ │ │ │ │ + 210 typedef typename Basis::Traits::DomainType DomainLocal; │ │ │ │ │ 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)); │ │ │ │ │ + 213 typedef typename Basis::Traits::RangeFieldType RangeField; │ │ │ │ │ + 215 static const std::size_t dimRange = Basis::Traits::dimRange; │ │ │ │ │ + 217 typedef typename Basis::Traits::RangeType Range; │ │ │ │ │ + 218 │ │ │ │ │ + 220 template │ │ │ │ │ + 221 static void gradient(const Basis& basis, const Geometry& geometry, │ │ │ │ │ + 222 const DomainLocal& xl, │ │ │ │ │ + 223 std::vector >& grad) │ │ │ │ │ + 225 { │ │ │ │ │ + 226 std::vector lgrad(basis.size()); │ │ │ │ │ + 227 basis.evaluateJacobian(xl, lgrad); │ │ │ │ │ + 228 │ │ │ │ │ + 229 const typename Geometry::JacobianInverseTransposed& jac = │ │ │ │ │ + 230 geometry.jacobianInverseTransposed(xl); │ │ │ │ │ + 231 │ │ │ │ │ + 232 grad.resize(basis.size()); │ │ │ │ │ + 233 for(std::size_t i = 0; i < basis.size(); ++i) │ │ │ │ │ + 234 jac.mv(lgrad[i][0], grad[i][0]); │ │ │ │ │ + 235 } │ │ │ │ │ + 236 }; │ │ │ │ │ + 237#endif // !DOXYGEN │ │ │ │ │ + 238 │ │ │ │ │ + 239} // namespace Dune │ │ │ │ │ 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 Traits::DomainType& 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 Dune │ │ │ │ │ - 779{ │ │ │ │ │ - 810 template │ │ │ │ │ -811 class LagrangePyramidLocalFiniteElement │ │ │ │ │ - 812 { │ │ │ │ │ - 813 public: │ │ │ │ │ -816 using Traits = LocalFiniteElementTraits, │ │ │ │ │ - 817 Impl::LagrangePyramidLocalCoefficients, │ │ │ │ │ - 818 Impl::LagrangePyramidLocalInterpolation > >; │ │ │ │ │ - 819 │ │ │ │ │ -825 LagrangePyramidLocalFiniteElement() {} │ │ │ │ │ - 826 │ │ │ │ │ -829 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 830 { │ │ │ │ │ - 831 return basis_; │ │ │ │ │ - 832 } │ │ │ │ │ - 833 │ │ │ │ │ -836 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 837 { │ │ │ │ │ - 838 return coefficients_; │ │ │ │ │ - 839 } │ │ │ │ │ - 840 │ │ │ │ │ -843 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 844 { │ │ │ │ │ - 845 return interpolation_; │ │ │ │ │ - 846 } │ │ │ │ │ - 847 │ │ │ │ │ -849 static constexpr std::size_t size () │ │ │ │ │ - 850 { │ │ │ │ │ - 851 return Impl::LagrangePyramidLocalBasis::size(); │ │ │ │ │ - 852 } │ │ │ │ │ - 853 │ │ │ │ │ -856 static constexpr GeometryType type () │ │ │ │ │ - 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 │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -localkey.hh │ │ │ │ │ + 241#endif // DUNE_LOCALFUNCTIONS_COMMON_INTERFACESWITCH_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::LagrangePyramidLocalFiniteElement │ │ │ │ │ -Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ -Definition lagrangepyramid.hh:812 │ │ │ │ │ -Dune::LagrangePyramidLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ -Definition lagrangepyramid.hh:836 │ │ │ │ │ -Dune::LagrangePyramidLocalFiniteElement::size │ │ │ │ │ -static constexpr std::size_t size() │ │ │ │ │ -The number of shape functions. │ │ │ │ │ -Definition lagrangepyramid.hh:849 │ │ │ │ │ -Dune::LagrangePyramidLocalFiniteElement::LagrangePyramidLocalFiniteElement │ │ │ │ │ -LagrangePyramidLocalFiniteElement() │ │ │ │ │ -Default constructor. │ │ │ │ │ -Definition lagrangepyramid.hh:825 │ │ │ │ │ -Dune::LagrangePyramidLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -The reference element that the local finite element is defined on. │ │ │ │ │ -Definition lagrangepyramid.hh:856 │ │ │ │ │ -Dune::LagrangePyramidLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ -Definition lagrangepyramid.hh:829 │ │ │ │ │ -Dune::LagrangePyramidLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Returns object that evaluates degrees of freedom. │ │ │ │ │ -Definition lagrangepyramid.hh:843 │ │ │ │ │ -localbasis.hh │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::FiniteElementInterfaceSwitch │ │ │ │ │ +Switch for uniform treatment of finite element with either the local or the │ │ │ │ │ +global interface. │ │ │ │ │ +Definition interfaceswitch.hh:30 │ │ │ │ │ +Dune::FiniteElementInterfaceSwitch::coefficients │ │ │ │ │ +static const Coefficients & coefficients(const FiniteElement &fe) │ │ │ │ │ +access coefficients │ │ │ │ │ +Definition interfaceswitch.hh:45 │ │ │ │ │ +Dune::FiniteElementInterfaceSwitch::setStore │ │ │ │ │ +static void setStore(Store &store, FiniteElement &&fe) │ │ │ │ │ +Store a finite element in the store. │ │ │ │ │ +Definition interfaceswitch.hh:88 │ │ │ │ │ +Dune::FiniteElementInterfaceSwitch::Coefficients │ │ │ │ │ +FiniteElement::Traits::Coefficients Coefficients │ │ │ │ │ +export the type of the coefficients │ │ │ │ │ +Definition interfaceswitch.hh:36 │ │ │ │ │ +Dune::FiniteElementInterfaceSwitch::setStore │ │ │ │ │ +static void setStore(Store &store, const Store &fe) │ │ │ │ │ +Store a finite element in the store. │ │ │ │ │ +Definition interfaceswitch.hh:91 │ │ │ │ │ +Dune::FiniteElementInterfaceSwitch::setStore │ │ │ │ │ +static void setStore(Store &store, const FiniteElement &fe) │ │ │ │ │ +Store a finite element in the store. │ │ │ │ │ +Definition interfaceswitch.hh:85 │ │ │ │ │ +Dune::FiniteElementInterfaceSwitch::Interpolation │ │ │ │ │ +FiniteElement::Traits::Interpolation Interpolation │ │ │ │ │ +export the type of the interpolation │ │ │ │ │ +Definition interfaceswitch.hh:34 │ │ │ │ │ +Dune::FiniteElementInterfaceSwitch::Store │ │ │ │ │ +std::shared_ptr< const FiniteElement > Store │ │ │ │ │ +Type for storing finite elements. │ │ │ │ │ +Definition interfaceswitch.hh:78 │ │ │ │ │ +Dune::FiniteElementInterfaceSwitch::basis │ │ │ │ │ +static const Basis & basis(const FiniteElement &fe) │ │ │ │ │ +access basis │ │ │ │ │ +Definition interfaceswitch.hh:39 │ │ │ │ │ +Dune::FiniteElementInterfaceSwitch::Basis │ │ │ │ │ +FiniteElement::Traits::Basis Basis │ │ │ │ │ +export the type of the basis │ │ │ │ │ +Definition interfaceswitch.hh:32 │ │ │ │ │ +Dune::FiniteElementInterfaceSwitch::interpolation │ │ │ │ │ +static const Interpolation & interpolation(const FiniteElement &fe) │ │ │ │ │ +access interpolation │ │ │ │ │ +Definition interfaceswitch.hh:42 │ │ │ │ │ +Dune::BasisInterfaceSwitch │ │ │ │ │ +Switch for uniform treatment of local and global basis classes. │ │ │ │ │ +Definition interfaceswitch.hh:154 │ │ │ │ │ +Dune::BasisInterfaceSwitch::dimRange │ │ │ │ │ +static const std::size_t dimRange │ │ │ │ │ +export dimension of the values │ │ │ │ │ +Definition interfaceswitch.hh:165 │ │ │ │ │ +Dune::BasisInterfaceSwitch::dimDomainLocal │ │ │ │ │ +static const std::size_t dimDomainLocal │ │ │ │ │ +export dimension of local coordinates │ │ │ │ │ +Definition interfaceswitch.hh:158 │ │ │ │ │ +Dune::BasisInterfaceSwitch::RangeField │ │ │ │ │ +Basis::Traits::RangeField RangeField │ │ │ │ │ +export field type of the values │ │ │ │ │ +Definition interfaceswitch.hh:163 │ │ │ │ │ +Dune::BasisInterfaceSwitch::Range │ │ │ │ │ +Basis::Traits::Range Range │ │ │ │ │ +export vector type of the values │ │ │ │ │ +Definition interfaceswitch.hh:167 │ │ │ │ │ +Dune::BasisInterfaceSwitch::gradient │ │ │ │ │ +static void gradient(const Basis &basis, const Geometry &geometry, const │ │ │ │ │ +DomainLocal &xl, std::vector< FieldMatrix< RangeField, 1, Geometry:: │ │ │ │ │ +coorddimension > > &grad) │ │ │ │ │ +Compute global gradient for scalar valued bases. │ │ │ │ │ +Definition interfaceswitch.hh:181 │ │ │ │ │ +Dune::BasisInterfaceSwitch::DomainLocal │ │ │ │ │ +Basis::Traits::DomainLocal DomainLocal │ │ │ │ │ +export vector type of the local coordinates │ │ │ │ │ +Definition interfaceswitch.hh:160 │ │ │ │ │ +Dune::BasisInterfaceSwitch::DomainField │ │ │ │ │ +Basis::Traits::DomainField DomainField │ │ │ │ │ +export field types of the coordinates │ │ │ │ │ +Definition interfaceswitch.hh:156 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00092.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk3d.hh File Reference │ │ │ │ +dune-localfunctions: interface.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,38 +65,60 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
pk3d.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
interface.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +
#include <array>
│ │ │ │ +#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::FiniteElementInterface
 Interface for global-valued finite elements. More...
 
struct  Dune::FiniteElementInterface::Traits
 types of component objects More...
 
class  Dune::FiniteElementFactoryInterface< Geometry, VertexOrder >
 Factory interface for global-valued finite elements. More...
 
class  Dune::BasisInterface
 Interface for global-valued shape functions. More...
 
struct  Dune::BasisInterface::Traits
 types of domain and range More...
 
struct  Dune::InterpolationInterface
 Interface for global-valued interpolation. More...
 
struct  Dune::CoefficientsInterface
 Interface for global-valued coefficients. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

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

│ │ │ │ -Typedefs

template<class D , class R , unsigned int k>
using Dune::Pk3DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, 3, k >
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,23 +6,44 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -Namespaces | Typedefs │ │ │ │ │ -pk3d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ + * common │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +interface.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ + Classes │ │ │ │ │ + class  Dune::FiniteElementInterface │ │ │ │ │ +  Interface for global-valued finite elements. More... │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::FiniteElementInterface::Traits │ │ │ │ │ +  types of component objects More... │ │ │ │ │ +  │ │ │ │ │ + class  Dune::FiniteElementFactoryInterface<_Geometry,_VertexOrder_> │ │ │ │ │ +  Factory interface for global-valued finite elements. More... │ │ │ │ │ +  │ │ │ │ │ + class  Dune::BasisInterface │ │ │ │ │ +  Interface for global-valued shape functions. More... │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::BasisInterface::Traits │ │ │ │ │ +  types of domain and range More... │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::InterpolationInterface │ │ │ │ │ +  Interface for global-valued interpolation. More... │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::CoefficientsInterface │ │ │ │ │ +  Interface for global-valued coefficients. More... │ │ │ │ │ +  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Typedefs │ │ │ │ │ -template │ │ │ │ │ -using Dune::Pk3DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, │ │ │ │ │ - 3, k > │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00092_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk3d.hh Source File │ │ │ │ +dune-localfunctions: interface.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,215 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pk3d.hh
│ │ │ │ +
interface.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
│ │ │ │ -
7
│ │ │ │ - │ │ │ │ -
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")]]
│ │ │ │ - │ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_INTERFACE_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_INTERFACE_HH
│ │ │ │ +
8
│ │ │ │ +
9#ifndef HEADERCHECK
│ │ │ │ +
10#error This header exists for documentation purposes only and should never be included directly.
│ │ │ │ +
11#endif
│ │ │ │ +
12
│ │ │ │ +
13#include <array>
│ │ │ │ +
14#include <cstddef>
│ │ │ │ +
15#include <vector>
│ │ │ │ +
16
│ │ │ │ +
17
│ │ │ │ +
18#include <dune/geometry/type.hh>
│ │ │ │ +
19
│ │ │ │ + │ │ │ │ +
21
│ │ │ │ +
22namespace Dune {
│ │ │ │
23
│ │ │ │ -
24}
│ │ │ │ -
25
│ │ │ │ -
26#endif
│ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27 struct ImplementationDefined;
│ │ │ │ +
28
│ │ │ │ +
29 public:
│ │ │ │ +
31
│ │ │ │ +
│ │ │ │ +
34 struct Traits
│ │ │ │ +
35 {
│ │ │ │ +
37
│ │ │ │ +
42 typedef ImplementationDefined Basis;
│ │ │ │ +
44
│ │ │ │ +
49 typedef ImplementationDefined Coefficients;
│ │ │ │ +
51
│ │ │ │ +
56 typedef ImplementationDefined Interpolation;
│ │ │ │ +
57 };
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
60
│ │ │ │ + │ │ │ │ + │ │ │ │ +
70
│ │ │ │ +
72
│ │ │ │ +
76 const Traits::Basis& basis() const;
│ │ │ │ +
78
│ │ │ │ + │ │ │ │ +
84
│ │ │ │ + │ │ │ │ +
90 GeometryType type() const;
│ │ │ │ +
91 };
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │ +
94
│ │ │ │ +
114 template<class Geometry, class VertexOrder>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
116 {
│ │ │ │ +
117 struct ImplementationDefined;
│ │ │ │ +
118
│ │ │ │ +
119 public:
│ │ │ │ +
121
│ │ │ │ +
126 typedef ImplementationDefined FiniteElement;
│ │ │ │ +
127
│ │ │ │ +
129
│ │ │ │ + │ │ │ │ +
133
│ │ │ │ +
154
│ │ │ │ +
156 const FiniteElement make(const Geometry&, const VertexOrder&, ...);
│ │ │ │ +
158 const FiniteElement make(const Geometry&, ...);
│ │ │ │ +
160 const FiniteElement make(const VertexOrder&, ...);
│ │ │ │ +
162
│ │ │ │ +
166 const FiniteElement make(const GeometryType&, ...);
│ │ │ │ +
168 const FiniteElement make(...);
│ │ │ │ +
169
│ │ │ │ +
171
│ │ │ │ +
172 };
│ │ │ │ +
│ │ │ │ +
173
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
176 {
│ │ │ │ +
177 struct ImplementationDefined;
│ │ │ │ +
178 constexpr static int implementationDefined = 42;
│ │ │ │ +
179
│ │ │ │ +
180 public:
│ │ │ │ +
182
│ │ │ │ +
│ │ │ │ +
187 struct Traits
│ │ │ │ +
188 {
│ │ │ │ +
191
│ │ │ │ +
193 typedef ImplementationDefined DomainFieldType;
│ │ │ │ +
194
│ │ │ │ +
196 constexpr static int dimDomain = implementationDefined;
│ │ │ │ +
197
│ │ │ │ +
199 typedef ImplementationDefined DomainType;
│ │ │ │ +
200
│ │ │ │ +
202
│ │ │ │ +
205
│ │ │ │ +
207 typedef ImplementationDefined RangeFieldType;
│ │ │ │ +
208
│ │ │ │ +
210 constexpr static int dimRange = implementationDefined;
│ │ │ │ +
211
│ │ │ │ +
213 typedef ImplementationDefined RangeType;
│ │ │ │ +
214
│ │ │ │ +
216
│ │ │ │ +
218
│ │ │ │ +
222 typedef ImplementationDefined Jacobian;
│ │ │ │ +
223 };
│ │ │ │ +
│ │ │ │ +
224
│ │ │ │ +
226 std::size_t size () const;
│ │ │ │ +
228 std::size_t order () const;
│ │ │ │ +
229
│ │ │ │ + │ │ │ │ +
232 std::vector<Traits::RangeType>& out) const;
│ │ │ │ +
233
│ │ │ │ + │ │ │ │ +
236 std::vector<Traits::Jacobian>& out) const;
│ │ │ │ +
237
│ │ │ │ +
243 void partial(const std::array<unsigned int,Traits::dimDomain>& order,
│ │ │ │ +
244 const typename Traits::DomainType& in,
│ │ │ │ +
245 std::vector<typename Traits::RangeType>& out) const;
│ │ │ │ +
246 };
│ │ │ │ +
│ │ │ │ +
247
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
250 {
│ │ │ │ +
252
│ │ │ │ + │ │ │ │ +
256
│ │ │ │ +
258
│ │ │ │ +
267 template<typename F, typename C>
│ │ │ │ +
268 void interpolate (const F& f, std::vector<C>& out) const;
│ │ │ │ +
269 };
│ │ │ │ +
│ │ │ │ +
270
│ │ │ │ +
272
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
278 {
│ │ │ │ +
280 std::size_t size() const;
│ │ │ │ +
281
│ │ │ │ +
283 const LocalKey& localKey(std::size_t i) const;
│ │ │ │ +
284 };
│ │ │ │ +
│ │ │ │ +
285}
│ │ │ │ +
286#endif // DUNE_LOCALFUNCTIONS_INTERFACE_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ +
Interface for global-valued finite elements.
Definition interface.hh:26
│ │ │ │ +
GeometryType type() const
Extract geometry type of this finite element.
│ │ │ │ +
const Traits::Basis & basis() const
Extract basis of this finite element.
│ │ │ │ +
const Traits::Coefficients & coefficients() const
Extract coefficients of this finite element.
│ │ │ │ +
const Traits::Interpolation & interpolation() const
Extract interpolation of this finite element.
│ │ │ │ +
FiniteElementInterface(const FiniteElementInterface &)
Finite elements are CopyConstructible.
│ │ │ │ +
FiniteElementInterface(...)
Construct a finite element.
│ │ │ │ +
types of component objects
Definition interface.hh:35
│ │ │ │ +
ImplementationDefined Basis
type of the Basis
Definition interface.hh:42
│ │ │ │ +
ImplementationDefined Coefficients
type of the Coefficients
Definition interface.hh:49
│ │ │ │ +
ImplementationDefined Interpolation
type of the Interpolation
Definition interface.hh:56
│ │ │ │ +
Factory interface for global-valued finite elements.
Definition interface.hh:116
│ │ │ │ +
const FiniteElement make(const VertexOrder &,...)
create a finite element from a vertex ordering
│ │ │ │ +
const FiniteElement make(...)
create a finite element
│ │ │ │ +
const FiniteElement make(const GeometryType &,...)
create a finite element from a geometry type
│ │ │ │ +
FiniteElementFactoryInterface(...)
Construct a finite element factory.
│ │ │ │ +
ImplementationDefined FiniteElement
Type of the finite element.
Definition interface.hh:126
│ │ │ │ +
const FiniteElement make(const Geometry &, const VertexOrder &,...)
create a finite element from a geometry and a vertex ordering
│ │ │ │ +
const FiniteElement make(const Geometry &,...)
create a finite element from a geometry
│ │ │ │ +
Interface for global-valued shape functions.
Definition interface.hh:176
│ │ │ │ +
void partial(const std::array< unsigned int, Traits::dimDomain > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of any order of all shape functions.
│ │ │ │ +
void evaluateFunction(const Traits::DomainType &in, std::vector< Traits::RangeType > &out) const
Evaluate all shape functions at given position.
│ │ │ │ +
std::size_t order() const
Polynomial order of the shape functions for quadrature.
│ │ │ │ +
void evaluateJacobian(const Traits::DomainType &in, std::vector< Traits::Jacobian > &out) const
Evaluate Jacobian of all shape functions at given position.
│ │ │ │ +
std::size_t size() const
Number of shape functions.
│ │ │ │ +
types of domain and range
Definition interface.hh:188
│ │ │ │ +
static constexpr int dimRange
dimension of the range
Definition interface.hh:210
│ │ │ │ +
ImplementationDefined Jacobian
Jacobian properties.
Definition interface.hh:222
│ │ │ │ +
ImplementationDefined DomainType
Type used for coordinate vectors in the domain.
Definition interface.hh:199
│ │ │ │ +
ImplementationDefined RangeFieldType
Field type of the range.
Definition interface.hh:207
│ │ │ │ +
ImplementationDefined DomainFieldType
Field type of the domain.
Definition interface.hh:193
│ │ │ │ +
ImplementationDefined RangeType
Type used for range values.
Definition interface.hh:213
│ │ │ │ +
static constexpr int dimDomain
dimension of the domain
Definition interface.hh:196
│ │ │ │ +
Interface for global-valued interpolation.
Definition interface.hh:250
│ │ │ │ +
BasisInterface::Traits Traits
Export basis traits.
Definition interface.hh:255
│ │ │ │ +
void interpolate(const F &f, std::vector< C > &out) const
Determine coefficients interpolating a given function.
│ │ │ │ +
Interface for global-valued coefficients.
Definition interface.hh:278
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
│ │ │ │ +
std::size_t size() const
number of coefficients
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,43 +7,292 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -pk3d.hh │ │ │ │ │ + * common │ │ │ │ │ +interface.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 │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#warning This header is deprecated │ │ │ │ │ - 11 │ │ │ │ │ - 12namespace Dune │ │ │ │ │ - 13{ │ │ │ │ │ - 14 │ │ │ │ │ - 19 template │ │ │ │ │ -20 using Pk3DLocalFiniteElement │ │ │ │ │ - 21 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ - 22 = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ + 5 │ │ │ │ │ + 6#ifndef DUNE_LOCALFUNCTIONS_INTERFACE_HH │ │ │ │ │ + 7#define DUNE_LOCALFUNCTIONS_INTERFACE_HH │ │ │ │ │ + 8 │ │ │ │ │ + 9#ifndef HEADERCHECK │ │ │ │ │ + 10#error This header exists for documentation purposes only and should never │ │ │ │ │ +be included directly. │ │ │ │ │ + 11#endif │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16 │ │ │ │ │ + 17 │ │ │ │ │ + 18#include │ │ │ │ │ + 19 │ │ │ │ │ + 20#include │ │ │ │ │ + 21 │ │ │ │ │ + 22namespace Dune { │ │ │ │ │ 23 │ │ │ │ │ - 24} │ │ │ │ │ - 25 │ │ │ │ │ - 26#endif │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ +25 class FiniteElementInterface │ │ │ │ │ + 26 { │ │ │ │ │ + 27 struct ImplementationDefined; │ │ │ │ │ + 28 │ │ │ │ │ + 29 public: │ │ │ │ │ + 31 │ │ │ │ │ +34 struct Traits │ │ │ │ │ + 35 { │ │ │ │ │ + 37 │ │ │ │ │ +42 typedef ImplementationDefined Basis; │ │ │ │ │ + 44 │ │ │ │ │ +49 typedef ImplementationDefined Coefficients; │ │ │ │ │ + 51 │ │ │ │ │ +56 typedef ImplementationDefined Interpolation; │ │ │ │ │ + 57 }; │ │ │ │ │ + 58 │ │ │ │ │ + 60 │ │ │ │ │ +67 FiniteElementInterface(...); │ │ │ │ │ +69 FiniteElementInterface(const FiniteElementInterface&); │ │ │ │ │ + 70 │ │ │ │ │ + 72 │ │ │ │ │ +76 const Traits::Basis& basis() const; │ │ │ │ │ + 78 │ │ │ │ │ +82 const Traits::Coefficients& coefficients() const; │ │ │ │ │ + 84 │ │ │ │ │ +88 const Traits::Interpolation& interpolation() const; │ │ │ │ │ +90 GeometryType type() const; │ │ │ │ │ + 91 }; │ │ │ │ │ + 92 │ │ │ │ │ + 94 │ │ │ │ │ + 114 template │ │ │ │ │ +115 class FiniteElementFactoryInterface │ │ │ │ │ + 116 { │ │ │ │ │ + 117 struct ImplementationDefined; │ │ │ │ │ + 118 │ │ │ │ │ + 119 public: │ │ │ │ │ + 121 │ │ │ │ │ +126 typedef ImplementationDefined FiniteElement; │ │ │ │ │ + 127 │ │ │ │ │ + 129 │ │ │ │ │ +132 FiniteElementFactoryInterface(...); │ │ │ │ │ + 133 │ │ │ │ │ + 154 │ │ │ │ │ +156 const FiniteElement make(const Geometry&, const VertexOrder&, ...); │ │ │ │ │ +158 const FiniteElement make(const Geometry&, ...); │ │ │ │ │ +160 const FiniteElement make(const VertexOrder&, ...); │ │ │ │ │ + 162 │ │ │ │ │ +166 const FiniteElement make(const GeometryType&, ...); │ │ │ │ │ +168 const FiniteElement make(...); │ │ │ │ │ + 169 │ │ │ │ │ + 171 │ │ │ │ │ + 172 }; │ │ │ │ │ + 173 │ │ │ │ │ +175 class BasisInterface │ │ │ │ │ + 176 { │ │ │ │ │ + 177 struct ImplementationDefined; │ │ │ │ │ + 178 constexpr static int implementationDefined = 42; │ │ │ │ │ + 179 │ │ │ │ │ + 180 public: │ │ │ │ │ + 182 │ │ │ │ │ +187 struct Traits │ │ │ │ │ + 188 { │ │ │ │ │ + 191 │ │ │ │ │ +193 typedef ImplementationDefined DomainFieldType; │ │ │ │ │ + 194 │ │ │ │ │ +196 constexpr static int dimDomain = implementationDefined; │ │ │ │ │ + 197 │ │ │ │ │ +199 typedef ImplementationDefined DomainType; │ │ │ │ │ + 200 │ │ │ │ │ + 202 │ │ │ │ │ + 205 │ │ │ │ │ +207 typedef ImplementationDefined RangeFieldType; │ │ │ │ │ + 208 │ │ │ │ │ +210 constexpr static int dimRange = implementationDefined; │ │ │ │ │ + 211 │ │ │ │ │ +213 typedef ImplementationDefined RangeType; │ │ │ │ │ + 214 │ │ │ │ │ + 216 │ │ │ │ │ + 218 │ │ │ │ │ +222 typedef ImplementationDefined Jacobian; │ │ │ │ │ + 223 }; │ │ │ │ │ + 224 │ │ │ │ │ +226 std::size_t size () const; │ │ │ │ │ +228 std::size_t order () const; │ │ │ │ │ + 229 │ │ │ │ │ +231 void evaluateFunction(const Traits::DomainType& in, │ │ │ │ │ + 232 std::vector& out) const; │ │ │ │ │ + 233 │ │ │ │ │ +235 void evaluateJacobian(const Traits::DomainType& in, │ │ │ │ │ + 236 std::vector& out) const; │ │ │ │ │ + 237 │ │ │ │ │ +243 void partial(const std::array& order, │ │ │ │ │ + 244 const typename Traits::DomainType& in, │ │ │ │ │ + 245 std::vector& out) const; │ │ │ │ │ + 246 }; │ │ │ │ │ + 247 │ │ │ │ │ +249 struct InterpolationInterface │ │ │ │ │ + 250 { │ │ │ │ │ + 252 │ │ │ │ │ +255 typedef BasisInterface::Traits Traits; │ │ │ │ │ + 256 │ │ │ │ │ + 258 │ │ │ │ │ + 267 template │ │ │ │ │ +268 void interpolate (const F& f, std::vector& out) const; │ │ │ │ │ + 269 }; │ │ │ │ │ + 270 │ │ │ │ │ + 272 │ │ │ │ │ +277 struct CoefficientsInterface │ │ │ │ │ + 278 { │ │ │ │ │ +280 std::size_t size() const; │ │ │ │ │ + 281 │ │ │ │ │ +283 const LocalKey& localKey(std::size_t i) const; │ │ │ │ │ + 284 }; │ │ │ │ │ + 285} │ │ │ │ │ + 286#endif // DUNE_LOCALFUNCTIONS_INTERFACE_HH │ │ │ │ │ +localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -Definition lagrangesimplex.hh:838 │ │ │ │ │ +Dune::FiniteElementInterface │ │ │ │ │ +Interface for global-valued finite elements. │ │ │ │ │ +Definition interface.hh:26 │ │ │ │ │ +Dune::FiniteElementInterface::type │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +Extract geometry type of this finite element. │ │ │ │ │ +Dune::FiniteElementInterface::basis │ │ │ │ │ +const Traits::Basis & basis() const │ │ │ │ │ +Extract basis of this finite element. │ │ │ │ │ +Dune::FiniteElementInterface::coefficients │ │ │ │ │ +const Traits::Coefficients & coefficients() const │ │ │ │ │ +Extract coefficients of this finite element. │ │ │ │ │ +Dune::FiniteElementInterface::interpolation │ │ │ │ │ +const Traits::Interpolation & interpolation() const │ │ │ │ │ +Extract interpolation of this finite element. │ │ │ │ │ +Dune::FiniteElementInterface::FiniteElementInterface │ │ │ │ │ +FiniteElementInterface(const FiniteElementInterface &) │ │ │ │ │ +Finite elements are CopyConstructible. │ │ │ │ │ +Dune::FiniteElementInterface::FiniteElementInterface │ │ │ │ │ +FiniteElementInterface(...) │ │ │ │ │ +Construct a finite element. │ │ │ │ │ +Dune::FiniteElementInterface::Traits │ │ │ │ │ +types of component objects │ │ │ │ │ +Definition interface.hh:35 │ │ │ │ │ +Dune::FiniteElementInterface::Traits::Basis │ │ │ │ │ +ImplementationDefined Basis │ │ │ │ │ +type of the Basis │ │ │ │ │ +Definition interface.hh:42 │ │ │ │ │ +Dune::FiniteElementInterface::Traits::Coefficients │ │ │ │ │ +ImplementationDefined Coefficients │ │ │ │ │ +type of the Coefficients │ │ │ │ │ +Definition interface.hh:49 │ │ │ │ │ +Dune::FiniteElementInterface::Traits::Interpolation │ │ │ │ │ +ImplementationDefined Interpolation │ │ │ │ │ +type of the Interpolation │ │ │ │ │ +Definition interface.hh:56 │ │ │ │ │ +Dune::FiniteElementFactoryInterface │ │ │ │ │ +Factory interface for global-valued finite elements. │ │ │ │ │ +Definition interface.hh:116 │ │ │ │ │ +Dune::FiniteElementFactoryInterface::make │ │ │ │ │ +const FiniteElement make(const VertexOrder &,...) │ │ │ │ │ +create a finite element from a vertex ordering │ │ │ │ │ +Dune::FiniteElementFactoryInterface::make │ │ │ │ │ +const FiniteElement make(...) │ │ │ │ │ +create a finite element │ │ │ │ │ +Dune::FiniteElementFactoryInterface::make │ │ │ │ │ +const FiniteElement make(const GeometryType &,...) │ │ │ │ │ +create a finite element from a geometry type │ │ │ │ │ +Dune::FiniteElementFactoryInterface::FiniteElementFactoryInterface │ │ │ │ │ +FiniteElementFactoryInterface(...) │ │ │ │ │ +Construct a finite element factory. │ │ │ │ │ +Dune::FiniteElementFactoryInterface::FiniteElement │ │ │ │ │ +ImplementationDefined FiniteElement │ │ │ │ │ +Type of the finite element. │ │ │ │ │ +Definition interface.hh:126 │ │ │ │ │ +Dune::FiniteElementFactoryInterface::make │ │ │ │ │ +const FiniteElement make(const Geometry &, const VertexOrder &,...) │ │ │ │ │ +create a finite element from a geometry and a vertex ordering │ │ │ │ │ +Dune::FiniteElementFactoryInterface::make │ │ │ │ │ +const FiniteElement make(const Geometry &,...) │ │ │ │ │ +create a finite element from a geometry │ │ │ │ │ +Dune::BasisInterface │ │ │ │ │ +Interface for global-valued shape functions. │ │ │ │ │ +Definition interface.hh:176 │ │ │ │ │ +Dune::BasisInterface::partial │ │ │ │ │ +void partial(const std::array< unsigned int, Traits::dimDomain > &order, const │ │ │ │ │ +typename Traits::DomainType &in, std::vector< typename Traits::RangeType > │ │ │ │ │ +&out) const │ │ │ │ │ +Evaluate partial derivatives of any order of all shape functions. │ │ │ │ │ +Dune::BasisInterface::evaluateFunction │ │ │ │ │ +void evaluateFunction(const Traits::DomainType &in, std::vector< Traits:: │ │ │ │ │ +RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions at given position. │ │ │ │ │ +Dune::BasisInterface::order │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +Polynomial order of the shape functions for quadrature. │ │ │ │ │ +Dune::BasisInterface::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const Traits::DomainType &in, std::vector< Traits:: │ │ │ │ │ +Jacobian > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions at given position. │ │ │ │ │ +Dune::BasisInterface::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +Number of shape functions. │ │ │ │ │ +Dune::BasisInterface::Traits │ │ │ │ │ +types of domain and range │ │ │ │ │ +Definition interface.hh:188 │ │ │ │ │ +Dune::BasisInterface::Traits::dimRange │ │ │ │ │ +static constexpr int dimRange │ │ │ │ │ +dimension of the range │ │ │ │ │ +Definition interface.hh:210 │ │ │ │ │ +Dune::BasisInterface::Traits::Jacobian │ │ │ │ │ +ImplementationDefined Jacobian │ │ │ │ │ +Jacobian properties. │ │ │ │ │ +Definition interface.hh:222 │ │ │ │ │ +Dune::BasisInterface::Traits::DomainType │ │ │ │ │ +ImplementationDefined DomainType │ │ │ │ │ +Type used for coordinate vectors in the domain. │ │ │ │ │ +Definition interface.hh:199 │ │ │ │ │ +Dune::BasisInterface::Traits::RangeFieldType │ │ │ │ │ +ImplementationDefined RangeFieldType │ │ │ │ │ +Field type of the range. │ │ │ │ │ +Definition interface.hh:207 │ │ │ │ │ +Dune::BasisInterface::Traits::DomainFieldType │ │ │ │ │ +ImplementationDefined DomainFieldType │ │ │ │ │ +Field type of the domain. │ │ │ │ │ +Definition interface.hh:193 │ │ │ │ │ +Dune::BasisInterface::Traits::RangeType │ │ │ │ │ +ImplementationDefined RangeType │ │ │ │ │ +Type used for range values. │ │ │ │ │ +Definition interface.hh:213 │ │ │ │ │ +Dune::BasisInterface::Traits::dimDomain │ │ │ │ │ +static constexpr int dimDomain │ │ │ │ │ +dimension of the domain │ │ │ │ │ +Definition interface.hh:196 │ │ │ │ │ +Dune::InterpolationInterface │ │ │ │ │ +Interface for global-valued interpolation. │ │ │ │ │ +Definition interface.hh:250 │ │ │ │ │ +Dune::InterpolationInterface::Traits │ │ │ │ │ +BasisInterface::Traits Traits │ │ │ │ │ +Export basis traits. │ │ │ │ │ +Definition interface.hh:255 │ │ │ │ │ +Dune::InterpolationInterface::interpolate │ │ │ │ │ +void interpolate(const F &f, std::vector< C > &out) const │ │ │ │ │ +Determine coefficients interpolating a given function. │ │ │ │ │ +Dune::CoefficientsInterface │ │ │ │ │ +Interface for global-valued coefficients. │ │ │ │ │ +Definition interface.hh:278 │ │ │ │ │ +Dune::CoefficientsInterface::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Dune::CoefficientsInterface::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00095.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0localcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: localfiniteelementtraits.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,31 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
p0localcoefficients.hh File Reference
│ │ │ │ +
localfiniteelementtraits.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::P0LocalCoefficients
 Layout map for P0 elements. More...
struct  Dune::LocalFiniteElementTraits< LB, LC, LI >
 traits helper struct More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,21 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ - * p0 │ │ │ │ │ + * common │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -p0localcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +localfiniteelementtraits.hh File Reference │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::P0LocalCoefficients │ │ │ │ │ -  Layout map for P0 elements. More... │ │ │ │ │ +struct  Dune::LocalFiniteElementTraits<_LB,_LC,_LI_> │ │ │ │ │ +  traits helper struct More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00095_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0localcoefficients.hh Source File │ │ │ │ +dune-localfunctions: localfiniteelementtraits.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,74 +70,50 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
p0localcoefficients.hh
│ │ │ │ +
localfiniteelementtraits.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_LOCALFINITEELEMENTTRAITS_HH
│ │ │ │ +
6#define DUNE_LOCALFINITEELEMENTTRAITS_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
│ │ │ │ - │ │ │ │ +
8namespace Dune {
│ │ │ │ +
9
│ │ │ │ +
11 template<class LB, class LC, class LI>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
13 {
│ │ │ │ +
16 typedef LB LocalBasisType;
│ │ │ │ +
17
│ │ │ │ + │ │ │ │ +
21
│ │ │ │ + │ │ │ │ +
25 };
│ │ │ │ +
│ │ │ │ +
26
│ │ │ │ +
27}
│ │ │ │ +
28
│ │ │ │ +
29#endif
│ │ │ │
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,74 +7,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ - * p0 │ │ │ │ │ -p0localcoefficients.hh │ │ │ │ │ + * common │ │ │ │ │ +localfiniteelementtraits.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_LOCALFINITEELEMENTTRAITS_HH │ │ │ │ │ + 6#define DUNE_LOCALFINITEELEMENTTRAITS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14namespace Dune │ │ │ │ │ - 15{ │ │ │ │ │ - 16 │ │ │ │ │ -23 class P0LocalCoefficients │ │ │ │ │ - 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 │ │ │ │ │ -localkey.hh │ │ │ │ │ + 8namespace Dune { │ │ │ │ │ + 9 │ │ │ │ │ + 11 template │ │ │ │ │ +12 struct LocalFiniteElementTraits │ │ │ │ │ + 13 { │ │ │ │ │ +16 typedef LB LocalBasisType; │ │ │ │ │ + 17 │ │ │ │ │ +20 typedef LC LocalCoefficientsType; │ │ │ │ │ + 21 │ │ │ │ │ +24 typedef LI LocalInterpolationType; │ │ │ │ │ + 25 }; │ │ │ │ │ + 26 │ │ │ │ │ + 27} │ │ │ │ │ + 28 │ │ │ │ │ + 29#endif │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::P0LocalCoefficients │ │ │ │ │ -Layout map for P0 elements. │ │ │ │ │ -Definition p0localcoefficients.hh:24 │ │ │ │ │ -Dune::P0LocalCoefficients::P0LocalCoefficients │ │ │ │ │ -P0LocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition p0localcoefficients.hh:27 │ │ │ │ │ -Dune::P0LocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition p0localcoefficients.hh:37 │ │ │ │ │ -Dune::P0LocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition p0localcoefficients.hh:31 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00098.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0localinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: virtualwrappers.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
p0localinterpolation.hh File Reference
│ │ │ │ +
virtualwrappers.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +
#include <array>
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/localfunctions/common/virtualinterface.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::P0LocalInterpolation< LB >
struct  Dune::LocalFiniteElementCloneFactoryHelper< Imp, IsInterface >
 
struct  Dune::LocalFiniteElementCloneFactory< Imp >
 
class  Dune::LocalBasisVirtualImp< T, Imp >
 class for wrapping a basis using the virtual interface More...
 
class  Dune::LocalInterpolationVirtualImp< DomainType, RangeType, Imp >
 class for wrapping a local interpolation using the virtual interface More...
 
class  Dune::LocalCoefficientsVirtualImp< Imp >
 class for wrapping local coefficients using the virtual interface More...
 
class  Dune::LocalFiniteElementVirtualImp< Imp >
 class for wrapping a finite element using the virtual interface More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,24 +6,41 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ - * p0 │ │ │ │ │ + * common │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -p0localinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +virtualwrappers.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::P0LocalInterpolation<_LB_> │ │ │ │ │ +struct  Dune::LocalFiniteElementCloneFactoryHelper<_Imp,_IsInterface_> │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::LocalFiniteElementCloneFactory<_Imp_> │ │ │ │ │ +  │ │ │ │ │ + class  Dune::LocalBasisVirtualImp<_T,_Imp_> │ │ │ │ │ +  class for wrapping a basis using the virtual interface More... │ │ │ │ │ +  │ │ │ │ │ + class  Dune::LocalInterpolationVirtualImp<_DomainType,_RangeType,_Imp_> │ │ │ │ │ +  class for wrapping a local interpolation using the virtual interface │ │ │ │ │ + More... │ │ │ │ │ +  │ │ │ │ │ + class  Dune::LocalCoefficientsVirtualImp<_Imp_> │ │ │ │ │ +  class for wrapping local coefficients using the virtual interface │ │ │ │ │ + More... │ │ │ │ │ +  │ │ │ │ │ + class  Dune::LocalFiniteElementVirtualImp<_Imp_> │ │ │ │ │ +  class for wrapping a finite element using the virtual interface │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00098_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0localinterpolation.hh Source File │ │ │ │ +dune-localfunctions: virtualwrappers.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,76 +70,410 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
p0localinterpolation.hh
│ │ │ │ +
virtualwrappers.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_COMMON_VIRTUALWRAPPERS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_COMMON_VIRTUALWRAPPERS_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>
│ │ │ │ +
8#include <array>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
17 // forward declaration needed by friend declarations
│ │ │ │ +
18 template<class Imp>
│ │ │ │ +
19 class LocalFiniteElementVirtualImp;
│ │ │ │ +
20
│ │ │ │ +
21 // default clone method is the copy constructor
│ │ │ │ +
22 template<class Imp, bool IsInterface>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │
│ │ │ │ -
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;
│ │ │ │ +
25 static Imp* clone(const Imp& imp)
│ │ │ │ +
26 {
│ │ │ │ +
27 return new Imp(imp);
│ │ │ │ +
28 }
│ │ │ │ +
│ │ │ │ +
29 };
│ │ │ │ +
│ │ │ │
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
│ │ │ │ +
31 // if FE derives from virtual interface the clone method is used
│ │ │ │ +
32 template<class Imp>
│ │ │ │ +
33 struct LocalFiniteElementCloneFactoryHelper<Imp, true>
│ │ │ │ +
34 {
│ │ │ │ +
35 static Imp* clone(const Imp& imp)
│ │ │ │ +
36 {
│ │ │ │ +
37 return imp.clone();
│ │ │ │ +
38 }
│ │ │ │ +
39 };
│ │ │ │ +
40
│ │ │ │ +
41 // factory template to clone and create an objects
│ │ │ │ +
42 template<class Imp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
44 {
│ │ │ │ + │ │ │ │ +
46
│ │ │ │ +
│ │ │ │ +
47 static Imp* clone(const Imp& imp)
│ │ │ │ +
48 {
│ │ │ │ + │ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
│ │ │ │ +
52 static Imp* create()
│ │ │ │ +
53 {
│ │ │ │ +
54 return new Imp;
│ │ │ │ +
55 }
│ │ │ │ +
│ │ │ │ +
56 };
│ │ │ │ +
│ │ │ │ +
57
│ │ │ │ +
58
│ │ │ │ +
59
│ │ │ │ +
60 // -----------------------------------------------------------------
│ │ │ │ +
61 // Basis
│ │ │ │ +
62 // -----------------------------------------------------------------
│ │ │ │ +
63
│ │ │ │ +
64
│ │ │ │ +
65
│ │ │ │ +
72 template<class T , class Imp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
75 {
│ │ │ │ +
76 template<class FEImp>
│ │ │ │ + │ │ │ │ +
78
│ │ │ │ +
79 protected:
│ │ │ │ +
80
│ │ │ │ +
│ │ │ │ +
82 LocalBasisVirtualImp( const Imp &imp )
│ │ │ │ +
83 : impl_(imp)
│ │ │ │ +
84 {}
│ │ │ │ +
│ │ │ │ +
85
│ │ │ │ +
86 public:
│ │ │ │ +
87 using Traits = T;
│ │ │ │ +
88
│ │ │ │ +
│ │ │ │ +
90 unsigned int size () const
│ │ │ │ +
91 {
│ │ │ │ +
92 return impl_.size();
│ │ │ │ +
93 }
│ │ │ │ +
│ │ │ │ +
94
│ │ │ │ +
│ │ │ │ +
96 unsigned int order () const
│ │ │ │ +
97 {
│ │ │ │ +
98 return impl_.order();
│ │ │ │ +
99 }
│ │ │ │ +
│ │ │ │ +
100
│ │ │ │ +
│ │ │ │ +
102 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
103 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
104 {
│ │ │ │ +
105 impl_.evaluateFunction(in,out);
│ │ │ │ +
106 }
│ │ │ │ +
│ │ │ │ +
107
│ │ │ │ +
│ │ │ │ +
109 inline void evaluateJacobian(
│ │ │ │ +
110 const typename Traits::DomainType& in,
│ │ │ │ +
111 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
112 {
│ │ │ │ +
113 impl_.evaluateJacobian(in,out);
│ │ │ │ +
114 }
│ │ │ │ +
│ │ │ │ +
115
│ │ │ │ +
│ │ │ │ +
121 void partial(const std::array<unsigned int,Traits::dimDomain>& order,
│ │ │ │ +
122 const typename Traits::DomainType& in,
│ │ │ │ +
123 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
124 {
│ │ │ │ +
125 impl_.partial(order,in,out);
│ │ │ │ +
126 }
│ │ │ │ +
│ │ │ │ +
127
│ │ │ │ +
128 protected:
│ │ │ │ +
129 const Imp& impl_;
│ │ │ │ +
130 };
│ │ │ │ +
│ │ │ │ +
131
│ │ │ │ +
132
│ │ │ │ +
133
│ │ │ │ +
134 // -----------------------------------------------------------------
│ │ │ │ +
135 // Interpolation
│ │ │ │ +
136 // -----------------------------------------------------------------
│ │ │ │ +
137
│ │ │ │ +
146 template<class DomainType, class RangeType, class Imp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
148 : public LocalInterpolationVirtualInterface< DomainType, RangeType >
│ │ │ │ +
149 {
│ │ │ │ +
150 template<class FEImp>
│ │ │ │ + │ │ │ │ +
152
│ │ │ │ + │ │ │ │ +
154
│ │ │ │ +
155 protected:
│ │ │ │ +
156
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
159 : impl_(imp) {}
│ │ │ │ +
│ │ │ │ +
160
│ │ │ │ +
161 public:
│ │ │ │ +
162
│ │ │ │ + │ │ │ │ +
164
│ │ │ │ + │ │ │ │ +
166
│ │ │ │ +
│ │ │ │ +
168 virtual void interpolate (const FunctionType& f, std::vector<CoefficientType>& out) const
│ │ │ │ +
169 {
│ │ │ │ +
170 impl_.interpolate(f,out);
│ │ │ │ +
171 }
│ │ │ │ +
│ │ │ │ +
172
│ │ │ │ +
173 protected:
│ │ │ │ +
174 const Imp& impl_;
│ │ │ │ +
175
│ │ │ │ +
176 };
│ │ │ │ +
│ │ │ │ +
177
│ │ │ │ +
178
│ │ │ │ +
179
│ │ │ │ +
180 // -----------------------------------------------------------------
│ │ │ │ +
181 // Coefficients
│ │ │ │ +
182 // -----------------------------------------------------------------
│ │ │ │ +
183
│ │ │ │ +
190 template<class Imp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
193 {
│ │ │ │ +
194 template<class FEImp>
│ │ │ │ + │ │ │ │ +
196
│ │ │ │ +
197 protected:
│ │ │ │ +
198
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
201 : impl_(imp)
│ │ │ │ +
202 {}
│ │ │ │ +
│ │ │ │ +
203
│ │ │ │ +
204 public:
│ │ │ │ +
205
│ │ │ │ +
│ │ │ │ +
207 std::size_t size () const
│ │ │ │ +
208 {
│ │ │ │ +
209 return impl_.size();
│ │ │ │ +
210 }
│ │ │ │ +
│ │ │ │ +
211
│ │ │ │ +
│ │ │ │ +
213 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
214 {
│ │ │ │ +
215 return impl_.localKey(i);
│ │ │ │ +
216 }
│ │ │ │ +
│ │ │ │ +
217
│ │ │ │ +
218 protected:
│ │ │ │ +
219 const Imp& impl_;
│ │ │ │ +
220
│ │ │ │ +
221 };
│ │ │ │ +
│ │ │ │ +
222
│ │ │ │ +
223
│ │ │ │ +
224
│ │ │ │ +
225 // -----------------------------------------------------------------
│ │ │ │ +
226 // Finite Element
│ │ │ │ +
227 // -----------------------------------------------------------------
│ │ │ │ +
228
│ │ │ │ +
237 template<class Imp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
239 : public LocalFiniteElementVirtualInterface<typename Imp::Traits::LocalBasisType::Traits>
│ │ │ │ +
240 {
│ │ │ │ +
241 using LocalBasisTraits = typename Imp::Traits::LocalBasisType::Traits;
│ │ │ │ + │ │ │ │ +
243
│ │ │ │ +
244 public:
│ │ │ │ +
245 typedef typename Interface::Traits Traits;
│ │ │ │ +
246
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
253 {}
│ │ │ │ +
│ │ │ │ +
254
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
257 : impl_(LocalFiniteElementCloneFactory<Imp>::create()),
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
261 {}
│ │ │ │ +
│ │ │ │ +
262
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
269 {}
│ │ │ │ +
│ │ │ │ +
270
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
272 {
│ │ │ │ +
273 delete impl_;
│ │ │ │ +
274 }
│ │ │ │ +
│ │ │ │ +
275
│ │ │ │ +
│ │ │ │ +
277 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
278 {
│ │ │ │ +
279 return localBasisImp_;
│ │ │ │ +
280 }
│ │ │ │ +
│ │ │ │ +
281
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
284 {
│ │ │ │ + │ │ │ │ +
286 }
│ │ │ │ +
│ │ │ │ +
287
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
290 {
│ │ │ │ + │ │ │ │ +
292 }
│ │ │ │ +
│ │ │ │ +
293
│ │ │ │ +
│ │ │ │ +
295 unsigned int size () const
│ │ │ │ +
296 {
│ │ │ │ +
297 return impl_->size();
│ │ │ │ +
298 }
│ │ │ │ +
│ │ │ │ +
299
│ │ │ │ +
│ │ │ │ +
301 const GeometryType type () const
│ │ │ │ +
302 {
│ │ │ │ +
303 return impl_->type();
│ │ │ │ +
304 }
│ │ │ │ +
│ │ │ │ +
305
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
312 {
│ │ │ │ +
313 return new LocalFiniteElementVirtualImp<Imp>(*this);
│ │ │ │ +
314 }
│ │ │ │ +
│ │ │ │ +
315
│ │ │ │ +
316 protected:
│ │ │ │ +
317 const Imp* impl_;
│ │ │ │ +
318
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
323 typename Imp::Traits::LocalInterpolationType> localInterpolationImp_;
│ │ │ │ +
324 };
│ │ │ │ +
│ │ │ │ +
325}
│ │ │ │ +
326#endif
│ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
virtual base class for a local interpolation
Definition virtualinterface.hh:190
│ │ │ │ +
std::function< RangeType(DomainType)> FunctionType
type of function to interpolate
Definition virtualinterface.hh:194
│ │ │ │ +
RangeType::field_type CoefficientType
type of the coefficient vector in the interpolate method
Definition virtualinterface.hh:197
│ │ │ │ +
virtual base class for a local basis
Definition virtualinterface.hh:97
│ │ │ │ +
virtual base class for local coefficients
Definition virtualinterface.hh:259
│ │ │ │ +
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
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition virtualwrappers.hh:277
│ │ │ │ +
virtual LocalFiniteElementVirtualImp< Imp > * clone() const
clone this wrapper
Definition virtualwrappers.hh:311
│ │ │ │ +
const LocalInterpolationVirtualImp< typename LocalBasisTraits::DomainType, typename LocalBasisTraits::RangeType, typename Imp::Traits::LocalInterpolationType > localInterpolationImp_
Definition virtualwrappers.hh:323
│ │ │ │ +
LocalFiniteElementVirtualImp(const Imp &imp)
taking a LocalFiniteElementVirtualInterface implementation
Definition virtualwrappers.hh:248
│ │ │ │ +
Interface::Traits Traits
Definition virtualwrappers.hh:245
│ │ │ │ +
LocalFiniteElementVirtualImp()
Default constructor. Assumes that the implementation class is default constructible as well.
Definition virtualwrappers.hh:256
│ │ │ │ +
LocalFiniteElementVirtualImp(const LocalFiniteElementVirtualImp &other)
Copy contructor needed for deep copy.
Definition virtualwrappers.hh:264
│ │ │ │ +
~LocalFiniteElementVirtualImp()
Definition virtualwrappers.hh:271
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition virtualwrappers.hh:295
│ │ │ │ +
const GeometryType type() const
Definition virtualwrappers.hh:301
│ │ │ │ +
const Imp * impl_
Definition virtualwrappers.hh:317
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition virtualwrappers.hh:283
│ │ │ │ +
const LocalBasisVirtualImp< LocalBasisTraits, typename Imp::Traits::LocalBasisType > localBasisImp_
Definition virtualwrappers.hh:319
│ │ │ │ +
const LocalCoefficientsVirtualImp< typename Imp::Traits::LocalCoefficientsType > localCoefficientsImp_
Definition virtualwrappers.hh:320
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition virtualwrappers.hh:289
│ │ │ │ +
Definition virtualwrappers.hh:24
│ │ │ │ +
static Imp * clone(const Imp &imp)
Definition virtualwrappers.hh:25
│ │ │ │ +
Definition virtualwrappers.hh:44
│ │ │ │ +
static Imp * clone(const Imp &imp)
Definition virtualwrappers.hh:47
│ │ │ │ +
static Imp * create()
Definition virtualwrappers.hh:52
│ │ │ │ +
LocalFiniteElementVirtualInterface< typename Imp::Traits::LocalBasisType::Traits > Interface
Definition virtualwrappers.hh:45
│ │ │ │ +
class for wrapping a basis using the virtual interface
Definition virtualwrappers.hh:75
│ │ │ │ +
void partial(const std::array< unsigned int, Traits::dimDomain > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of any order of all shape functions.
Definition virtualwrappers.hh:121
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all basis function at given position.
Definition virtualwrappers.hh:102
│ │ │ │ +
const Imp & impl_
Definition virtualwrappers.hh:129
│ │ │ │ +
unsigned int size() const
Number of shape functions.
Definition virtualwrappers.hh:90
│ │ │ │ +
T Traits
Definition virtualwrappers.hh:87
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate jacobian of all shape functions at given position.
Definition virtualwrappers.hh:109
│ │ │ │ +
LocalBasisVirtualImp(const Imp &imp)
constructor taking an implementation of the interface
Definition virtualwrappers.hh:82
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition virtualwrappers.hh:96
│ │ │ │ +
class for wrapping a local interpolation using the virtual interface
Definition virtualwrappers.hh:149
│ │ │ │ +
virtual void interpolate(const FunctionType &f, std::vector< CoefficientType > &out) const
determine coefficients interpolating a given function
Definition virtualwrappers.hh:168
│ │ │ │ +
const Imp & impl_
Definition virtualwrappers.hh:174
│ │ │ │ +
Base::FunctionType FunctionType
Definition virtualwrappers.hh:163
│ │ │ │ +
LocalInterpolationVirtualImp(const Imp &imp)
constructor taking an implementation of the Dune::LocalInterpolationVirtualInterface
Definition virtualwrappers.hh:158
│ │ │ │ +
Base::CoefficientType CoefficientType
Definition virtualwrappers.hh:165
│ │ │ │ +
class for wrapping local coefficients using the virtual interface
Definition virtualwrappers.hh:193
│ │ │ │ +
LocalCoefficientsVirtualImp(const Imp &imp)
constructor taking an implementation of the Dune::LocalCoefficientsVirtualInterface
Definition virtualwrappers.hh:200
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition virtualwrappers.hh:213
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition virtualwrappers.hh:207
│ │ │ │ +
const Imp & impl_
Definition virtualwrappers.hh:219
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,72 +7,491 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ - * p0 │ │ │ │ │ -p0localinterpolation.hh │ │ │ │ │ + * common │ │ │ │ │ +virtualwrappers.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_COMMON_VIRTUALWRAPPERS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_COMMON_VIRTUALWRAPPERS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 16 template │ │ │ │ │ -17 class P0LocalInterpolation │ │ │ │ │ - 18 { │ │ │ │ │ - 19 public: │ │ │ │ │ -20 P0LocalInterpolation (const GeometryType& gt) : gt_(gt) │ │ │ │ │ - 21 {} │ │ │ │ │ - 22 │ │ │ │ │ - 24 template │ │ │ │ │ -25 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14namespace Dune │ │ │ │ │ + 15{ │ │ │ │ │ + 16 │ │ │ │ │ + 17 // forward declaration needed by friend declarations │ │ │ │ │ + 18 template │ │ │ │ │ + 19 class LocalFiniteElementVirtualImp; │ │ │ │ │ + 20 │ │ │ │ │ + 21 // default clone method is the copy constructor │ │ │ │ │ + 22 template │ │ │ │ │ +23 struct LocalFiniteElementCloneFactoryHelper │ │ │ │ │ + 24 { │ │ │ │ │ +25 static Imp* clone(const Imp& imp) │ │ │ │ │ 26 { │ │ │ │ │ - 27 typedef typename LB::Traits::DomainType DomainType; │ │ │ │ │ - 28 typedef typename LB::Traits::DomainFieldType DF; │ │ │ │ │ - 29 const int dim=LB::Traits::dimDomain; │ │ │ │ │ + 27 return new Imp(imp); │ │ │ │ │ + 28 } │ │ │ │ │ + 29 }; │ │ │ │ │ 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 │ │ │ │ │ + 31 // if FE derives from virtual interface the clone method is used │ │ │ │ │ + 32 template │ │ │ │ │ + 33 struct LocalFiniteElementCloneFactoryHelper │ │ │ │ │ + 34 { │ │ │ │ │ + 35 static Imp* clone(const Imp& imp) │ │ │ │ │ + 36 { │ │ │ │ │ + 37 return imp.clone(); │ │ │ │ │ + 38 } │ │ │ │ │ + 39 }; │ │ │ │ │ + 40 │ │ │ │ │ + 41 // factory template to clone and create an objects │ │ │ │ │ + 42 template │ │ │ │ │ +43 struct LocalFiniteElementCloneFactory │ │ │ │ │ + 44 { │ │ │ │ │ +45 typedef LocalFiniteElementVirtualInterface Interface; │ │ │ │ │ + 46 │ │ │ │ │ +47 static Imp* clone(const Imp& imp) │ │ │ │ │ + 48 { │ │ │ │ │ + 49 return LocalFiniteElementCloneFactoryHelper::value>::clone(imp); │ │ │ │ │ + 50 } │ │ │ │ │ + 51 │ │ │ │ │ +52 static Imp* create() │ │ │ │ │ + 53 { │ │ │ │ │ + 54 return new Imp; │ │ │ │ │ + 55 } │ │ │ │ │ + 56 }; │ │ │ │ │ + 57 │ │ │ │ │ + 58 │ │ │ │ │ + 59 │ │ │ │ │ + 60 // ----------------------------------------------------------------- │ │ │ │ │ + 61 // Basis │ │ │ │ │ + 62 // ----------------------------------------------------------------- │ │ │ │ │ + 63 │ │ │ │ │ + 64 │ │ │ │ │ + 65 │ │ │ │ │ + 72 template │ │ │ │ │ +73 class LocalBasisVirtualImp │ │ │ │ │ + 74 : public LocalBasisVirtualInterface │ │ │ │ │ + 75 { │ │ │ │ │ + 76 template │ │ │ │ │ +77 friend class LocalFiniteElementVirtualImp; │ │ │ │ │ + 78 │ │ │ │ │ + 79 protected: │ │ │ │ │ + 80 │ │ │ │ │ +82 LocalBasisVirtualImp( const Imp &imp ) │ │ │ │ │ + 83 : impl_(imp) │ │ │ │ │ + 84 {} │ │ │ │ │ + 85 │ │ │ │ │ + 86 public: │ │ │ │ │ +87 using Traits = T; │ │ │ │ │ + 88 │ │ │ │ │ +90 unsigned int size () const │ │ │ │ │ + 91 { │ │ │ │ │ + 92 return impl_.size(); │ │ │ │ │ + 93 } │ │ │ │ │ + 94 │ │ │ │ │ +96 unsigned int order () const │ │ │ │ │ + 97 { │ │ │ │ │ + 98 return impl_.order(); │ │ │ │ │ + 99 } │ │ │ │ │ + 100 │ │ │ │ │ +102 inline void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ + 103 std::vector& out) const │ │ │ │ │ + 104 { │ │ │ │ │ + 105 impl_.evaluateFunction(in,out); │ │ │ │ │ + 106 } │ │ │ │ │ + 107 │ │ │ │ │ +109 inline void evaluateJacobian( │ │ │ │ │ + 110 const typename Traits::DomainType& in, │ │ │ │ │ + 111 std::vector& out) const │ │ │ │ │ + 112 { │ │ │ │ │ + 113 impl_.evaluateJacobian(in,out); │ │ │ │ │ + 114 } │ │ │ │ │ + 115 │ │ │ │ │ +121 void partial(const std::array& order, │ │ │ │ │ + 122 const typename Traits::DomainType& in, │ │ │ │ │ + 123 std::vector& out) const │ │ │ │ │ + 124 { │ │ │ │ │ + 125 impl_.partial(order,in,out); │ │ │ │ │ + 126 } │ │ │ │ │ + 127 │ │ │ │ │ + 128 protected: │ │ │ │ │ +129 const Imp& impl_; │ │ │ │ │ + 130 }; │ │ │ │ │ + 131 │ │ │ │ │ + 132 │ │ │ │ │ + 133 │ │ │ │ │ + 134 // ----------------------------------------------------------------- │ │ │ │ │ + 135 // Interpolation │ │ │ │ │ + 136 // ----------------------------------------------------------------- │ │ │ │ │ + 137 │ │ │ │ │ + 146 template │ │ │ │ │ +147 class LocalInterpolationVirtualImp │ │ │ │ │ + 148 : public LocalInterpolationVirtualInterface< DomainType, RangeType > │ │ │ │ │ + 149 { │ │ │ │ │ + 150 template │ │ │ │ │ +151 friend class LocalFiniteElementVirtualImp; │ │ │ │ │ + 152 │ │ │ │ │ + 153 typedef LocalInterpolationVirtualInterface<_DomainType,_RangeType_> Base; │ │ │ │ │ + 154 │ │ │ │ │ + 155 protected: │ │ │ │ │ + 156 │ │ │ │ │ +158 LocalInterpolationVirtualImp( const Imp &imp) │ │ │ │ │ + 159 : impl_(imp) {} │ │ │ │ │ + 160 │ │ │ │ │ + 161 public: │ │ │ │ │ + 162 │ │ │ │ │ +163 typedef typename Base::FunctionType FunctionType; │ │ │ │ │ + 164 │ │ │ │ │ +165 typedef typename Base::CoefficientType CoefficientType; │ │ │ │ │ + 166 │ │ │ │ │ +168 virtual void interpolate (const FunctionType& f, std:: │ │ │ │ │ +vector& out) const │ │ │ │ │ + 169 { │ │ │ │ │ + 170 impl_.interpolate(f,out); │ │ │ │ │ + 171 } │ │ │ │ │ + 172 │ │ │ │ │ + 173 protected: │ │ │ │ │ +174 const Imp& impl_; │ │ │ │ │ + 175 │ │ │ │ │ + 176 }; │ │ │ │ │ + 177 │ │ │ │ │ + 178 │ │ │ │ │ + 179 │ │ │ │ │ + 180 // ----------------------------------------------------------------- │ │ │ │ │ + 181 // Coefficients │ │ │ │ │ + 182 // ----------------------------------------------------------------- │ │ │ │ │ + 183 │ │ │ │ │ + 190 template │ │ │ │ │ +191 class LocalCoefficientsVirtualImp │ │ │ │ │ + 192 : public LocalCoefficientsVirtualInterface │ │ │ │ │ + 193 { │ │ │ │ │ + 194 template │ │ │ │ │ +195 friend class LocalFiniteElementVirtualImp; │ │ │ │ │ + 196 │ │ │ │ │ + 197 protected: │ │ │ │ │ + 198 │ │ │ │ │ +200 LocalCoefficientsVirtualImp( const Imp &imp ) │ │ │ │ │ + 201 : impl_(imp) │ │ │ │ │ + 202 {} │ │ │ │ │ + 203 │ │ │ │ │ + 204 public: │ │ │ │ │ + 205 │ │ │ │ │ +207 std::size_t size () const │ │ │ │ │ + 208 { │ │ │ │ │ + 209 return impl_.size(); │ │ │ │ │ + 210 } │ │ │ │ │ + 211 │ │ │ │ │ +213 const LocalKey& localKey (std::size_t i) const │ │ │ │ │ + 214 { │ │ │ │ │ + 215 return impl_.localKey(i); │ │ │ │ │ + 216 } │ │ │ │ │ + 217 │ │ │ │ │ + 218 protected: │ │ │ │ │ +219 const Imp& impl_; │ │ │ │ │ + 220 │ │ │ │ │ + 221 }; │ │ │ │ │ + 222 │ │ │ │ │ + 223 │ │ │ │ │ + 224 │ │ │ │ │ + 225 // ----------------------------------------------------------------- │ │ │ │ │ + 226 // Finite Element │ │ │ │ │ + 227 // ----------------------------------------------------------------- │ │ │ │ │ + 228 │ │ │ │ │ + 237 template │ │ │ │ │ +238 class LocalFiniteElementVirtualImp │ │ │ │ │ + 239 : public LocalFiniteElementVirtualInterface │ │ │ │ │ + 240 { │ │ │ │ │ + 241 using LocalBasisTraits = typename Imp::Traits::LocalBasisType::Traits; │ │ │ │ │ + 242 using Interface = LocalFiniteElementVirtualInterface; │ │ │ │ │ + 243 │ │ │ │ │ + 244 public: │ │ │ │ │ +245 typedef typename Interface::Traits Traits; │ │ │ │ │ + 246 │ │ │ │ │ +248 LocalFiniteElementVirtualImp( const Imp &imp ) │ │ │ │ │ + 249 : impl_(LocalFiniteElementCloneFactory::clone(imp)), │ │ │ │ │ + 250 localBasisImp_(impl_->localBasis()), │ │ │ │ │ + 251 localCoefficientsImp_(impl_->localCoefficients()), │ │ │ │ │ + 252 localInterpolationImp_(impl_->localInterpolation()) │ │ │ │ │ + 253 {} │ │ │ │ │ + 254 │ │ │ │ │ +256 LocalFiniteElementVirtualImp() │ │ │ │ │ + 257 : impl_(LocalFiniteElementCloneFactory::create()), │ │ │ │ │ + 258 localBasisImp_(impl_->localBasis()), │ │ │ │ │ + 259 localCoefficientsImp_(impl_->localCoefficients()), │ │ │ │ │ + 260 localInterpolationImp_(impl_->localInterpolation()) │ │ │ │ │ + 261 {} │ │ │ │ │ + 262 │ │ │ │ │ +264 LocalFiniteElementVirtualImp(const LocalFiniteElementVirtualImp& other) │ │ │ │ │ + 265 : impl_(LocalFiniteElementCloneFactory::clone(*other.impl_)), │ │ │ │ │ + 266 localBasisImp_(impl_->localBasis()), │ │ │ │ │ + 267 localCoefficientsImp_(impl_->localCoefficients()), │ │ │ │ │ + 268 localInterpolationImp_(impl_->localInterpolation()) │ │ │ │ │ + 269 {} │ │ │ │ │ + 270 │ │ │ │ │ +271 ~LocalFiniteElementVirtualImp() │ │ │ │ │ + 272 { │ │ │ │ │ + 273 delete impl_; │ │ │ │ │ + 274 } │ │ │ │ │ + 275 │ │ │ │ │ +277 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 278 { │ │ │ │ │ + 279 return localBasisImp_; │ │ │ │ │ + 280 } │ │ │ │ │ + 281 │ │ │ │ │ +283 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 284 { │ │ │ │ │ + 285 return localCoefficientsImp_; │ │ │ │ │ + 286 } │ │ │ │ │ + 287 │ │ │ │ │ +289 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 290 { │ │ │ │ │ + 291 return localInterpolationImp_; │ │ │ │ │ + 292 } │ │ │ │ │ + 293 │ │ │ │ │ +295 unsigned int size () const │ │ │ │ │ + 296 { │ │ │ │ │ + 297 return impl_->size(); │ │ │ │ │ + 298 } │ │ │ │ │ + 299 │ │ │ │ │ +301 const GeometryType type () const │ │ │ │ │ + 302 { │ │ │ │ │ + 303 return impl_->type(); │ │ │ │ │ + 304 } │ │ │ │ │ + 305 │ │ │ │ │ +311 virtual LocalFiniteElementVirtualImp* clone() const │ │ │ │ │ + 312 { │ │ │ │ │ + 313 return new LocalFiniteElementVirtualImp(*this); │ │ │ │ │ + 314 } │ │ │ │ │ + 315 │ │ │ │ │ + 316 protected: │ │ │ │ │ +317 const Imp* impl_; │ │ │ │ │ + 318 │ │ │ │ │ +319 const LocalBasisVirtualImp localBasisImp_; │ │ │ │ │ +320 const LocalCoefficientsVirtualImp localCoefficientsImp_; │ │ │ │ │ + 321 const LocalInterpolationVirtualImp localInterpolationImp_; │ │ │ │ │ + 324 }; │ │ │ │ │ + 325} │ │ │ │ │ + 326#endif │ │ │ │ │ +localkey.hh │ │ │ │ │ +virtualinterface.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::P0LocalInterpolation │ │ │ │ │ -Definition p0localinterpolation.hh:18 │ │ │ │ │ -Dune::P0LocalInterpolation::P0LocalInterpolation │ │ │ │ │ -P0LocalInterpolation(const GeometryType >) │ │ │ │ │ -Definition p0localinterpolation.hh:20 │ │ │ │ │ -Dune::P0LocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LocalBasisTraits::RangeType │ │ │ │ │ +R RangeType │ │ │ │ │ +range type │ │ │ │ │ +Definition common/localbasis.hh:51 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::LocalInterpolationVirtualInterface │ │ │ │ │ +virtual base class for a local interpolation │ │ │ │ │ +Definition virtualinterface.hh:190 │ │ │ │ │ +Dune::LocalInterpolationVirtualInterface::FunctionType │ │ │ │ │ +std::function< RangeType(DomainType)> FunctionType │ │ │ │ │ +type of function to interpolate │ │ │ │ │ +Definition virtualinterface.hh:194 │ │ │ │ │ +Dune::LocalInterpolationVirtualInterface::CoefficientType │ │ │ │ │ +RangeType::field_type CoefficientType │ │ │ │ │ +type of the coefficient vector in the interpolate method │ │ │ │ │ +Definition virtualinterface.hh:197 │ │ │ │ │ +Dune::LocalBasisVirtualInterface │ │ │ │ │ +virtual base class for a local basis │ │ │ │ │ +Definition virtualinterface.hh:97 │ │ │ │ │ +Dune::LocalCoefficientsVirtualInterface │ │ │ │ │ +virtual base class for local coefficients │ │ │ │ │ +Definition virtualinterface.hh:259 │ │ │ │ │ +Dune::LocalFiniteElementVirtualInterface │ │ │ │ │ +virtual base class for local finite elements with functions │ │ │ │ │ +Definition virtualinterface.hh:286 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp │ │ │ │ │ +class for wrapping a finite element using the virtual interface │ │ │ │ │ +Definition virtualwrappers.hh:240 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition virtualwrappers.hh:277 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::clone │ │ │ │ │ +virtual LocalFiniteElementVirtualImp< Imp > * clone() const │ │ │ │ │ +clone this wrapper │ │ │ │ │ +Definition virtualwrappers.hh:311 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::localInterpolationImp_ │ │ │ │ │ +const LocalInterpolationVirtualImp< typename LocalBasisTraits::DomainType, │ │ │ │ │ +typename LocalBasisTraits::RangeType, typename Imp::Traits:: │ │ │ │ │ +LocalInterpolationType > localInterpolationImp_ │ │ │ │ │ +Definition virtualwrappers.hh:323 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::LocalFiniteElementVirtualImp │ │ │ │ │ +LocalFiniteElementVirtualImp(const Imp &imp) │ │ │ │ │ +taking a LocalFiniteElementVirtualInterface implementation │ │ │ │ │ +Definition virtualwrappers.hh:248 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::Traits │ │ │ │ │ +Interface::Traits Traits │ │ │ │ │ +Definition virtualwrappers.hh:245 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::LocalFiniteElementVirtualImp │ │ │ │ │ +LocalFiniteElementVirtualImp() │ │ │ │ │ +Default constructor. Assumes that the implementation class is default │ │ │ │ │ +constructible as well. │ │ │ │ │ +Definition virtualwrappers.hh:256 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::LocalFiniteElementVirtualImp │ │ │ │ │ +LocalFiniteElementVirtualImp(const LocalFiniteElementVirtualImp &other) │ │ │ │ │ +Copy contructor needed for deep copy. │ │ │ │ │ +Definition virtualwrappers.hh:264 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::~LocalFiniteElementVirtualImp │ │ │ │ │ +~LocalFiniteElementVirtualImp() │ │ │ │ │ +Definition virtualwrappers.hh:271 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition virtualwrappers.hh:295 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::type │ │ │ │ │ +const GeometryType type() const │ │ │ │ │ +Definition virtualwrappers.hh:301 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::impl_ │ │ │ │ │ +const Imp * impl_ │ │ │ │ │ +Definition virtualwrappers.hh:317 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition virtualwrappers.hh:283 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::localBasisImp_ │ │ │ │ │ +const LocalBasisVirtualImp< LocalBasisTraits, typename Imp::Traits:: │ │ │ │ │ +LocalBasisType > localBasisImp_ │ │ │ │ │ +Definition virtualwrappers.hh:319 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::localCoefficientsImp_ │ │ │ │ │ +const LocalCoefficientsVirtualImp< typename Imp::Traits::LocalCoefficientsType │ │ │ │ │ +> localCoefficientsImp_ │ │ │ │ │ +Definition virtualwrappers.hh:320 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition virtualwrappers.hh:289 │ │ │ │ │ +Dune::LocalFiniteElementCloneFactoryHelper │ │ │ │ │ +Definition virtualwrappers.hh:24 │ │ │ │ │ +Dune::LocalFiniteElementCloneFactoryHelper::clone │ │ │ │ │ +static Imp * clone(const Imp &imp) │ │ │ │ │ +Definition virtualwrappers.hh:25 │ │ │ │ │ +Dune::LocalFiniteElementCloneFactory │ │ │ │ │ +Definition virtualwrappers.hh:44 │ │ │ │ │ +Dune::LocalFiniteElementCloneFactory::clone │ │ │ │ │ +static Imp * clone(const Imp &imp) │ │ │ │ │ +Definition virtualwrappers.hh:47 │ │ │ │ │ +Dune::LocalFiniteElementCloneFactory::create │ │ │ │ │ +static Imp * create() │ │ │ │ │ +Definition virtualwrappers.hh:52 │ │ │ │ │ +Dune::LocalFiniteElementCloneFactory::Interface │ │ │ │ │ +LocalFiniteElementVirtualInterface< typename Imp::Traits::LocalBasisType:: │ │ │ │ │ +Traits > Interface │ │ │ │ │ +Definition virtualwrappers.hh:45 │ │ │ │ │ +Dune::LocalBasisVirtualImp │ │ │ │ │ +class for wrapping a basis using the virtual interface │ │ │ │ │ +Definition virtualwrappers.hh:75 │ │ │ │ │ +Dune::LocalBasisVirtualImp::partial │ │ │ │ │ +void partial(const std::array< unsigned int, Traits::dimDomain > &order, const │ │ │ │ │ +typename Traits::DomainType &in, std::vector< typename Traits::RangeType > │ │ │ │ │ +&out) const │ │ │ │ │ +Evaluate partial derivatives of any order of all shape functions. │ │ │ │ │ +Definition virtualwrappers.hh:121 │ │ │ │ │ +Dune::LocalBasisVirtualImp::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all basis function at given position. │ │ │ │ │ +Definition virtualwrappers.hh:102 │ │ │ │ │ +Dune::LocalBasisVirtualImp::impl_ │ │ │ │ │ +const Imp & impl_ │ │ │ │ │ +Definition virtualwrappers.hh:129 │ │ │ │ │ +Dune::LocalBasisVirtualImp::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions. │ │ │ │ │ +Definition virtualwrappers.hh:90 │ │ │ │ │ +Dune::LocalBasisVirtualImp::Traits │ │ │ │ │ +T Traits │ │ │ │ │ +Definition virtualwrappers.hh:87 │ │ │ │ │ +Dune::LocalBasisVirtualImp::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate jacobian of all shape functions at given position. │ │ │ │ │ +Definition virtualwrappers.hh:109 │ │ │ │ │ +Dune::LocalBasisVirtualImp::LocalBasisVirtualImp │ │ │ │ │ +LocalBasisVirtualImp(const Imp &imp) │ │ │ │ │ +constructor taking an implementation of the interface │ │ │ │ │ +Definition virtualwrappers.hh:82 │ │ │ │ │ +Dune::LocalBasisVirtualImp::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition virtualwrappers.hh:96 │ │ │ │ │ +Dune::LocalInterpolationVirtualImp │ │ │ │ │ +class for wrapping a local interpolation using the virtual interface │ │ │ │ │ +Definition virtualwrappers.hh:149 │ │ │ │ │ +Dune::LocalInterpolationVirtualImp::interpolate │ │ │ │ │ +virtual void interpolate(const FunctionType &f, std::vector< CoefficientType > │ │ │ │ │ +&out) const │ │ │ │ │ determine coefficients interpolating a given function │ │ │ │ │ -Definition p0localinterpolation.hh:25 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Definition virtualwrappers.hh:168 │ │ │ │ │ +Dune::LocalInterpolationVirtualImp::impl_ │ │ │ │ │ +const Imp & impl_ │ │ │ │ │ +Definition virtualwrappers.hh:174 │ │ │ │ │ +Dune::LocalInterpolationVirtualImp::FunctionType │ │ │ │ │ +Base::FunctionType FunctionType │ │ │ │ │ +Definition virtualwrappers.hh:163 │ │ │ │ │ +Dune::LocalInterpolationVirtualImp::LocalInterpolationVirtualImp │ │ │ │ │ +LocalInterpolationVirtualImp(const Imp &imp) │ │ │ │ │ +constructor taking an implementation of the Dune:: │ │ │ │ │ +LocalInterpolationVirtualInterface │ │ │ │ │ +Definition virtualwrappers.hh:158 │ │ │ │ │ +Dune::LocalInterpolationVirtualImp::CoefficientType │ │ │ │ │ +Base::CoefficientType CoefficientType │ │ │ │ │ +Definition virtualwrappers.hh:165 │ │ │ │ │ +Dune::LocalCoefficientsVirtualImp │ │ │ │ │ +class for wrapping local coefficients using the virtual interface │ │ │ │ │ +Definition virtualwrappers.hh:193 │ │ │ │ │ +Dune::LocalCoefficientsVirtualImp::LocalCoefficientsVirtualImp │ │ │ │ │ +LocalCoefficientsVirtualImp(const Imp &imp) │ │ │ │ │ +constructor taking an implementation of the Dune:: │ │ │ │ │ +LocalCoefficientsVirtualInterface │ │ │ │ │ +Definition virtualwrappers.hh:200 │ │ │ │ │ +Dune::LocalCoefficientsVirtualImp::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition virtualwrappers.hh:213 │ │ │ │ │ +Dune::LocalCoefficientsVirtualImp::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition virtualwrappers.hh:207 │ │ │ │ │ +Dune::LocalCoefficientsVirtualImp::impl_ │ │ │ │ │ +const Imp & impl_ │ │ │ │ │ +Definition virtualwrappers.hh:219 │ │ │ │ │ +localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00101.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0localbasis.hh File Reference │ │ │ │ +dune-localfunctions: orthonormal.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
p0localbasis.hh File Reference
│ │ │ │ +
orthonormal.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::P0LocalBasis< D, R, d >
 Constant shape function. More...
class  Dune::OrthonormalLocalFiniteElement< dimDomain, D, R, SF, CF >
 A class providing orthonormal basis functions. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,25 +6,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ - * p0 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -p0localbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +orthonormal.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::P0LocalBasis<_D,_R,_d_> │ │ │ │ │ -  Constant shape function. More... │ │ │ │ │ +class  Dune::OrthonormalLocalFiniteElement<_dimDomain,_D,_R,_SF,_CF_> │ │ │ │ │ +  A class providing orthonormal basis functions. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00101_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0localbasis.hh Source File │ │ │ │ +dune-localfunctions: orthonormal.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,109 +70,71 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
p0localbasis.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_P0LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_P0LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_ORTHONORMALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_ORTHONORMALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
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
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,122 +7,78 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ - * p0 │ │ │ │ │ -p0localbasis.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_P0LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_P0LOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_ORTHONORMALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_ORTHONORMALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14namespace Dune │ │ │ │ │ - 15{ │ │ │ │ │ - 28 template │ │ │ │ │ -29 class P0LocalBasis │ │ │ │ │ - 30 { │ │ │ │ │ - 31 public: │ │ │ │ │ - 33 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -34 Dune::FieldMatrix > Traits; │ │ │ │ │ - 35 │ │ │ │ │ -37 unsigned int size () const │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 32 template< unsigned int dimDomain, class D, class R, │ │ │ │ │ + 33 class SF=R, class CF=SF > │ │ │ │ │ +34 class OrthonormalLocalFiniteElement │ │ │ │ │ + 35 : public GenericLocalFiniteElement< OrthonormalBasisFactory< dimDomain, SF, │ │ │ │ │ +CF >, │ │ │ │ │ + 36 DGLocalCoefficientsFactory< OrthonormalBasisFactory< dimDomain, SF, CF > >, │ │ │ │ │ + 37 LocalL2InterpolationFactory< OrthonormalBasisFactory< dimDomain, SF, CF │ │ │ │ │ +>,true > > │ │ │ │ │ 38 { │ │ │ │ │ - 39 return 1; │ │ │ │ │ - 40 } │ │ │ │ │ - 41 │ │ │ │ │ -43 inline void evaluateFunction (const typename Traits::DomainType&, │ │ │ │ │ - 44 std::vector& 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& out) const // return value │ │ │ │ │ - 54 { │ │ │ │ │ - 55 out.resize(1); │ │ │ │ │ - 56 for (int i=0; i& order, │ │ │ │ │ - 66 const typename Traits::DomainType& in, │ │ │ │ │ - 67 std::vector& 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 │ │ │ │ │ + 39 typedef GenericLocalFiniteElement<_OrthonormalBasisFactory<_dimDomain,_SF, │ │ │ │ │ +CF_>, │ │ │ │ │ + 40 DGLocalCoefficientsFactory<_OrthonormalBasisFactory<_dimDomain,_SF,_CF_> >, │ │ │ │ │ + 41 LocalL2InterpolationFactory<_OrthonormalBasisFactory<_dimDomain,_SF,_CF │ │ │ │ │ +>,true > > Base; │ │ │ │ │ + 42 public: │ │ │ │ │ + 43 using typename Base::Traits; │ │ │ │ │ + 44 │ │ │ │ │ +47 OrthonormalLocalFiniteElement ( const GeometryType >, unsigned int order ) │ │ │ │ │ + 48 : Base(gt, order) │ │ │ │ │ + 49 {} │ │ │ │ │ + 50 }; │ │ │ │ │ + 51 │ │ │ │ │ + 52} │ │ │ │ │ + 53 │ │ │ │ │ + 54#endif │ │ │ │ │ +orthonormalbasis.hh │ │ │ │ │ +l2interpolation.hh │ │ │ │ │ +dglocalcoefficients.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::P0LocalBasis │ │ │ │ │ -Constant shape function. │ │ │ │ │ -Definition p0localbasis.hh:30 │ │ │ │ │ -Dune::P0LocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition p0localbasis.hh:79 │ │ │ │ │ -Dune::P0LocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition p0localbasis.hh:52 │ │ │ │ │ -Dune::P0LocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition p0localbasis.hh:43 │ │ │ │ │ -Dune::P0LocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::P0LocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition p0localbasis.hh:37 │ │ │ │ │ -Dune::P0LocalBasis::Traits │ │ │ │ │ -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 │ │ │ │ │ -localbasis.hh │ │ │ │ │ +Dune::OrthonormalLocalFiniteElement │ │ │ │ │ +A class providing orthonormal basis functions. │ │ │ │ │ +Definition orthonormal.hh:38 │ │ │ │ │ +Dune::OrthonormalLocalFiniteElement::OrthonormalLocalFiniteElement │ │ │ │ │ +OrthonormalLocalFiniteElement(const GeometryType >, unsigned int order) │ │ │ │ │ +Definition orthonormal.hh:47 │ │ │ │ │ +Dune::DGLocalCoefficientsFactory │ │ │ │ │ +A factory class for the dg local coefficients. │ │ │ │ │ +Definition dglocalcoefficients.hh:59 │ │ │ │ │ +Dune::LocalL2InterpolationFactory │ │ │ │ │ +A factory class for the local l2 interpolations taking a basis factory. │ │ │ │ │ +Definition l2interpolation.hh:199 │ │ │ │ │ +Dune::GenericLocalFiniteElement │ │ │ │ │ +A LocalFiniteElement implementation based on three TopologyFactories providing │ │ │ │ │ +the LocalBasis,... │ │ │ │ │ +Definition localfunctions/utility/localfiniteelement.hh:25 │ │ │ │ │ +Dune::GenericLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< typename BasisF::Object, typename CoeffF::Object, │ │ │ │ │ +typename InterpolF::Object > Traits │ │ │ │ │ +Definition localfunctions/utility/localfiniteelement.hh:29 │ │ │ │ │ +localfiniteelement.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00113.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangecube.hh File Reference │ │ │ │ +dune-localfunctions: power.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
lagrangecube.hh File Reference
│ │ │ │ +
power.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 <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::LagrangeCubeLocalFiniteElement< D, R, dim, k >
 Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order. More...
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
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,32 +6,35 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ + * meta │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -lagrangecube.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +power.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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::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 │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00113_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangecube.hh Source File │ │ │ │ +dune-localfunctions: power.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,747 +70,144 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangecube.hh
│ │ │ │ +
power.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
│ │ │ │ -
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 }
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_META_POWER_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_META_POWER_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <cstddef>
│ │ │ │ +
10#include <memory>
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ +
105 template<class BackendFiniteElement, std::size_t dimR>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
107 {
│ │ │ │ +
108 public:
│ │ │ │ + │ │ │ │ +
111
│ │ │ │
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());
│ │ │ │ +
│ │ │ │ +
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 // 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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
130} // namespace Dune
│ │ │ │ +
131
│ │ │ │ +
132#endif // DUNE_LOCALFUNCTIONS_META_POWER_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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,776 +7,173 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -lagrangecube.hh │ │ │ │ │ + * meta │ │ │ │ │ +power.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 │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include │ │ │ │ │ - 16 │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include │ │ │ │ │ - 20#include │ │ │ │ │ - 21 │ │ │ │ │ - 22namespace Dune { 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 } │ │ │ │ │ + 5 │ │ │ │ │ + 6#ifndef DUNE_LOCALFUNCTIONS_META_POWER_HH │ │ │ │ │ + 7#define DUNE_LOCALFUNCTIONS_META_POWER_HH │ │ │ │ │ + 8 │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ + 17 │ │ │ │ │ + 18namespace Dune { │ │ │ │ │ + 19 │ │ │ │ │ + 22 │ │ │ │ │ + 28 template │ │ │ │ │ +29 class PowerFiniteElement { │ │ │ │ │ + 30 public: │ │ │ │ │ +32 struct Traits { │ │ │ │ │ +34 typedef PowerBasis Basis; │ │ │ │ │ +36 typedef PowerCoefficients Coefficients; │ │ │ │ │ + 38 typedef PowerInterpolation Interpolation; │ │ │ │ │ + 40 }; │ │ │ │ │ + 41 private: │ │ │ │ │ + 42 std::shared_ptr 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 &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 │ │ │ │ │ - 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 │ │ │ │ │ +106 class PowerFiniteElementFactory │ │ │ │ │ 107 { │ │ │ │ │ - 108 alpha[j] = i % (k+1); │ │ │ │ │ - 109 i = i/(k+1); │ │ │ │ │ - 110 } │ │ │ │ │ - 111 return alpha; │ │ │ │ │ - 112 } │ │ │ │ │ + 108 public: │ │ │ │ │ +110 typedef PowerFiniteElement FiniteElement; │ │ │ │ │ + 111 │ │ │ │ │ 113 │ │ │ │ │ - 114 public: │ │ │ │ │ - 115 using Traits = │ │ │ │ │ -LocalBasisTraits,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 Traits::DomainType& x, │ │ │ │ │ - 126 std::vector& out) const │ │ │ │ │ - 127 { │ │ │ │ │ - 128 out.resize(size()); │ │ │ │ │ +117 const FiniteElement make(const BackendFiniteElement &backend) const │ │ │ │ │ + 118 { return FiniteElement(backend); } │ │ │ │ │ + 120 │ │ │ │ │ + 124 const FiniteElement │ │ │ │ │ +125 make(const std::shared_ptr &backendSPtr) const │ │ │ │ │ + 126 { return FiniteElement(backendSPtr); } │ │ │ │ │ + 127 │ │ │ │ │ + 128 }; │ │ │ │ │ 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 Traits::DomainType& 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 │ │ │ │ │ -710 class LagrangeCubeLocalFiniteElement │ │ │ │ │ - 711 { │ │ │ │ │ - 712 public: │ │ │ │ │ -715 using Traits = LocalFiniteElementTraits, │ │ │ │ │ - 716 Impl::LagrangeCubeLocalCoefficients, │ │ │ │ │ - 717 Impl::LagrangeCubeLocalInterpolation > >; │ │ │ │ │ - 718 │ │ │ │ │ -724 LagrangeCubeLocalFiniteElement() {} │ │ │ │ │ - 725 │ │ │ │ │ -728 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 729 { │ │ │ │ │ - 730 return basis_; │ │ │ │ │ - 731 } │ │ │ │ │ - 732 │ │ │ │ │ -735 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 736 { │ │ │ │ │ - 737 return coefficients_; │ │ │ │ │ - 738 } │ │ │ │ │ - 739 │ │ │ │ │ -742 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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 basis_; │ │ │ │ │ - 762 Impl::LagrangeCubeLocalCoefficients coefficients_; │ │ │ │ │ - 763 Impl::LagrangeCubeLocalInterpolation > interpolation_; │ │ │ │ │ - 764 }; │ │ │ │ │ - 765 │ │ │ │ │ - 766} // namespace Dune │ │ │ │ │ - 767 │ │ │ │ │ - 768#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGECUBE_HH │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -localkey.hh │ │ │ │ │ + 130} // namespace Dune │ │ │ │ │ + 131 │ │ │ │ │ + 132#endif // DUNE_LOCALFUNCTIONS_META_POWER_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::LagrangeCubeLocalFiniteElement │ │ │ │ │ -Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -Definition lagrangecube.hh:711 │ │ │ │ │ -Dune::LagrangeCubeLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ -Definition lagrangecube.hh:728 │ │ │ │ │ -Dune::LagrangeCubeLocalFiniteElement::LagrangeCubeLocalFiniteElement │ │ │ │ │ -LagrangeCubeLocalFiniteElement() │ │ │ │ │ -Default constructor. │ │ │ │ │ -Definition lagrangecube.hh:724 │ │ │ │ │ -Dune::LagrangeCubeLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Returns object that evaluates degrees of freedom. │ │ │ │ │ -Definition lagrangecube.hh:742 │ │ │ │ │ -Dune::LagrangeCubeLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -The reference element that the local finite element is defined on. │ │ │ │ │ -Definition lagrangecube.hh:755 │ │ │ │ │ -Dune::LagrangeCubeLocalFiniteElement::size │ │ │ │ │ -static constexpr std::size_t size() │ │ │ │ │ -The number of shape functions. │ │ │ │ │ -Definition lagrangecube.hh:748 │ │ │ │ │ -Dune::LagrangeCubeLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ -Definition lagrangecube.hh:735 │ │ │ │ │ -localbasis.hh │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::PowerFiniteElement │ │ │ │ │ +Meta-finite element turning a scalar finite element into vector-valued one. │ │ │ │ │ +Definition power.hh:29 │ │ │ │ │ +Dune::PowerFiniteElement::basis │ │ │ │ │ +const Traits::Basis & basis() const │ │ │ │ │ +Extract basis of this finite element. │ │ │ │ │ +Definition power.hh:77 │ │ │ │ │ +Dune::PowerFiniteElement::type │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +Extract geometry type of this finite element. │ │ │ │ │ +Definition power.hh:93 │ │ │ │ │ +Dune::PowerFiniteElement::interpolation │ │ │ │ │ +const Traits::Interpolation & interpolation() const │ │ │ │ │ +Extract interpolation of this finite element. │ │ │ │ │ +Definition power.hh:90 │ │ │ │ │ +Dune::PowerFiniteElement::PowerFiniteElement │ │ │ │ │ +PowerFiniteElement(const Backend &backend_) │ │ │ │ │ +Construct a finite element. │ │ │ │ │ +Definition power.hh:53 │ │ │ │ │ +Dune::PowerFiniteElement::PowerFiniteElement │ │ │ │ │ +PowerFiniteElement(const std::shared_ptr< const Backend > &backendSPtr) │ │ │ │ │ +Construct a finite element. │ │ │ │ │ +Definition power.hh:65 │ │ │ │ │ +Dune::PowerFiniteElement::coefficients │ │ │ │ │ +const Traits::Coefficients & coefficients() const │ │ │ │ │ +Extract coefficients of this finite element. │ │ │ │ │ +Definition power.hh:83 │ │ │ │ │ +Dune::PowerFiniteElement::Traits │ │ │ │ │ +types of component objects │ │ │ │ │ +Definition power.hh:32 │ │ │ │ │ +Dune::PowerFiniteElement::Traits::Basis │ │ │ │ │ +PowerBasis< typename Backend::Traits::Basis, dimR > Basis │ │ │ │ │ +type of the Basis │ │ │ │ │ +Definition power.hh:34 │ │ │ │ │ +Dune::PowerFiniteElement::Traits::Coefficients │ │ │ │ │ +PowerCoefficients Coefficients │ │ │ │ │ +type of the Coefficients │ │ │ │ │ +Definition power.hh:36 │ │ │ │ │ +Dune::PowerFiniteElement::Traits::Interpolation │ │ │ │ │ +PowerInterpolation< typename Backend::Traits::Interpolation, typename Basis:: │ │ │ │ │ +Traits > Interpolation │ │ │ │ │ +type of the Interpolation │ │ │ │ │ +Definition power.hh:39 │ │ │ │ │ +Dune::PowerFiniteElementFactory │ │ │ │ │ +Factory for meta-finite elements turning scalar finite elements into vector- │ │ │ │ │ +valued ones. │ │ │ │ │ +Definition power.hh:107 │ │ │ │ │ +Dune::PowerFiniteElementFactory::make │ │ │ │ │ +const FiniteElement make(const std::shared_ptr< const BackendFiniteElement > │ │ │ │ │ +&backendSPtr) const │ │ │ │ │ +create a finite element │ │ │ │ │ +Definition power.hh:125 │ │ │ │ │ +Dune::PowerFiniteElementFactory::make │ │ │ │ │ +const FiniteElement make(const BackendFiniteElement &backend) const │ │ │ │ │ +create a finite element │ │ │ │ │ +Definition power.hh:117 │ │ │ │ │ +Dune::PowerFiniteElementFactory::FiniteElement │ │ │ │ │ +PowerFiniteElement< BackendFiniteElement, dimR > FiniteElement │ │ │ │ │ +Type of the finite element. │ │ │ │ │ +Definition power.hh:110 │ │ │ │ │ +Dune::PowerBasis │ │ │ │ │ +Meta-basis turning a scalar basis into vector-valued basis. │ │ │ │ │ +Definition meta/power/basis.hh:26 │ │ │ │ │ +Dune::PowerCoefficients │ │ │ │ │ +Meta-coefficients turning a scalar coefficients into vector-valued │ │ │ │ │ +coefficients. │ │ │ │ │ +Definition meta/power/coefficients.hh:22 │ │ │ │ │ +Dune::PowerInterpolation │ │ │ │ │ +Meta-interpolation turning a scalar interpolation into vector-valued │ │ │ │ │ +interpolation. │ │ │ │ │ +Definition meta/power/interpolation.hh:26 │ │ │ │ │ +basis.hh │ │ │ │ │ +coefficients.hh │ │ │ │ │ +interpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00116.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: q1.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,50 +65,25 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
q1.hh File Reference
│ │ │ │ +
brezzidouglasmarini.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>
│ │ │ │ + │ │ │ │

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 {} │ │ │ │ │ @@ -6,31 +6,15 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -Classes | Namespaces | Typedefs │ │ │ │ │ -q1.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +brezzidouglasmarini.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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 │ │ │ │ │ -using Dune::Q1LocalFiniteElement = LagrangeCubeLocalFiniteElement< D, R, dim, │ │ │ │ │ - 1 > │ │ │ │ │ -  The local Q1 finite element on cubes. │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00116_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: q1.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,83 +70,35 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
q1.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
│ │ │ │ -
6#ifndef DUNE_Q1_LOCALFINITEELEMENT_HH
│ │ │ │ -
7#define DUNE_Q1_LOCALFINITEELEMENT_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <dune/geometry/type.hh>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
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
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH
│ │ │ │ +
7
│ │ │ │ +
8// BDM implementations with compile-time order
│ │ │ │ + │ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,85 +7,28 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -q1.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 │ │ │ │ │ - 6#ifndef DUNE_Q1_LOCALFINITEELEMENT_HH │ │ │ │ │ - 7#define DUNE_Q1_LOCALFINITEELEMENT_HH │ │ │ │ │ - 8 │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#warning This header is deprecated │ │ │ │ │ - 16 │ │ │ │ │ - 17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ - 19 │ │ │ │ │ - 27 template │ │ │ │ │ -28 using Q1LocalFiniteElement │ │ │ │ │ - 29 [[deprecated("use LagrangeCubeLocalFiniteElement instead")]] │ │ │ │ │ - 30 = LagrangeCubeLocalFiniteElement; │ │ │ │ │ - 31 │ │ │ │ │ - 32 │ │ │ │ │ - 34 │ │ │ │ │ - 39 template │ │ │ │ │ -40 class Q1FiniteElementFactory : │ │ │ │ │ - 41 public ScalarLocalToGlobalFiniteElementAdaptorFactory< │ │ │ │ │ - 42 LagrangeCubeLocalFiniteElement< │ │ │ │ │ - 43 typename Geometry::ctype, RF, Geometry::mydimension, 1 │ │ │ │ │ - 44 >, │ │ │ │ │ - 45 Geometry │ │ │ │ │ - 46 > │ │ │ │ │ - 47 { │ │ │ │ │ - 48 typedef LagrangeCubeLocalFiniteElement< │ │ │ │ │ - 49 typename Geometry::ctype, RF, Geometry::mydimension, 1 │ │ │ │ │ - 50 > LFE; │ │ │ │ │ - 51 typedef ScalarLocalToGlobalFiniteElementAdaptorFactory Base; │ │ │ │ │ - 52 │ │ │ │ │ - 53 static const LFE lfe; │ │ │ │ │ - 54 │ │ │ │ │ - 55 public: │ │ │ │ │ -57 Q1FiniteElementFactory() : Base(lfe) {} │ │ │ │ │ - 58 }; │ │ │ │ │ - 59 │ │ │ │ │ - 60 template │ │ │ │ │ - 61 const typename Q1FiniteElementFactory::LFE │ │ │ │ │ - 62 Q1FiniteElementFactory::lfe; │ │ │ │ │ - 63} │ │ │ │ │ - 64 │ │ │ │ │ - 65#endif │ │ │ │ │ -lagrangecube.hh │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -localtoglobaladaptors.hh │ │ │ │ │ -Dune │ │ │ │ │ -Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory │ │ │ │ │ -Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. │ │ │ │ │ -Definition localtoglobaladaptors.hh:244 │ │ │ │ │ -Dune::LagrangeCubeLocalFiniteElement │ │ │ │ │ -Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -Definition lagrangecube.hh:711 │ │ │ │ │ -Dune::Q1FiniteElementFactory │ │ │ │ │ -Factory for global-valued Q1 elements. │ │ │ │ │ -Definition q1.hh:47 │ │ │ │ │ -Dune::Q1FiniteElementFactory::Q1FiniteElementFactory │ │ │ │ │ -Q1FiniteElementFactory() │ │ │ │ │ -default constructor │ │ │ │ │ -Definition q1.hh:57 │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8// BDM implementations with compile-time order │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH │ │ │ │ │ +brezzidouglasmarinicube.hh │ │ │ │ │ +brezzidouglasmarinisimplex.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00119.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: emptypoints.hh File Reference │ │ │ │ +dune-localfunctions: dualmortarbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,25 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
emptypoints.hh File Reference
│ │ │ │ +
dualmortarbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::LagrangePoint< F, dim >
 
class  Dune::EmptyPointSet< F, dim >
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

namespace  Dune
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,25 +6,14 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -emptypoints.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +dualmortarbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -class  Dune::LagrangePoint<_F,_dim_> │ │ │ │ │ -  │ │ │ │ │ -class  Dune::EmptyPointSet<_F,_dim_> │ │ │ │ │ -  │ │ │ │ │ - Namespaces │ │ │ │ │ -namespace  Dune │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00119_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: emptypoints.hh Source File │ │ │ │ +dune-localfunctions: dualmortarbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,185 +70,34 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
emptypoints.hh
│ │ │ │ +
dualmortarbasis.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_DUALMORTARBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/fvector.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 };
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
51 // EmptyPointSet
│ │ │ │ -
52 // --------------
│ │ │ │ -
53
│ │ │ │ -
54 template< class F, unsigned int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
56 {
│ │ │ │ - │ │ │ │ -
58
│ │ │ │ -
59 public:
│ │ │ │ -
60 typedef F Field;
│ │ │ │ -
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
│ │ │ │ -
96 {
│ │ │ │ -
97 return order_;
│ │ │ │ -
98 }
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ -
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
│ │ │ │ + │ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11#endif // #ifndef DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,205 +7,26 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -emptypoints.hh │ │ │ │ │ +dualmortarbasis.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_DUALMORTARBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 16 template< class F, unsigned int dim > │ │ │ │ │ -17 class LagrangePoint │ │ │ │ │ - 18 { │ │ │ │ │ - 19 typedef LagrangePoint<_F,_dim_> This; │ │ │ │ │ - 20 │ │ │ │ │ - 21 template< class, class > │ │ │ │ │ -22 friend class LagrangePointSetImpl; │ │ │ │ │ - 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 │ │ │ │ │ -46 Vector point_ = {}; │ │ │ │ │ -47 LocalKey localKey_ = {}; │ │ │ │ │ -48 Field weight_ = {}; │ │ │ │ │ - 49 }; │ │ │ │ │ - 50 │ │ │ │ │ - 51 // EmptyPointSet │ │ │ │ │ - 52 // -------------- │ │ │ │ │ - 53 │ │ │ │ │ - 54 template< class F, unsigned int dim > │ │ │ │ │ -55 class EmptyPointSet │ │ │ │ │ - 56 { │ │ │ │ │ - 57 typedef EmptyPointSet<_F,_dim_> This; │ │ │ │ │ - 58 │ │ │ │ │ - 59 public: │ │ │ │ │ -60 typedef F Field; │ │ │ │ │ - 61 │ │ │ │ │ -62 static const unsigned int dimension = dim; │ │ │ │ │ - 63 │ │ │ │ │ -64 typedef Dune::LagrangePoint<_Field,_dimension_> LagrangePoint; │ │ │ │ │ - 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 │ │ │ │ │ - 96 { │ │ │ │ │ - 97 return order_; │ │ │ │ │ - 98 } │ │ │ │ │ - 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 │ │ │ │ │ -localkey.hh │ │ │ │ │ -Dune │ │ │ │ │ -Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::LagrangePoint │ │ │ │ │ -Definition emptypoints.hh:18 │ │ │ │ │ -Dune::LagrangePoint::localKey │ │ │ │ │ -const LocalKey & localKey() const │ │ │ │ │ -Definition emptypoints.hh:36 │ │ │ │ │ -Dune::LagrangePoint::weight_ │ │ │ │ │ -Field weight_ │ │ │ │ │ -Definition emptypoints.hh:48 │ │ │ │ │ -Dune::LagrangePoint::dimension │ │ │ │ │ -static const int dimension │ │ │ │ │ -Definition emptypoints.hh:25 │ │ │ │ │ -Dune::LagrangePoint::LagrangePointSetImpl │ │ │ │ │ -friend class LagrangePointSetImpl │ │ │ │ │ -Definition emptypoints.hh:22 │ │ │ │ │ -Dune::LagrangePoint::point_ │ │ │ │ │ -Vector point_ │ │ │ │ │ -Definition emptypoints.hh:46 │ │ │ │ │ -Dune::LagrangePoint::weight │ │ │ │ │ -const Field weight() const │ │ │ │ │ -Definition emptypoints.hh:41 │ │ │ │ │ -Dune::LagrangePoint::Vector │ │ │ │ │ -FieldVector< Field, dimension > Vector │ │ │ │ │ -Definition emptypoints.hh:29 │ │ │ │ │ -Dune::LagrangePoint::Field │ │ │ │ │ -F Field │ │ │ │ │ -Definition emptypoints.hh:27 │ │ │ │ │ -Dune::LagrangePoint::point │ │ │ │ │ -const Vector & point() const │ │ │ │ │ -Definition emptypoints.hh:31 │ │ │ │ │ -Dune::LagrangePoint::localKey_ │ │ │ │ │ -LocalKey localKey_ │ │ │ │ │ -Definition emptypoints.hh:47 │ │ │ │ │ -Dune::EmptyPointSet │ │ │ │ │ -Definition emptypoints.hh:56 │ │ │ │ │ -Dune::EmptyPointSet::order │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -Definition emptypoints.hh:95 │ │ │ │ │ -Dune::EmptyPointSet::order_ │ │ │ │ │ -std::size_t order_ │ │ │ │ │ -Definition emptypoints.hh:106 │ │ │ │ │ -Dune::EmptyPointSet::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition emptypoints.hh:62 │ │ │ │ │ -Dune::EmptyPointSet::EmptyPointSet │ │ │ │ │ -EmptyPointSet(const std::size_t order) │ │ │ │ │ -Definition emptypoints.hh:69 │ │ │ │ │ -Dune::EmptyPointSet::operator[] │ │ │ │ │ -const LagrangePoint & operator[](const unsigned int i) const │ │ │ │ │ -Definition emptypoints.hh:74 │ │ │ │ │ -Dune::EmptyPointSet::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -Definition emptypoints.hh:100 │ │ │ │ │ -Dune::EmptyPointSet::LagrangePoint │ │ │ │ │ -Dune::LagrangePoint< Field, dimension > LagrangePoint │ │ │ │ │ -Definition emptypoints.hh:64 │ │ │ │ │ -Dune::EmptyPointSet::localKey │ │ │ │ │ -const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ -Definition emptypoints.hh:90 │ │ │ │ │ -Dune::EmptyPointSet::begin │ │ │ │ │ -iterator begin() const │ │ │ │ │ -Definition emptypoints.hh:80 │ │ │ │ │ -Dune::EmptyPointSet::end │ │ │ │ │ -iterator end() const │ │ │ │ │ -Definition emptypoints.hh:85 │ │ │ │ │ -Dune::EmptyPointSet::Field │ │ │ │ │ -F Field │ │ │ │ │ -Definition emptypoints.hh:60 │ │ │ │ │ -Dune::EmptyPointSet::points_ │ │ │ │ │ -std::vector< LagrangePoint > points_ │ │ │ │ │ -Definition emptypoints.hh:107 │ │ │ │ │ -Dune::EmptyPointSet::iterator │ │ │ │ │ -std::vector< LagrangePoint >::const_iterator iterator │ │ │ │ │ -Definition emptypoints.hh:66 │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#endif // #ifndef DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_HH │ │ │ │ │ +dualq1.hh │ │ │ │ │ +dualp1.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00122.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk1d.hh File Reference │ │ │ │ +dune-localfunctions: edges0.5.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,55 +65,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
pk1d.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
edges0.5.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/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

class  Dune::Pk1DFiniteElement< Geometry, RF, k >
 Langrange finite element of arbitrary order on triangles. More...
class  Dune::EdgeS0_5FiniteElement< Geometry, RF >
 FiniteElement for lowest order edge elements on simplices. More...
 
struct  Dune::Pk1DFiniteElement< Geometry, RF, k >::Traits
struct  Dune::EdgeS0_5FiniteElement< Geometry, RF >::Traits
 
struct  Dune::Pk1DFiniteElementFactory< Geometry, RF, k >
 Factory for Pk1DFiniteElement objects. More...
struct  Dune::EdgeS0_5FiniteElementFactory< Geometry, RF >
 Factory for EdgeS0_5FiniteElement 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 {} │ │ │ │ │ @@ -6,38 +6,30 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -Classes | Namespaces | Typedefs │ │ │ │ │ -pk1d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ + * whitney │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +edges0.5.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ - class  Dune::Pk1DFiniteElement<_Geometry,_RF,_k_> │ │ │ │ │ -  Langrange finite element of arbitrary order on triangles. More... │ │ │ │ │ + class  Dune::EdgeS0_5FiniteElement<_Geometry,_RF_> │ │ │ │ │ +  FiniteElement for lowest order edge elements on simplices. More... │ │ │ │ │   │ │ │ │ │ -struct  Dune::Pk1DFiniteElement<_Geometry,_RF,_k_>::Traits │ │ │ │ │ +struct  Dune::EdgeS0_5FiniteElement<_Geometry,_RF_>::Traits │ │ │ │ │   │ │ │ │ │ -struct  Dune::Pk1DFiniteElementFactory<_Geometry,_RF,_k_> │ │ │ │ │ -  Factory for Pk1DFiniteElement objects. More... │ │ │ │ │ +struct  Dune::EdgeS0_5FiniteElementFactory<_Geometry,_RF_> │ │ │ │ │ +  Factory for EdgeS0_5FiniteElement objects. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Typedefs │ │ │ │ │ -template │ │ │ │ │ -using Dune::Pk1DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, │ │ │ │ │ - 1, k > │ │ │ │ │ -  Lagrange finite element on the unit interval with arbitrary compile-time │ │ │ │ │ - order. │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00122_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk1d.hh Source File │ │ │ │ +dune-localfunctions: edges0.5.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,152 +70,132 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pk1d.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#ifndef DUNE_PK1DLOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_PK1DLOCALFINITEELEMENT_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,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:
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <dune/geometry/type.hh>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune {
│ │ │ │ +
16
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
127} // namespace Dune
│ │ │ │ +
128
│ │ │ │ +
129#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_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 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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,171 +7,153 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -pk1d.hh │ │ │ │ │ + * whitney │ │ │ │ │ +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#ifndef DUNE_PK1DLOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_PK1DLOCALFINITEELEMENT_HH │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15 │ │ │ │ │ - 16#warning This header is deprecated │ │ │ │ │ - 17 │ │ │ │ │ - 18namespace Dune │ │ │ │ │ - 19{ │ │ │ │ │ - 20 │ │ │ │ │ - 25 template │ │ │ │ │ -26 using Pk1DLocalFiniteElement │ │ │ │ │ - 27 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ - 28 = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ - 29 │ │ │ │ │ - 30 │ │ │ │ │ - 32 │ │ │ │ │ - 39 template │ │ │ │ │ -40 class Pk1DFiniteElement { │ │ │ │ │ - 41 typedef typename Geometry::ctype DF; │ │ │ │ │ - 42 typedef Impl::LagrangeSimplexLocalBasis LocalBasis; │ │ │ │ │ - 43 typedef Impl::LagrangeSimplexLocalInterpolation │ │ │ │ │ -LocalInterpolation; │ │ │ │ │ - 44 │ │ │ │ │ - 45 public: │ │ │ │ │ -49 struct Traits { │ │ │ │ │ -50 typedef ScalarLocalToGlobalBasisAdaptor Basis; │ │ │ │ │ - 51 typedef LocalToGlobalInterpolationAdaptor< │ │ │ │ │ - 52 LocalInterpolation, │ │ │ │ │ - 53 typename Basis::Traits │ │ │ │ │ -54 > Interpolation; │ │ │ │ │ -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: │ │ │ │ │ + 5 │ │ │ │ │ + 6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH │ │ │ │ │ + 7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH │ │ │ │ │ + 8 │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune { │ │ │ │ │ + 16 │ │ │ │ │ + 18 // │ │ │ │ │ + 19 // FiniteElement │ │ │ │ │ + 20 // │ │ │ │ │ + 21 │ │ │ │ │ + 23 │ │ │ │ │ + 41 template │ │ │ │ │ +42 class EdgeS0_5FiniteElement { │ │ │ │ │ + 43 public: │ │ │ │ │ +47 struct Traits { │ │ │ │ │ +48 typedef EdgeS0_5Basis Basis; │ │ │ │ │ + 49 typedef EdgeS0_5Interpolation Interpolation; │ │ │ │ │ +51 typedef EdgeS0_5Coefficients Coefficients; │ │ │ │ │ + 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 │ │ │ │ │ +65 EdgeS0_5FiniteElement(const Geometry& geo, │ │ │ │ │ + 66 const VertexOrder& vertexOrder) : │ │ │ │ │ + 67 basis_(geo, vertexOrder), interpolation_(geo, vertexOrder) │ │ │ │ │ + 68 { } │ │ │ │ │ 69 │ │ │ │ │ - 82 template │ │ │ │ │ -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 │ │ │ │ │ - 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 │ │ │ │ │ -122 struct Pk1DFiniteElementFactory { │ │ │ │ │ -123 typedef Pk1DFiniteElement FiniteElement; │ │ │ │ │ - 124 │ │ │ │ │ +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 │ │ │ │ │ + 83 const typename EdgeS0_5FiniteElement::Traits::Coefficients& │ │ │ │ │ + 84 EdgeS0_5FiniteElement::coefficients_ = │ │ │ │ │ + 85 typename Traits::Coefficients(); │ │ │ │ │ + 86 │ │ │ │ │ + 88 // │ │ │ │ │ + 89 // Factory │ │ │ │ │ + 90 // │ │ │ │ │ + 91 │ │ │ │ │ + 93 │ │ │ │ │ + 102 template │ │ │ │ │ +103 struct EdgeS0_5FiniteElementFactory { │ │ │ │ │ +104 typedef EdgeS0_5FiniteElement FiniteElement; │ │ │ │ │ + 105 │ │ │ │ │ + 107 │ │ │ │ │ + 121 template │ │ │ │ │ +122 const FiniteElement make(const Geometry& geometry, │ │ │ │ │ + 123 const VertexOrder& vertexOrder) │ │ │ │ │ + 124 { return FiniteElement(geometry, vertexOrder); } │ │ │ │ │ + 125 }; │ │ │ │ │ 126 │ │ │ │ │ - 140 template │ │ │ │ │ -141 const FiniteElement make(const Geometry& geometry, │ │ │ │ │ - 142 const VertexOrder& vertexOrder) │ │ │ │ │ - 143 { return FiniteElement(geometry, vertexOrder); } │ │ │ │ │ - 144 }; │ │ │ │ │ - 145} │ │ │ │ │ - 146 │ │ │ │ │ - 147#endif │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -localtoglobaladaptors.hh │ │ │ │ │ + 127} // namespace Dune │ │ │ │ │ + 128 │ │ │ │ │ + 129#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalToGlobalBasisAdaptorTraits │ │ │ │ │ -Traits class for local-to-global basis adaptors. │ │ │ │ │ -Definition localtoglobaladaptors.hh:30 │ │ │ │ │ -Dune::ScalarLocalToGlobalBasisAdaptor │ │ │ │ │ -Convert a simple scalar local basis into a global basis. │ │ │ │ │ -Definition localtoglobaladaptors.hh:65 │ │ │ │ │ -Dune::LocalToGlobalInterpolationAdaptor │ │ │ │ │ -Convert a local interpolation into a global interpolation. │ │ │ │ │ -Definition localtoglobaladaptors.hh:149 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -Definition lagrangesimplex.hh:838 │ │ │ │ │ -Dune::Pk1DFiniteElement │ │ │ │ │ -Langrange finite element of arbitrary order on triangles. │ │ │ │ │ -Definition pk1d.hh:40 │ │ │ │ │ -Dune::Pk1DFiniteElement::Pk1DFiniteElement │ │ │ │ │ -Pk1DFiniteElement(const Geometry &geometry, const VertexOrder &vertexOrder) │ │ │ │ │ -construct a Pk1DFiniteElement │ │ │ │ │ -Definition pk1d.hh:83 │ │ │ │ │ -Dune::Pk1DFiniteElement::basis │ │ │ │ │ +Dune::EdgeS0_5FiniteElement │ │ │ │ │ +FiniteElement for lowest order edge elements on simplices. │ │ │ │ │ +Definition edges0.5.hh:42 │ │ │ │ │ +Dune::EdgeS0_5FiniteElement::EdgeS0_5FiniteElement │ │ │ │ │ +EdgeS0_5FiniteElement(const Geometry &geo, const VertexOrder &vertexOrder) │ │ │ │ │ +Constructor. │ │ │ │ │ +Definition edges0.5.hh:65 │ │ │ │ │ +Dune::EdgeS0_5FiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +return geometry type of this element │ │ │ │ │ +Definition edges0.5.hh:79 │ │ │ │ │ +Dune::EdgeS0_5FiniteElement::basis │ │ │ │ │ const Traits::Basis & basis() const │ │ │ │ │ -Definition pk1d.hh:89 │ │ │ │ │ -Dune::Pk1DFiniteElement::type │ │ │ │ │ -const GeometryType & type() const │ │ │ │ │ -Definition pk1d.hh:94 │ │ │ │ │ -Dune::Pk1DFiniteElement::coefficients │ │ │ │ │ -const Traits::Coefficients & coefficients() const │ │ │ │ │ -Definition pk1d.hh:92 │ │ │ │ │ -Dune::Pk1DFiniteElement::interpolation │ │ │ │ │ +return reference to the basis object │ │ │ │ │ +Definition edges0.5.hh:71 │ │ │ │ │ +Dune::EdgeS0_5FiniteElement::interpolation │ │ │ │ │ const Traits::Interpolation & interpolation() const │ │ │ │ │ -Definition pk1d.hh:90 │ │ │ │ │ -Dune::Pk1DFiniteElement::Traits │ │ │ │ │ -Definition pk1d.hh:49 │ │ │ │ │ -Dune::Pk1DFiniteElement::Traits::Basis │ │ │ │ │ -ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry > Basis │ │ │ │ │ -Definition pk1d.hh:50 │ │ │ │ │ -Dune::Pk1DFiniteElement::Traits::Interpolation │ │ │ │ │ -LocalToGlobalInterpolationAdaptor< LocalInterpolation, typename Basis::Traits > │ │ │ │ │ -Interpolation │ │ │ │ │ -Definition pk1d.hh:54 │ │ │ │ │ -Dune::Pk1DFiniteElement::Traits::Coefficients │ │ │ │ │ -Impl::LagrangeSimplexLocalCoefficients< 1, k > Coefficients │ │ │ │ │ -Definition pk1d.hh:55 │ │ │ │ │ -Dune::Pk1DFiniteElementFactory │ │ │ │ │ -Factory for Pk1DFiniteElement objects. │ │ │ │ │ -Definition pk1d.hh:122 │ │ │ │ │ -Dune::Pk1DFiniteElementFactory::make │ │ │ │ │ +return reference to the interpolation object │ │ │ │ │ +Definition edges0.5.hh:73 │ │ │ │ │ +Dune::EdgeS0_5FiniteElement::coefficients │ │ │ │ │ +const Traits::Coefficients & coefficients() const │ │ │ │ │ +return reference to the coefficients object │ │ │ │ │ +Definition edges0.5.hh:76 │ │ │ │ │ +Dune::EdgeS0_5FiniteElement::Traits │ │ │ │ │ +Definition edges0.5.hh:47 │ │ │ │ │ +Dune::EdgeS0_5FiniteElement::Traits::Coefficients │ │ │ │ │ +EdgeS0_5Coefficients< Geometry::mydimension > Coefficients │ │ │ │ │ +Definition edges0.5.hh:51 │ │ │ │ │ +Dune::EdgeS0_5FiniteElement::Traits::Interpolation │ │ │ │ │ +EdgeS0_5Interpolation< Geometry, typename Basis::Traits > Interpolation │ │ │ │ │ +Definition edges0.5.hh:50 │ │ │ │ │ +Dune::EdgeS0_5FiniteElement::Traits::Basis │ │ │ │ │ +EdgeS0_5Basis< Geometry, RF > Basis │ │ │ │ │ +Definition edges0.5.hh:48 │ │ │ │ │ +Dune::EdgeS0_5FiniteElementFactory │ │ │ │ │ +Factory for EdgeS0_5FiniteElement objects. │ │ │ │ │ +Definition edges0.5.hh:103 │ │ │ │ │ +Dune::EdgeS0_5FiniteElementFactory::make │ │ │ │ │ const FiniteElement make(const Geometry &geometry, const VertexOrder │ │ │ │ │ &vertexOrder) │ │ │ │ │ -construct Pk1DFiniteElementFactory │ │ │ │ │ -Definition pk1d.hh:141 │ │ │ │ │ -Dune::Pk1DFiniteElementFactory::FiniteElement │ │ │ │ │ -Pk1DFiniteElement< Geometry, RF, k > FiniteElement │ │ │ │ │ -Definition pk1d.hh:123 │ │ │ │ │ +construct the factory │ │ │ │ │ +Definition edges0.5.hh:122 │ │ │ │ │ +Dune::EdgeS0_5FiniteElementFactory::FiniteElement │ │ │ │ │ +EdgeS0_5FiniteElement< Geometry, RF > FiniteElement │ │ │ │ │ +Definition edges0.5.hh:104 │ │ │ │ │ +Dune::EdgeS0_5Basis │ │ │ │ │ +Basis for order 0.5 (lowest order) edge elements on simplices. │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:38 │ │ │ │ │ +Dune::EdgeS0_5Basis::Traits │ │ │ │ │ +export type traits for function signature │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:41 │ │ │ │ │ +Dune::EdgeS0_5Coefficients │ │ │ │ │ +Coefficients for lowest order edge elements on simplices. │ │ │ │ │ +Definition whitney/edges0.5/coefficients.hh:30 │ │ │ │ │ +Dune::EdgeS0_5Interpolation │ │ │ │ │ +Interpolation for lowest order edge elements on simplices. │ │ │ │ │ +Definition whitney/edges0.5/interpolation.hh:33 │ │ │ │ │ +basis.hh │ │ │ │ │ +coefficients.hh │ │ │ │ │ +interpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00125.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pyramidp2.hh File Reference │ │ │ │ +dune-localfunctions: common.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
pyramidp2.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
common.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangepyramid.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

struct  Dune::EdgeS0_5Common< dim, DF >
 Common base class for edge elements. 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 {} │ │ │ │ │ @@ -6,24 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -Namespaces | Typedefs │ │ │ │ │ -pyramidp2.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ + * whitney │ │ │ │ │ + * edges0.5 │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +common.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ + Classes │ │ │ │ │ +struct  Dune::EdgeS0_5Common<_dim,_DF_> │ │ │ │ │ +  Common base class for edge elements. More... │ │ │ │ │ +  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Typedefs │ │ │ │ │ -template │ │ │ │ │ -using Dune::PyramidP2LocalFiniteElement = LagrangePyramidLocalFiniteElement< │ │ │ │ │ - D, R, 2 > │ │ │ │ │ -  Second-order Lagrangian finite element on a three-dimensional pyramid. │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00125_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pyramidp2.hh Source File │ │ │ │ +dune-localfunctions: common.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,60 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pyramidp2.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_PYRAMIDP2_3DLOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH
│ │ │ │ -
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
10#warning This header is deprecated
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ +
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/geometry/dimension.hh>
│ │ │ │ +
12#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
13#include <dune/geometry/type.hh>
│ │ │ │
14
│ │ │ │ -
19 template<class D, class R>
│ │ │ │ - │ │ │ │ -
21 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
24}
│ │ │ │ -
25
│ │ │ │ -
26#endif
│ │ │ │ - │ │ │ │ +
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
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for 3d pyramids with compile-time polynomial order.
Definition lagrangepyramid.hh:812
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,42 +7,65 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -pyramidp2.hh │ │ │ │ │ + * whitney │ │ │ │ │ + * edges0.5 │ │ │ │ │ +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_PYRAMIDP2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#warning This header is deprecated │ │ │ │ │ - 11 │ │ │ │ │ - 12namespace Dune │ │ │ │ │ - 13{ │ │ │ │ │ + 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#include │ │ │ │ │ 14 │ │ │ │ │ - 19 template │ │ │ │ │ -20 using PyramidP2LocalFiniteElement │ │ │ │ │ - 21 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]] │ │ │ │ │ - 22 = LagrangePyramidLocalFiniteElement; │ │ │ │ │ - 23 │ │ │ │ │ - 24} │ │ │ │ │ - 25 │ │ │ │ │ - 26#endif │ │ │ │ │ -lagrangepyramid.hh │ │ │ │ │ + 15namespace Dune { │ │ │ │ │ + 16 │ │ │ │ │ + 18 template │ │ │ │ │ +19 struct EdgeS0_5Common { │ │ │ │ │ +21 using RefElem = │ │ │ │ │ + 22 decltype(referenceElement(DF{}, GeometryTypes::simplex(dim), │ │ │ │ │ + 23 Dim{})); │ │ │ │ │ + 24 │ │ │ │ │ +26 RefElem refelem = referenceElement(DF{}, GeometryTypes::simplex(dim), │ │ │ │ │ + 27 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LagrangePyramidLocalFiniteElement │ │ │ │ │ -Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ -Definition lagrangepyramid.hh:812 │ │ │ │ │ +Dune::EdgeS0_5Common │ │ │ │ │ +Common base class for edge elements. │ │ │ │ │ +Definition common.hh:19 │ │ │ │ │ +Dune::EdgeS0_5Common::refelem │ │ │ │ │ +RefElem refelem │ │ │ │ │ +The reference element for this edge element. │ │ │ │ │ +Definition common.hh:26 │ │ │ │ │ +Dune::EdgeS0_5Common::RefElem │ │ │ │ │ +decltype(referenceElement(DF{}, GeometryTypes::simplex(dim), Dim< dim >{})) │ │ │ │ │ +RefElem │ │ │ │ │ +The type of the referenceElement. │ │ │ │ │ +Definition common.hh:23 │ │ │ │ │ +Dune::EdgeS0_5Common::s │ │ │ │ │ +std::size_t s │ │ │ │ │ +The number of base functions. │ │ │ │ │ +Definition common.hh:34 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00128.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: q2.hh File Reference │ │ │ │ +dune-localfunctions: nedelec1stkindcube.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,37 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
q2.hh File Reference
│ │ │ │ +
nedelec1stkindcube.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/typetraits.hh>
│ │ │ │ +
#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/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/common/localtoglobaladaptors.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangesimplex.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::Q2FiniteElementFactory< Geometry, RF >
 Factory for global-valued Q23D elements. More...
class  Dune::Nedelec1stKindCubeLocalFiniteElement< D, R, dim, k >
 Nédélec elements of the first kind for cube elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,27 +6,31 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ + * nedelec │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -q2.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +nedelec1stkindcube.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::Q2FiniteElementFactory<_Geometry,_RF_> │ │ │ │ │ -  Factory for global-valued Q23D elements. More... │ │ │ │ │ +class  Dune::Nedelec1stKindCubeLocalFiniteElement<_D,_R,_dim,_k_> │ │ │ │ │ +  Nédélec elements of the first kind for cube elements. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00128_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: q2.hh Source File │ │ │ │ +dune-localfunctions: nedelec1stkindcube.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,77 +70,521 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
q2.hh
│ │ │ │ +
nedelec1stkindcube.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_NEDELEC_NEDELEC1STKINDCUBE_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDCUBE_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/typetraits.hh>
│ │ │ │ -
9#include <dune/geometry/type.hh>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <numeric>
│ │ │ │ +
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
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
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;
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ +
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());
│ │ │ │ +
87
│ │ │ │ +
88 if (dim==2)
│ │ │ │ +
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};
│ │ │ │ +
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]};
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,84 +7,547 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -q2.hh │ │ │ │ │ + * nedelec │ │ │ │ │ +nedelec1stkindcube.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_NEDELEC_NEDELEC1STKINDCUBE_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDCUBE_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ 16 │ │ │ │ │ - 17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ - 20 │ │ │ │ │ - 25 template │ │ │ │ │ -26 class Q2FiniteElementFactory : │ │ │ │ │ - 27 public ScalarLocalToGlobalFiniteElementAdaptorFactory< │ │ │ │ │ - 28 typename std::conditional, │ │ │ │ │ - 30 LagrangeCubeLocalFiniteElement >::type, │ │ │ │ │ - 31 Geometry> │ │ │ │ │ - 32 { │ │ │ │ │ - 33 typedef typename std::conditional, │ │ │ │ │ - 35 LagrangeCubeLocalFiniteElement >::type LFE; │ │ │ │ │ - 36 typedef ScalarLocalToGlobalFiniteElementAdaptorFactory Base; │ │ │ │ │ - 37 │ │ │ │ │ - 38 static const LFE lfe; │ │ │ │ │ - 39 │ │ │ │ │ - 40 public: │ │ │ │ │ -42 Q2FiniteElementFactory() : Base(lfe) {} │ │ │ │ │ - 43 }; │ │ │ │ │ - 44 │ │ │ │ │ - 45 template │ │ │ │ │ - 46 const typename Q2FiniteElementFactory::LFE │ │ │ │ │ - 47 Q2FiniteElementFactory::lfe; │ │ │ │ │ - 48} │ │ │ │ │ - 49 │ │ │ │ │ - 50#endif │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ -lagrangecube.hh │ │ │ │ │ + 17#include │ │ │ │ │ + 18#include │ │ │ │ │ + 19#include // For │ │ │ │ │ +deprecated makeFunctionWithCallOperator │ │ │ │ │ + 20#include │ │ │ │ │ + 21 │ │ │ │ │ + 22namespace Dune │ │ │ │ │ + 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()); │ │ │ │ │ + 87 │ │ │ │ │ + 88 if (dim==2) │ │ │ │ │ + 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& order, │ │ │ │ │ + 207 const typename Traits::DomainType& 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) │ │ │ │ │ + 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 │ │ │ │ │ +495 class Nedelec1stKindCubeLocalFiniteElement │ │ │ │ │ + 496 { │ │ │ │ │ + 497 public: │ │ │ │ │ +498 using Traits = LocalFiniteElementTraits, │ │ │ │ │ + 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 │ │ │ │ │ +507 Nedelec1stKindCubeLocalFiniteElement() = default; │ │ │ │ │ + 508 │ │ │ │ │ +514 Nedelec1stKindCubeLocalFiniteElement (std::bitset s) : │ │ │ │ │ + 515 basis_(s), │ │ │ │ │ + 516 interpolation_(s) │ │ │ │ │ + 517 {} │ │ │ │ │ + 518 │ │ │ │ │ +519 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 520 { │ │ │ │ │ + 521 return basis_; │ │ │ │ │ + 522 } │ │ │ │ │ + 523 │ │ │ │ │ +524 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 525 { │ │ │ │ │ + 526 return coefficients_; │ │ │ │ │ + 527 } │ │ │ │ │ + 528 │ │ │ │ │ +529 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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 │ │ │ │ │ +localkey.hh │ │ │ │ │ localfiniteelementtraits.hh │ │ │ │ │ -localtoglobaladaptors.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory │ │ │ │ │ -Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. │ │ │ │ │ -Definition localtoglobaladaptors.hh:244 │ │ │ │ │ -Dune::LagrangeCubeLocalFiniteElement │ │ │ │ │ -Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -Definition lagrangecube.hh:711 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -Definition lagrangesimplex.hh:838 │ │ │ │ │ -Dune::Q2FiniteElementFactory │ │ │ │ │ -Factory for global-valued Q23D elements. │ │ │ │ │ -Definition q2.hh:32 │ │ │ │ │ -Dune::Q2FiniteElementFactory::Q2FiniteElementFactory │ │ │ │ │ -Q2FiniteElementFactory() │ │ │ │ │ -default constructor │ │ │ │ │ -Definition q2.hh:42 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::Nedelec1stKindCubeLocalFiniteElement │ │ │ │ │ +Nédélec elements of the first kind for cube elements. │ │ │ │ │ +Definition nedelec1stkindcube.hh:496 │ │ │ │ │ +Dune::Nedelec1stKindCubeLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition nedelec1stkindcube.hh:529 │ │ │ │ │ +Dune::Nedelec1stKindCubeLocalFiniteElement::size │ │ │ │ │ +static constexpr unsigned int size() │ │ │ │ │ +Definition nedelec1stkindcube.hh:534 │ │ │ │ │ +Dune::Nedelec1stKindCubeLocalFiniteElement:: │ │ │ │ │ +Nedelec1stKindCubeLocalFiniteElement │ │ │ │ │ +Nedelec1stKindCubeLocalFiniteElement()=default │ │ │ │ │ +Default constructor. │ │ │ │ │ +Dune::Nedelec1stKindCubeLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition nedelec1stkindcube.hh:539 │ │ │ │ │ +Dune::Nedelec1stKindCubeLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition nedelec1stkindcube.hh:524 │ │ │ │ │ +Dune::Nedelec1stKindCubeLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition nedelec1stkindcube.hh:519 │ │ │ │ │ +Dune::Nedelec1stKindCubeLocalFiniteElement:: │ │ │ │ │ +Nedelec1stKindCubeLocalFiniteElement │ │ │ │ │ +Nedelec1stKindCubeLocalFiniteElement(std::bitset< power(2, dim-1) *dim > s) │ │ │ │ │ +Constructor with explicitly given edge orientations. │ │ │ │ │ +Definition nedelec1stkindcube.hh:514 │ │ │ │ │ +localbasis.hh │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00131.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: qk.hh File Reference │ │ │ │ +dune-localfunctions: nedelec1stkindsimplex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
qk.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
nedelec1stkindsimplex.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │ +
#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>
│ │ │ │
│ │ │ │

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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ 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.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,25 +6,30 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -Namespaces | Typedefs │ │ │ │ │ -qk.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ + * nedelec │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +nedelec1stkindsimplex.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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... │ │ │ │ │ +  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Typedefs │ │ │ │ │ -template │ │ │ │ │ -using Dune::QkLocalFiniteElement = LagrangeCubeLocalFiniteElement< D, R, d, k │ │ │ │ │ - > │ │ │ │ │ -  General Lagrange finite element for cubes with arbitrary dimension and │ │ │ │ │ - polynomial order. │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00131_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: qk.hh Source File │ │ │ │ +dune-localfunctions: nedelec1stkindsimplex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,426 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
qk.hh
│ │ │ │ +
nedelec1stkindsimplex.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
│ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11#warning This header is deprecated
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDSIMPLEX_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDSIMPLEX_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <numeric>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/fmatrix.hh>
│ │ │ │ +
11#include <dune/common/fvector.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
│ │ │ │ - │ │ │ │ +
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> >;
│ │ │ │ +
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;
│ │ │ │ +
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 }
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,43 +7,448 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -qk.hh │ │ │ │ │ + * nedelec │ │ │ │ │ +nedelec1stkindsimplex.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 │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#warning This header is deprecated │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDSIMPLEX_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDSIMPLEX_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 25 template │ │ │ │ │ -26 using QkLocalFiniteElement │ │ │ │ │ - 27 [[deprecated("use LagrangeCubeLocalFiniteElement instead")]] │ │ │ │ │ - 28 = LagrangeCubeLocalFiniteElement; │ │ │ │ │ - 29 │ │ │ │ │ - 30} │ │ │ │ │ - 31 │ │ │ │ │ - 32#endif │ │ │ │ │ -lagrangecube.hh │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16#include │ │ │ │ │ + 17#include │ │ │ │ │ + 18#include // For │ │ │ │ │ +deprecated makeFunctionWithCallOperator │ │ │ │ │ + 19#include │ │ │ │ │ + 20 │ │ │ │ │ + 21namespace Dune │ │ │ │ │ + 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 >; │ │ │ │ │ + 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& 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 Traits::DomainType& 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 │ │ │ │ │ +402 class Nedelec1stKindSimplexLocalFiniteElement │ │ │ │ │ + 403 { │ │ │ │ │ + 404 public: │ │ │ │ │ +405 using Traits = LocalFiniteElementTraits, │ │ │ │ │ + 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 │ │ │ │ │ +414 Nedelec1stKindSimplexLocalFiniteElement() = default; │ │ │ │ │ + 415 │ │ │ │ │ +421 Nedelec1stKindSimplexLocalFiniteElement (std::bitset s) : │ │ │ │ │ + 422 basis_(s), │ │ │ │ │ + 423 interpolation_(s) │ │ │ │ │ + 424 {} │ │ │ │ │ + 425 │ │ │ │ │ +426 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 427 { │ │ │ │ │ + 428 return basis_; │ │ │ │ │ + 429 } │ │ │ │ │ + 430 │ │ │ │ │ +431 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 432 { │ │ │ │ │ + 433 return coefficients_; │ │ │ │ │ + 434 } │ │ │ │ │ + 435 │ │ │ │ │ +436 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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 │ │ │ │ │ +localkey.hh │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LagrangeCubeLocalFiniteElement │ │ │ │ │ -Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -Definition lagrangecube.hh:711 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::Nedelec1stKindSimplexLocalFiniteElement │ │ │ │ │ +Nédélec elements of the first kind for simplex elements. │ │ │ │ │ +Definition nedelec1stkindsimplex.hh:403 │ │ │ │ │ +Dune::Nedelec1stKindSimplexLocalFiniteElement::size │ │ │ │ │ +static constexpr unsigned int size() │ │ │ │ │ +Definition nedelec1stkindsimplex.hh:441 │ │ │ │ │ +Dune::Nedelec1stKindSimplexLocalFiniteElement:: │ │ │ │ │ +Nedelec1stKindSimplexLocalFiniteElement │ │ │ │ │ +Nedelec1stKindSimplexLocalFiniteElement()=default │ │ │ │ │ +Default constructor. │ │ │ │ │ +Dune::Nedelec1stKindSimplexLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition nedelec1stkindsimplex.hh:436 │ │ │ │ │ +Dune::Nedelec1stKindSimplexLocalFiniteElement:: │ │ │ │ │ +Nedelec1stKindSimplexLocalFiniteElement │ │ │ │ │ +Nedelec1stKindSimplexLocalFiniteElement(std::bitset< dim *(dim+1)/2 > s) │ │ │ │ │ +Constructor with explicitly given edge orientations. │ │ │ │ │ +Definition nedelec1stkindsimplex.hh:421 │ │ │ │ │ +Dune::Nedelec1stKindSimplexLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition nedelec1stkindsimplex.hh:446 │ │ │ │ │ +Dune::Nedelec1stKindSimplexLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition nedelec1stkindsimplex.hh:426 │ │ │ │ │ +Dune::Nedelec1stKindSimplexLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition nedelec1stkindsimplex.hh:431 │ │ │ │ │ +localbasis.hh │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00134.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk2d.hh File Reference │ │ │ │ +dune-localfunctions: nedelecsimplexbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,54 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
pk2d.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
nedelecsimplexbasis.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 <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

class  Dune::Pk2DFiniteElement< Geometry, RF, k >
 Langrange finite element of arbitrary order on triangles. More...
 
struct  Dune::Pk2DFiniteElement< Geometry, RF, k >::Traits
 
struct  Dune::Pk2DFiniteElementFactory< Geometry, RF, k >
 Factory for Pk2DFiniteElement objects. More...
struct  Dune::NedelecBasisFactory< dim, SF, CF >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

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

│ │ │ │ -Typedefs

template<class D , class R , unsigned int k>
using Dune::Pk2DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, 2, k >
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,36 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -Classes | Namespaces | Typedefs │ │ │ │ │ -pk2d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * nedelec │ │ │ │ │ + * nedelecsimplex │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +nedelecsimplexbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "nedelecsimplexinterpolation.hh" │ │ │ │ │ +#include "nedelecsimplexprebasis.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... │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::Pk2DFiniteElement<_Geometry,_RF,_k_>::Traits │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::Pk2DFiniteElementFactory<_Geometry,_RF,_k_> │ │ │ │ │ -  Factory for Pk2DFiniteElement objects. More... │ │ │ │ │ +struct  Dune::NedelecBasisFactory<_dim,_SF,_CF_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Typedefs │ │ │ │ │ -template │ │ │ │ │ -using Dune::Pk2DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, │ │ │ │ │ - 2, k > │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00134_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk2d.hh Source File │ │ │ │ +dune-localfunctions: nedelecsimplexbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,152 +70,73 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pk2d.hh
│ │ │ │ +
nedelecsimplexbasis.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
│ │ │ │ -
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/geometry/type.hh>
│ │ │ │ +
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
│ │ │ │ -
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();
│ │ │ │ -
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#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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 */
│ │ │ │ +
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}
│ │ │ │ +
43
│ │ │ │ +
44#endif // #ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXBASIS_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
│ │ │ │ +
Definition nedelecsimplexbasis.hh:41
│ │ │ │ +
Definition defaultbasisfactory.hh:38
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,171 +7,73 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -pk2d.hh │ │ │ │ │ + * nedelec │ │ │ │ │ + * nedelecsimplex │ │ │ │ │ +nedelecsimplexbasis.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 │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ + 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 │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include "nedelecsimplexinterpolation.hh" │ │ │ │ │ + 14#include "nedelecsimplexprebasis.hh" │ │ │ │ │ 15 │ │ │ │ │ - 16#warning This header is deprecated │ │ │ │ │ - 17 │ │ │ │ │ - 18namespace Dune │ │ │ │ │ - 19{ │ │ │ │ │ - 20 │ │ │ │ │ - 25 template │ │ │ │ │ -26 using Pk2DLocalFiniteElement │ │ │ │ │ - 27 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ - 28 = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ - 29 │ │ │ │ │ - 30 │ │ │ │ │ - 32 │ │ │ │ │ - 39 template │ │ │ │ │ -40 class Pk2DFiniteElement { │ │ │ │ │ - 41 typedef typename Geometry::ctype DF; │ │ │ │ │ - 42 typedef Impl::LagrangeSimplexLocalBasis LocalBasis; │ │ │ │ │ - 43 typedef Impl::LagrangeSimplexLocalInterpolation │ │ │ │ │ -LocalInterpolation; │ │ │ │ │ - 44 │ │ │ │ │ - 45 public: │ │ │ │ │ -49 struct Traits { │ │ │ │ │ -50 typedef ScalarLocalToGlobalBasisAdaptor Basis; │ │ │ │ │ - 51 typedef LocalToGlobalInterpolationAdaptor< │ │ │ │ │ - 52 LocalInterpolation, │ │ │ │ │ - 53 typename Basis::Traits │ │ │ │ │ -54 > Interpolation; │ │ │ │ │ -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 │ │ │ │ │ -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 │ │ │ │ │ - 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 │ │ │ │ │ -122 struct Pk2DFiniteElementFactory { │ │ │ │ │ -123 typedef Pk2DFiniteElement FiniteElement; │ │ │ │ │ - 124 │ │ │ │ │ - 126 │ │ │ │ │ - 140 template │ │ │ │ │ -141 const FiniteElement make(const Geometry& geometry, │ │ │ │ │ - 142 const VertexOrder& vertexOrder) │ │ │ │ │ - 143 { return FiniteElement(geometry, vertexOrder); } │ │ │ │ │ - 144 }; │ │ │ │ │ - 145} │ │ │ │ │ - 146 │ │ │ │ │ - 147#endif │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -localtoglobaladaptors.hh │ │ │ │ │ + 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 */ │ │ │ │ │ + 35 │ │ │ │ │ + 36 template< unsigned int dim, class SF, class CF > │ │ │ │ │ +37 struct NedelecBasisFactory │ │ │ │ │ + 38 : public DefaultBasisFactory< NedelecPreBasisFactory, │ │ │ │ │ + 39 NedelecL2InterpolationFactory, │ │ │ │ │ + 40 dim,dim,SF,CF > │ │ │ │ │ + 41 {}; │ │ │ │ │ + 42} │ │ │ │ │ + 43 │ │ │ │ │ + 44#endif // #ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXBASIS_HH │ │ │ │ │ +nedelecsimplexinterpolation.hh │ │ │ │ │ +nedelecsimplexprebasis.hh │ │ │ │ │ +defaultbasisfactory.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalToGlobalBasisAdaptorTraits │ │ │ │ │ -Traits class for local-to-global basis adaptors. │ │ │ │ │ -Definition localtoglobaladaptors.hh:30 │ │ │ │ │ -Dune::ScalarLocalToGlobalBasisAdaptor │ │ │ │ │ -Convert a simple scalar local basis into a global basis. │ │ │ │ │ -Definition localtoglobaladaptors.hh:65 │ │ │ │ │ -Dune::LocalToGlobalInterpolationAdaptor │ │ │ │ │ -Convert a local interpolation into a global interpolation. │ │ │ │ │ -Definition localtoglobaladaptors.hh:149 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -Definition lagrangesimplex.hh:838 │ │ │ │ │ -Dune::Pk2DFiniteElement │ │ │ │ │ -Langrange finite element of arbitrary order on triangles. │ │ │ │ │ -Definition pk2d.hh:40 │ │ │ │ │ -Dune::Pk2DFiniteElement::Pk2DFiniteElement │ │ │ │ │ -Pk2DFiniteElement(const Geometry &geometry, const VertexOrder &vertexOrder) │ │ │ │ │ -construct a Pk2DFiniteElement │ │ │ │ │ -Definition pk2d.hh:83 │ │ │ │ │ -Dune::Pk2DFiniteElement::interpolation │ │ │ │ │ -const Traits::Interpolation & interpolation() const │ │ │ │ │ -Definition pk2d.hh:90 │ │ │ │ │ -Dune::Pk2DFiniteElement::basis │ │ │ │ │ -const Traits::Basis & basis() const │ │ │ │ │ -Definition pk2d.hh:89 │ │ │ │ │ -Dune::Pk2DFiniteElement::coefficients │ │ │ │ │ -const Traits::Coefficients & coefficients() const │ │ │ │ │ -Definition pk2d.hh:92 │ │ │ │ │ -Dune::Pk2DFiniteElement::type │ │ │ │ │ -const GeometryType & type() const │ │ │ │ │ -Definition pk2d.hh:94 │ │ │ │ │ -Dune::Pk2DFiniteElement::Traits │ │ │ │ │ -Definition pk2d.hh:49 │ │ │ │ │ -Dune::Pk2DFiniteElement::Traits::Basis │ │ │ │ │ -ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry > Basis │ │ │ │ │ -Definition pk2d.hh:50 │ │ │ │ │ -Dune::Pk2DFiniteElement::Traits::Coefficients │ │ │ │ │ -Impl::LagrangeSimplexLocalCoefficients< 2, k > Coefficients │ │ │ │ │ -Definition pk2d.hh:55 │ │ │ │ │ -Dune::Pk2DFiniteElement::Traits::Interpolation │ │ │ │ │ -LocalToGlobalInterpolationAdaptor< LocalInterpolation, typename Basis::Traits > │ │ │ │ │ -Interpolation │ │ │ │ │ -Definition pk2d.hh:54 │ │ │ │ │ -Dune::Pk2DFiniteElementFactory │ │ │ │ │ -Factory for Pk2DFiniteElement objects. │ │ │ │ │ -Definition pk2d.hh:122 │ │ │ │ │ -Dune::Pk2DFiniteElementFactory::FiniteElement │ │ │ │ │ -Pk2DFiniteElement< Geometry, RF, k > FiniteElement │ │ │ │ │ -Definition pk2d.hh:123 │ │ │ │ │ -Dune::Pk2DFiniteElementFactory::make │ │ │ │ │ -const FiniteElement make(const Geometry &geometry, const VertexOrder │ │ │ │ │ -&vertexOrder) │ │ │ │ │ -construct Pk2DFiniteElementFactory │ │ │ │ │ -Definition pk2d.hh:141 │ │ │ │ │ +Dune::NedelecBasisFactory │ │ │ │ │ +Definition nedelecsimplexbasis.hh:41 │ │ │ │ │ +Dune::DefaultBasisFactory │ │ │ │ │ +Definition defaultbasisfactory.hh:38 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00137.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: prismp2.hh File Reference │ │ │ │ +dune-localfunctions: nedelecsimplexinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,56 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
prismp2.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
nedelecsimplexinterpolation.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangeprism.hh>
│ │ │ │ +
#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>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::LocalCoefficientsContainer
 
struct  Dune::NedelecCoefficientsFactory< dim >
 
struct  Dune::NedelecL2InterpolationBuilder< dim, Field >
 
class  Dune::NedelecL2Interpolation< dimension, F >
 An L2-based interpolation for Nedelec. More...
 
struct  Dune::NedelecL2InterpolationFactory< dim, Field >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ 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 {} │ │ │ │ │ @@ -6,24 +6,41 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -Namespaces | Typedefs │ │ │ │ │ -prismp2.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ + * nedelec │ │ │ │ │ + * nedelecsimplex │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +nedelecsimplexinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ + Classes │ │ │ │ │ + class  Dune::LocalCoefficientsContainer │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::NedelecCoefficientsFactory<_dim_> │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::NedelecL2InterpolationBuilder<_dim,_Field_> │ │ │ │ │ +  │ │ │ │ │ + class  Dune::NedelecL2Interpolation<_dimension,_F_> │ │ │ │ │ +  An L2-based interpolation for Nedelec. More... │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::NedelecL2InterpolationFactory<_dim,_Field_> │ │ │ │ │ +  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Typedefs │ │ │ │ │ -template │ │ │ │ │ -using Dune::PrismP2LocalFiniteElement = LagrangePrismLocalFiniteElement< D, R, │ │ │ │ │ - 2 > │ │ │ │ │ -  Second-order Lagrange finite element on a three-dimensional prism. │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00137_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: prismp2.hh Source File │ │ │ │ +dune-localfunctions: nedelecsimplexinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,816 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
prismp2.hh
│ │ │ │ +
nedelecsimplexinterpolation.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_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
10#warning This header is deprecated
│ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <utility>
│ │ │ │ +
10#include <numeric>
│ │ │ │
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
19 template<class D, class R>
│ │ │ │ - │ │ │ │ -
21 [[deprecated("use LagrangePrismLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
24}
│ │ │ │ +
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#endif
│ │ │ │ - │ │ │ │ +
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 )
│ │ │ │ +
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 // 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
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for 3d prisms with arbitrary compile-time polynomial order.
Definition lagrangeprism.hh:652
│ │ │ │ +
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
│ │ │ │ +
Definition interpolationhelper.hh:22
│ │ │ │ +
Definition interpolationhelper.hh:24
│ │ │ │ +
Definition polynomialbasis.hh:65
│ │ │ │ +
unsigned int size() const
Definition polynomialbasis.hh:113
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,43 +7,906 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -prismp2.hh │ │ │ │ │ + * nedelec │ │ │ │ │ + * nedelecsimplex │ │ │ │ │ +nedelecsimplexinterpolation.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_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH │ │ │ │ │ + 6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#warning This header is deprecated │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ 11 │ │ │ │ │ - 12namespace Dune │ │ │ │ │ - 13{ │ │ │ │ │ - 14 │ │ │ │ │ - 19 template │ │ │ │ │ -20 using PrismP2LocalFiniteElement │ │ │ │ │ - 21 [[deprecated("use LagrangePrismLocalFiniteElement instead")]] │ │ │ │ │ - 22 = LagrangePrismLocalFiniteElement; │ │ │ │ │ - 23 │ │ │ │ │ - 24} │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ + 17 │ │ │ │ │ + 18#include │ │ │ │ │ + 19#include │ │ │ │ │ + 20#include │ │ │ │ │ + 21#include │ │ │ │ │ + 22 │ │ │ │ │ + 23namespace Dune │ │ │ │ │ + 24{ │ │ │ │ │ 25 │ │ │ │ │ - 26#endif │ │ │ │ │ -lagrangeprism.hh │ │ │ │ │ + 26 // Internal Forward Declarations │ │ │ │ │ + 27 // ----------------------------- │ │ │ │ │ + 28 │ │ │ │ │ + 29 template < unsigned int dim, class Field > │ │ │ │ │ + 30 struct NedelecL2InterpolationFactory; │ │ │ │ │ + 31 │ │ │ │ │ + 32 │ │ │ │ │ + 33 │ │ │ │ │ + 34 // LocalCoefficientsContainer │ │ │ │ │ + 35 // -------------------------- │ │ │ │ │ + 36 │ │ │ │ │ +37 class LocalCoefficientsContainer │ │ │ │ │ + 38 { │ │ │ │ │ + 39 typedef LocalCoefficientsContainer This; │ │ │ │ │ + 40 │ │ │ │ │ + 41 public: │ │ │ │ │ + 42 template │ │ │ │ │ +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 // NedelecCoefficientsFactory │ │ │ │ │ + 66 // -------------------------------- │ │ │ │ │ + 67 │ │ │ │ │ + 68 template < unsigned int dim > │ │ │ │ │ +69 struct NedelecCoefficientsFactory │ │ │ │ │ + 70 { │ │ │ │ │ +71 typedef std::size_t Key; │ │ │ │ │ +72 typedef const LocalCoefficientsContainer Object; │ │ │ │ │ + 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 > │ │ │ │ │ +110 struct NedelecL2InterpolationBuilder │ │ │ │ │ + 111 { │ │ │ │ │ +112 static const unsigned int dimension = dim; │ │ │ │ │ + 113 │ │ │ │ │ + 114 // for the dofs associated to the element │ │ │ │ │ +115 typedef OrthonormalBasisFactory<_dimension,_Field_> TestBasisFactory; │ │ │ │ │ +116 typedef typename TestBasisFactory::Object TestBasis; │ │ │ │ │ + 117 │ │ │ │ │ + 118 // for the dofs associated to the faces │ │ │ │ │ +119 typedef OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory; │ │ │ │ │ +120 typedef typename TestFaceBasisFactory::Object TestFaceBasis; │ │ │ │ │ + 121 │ │ │ │ │ + 122 // for the dofs associated to the edges │ │ │ │ │ +123 typedef OrthonormalBasisFactory<_1,_Field_> TestEdgeBasisFactory; │ │ │ │ │ +124 typedef typename TestEdgeBasisFactory::Object TestEdgeBasis; │ │ │ │ │ + 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,dim-1> FaceTangents; │ │ │ │ │ + 132 │ │ │ │ │ +133 NedelecL2InterpolationBuilder () = default; │ │ │ │ │ + 134 │ │ │ │ │ +135 NedelecL2InterpolationBuilder ( const NedelecL2InterpolationBuilder & ) = │ │ │ │ │ +delete; │ │ │ │ │ +136 NedelecL2InterpolationBuilder ( NedelecL2InterpolationBuilder && ) = │ │ │ │ │ +delete; │ │ │ │ │ + 137 │ │ │ │ │ +138 ~NedelecL2InterpolationBuilder () │ │ │ │ │ + 139 { │ │ │ │ │ + 140 TestBasisFactory::release( testBasis_ ); │ │ │ │ │ + 141 for( FaceStructure &f : faceStructure_ ) │ │ │ │ │ + 142 TestFaceBasisFactory::release( f.basis_ ); │ │ │ │ │ + 143 for( EdgeStructure& e : edgeStructure_ ) │ │ │ │ │ + 144 TestEdgeBasisFactory::release( e.basis_ ); │ │ │ │ │ + 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 │ │ │ │ │ +175 TestBasis *testBasis () const │ │ │ │ │ + 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(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 zero(0); │ │ │ │ │ + 244 FaceTangents faceTangents; │ │ │ │ │ + 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; jvertex2) │ │ │ │ │ + 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; iv1) │ │ │ │ │ + 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> │ │ │ │ │ +359 class NedelecL2Interpolation │ │ │ │ │ + 360 : public InterpolationHelper< F ,dimension > │ │ │ │ │ + 361 { │ │ │ │ │ + 362 typedef NedelecL2Interpolation<_dimension,_F_> This; │ │ │ │ │ + 363 typedef InterpolationHelper Base; │ │ │ │ │ + 364 │ │ │ │ │ + 365 public: │ │ │ │ │ +366 typedef F Field; │ │ │ │ │ +367 typedef NedelecL2InterpolationBuilder Builder; │ │ │ │ │ +368 typedef typename Builder::FaceTangents FaceTangents; │ │ │ │ │ + 369 │ │ │ │ │ +370 NedelecL2Interpolation() │ │ │ │ │ + 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().resize │ │ │ │ │ +(1) ),void >::value,void> │ │ │ │ │ + 378 { │ │ │ │ │ + 379 coefficients.resize(size()); │ │ │ │ │ + 380 typename Base::template Helper 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().rowPtr(0)), typename Matrix::Field* >:: │ │ │ │ │ +value,void> │ │ │ │ │ + 388 { │ │ │ │ │ + 389 matrix.resize( size(), basis.size() ); │ │ │ │ │ + 390 typename Base::template Helper 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 │ │ │ │ │ +404 void build( std::size_t order ) │ │ │ │ │ + 405 { │ │ │ │ │ + 406 size_ = 0; │ │ │ │ │ + 407 order_ = order; │ │ │ │ │ + 408 builder_.template build(order_); │ │ │ │ │ + 409 if (builder_.testBasis()) │ │ │ │ │ + 410 size_ += dimension*builder_.testBasis()->size(); │ │ │ │ │ + 411 │ │ │ │ │ + 412 for ( unsigned int f=0; fsize(); │ │ │ │ │ + 415 │ │ │ │ │ + 416 for ( unsigned int e=0; esize(); │ │ │ │ │ + 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; esize(); ++i,++row) │ │ │ │ │ + 429 keys[row] = LocalKey(e,dimension-1,i); │ │ │ │ │ + 430 } │ │ │ │ │ + 431 for (unsigned int f=0; fsize()*(dimension-1); │ │ │ │ │ +++i,++row) │ │ │ │ │ + 435 keys[row] = LocalKey(f,1,i); │ │ │ │ │ + 436 } │ │ │ │ │ + 437 │ │ │ │ │ + 438 if (builder_.testBasis()) │ │ │ │ │ + 439 for (unsigned int i=0; isize()*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 ) const │ │ │ │ │ + 447 { │ │ │ │ │ + 448 const Dune::GeometryType geoType( builder_.topologyId(), dimension ); │ │ │ │ │ + 449 │ │ │ │ │ + 450 std::vector testBasisVal; │ │ │ │ │ + 451 │ │ │ │ │ + 452 for (unsigned int i=0; i EdgeQuadrature; │ │ │ │ │ + 460 typedef Dune::QuadratureRules EdgeQuadratureRules; │ │ │ │ │ + 461 │ │ │ │ │ + 462 const auto &refElement = Dune::ReferenceElements< Field, dimension >:: │ │ │ │ │ +general( geoType ); │ │ │ │ │ + 463 │ │ │ │ │ + 464 for (unsigned int e=0; esize()); │ │ │ │ │ + 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() ) ), │ │ │ │ │ + 484 builder_.edgeTangent(e), │ │ │ │ │ + 485 edgeQuad[qi].weight(), │ │ │ │ │ + 486 func); │ │ │ │ │ + 487 } │ │ │ │ │ + 488 │ │ │ │ │ + 489 row += builder_.testEdgeBasis(e)->size(); │ │ │ │ │ + 490 } │ │ │ │ │ + 491 │ │ │ │ │ + 492 // face dofs: │ │ │ │ │ + 493 typedef Dune::QuadratureRule FaceQuadrature; │ │ │ │ │ + 494 typedef Dune::QuadratureRules FaceQuadratureRules; │ │ │ │ │ + 495 │ │ │ │ │ + 496 for (unsigned int f=0; fsize()); │ │ │ │ │ + 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() ) ), │ │ │ │ │ + 517 builder_.faceTangents(f), │ │ │ │ │ + 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 Quadrature; │ │ │ │ │ + 533 typedef Dune::QuadratureRules 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 │ │ │ │ │ + 563 void computeEdgeDofs (unsigned int startRow, │ │ │ │ │ + 564 const MVal &mVal, │ │ │ │ │ + 565 const NedVal &nedVal, │ │ │ │ │ + 566 const FieldVector &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 │ │ │ │ │ + 594 void computeFaceDofs (unsigned int startRow, │ │ │ │ │ + 595 const MVal &mVal, │ │ │ │ │ + 596 const NedVal &nedVal, │ │ │ │ │ + 597 const FaceTangents& faceTangents, │ │ │ │ │ + 598 const FieldVector &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 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 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 │ │ │ │ │ +661 struct NedelecL2InterpolationFactory │ │ │ │ │ + 662 { │ │ │ │ │ +663 typedef NedelecL2InterpolationBuilder Builder; │ │ │ │ │ +664 typedef const NedelecL2Interpolation Object; │ │ │ │ │ +665 typedef std::size_t Key; │ │ │ │ │ +666 typedef typename std::remove_const::type NonConstObject; │ │ │ │ │ + 667 │ │ │ │ │ + 668 template │ │ │ │ │ +669 static Object *create( const Key &key ) │ │ │ │ │ + 670 { │ │ │ │ │ + 671 if ( !supports(key) ) │ │ │ │ │ + 672 return 0; │ │ │ │ │ + 673 NonConstObject *interpol = new NonConstObject(); │ │ │ │ │ + 674 interpol->template build(key); │ │ │ │ │ + 675 return interpol; │ │ │ │ │ + 676 } │ │ │ │ │ + 677 │ │ │ │ │ + 678 template │ │ │ │ │ +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 │ │ │ │ │ +localkey.hh │ │ │ │ │ +orthonormalbasis.hh │ │ │ │ │ +interpolationhelper.hh │ │ │ │ │ +polynomialbasis.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LagrangePrismLocalFiniteElement │ │ │ │ │ -Lagrange finite element for 3d prisms with arbitrary compile-time polynomial │ │ │ │ │ -order. │ │ │ │ │ -Definition lagrangeprism.hh:652 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::NedelecL2InterpolationFactory │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:662 │ │ │ │ │ +Dune::NedelecL2InterpolationFactory::create │ │ │ │ │ +static Object * create(const Key &key) │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:669 │ │ │ │ │ +Dune::NedelecL2InterpolationFactory::Object │ │ │ │ │ +const NedelecL2Interpolation< dim, Field > Object │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:664 │ │ │ │ │ +Dune::NedelecL2InterpolationFactory::Builder │ │ │ │ │ +NedelecL2InterpolationBuilder< dim, Field > Builder │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:663 │ │ │ │ │ +Dune::NedelecL2InterpolationFactory::Key │ │ │ │ │ +std::size_t Key │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:665 │ │ │ │ │ +Dune::NedelecL2InterpolationFactory::supports │ │ │ │ │ +static bool supports(const Key &key) │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:679 │ │ │ │ │ +Dune::NedelecL2InterpolationFactory::NonConstObject │ │ │ │ │ +std::remove_const< Object >::type NonConstObject │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:666 │ │ │ │ │ +Dune::NedelecL2InterpolationFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:684 │ │ │ │ │ +Dune::LocalCoefficientsContainer │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:38 │ │ │ │ │ +Dune::LocalCoefficientsContainer::LocalCoefficientsContainer │ │ │ │ │ +LocalCoefficientsContainer(const Setter &setter) │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:43 │ │ │ │ │ +Dune::LocalCoefficientsContainer::localKey │ │ │ │ │ +const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:48 │ │ │ │ │ +Dune::LocalCoefficientsContainer::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:54 │ │ │ │ │ +Dune::NedelecCoefficientsFactory │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:70 │ │ │ │ │ +Dune::NedelecCoefficientsFactory::create │ │ │ │ │ +static Object * create(const Key &key) │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:75 │ │ │ │ │ +Dune::NedelecCoefficientsFactory::supports │ │ │ │ │ +static bool supports(const Key &key) │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:87 │ │ │ │ │ +Dune::NedelecCoefficientsFactory::Object │ │ │ │ │ +const LocalCoefficientsContainer Object │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:72 │ │ │ │ │ +Dune::NedelecCoefficientsFactory::Key │ │ │ │ │ +std::size_t Key │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:71 │ │ │ │ │ +Dune::NedelecCoefficientsFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:92 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:111 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::testEdgeBasis │ │ │ │ │ +TestEdgeBasis * testEdgeBasis(unsigned int e) const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:188 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::~NedelecL2InterpolationBuilder │ │ │ │ │ +~NedelecL2InterpolationBuilder() │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:138 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::type │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:152 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::TestBasis │ │ │ │ │ +TestBasisFactory::Object TestBasis │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:116 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::Tangent │ │ │ │ │ +FieldVector< Field, dimension > Tangent │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:127 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::TestFaceBasis │ │ │ │ │ +TestFaceBasisFactory::Object TestFaceBasis │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:120 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::testFaceBasis │ │ │ │ │ +TestFaceBasis * testFaceBasis(unsigned int f) const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:181 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::TestEdgeBasis │ │ │ │ │ +TestEdgeBasisFactory::Object TestEdgeBasis │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:124 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::Normal │ │ │ │ │ +FieldVector< Field, dimension > Normal │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:130 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::build │ │ │ │ │ +void build(std::size_t order) │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:213 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::TestBasisFactory │ │ │ │ │ +OrthonormalBasisFactory< dimension, Field > TestBasisFactory │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:115 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::TestFaceBasisFactory │ │ │ │ │ +OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:119 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::faceTangents │ │ │ │ │ +const FaceTangents & faceTangents(unsigned int f) const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:200 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::faceSize │ │ │ │ │ +unsigned int faceSize() const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:163 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::testBasis │ │ │ │ │ +TestBasis * testBasis() const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:175 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::FaceTangents │ │ │ │ │ +std::array< FieldVector< Field, dimension >, dim-1 > FaceTangents │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:131 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::TestEdgeBasisFactory │ │ │ │ │ +OrthonormalBasisFactory< 1, Field > TestEdgeBasisFactory │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:123 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::edgeTangent │ │ │ │ │ +const Tangent & edgeTangent(unsigned int e) const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:194 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::NedelecL2InterpolationBuilder │ │ │ │ │ +NedelecL2InterpolationBuilder(NedelecL2InterpolationBuilder &&)=delete │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::order │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:157 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::edgeSize │ │ │ │ │ +unsigned int edgeSize() const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:169 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::topologyId │ │ │ │ │ +unsigned int topologyId() const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:147 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::NedelecL2InterpolationBuilder │ │ │ │ │ +NedelecL2InterpolationBuilder(const NedelecL2InterpolationBuilder &)=delete │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:112 │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::NedelecL2InterpolationBuilder │ │ │ │ │ +NedelecL2InterpolationBuilder()=default │ │ │ │ │ +Dune::NedelecL2InterpolationBuilder::normal │ │ │ │ │ +const Normal & normal(unsigned int f) const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:206 │ │ │ │ │ +Dune::NedelecL2Interpolation │ │ │ │ │ +An L2-based interpolation for Nedelec. │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:361 │ │ │ │ │ +Dune::NedelecL2Interpolation::FaceTangents │ │ │ │ │ +Builder::FaceTangents FaceTangents │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:368 │ │ │ │ │ +Dune::NedelecL2Interpolation::Field │ │ │ │ │ +F Field │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:366 │ │ │ │ │ +Dune::NedelecL2Interpolation::interpolate │ │ │ │ │ +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 │ │ │ │ │ +Dune::NedelecL2Interpolation::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:398 │ │ │ │ │ +Dune::NedelecL2Interpolation::interpolate │ │ │ │ │ +void interpolate(typename Base::template Helper< Func, Container, type > &func) │ │ │ │ │ +const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:446 │ │ │ │ │ +Dune::NedelecL2Interpolation::order_ │ │ │ │ │ +std::size_t order_ │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:656 │ │ │ │ │ +Dune::NedelecL2Interpolation::Builder │ │ │ │ │ +NedelecL2InterpolationBuilder< dimension, Field > Builder │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:367 │ │ │ │ │ +Dune::NedelecL2Interpolation::interpolate │ │ │ │ │ +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 │ │ │ │ │ +Dune::NedelecL2Interpolation::size_ │ │ │ │ │ +std::size_t size_ │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:657 │ │ │ │ │ +Dune::NedelecL2Interpolation::NedelecL2Interpolation │ │ │ │ │ +NedelecL2Interpolation() │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:370 │ │ │ │ │ +Dune::NedelecL2Interpolation::build │ │ │ │ │ +void build(std::size_t order) │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:404 │ │ │ │ │ +Dune::NedelecL2Interpolation::order │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:394 │ │ │ │ │ +Dune::NedelecL2Interpolation::setLocalKeys │ │ │ │ │ +void setLocalKeys(std::vector< LocalKey > &keys) const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:421 │ │ │ │ │ +Dune::NedelecL2Interpolation::builder_ │ │ │ │ │ +Builder builder_ │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:655 │ │ │ │ │ +Dune::OrthonormalBasisFactory │ │ │ │ │ +Definition orthonormalbasis.hh:20 │ │ │ │ │ +Dune::OrthonormalBasisFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition orthonormalbasis.hh:57 │ │ │ │ │ +Dune::InterpolationHelper │ │ │ │ │ +Definition interpolationhelper.hh:22 │ │ │ │ │ +Dune::InterpolationHelper::Helper │ │ │ │ │ +Definition interpolationhelper.hh:24 │ │ │ │ │ +Dune::PolynomialBasis │ │ │ │ │ +Definition polynomialbasis.hh:65 │ │ │ │ │ +Dune::PolynomialBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Definition polynomialbasis.hh:113 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00140.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pyramidp1.hh File Reference │ │ │ │ +dune-localfunctions: nedelecsimplexprebasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
pyramidp1.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
nedelecsimplexprebasis.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangepyramid.hh>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <utility>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

struct  Dune::NedelecPreBasisFactory< dim, Field >
 
struct  Dune::NedelecPreBasisFactory< dim, Field >::EvaluationBasisFactory< dd, FF >
 
struct  Dune::NedelecVecMatrix< geometryId, Field >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ 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 {} │ │ │ │ │ @@ -6,24 +6,30 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -Namespaces | Typedefs │ │ │ │ │ -pyramidp1.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ + * nedelec │ │ │ │ │ + * nedelecsimplex │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +nedelecsimplexprebasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ + Classes │ │ │ │ │ +struct  Dune::NedelecPreBasisFactory<_dim,_Field_> │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::NedelecPreBasisFactory<_dim,_Field_>::EvaluationBasisFactory< │ │ │ │ │ + dd,_FF_> │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::NedelecVecMatrix<_geometryId,_Field_> │ │ │ │ │ +  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Typedefs │ │ │ │ │ -template │ │ │ │ │ -using Dune::PyramidP1LocalFiniteElement = LagrangePyramidLocalFiniteElement< │ │ │ │ │ - D, R, 1 > │ │ │ │ │ -  First-order Lagrangian finite element on a three-dimensional pyramid. │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00140_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pyramidp1.hh Source File │ │ │ │ +dune-localfunctions: nedelecsimplexprebasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,47 +70,353 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pyramidp1.hh
│ │ │ │ +
nedelecsimplexprebasis.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
│ │ │ │ - │ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <utility>
│ │ │ │
10
│ │ │ │ -
11#warning This header is deprecated
│ │ │ │ +
11#include <dune/geometry/type.hh>
│ │ │ │
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
20 template<class D, class R>
│ │ │ │ - │ │ │ │ -
22 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
24
│ │ │ │ -
25}
│ │ │ │ -
26
│ │ │ │ -
27#endif
│ │ │ │ - │ │ │ │ + │ │ │ │ +
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 };
│ │ │ │ +
│ │ │ │ +
36
│ │ │ │ +
37 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
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");
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
271
│ │ │ │ +
272 unsigned int row_,col_;
│ │ │ │ +
273 Field **mat_;
│ │ │ │ +
274 };
│ │ │ │ +
│ │ │ │ +
275
│ │ │ │ +
276
│ │ │ │ +
277}
│ │ │ │ +
278#endif // #ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for 3d pyramids with compile-time polynomial order.
Definition lagrangepyramid.hh:812
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,43 +7,409 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -pyramidp1.hh │ │ │ │ │ + * nedelec │ │ │ │ │ + * nedelecsimplex │ │ │ │ │ +nedelecsimplexprebasis.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 │ │ │ │ │ - 9#include │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ 10 │ │ │ │ │ - 11#warning This header is deprecated │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 20 template │ │ │ │ │ -21 using PyramidP1LocalFiniteElement │ │ │ │ │ - 22 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]] │ │ │ │ │ - 23 = LagrangePyramidLocalFiniteElement; │ │ │ │ │ - 24 │ │ │ │ │ - 25} │ │ │ │ │ - 26 │ │ │ │ │ - 27#endif │ │ │ │ │ -lagrangepyramid.hh │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 17 template < GeometryType::Id geometryId, class Field > │ │ │ │ │ + 18 struct NedelecVecMatrix; │ │ │ │ │ + 19 │ │ │ │ │ + 20 template │ │ │ │ │ +21 struct NedelecPreBasisFactory │ │ │ │ │ + 22 { │ │ │ │ │ +23 typedef MonomialBasisProvider MBasisFactory; │ │ │ │ │ +24 typedef typename MBasisFactory::Object MBasis; │ │ │ │ │ +25 typedef StandardEvaluator EvalMBasis; │ │ │ │ │ +26 typedef PolynomialBasisWithMatrix > │ │ │ │ │ +Basis; │ │ │ │ │ + 27 │ │ │ │ │ +28 typedef const Basis Object; │ │ │ │ │ +29 typedef std::size_t Key; │ │ │ │ │ + 30 │ │ │ │ │ + 31 template │ │ │ │ │ +32 struct EvaluationBasisFactory │ │ │ │ │ + 33 { │ │ │ │ │ +34 typedef MonomialBasisProvider Type; │ │ │ │ │ + 35 }; │ │ │ │ │ + 36 │ │ │ │ │ + 37 template< GeometryType::Id geometryId > │ │ │ │ │ +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--; │ │ │ │ │ + 50 NedelecVecMatrix vecMatrix(order); │ │ │ │ │ + 51 MBasis *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 } │ │ │ │ │ +56 static void release( Object *object ) { delete object; } │ │ │ │ │ + 57 }; │ │ │ │ │ + 58 │ │ │ │ │ + 59 template │ │ │ │ │ +60 struct NedelecVecMatrix │ │ │ │ │ + 61 { │ │ │ │ │ +62 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ +63 static const unsigned int dim = geometry.dim(); │ │ │ │ │ +64 typedef MultiIndex MI; │ │ │ │ │ +65 typedef MonomialBasis MIBasis; │ │ │ │ │ +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: =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"); │ │ │ │ │ + 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; w0; │ │ │ │ │ + 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 │ │ │ │ │ +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 MI │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:64 │ │ │ │ │ +Dune::NedelecVecMatrix::row_ │ │ │ │ │ +unsigned int row_ │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:272 │ │ │ │ │ +Dune::NedelecVecMatrix::cols │ │ │ │ │ +unsigned int cols() const │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:255 │ │ │ │ │ +Dune::NedelecVecMatrix::~NedelecVecMatrix │ │ │ │ │ +~NedelecVecMatrix() │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:247 │ │ │ │ │ +Dune::NedelecVecMatrix::MIBasis │ │ │ │ │ +MonomialBasis< geometryId, MI > MIBasis │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:65 │ │ │ │ │ +Dune::NedelecVecMatrix::col_ │ │ │ │ │ +unsigned int col_ │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:272 │ │ │ │ │ +Dune::NedelecVecMatrix::dim │ │ │ │ │ +static const unsigned int dim │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:63 │ │ │ │ │ +Dune::NedelecVecMatrix::row │ │ │ │ │ +void row(const unsigned int row, Vector &vec) const │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:264 │ │ │ │ │ +Dune::NedelecVecMatrix::geometry │ │ │ │ │ +static constexpr GeometryType geometry │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:62 │ │ │ │ │ +Dune::NedelecVecMatrix::rows │ │ │ │ │ +unsigned int rows() const │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:259 │ │ │ │ │ +Dune::NedelecVecMatrix::mat_ │ │ │ │ │ +Field ** mat_ │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:273 │ │ │ │ │ +Dune::NedelecPreBasisFactory │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:22 │ │ │ │ │ +Dune::NedelecPreBasisFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:56 │ │ │ │ │ +Dune::NedelecPreBasisFactory::MBasis │ │ │ │ │ +MBasisFactory::Object MBasis │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:24 │ │ │ │ │ +Dune::NedelecPreBasisFactory::create │ │ │ │ │ +static Object * create(Key order) │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:38 │ │ │ │ │ +Dune::NedelecPreBasisFactory::Basis │ │ │ │ │ +PolynomialBasisWithMatrix< EvalMBasis, SparseCoeffMatrix< Field, dim > > Basis │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:26 │ │ │ │ │ +Dune::NedelecPreBasisFactory::Object │ │ │ │ │ +const Basis Object │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:28 │ │ │ │ │ +Dune::NedelecPreBasisFactory::EvalMBasis │ │ │ │ │ +StandardEvaluator< MBasis > EvalMBasis │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:25 │ │ │ │ │ +Dune::NedelecPreBasisFactory::MBasisFactory │ │ │ │ │ +MonomialBasisProvider< dim, Field > MBasisFactory │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:23 │ │ │ │ │ +Dune::NedelecPreBasisFactory::Key │ │ │ │ │ +std::size_t Key │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:29 │ │ │ │ │ +Dune::NedelecPreBasisFactory::EvaluationBasisFactory │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:33 │ │ │ │ │ +Dune::NedelecPreBasisFactory::EvaluationBasisFactory::Type │ │ │ │ │ +MonomialBasisProvider< dd, FF > Type │ │ │ │ │ +Definition nedelecsimplexprebasis.hh:34 │ │ │ │ │ +Dune::StandardEvaluator │ │ │ │ │ +Definition basisevaluator.hh:131 │ │ │ │ │ +Dune::MonomialBasis │ │ │ │ │ +Definition monomialbasis.hh:440 │ │ │ │ │ +Dune::MonomialBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Definition monomialbasis.hh:476 │ │ │ │ │ +Dune::MonomialBasis::evaluate │ │ │ │ │ +void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ +values) const │ │ │ │ │ +Definition monomialbasis.hh:498 │ │ │ │ │ +Dune::MonomialBasis::sizes │ │ │ │ │ +const unsigned int * sizes(unsigned int order) const │ │ │ │ │ +Definition monomialbasis.hh:465 │ │ │ │ │ +Dune::MonomialBasisProvider │ │ │ │ │ +Definition monomialbasis.hh:780 │ │ │ │ │ +Dune::MultiIndex │ │ │ │ │ +Definition multiindex.hh:37 │ │ │ │ │ +Dune::MultiIndex::z │ │ │ │ │ +int z(int i) const │ │ │ │ │ +Definition multiindex.hh:91 │ │ │ │ │ +Dune::PolynomialBasisWithMatrix │ │ │ │ │ +Definition polynomialbasis.hh:348 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00143.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangecoefficients.hh File Reference │ │ │ │ +dune-localfunctions: monomiallocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
lagrangecoefficients.hh File Reference
│ │ │ │ +
monomiallocalcoefficients.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::MonomialLocalCoefficients< static_size >
 Layout map for monomial finite elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,25 +6,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ + * monomial │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -lagrangecoefficients.hh File Reference │ │ │ │ │ +monomiallocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include "../common/localkey.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  Dune::LagrangeCoefficientsFactory<_LP,_dim,_F_> │ │ │ │ │ +class  Dune::MonomialLocalCoefficients<_static_size_> │ │ │ │ │ +  Layout map for monomial finite elements. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00143_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangecoefficients.hh Source File │ │ │ │ +dune-localfunctions: monomiallocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,81 +70,77 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangecoefficients.hh
│ │ │ │ +
monomiallocalcoefficients.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_MONOMIAL_MONOMIALLOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALCOEFFICIENTS_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>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include "../common/localkey.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
22 template<int static_size>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 : index(static_size, LocalKey(0,0,0))
│ │ │ │ +
29 {
│ │ │ │ +
30 for(int i = 0; i < static_size; ++i)
│ │ │ │ +
31 index[i].index(i);
│ │ │ │ +
32 }
│ │ │ │ +
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
35 std::size_t size () const
│ │ │ │ +
36 {
│ │ │ │ +
37 return static_size;
│ │ │ │ +
38 }
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ +
41 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
42 {
│ │ │ │ +
43 return index[i];
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
46 private:
│ │ │ │ +
47 std::vector<LocalKey> index;
│ │ │ │ +
48 };
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
50}
│ │ │ │ +
51#endif //DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALCOEFFICIENTS_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 monomial finite elements.
Definition monomiallocalcoefficients.hh:24
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition monomiallocalcoefficients.hh:35
│ │ │ │ +
MonomialLocalCoefficients()
Standard constructor.
Definition monomiallocalcoefficients.hh:27
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition monomiallocalcoefficients.hh:41
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,82 +7,76 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -lagrangecoefficients.hh │ │ │ │ │ + * monomial │ │ │ │ │ +monomiallocalcoefficients.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_MONOMIAL_MONOMIALLOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16 │ │ │ │ │ - 17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ - 19 │ │ │ │ │ - 20 template< template class LP, │ │ │ │ │ - 21 unsigned int dim, class F> │ │ │ │ │ -22 struct LagrangeCoefficientsFactory │ │ │ │ │ - 23 { │ │ │ │ │ -24 static const unsigned int dimension = dim; │ │ │ │ │ -25 const typedef LP 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(order)) │ │ │ │ │ - 32 return 0; │ │ │ │ │ - 33 typedef typename std::remove_const::type LagrangeCoefficients; │ │ │ │ │ - 34 LagrangeCoefficients *object = new LagrangeCoefficients(order); │ │ │ │ │ - 35 if ( !object->template build() ) │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include "../common/localkey.hh" │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ + 22 template │ │ │ │ │ +23 class MonomialLocalCoefficients │ │ │ │ │ + 24 { │ │ │ │ │ + 25 public: │ │ │ │ │ +27 MonomialLocalCoefficients () │ │ │ │ │ + 28 : index(static_size, LocalKey(0,0,0)) │ │ │ │ │ + 29 { │ │ │ │ │ + 30 for(int i = 0; i < static_size; ++i) │ │ │ │ │ + 31 index[i].index(i); │ │ │ │ │ + 32 } │ │ │ │ │ + 33 │ │ │ │ │ +35 std::size_t size () const │ │ │ │ │ 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 │ │ │ │ │ -field.hh │ │ │ │ │ -localkey.hh │ │ │ │ │ + 37 return static_size; │ │ │ │ │ + 38 } │ │ │ │ │ + 39 │ │ │ │ │ +41 const LocalKey& localKey (std::size_t i) const │ │ │ │ │ + 42 { │ │ │ │ │ + 43 return index[i]; │ │ │ │ │ + 44 } │ │ │ │ │ + 45 │ │ │ │ │ + 46 private: │ │ │ │ │ + 47 std::vector index; │ │ │ │ │ + 48 }; │ │ │ │ │ + 49 │ │ │ │ │ + 50} │ │ │ │ │ + 51#endif //DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALCOEFFICIENTS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LagrangeCoefficientsFactory │ │ │ │ │ -Definition lagrangecoefficients.hh:23 │ │ │ │ │ -Dune::LagrangeCoefficientsFactory::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition lagrangecoefficients.hh:24 │ │ │ │ │ -Dune::LagrangeCoefficientsFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition lagrangecoefficients.hh:42 │ │ │ │ │ -Dune::LagrangeCoefficientsFactory::Object │ │ │ │ │ -const typedef LP< F, dim > Object │ │ │ │ │ -Definition lagrangecoefficients.hh:25 │ │ │ │ │ -Dune::LagrangeCoefficientsFactory::create │ │ │ │ │ -static Object * create(const Key &order) │ │ │ │ │ -Definition lagrangecoefficients.hh:29 │ │ │ │ │ -Dune::LagrangeCoefficientsFactory::Key │ │ │ │ │ -std::size_t Key │ │ │ │ │ -Definition lagrangecoefficients.hh:26 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::MonomialLocalCoefficients │ │ │ │ │ +Layout map for monomial finite elements. │ │ │ │ │ +Definition monomiallocalcoefficients.hh:24 │ │ │ │ │ +Dune::MonomialLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition monomiallocalcoefficients.hh:35 │ │ │ │ │ +Dune::MonomialLocalCoefficients::MonomialLocalCoefficients │ │ │ │ │ +MonomialLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition monomiallocalcoefficients.hh:27 │ │ │ │ │ +Dune::MonomialLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition monomiallocalcoefficients.hh:41 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00146.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p23d.hh File Reference │ │ │ │ +dune-localfunctions: monomiallocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,55 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
p23d.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
monomiallocalbasis.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +
#include <array>
│ │ │ │ +#include <cassert>
│ │ │ │ +#include <numeric>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/common/math.hh>
│ │ │ │ +#include "../common/localbasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::MonomImp::EvalAccess< Traits >
 Access output vector of evaluateFunction() and evaluate() More...
 
class  Dune::MonomImp::JacobianAccess< Traits >
 Access output vector of evaluateJacobian() More...
 
struct  Dune::MonomImp::Evaluate< Traits, c >
 
struct  Dune::MonomImp::Evaluate< Traits, 1 >
 
class  Dune::MonomialLocalBasis< D, R, d, p >
 Constant shape function. 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.
 
namespace  Dune::MonomImp
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,25 +6,39 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -Namespaces | Typedefs │ │ │ │ │ -p23d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ + * monomial │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +monomiallocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../common/localbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ + Classes │ │ │ │ │ + class  Dune::MonomImp::EvalAccess<_Traits_> │ │ │ │ │ +  Access output vector of evaluateFunction() and evaluate() More... │ │ │ │ │ +  │ │ │ │ │ + class  Dune::MonomImp::JacobianAccess<_Traits_> │ │ │ │ │ +  Access output vector of evaluateJacobian() More... │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::MonomImp::Evaluate<_Traits,_c_> │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::MonomImp::Evaluate<_Traits,_1_> │ │ │ │ │ +  │ │ │ │ │ + class  Dune::MonomialLocalBasis<_D,_R,_d,_p_> │ │ │ │ │ +  Constant shape function. More... │ │ │ │ │ +  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ - Typedefs │ │ │ │ │ -template │ │ │ │ │ -using Dune::P23DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, │ │ │ │ │ - 3, 2 > │ │ │ │ │ -  Second-order Lagrange local finite element on the reference tetrahedron. │ │ │ │ │ - │ │ │ │ │ +namespace  Dune::MonomImp │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00146_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p23d.hh Source File │ │ │ │ +dune-localfunctions: monomiallocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,304 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
p23d.hh
│ │ │ │ +
monomiallocalbasis.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_MONOMIAL_MONOMIALLOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALBASIS_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
10#warning This header is deprecated
│ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <cassert>
│ │ │ │ +
10#include <numeric>
│ │ │ │
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ +
12#include <dune/common/fmatrix.hh>
│ │ │ │ +
13#include <dune/common/math.hh>
│ │ │ │
14
│ │ │ │ -
22 template<class D, class R>
│ │ │ │ - │ │ │ │ -
24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
26
│ │ │ │ -
27}
│ │ │ │ +
15#include "../common/localbasis.hh"
│ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
│ │ │ │ +
19 namespace MonomImp
│ │ │ │ +
20 {
│ │ │ │ +
22 template <typename Traits>
│ │ │ │ +
│ │ │ │ +
23 class EvalAccess {
│ │ │ │ +
24 std::vector<typename Traits::RangeType> &out;
│ │ │ │ +
25#ifndef NDEBUG
│ │ │ │ +
26 unsigned int first_unused_index;
│ │ │ │ +
27#endif
│ │ │ │
28
│ │ │ │ -
29#endif
│ │ │ │ - │ │ │ │ +
29 public:
│ │ │ │ +
│ │ │ │ +
30 EvalAccess(std::vector<typename Traits::RangeType> &out_)
│ │ │ │ +
31 : out(out_)
│ │ │ │ +
32#ifndef NDEBUG
│ │ │ │ +
33 , first_unused_index(0)
│ │ │ │ +
34#endif
│ │ │ │ +
35 { }
│ │ │ │ +
│ │ │ │ +
36#ifndef NDEBUG
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 assert(first_unused_index == out.size());
│ │ │ │ +
39 }
│ │ │ │ +
│ │ │ │ +
40#endif
│ │ │ │ +
│ │ │ │ +
41 typename Traits::RangeFieldType &operator[](unsigned int index)
│ │ │ │ +
42 {
│ │ │ │ +
43 assert(index < out.size());
│ │ │ │ +
44#ifndef NDEBUG
│ │ │ │ +
45 if(first_unused_index <= index)
│ │ │ │ +
46 first_unused_index = index+1;
│ │ │ │ +
47#endif
│ │ │ │ +
48 return out[index][0];
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50 };
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
53 template <typename Traits>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
55 std::vector<typename Traits::JacobianType> &out;
│ │ │ │ +
56 unsigned int row;
│ │ │ │ +
57#ifndef NDEBUG
│ │ │ │ +
58 unsigned int first_unused_index;
│ │ │ │ +
59#endif
│ │ │ │ +
60
│ │ │ │ +
61 public:
│ │ │ │ +
│ │ │ │ +
62 JacobianAccess(std::vector<typename Traits::JacobianType> &out_,
│ │ │ │ +
63 unsigned int row_)
│ │ │ │ +
64 : out(out_), row(row_)
│ │ │ │ +
65#ifndef NDEBUG
│ │ │ │ +
66 , first_unused_index(0)
│ │ │ │ +
67#endif
│ │ │ │ +
68 { }
│ │ │ │ +
│ │ │ │ +
69#ifndef NDEBUG
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
71 assert(first_unused_index == out.size());
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73#endif
│ │ │ │ +
│ │ │ │ +
74 typename Traits::RangeFieldType &operator[](unsigned int index)
│ │ │ │ +
75 {
│ │ │ │ +
76 assert(index < out.size());
│ │ │ │ +
77#ifndef NDEBUG
│ │ │ │ +
78 if(first_unused_index <= index)
│ │ │ │ +
79 first_unused_index = index+1;
│ │ │ │ +
80#endif
│ │ │ │ +
81 return out[index][0][row];
│ │ │ │ +
82 }
│ │ │ │ +
│ │ │ │ +
83 };
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
97 template <typename Traits, int c>
│ │ │ │ +
│ │ │ │ +
98 struct Evaluate
│ │ │ │ +
99 {
│ │ │ │ +
101 constexpr static int d = Traits::dimDomain - c;
│ │ │ │ +
102
│ │ │ │ +
109 template <typename Access>
│ │ │ │ +
│ │ │ │ +
110 static void eval (
│ │ │ │ +
111 const typename Traits::DomainType &in,
│ │ │ │ +
114 const std::array<unsigned int, Traits::dimDomain> &derivatives,
│ │ │ │ +
117 typename Traits::RangeFieldType prod,
│ │ │ │ +
119 int bound,
│ │ │ │ +
121 int& index,
│ │ │ │ +
123 Access &access)
│ │ │ │ +
124 {
│ │ │ │ +
125 // start with the highest exponent for this dimension, then work down
│ │ │ │ +
126 for (int e = bound; e >= 0; --e)
│ │ │ │ +
127 {
│ │ │ │ +
128 // the rest of the available exponents, to be used by the other
│ │ │ │ +
129 // dimensions
│ │ │ │ +
130 int newbound = bound - e;
│ │ │ │ +
131 if(e < (int)derivatives[d])
│ │ │ │ + │ │ │ │ +
133 eval(in, derivatives, 0, newbound, index, access);
│ │ │ │ +
134 else {
│ │ │ │ +
135 int coeff = 1;
│ │ │ │ +
136 for(int i = e - derivatives[d] + 1; i <= e; ++i)
│ │ │ │ +
137 coeff *= i;
│ │ │ │ +
138 // call the evaluator for the next dimension
│ │ │ │ + │ │ │ │ +
140 eval( // pass the coordinate and the derivatives unchanged
│ │ │ │ +
141 in, derivatives,
│ │ │ │ +
142 // also pass the product accumulated so far, but also
│ │ │ │ +
143 // include the current dimension
│ │ │ │ +
144 prod * power(in[d], e-derivatives[d]) * coeff,
│ │ │ │ +
145 // pass the number of remaining exponents to the next
│ │ │ │ +
146 // dimension
│ │ │ │ +
147 newbound,
│ │ │ │ +
148 // pass the next index to fill and the output access
│ │ │ │ +
149 // wrapper
│ │ │ │ +
150 index, access);
│ │ │ │ +
151 }
│ │ │ │ +
152 }
│ │ │ │ +
153 }
│ │ │ │ +
│ │ │ │ +
154 };
│ │ │ │ +
│ │ │ │ +
155
│ │ │ │ +
160 template <typename Traits>
│ │ │ │ +
│ │ │ │ +
161 struct Evaluate<Traits, 1>
│ │ │ │ +
162 {
│ │ │ │ +
163 constexpr static int d = Traits::dimDomain-1;
│ │ │ │ +
165 template <typename Access>
│ │ │ │ +
│ │ │ │ +
166 static void eval (const typename Traits::DomainType &in,
│ │ │ │ +
167 const std::array<unsigned int, Traits::dimDomain> &derivatives,
│ │ │ │ +
168 typename Traits::RangeFieldType prod,
│ │ │ │ +
169 int bound, int& index, Access &access)
│ │ │ │ +
170 {
│ │ │ │ +
171 if(bound < (int)derivatives[d])
│ │ │ │ +
172 prod = 0;
│ │ │ │ +
173 else {
│ │ │ │ +
174 int coeff = 1;
│ │ │ │ +
175 for(int i = bound - derivatives[d] + 1; i <= bound; ++i)
│ │ │ │ +
176 coeff *= i;
│ │ │ │ +
177 prod *= power(in[d], bound-derivatives[d]) * coeff;
│ │ │ │ +
178 }
│ │ │ │ +
179 access[index] = prod;
│ │ │ │ +
180 ++index;
│ │ │ │ +
181 }
│ │ │ │ +
│ │ │ │ +
182 };
│ │ │ │ +
│ │ │ │ +
183
│ │ │ │ +
184 } //namespace MonomImp
│ │ │ │ +
│ │ │ │ +
185
│ │ │ │ +
199 template<class D, class R, unsigned int d, unsigned int p>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
201 {
│ │ │ │ +
202 // Helper: Number of shape functions for a k-th order element in dimension dd
│ │ │ │ +
203 static constexpr unsigned int size (int dd, int k)
│ │ │ │ +
204 {
│ │ │ │ +
205 if (dd==0 || k==0)
│ │ │ │ +
206 return 1;
│ │ │ │ +
207 return size(dd,k-1) + size(dd-1,k);
│ │ │ │ +
208 }
│ │ │ │ +
209
│ │ │ │ +
210 public:
│ │ │ │ +
212 typedef LocalBasisTraits<D,d,Dune::FieldVector<D,d>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ +
213 Dune::FieldMatrix<R,1,d> > Traits;
│ │ │ │ +
214
│ │ │ │ +
│ │ │ │ +
216 static constexpr unsigned int size ()
│ │ │ │ +
217 {
│ │ │ │ +
218 return size(d,p);
│ │ │ │ +
219 }
│ │ │ │ +
│ │ │ │ +
220
│ │ │ │ +
│ │ │ │ +
222 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
223 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
224 {
│ │ │ │ +
225 out.resize(size());
│ │ │ │ +
226 int index = 0;
│ │ │ │ +
227 std::array<unsigned int, d> derivatives;
│ │ │ │ +
228 std::fill(derivatives.begin(), derivatives.end(), 0);
│ │ │ │ + │ │ │ │ +
230 for (unsigned int lp = 0; lp <= p; ++lp)
│ │ │ │ +
231 MonomImp::Evaluate<Traits, d>::eval(in, derivatives, 1, lp, index, access);
│ │ │ │ +
232 }
│ │ │ │ +
│ │ │ │ +
233
│ │ │ │ +
│ │ │ │ +
239 inline void partial(const std::array<unsigned int,d>& order,
│ │ │ │ +
240 const typename Traits::DomainType& in,
│ │ │ │ +
241 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
242 {
│ │ │ │ +
243 out.resize(size());
│ │ │ │ +
244 int index = 0;
│ │ │ │ + │ │ │ │ +
246 for (unsigned int lp = 0; lp <= p; ++lp)
│ │ │ │ +
247 MonomImp::Evaluate<Traits, d>::eval(in, order, 1, lp, index, access);
│ │ │ │ +
248 }
│ │ │ │ +
│ │ │ │ +
249
│ │ │ │ +
251 inline void
│ │ │ │ +
│ │ │ │ +
252 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ +
253 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ +
254 {
│ │ │ │ +
255 out.resize(size());
│ │ │ │ +
256 std::array<unsigned int, d> derivatives;
│ │ │ │ +
257 for(unsigned int i = 0; i < d; ++i)
│ │ │ │ +
258 derivatives[i] = 0;
│ │ │ │ +
259 for(unsigned int i = 0; i < d; ++i)
│ │ │ │ +
260 {
│ │ │ │ +
261 derivatives[i] = 1;
│ │ │ │ +
262 int index = 0;
│ │ │ │ + │ │ │ │ +
264 for(unsigned int lp = 0; lp <= p; ++lp)
│ │ │ │ +
265 MonomImp::Evaluate<Traits, d>::eval(in, derivatives, 1, lp, index, access);
│ │ │ │ +
266 derivatives[i] = 0;
│ │ │ │ +
267 }
│ │ │ │ +
268 }
│ │ │ │ +
│ │ │ │ +
269
│ │ │ │ +
│ │ │ │ +
271 unsigned int order () const
│ │ │ │ +
272 {
│ │ │ │ +
273 return p;
│ │ │ │ +
274 }
│ │ │ │ +
│ │ │ │ +
275 };
│ │ │ │ +
│ │ │ │ +
276
│ │ │ │ +
277}
│ │ │ │ +
278
│ │ │ │ +
279#endif // DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALBASIS_HH
│ │ │ │
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
│ │ │ │ +
Access output vector of evaluateFunction() and evaluate()
Definition monomiallocalbasis.hh:23
│ │ │ │ +
Traits::RangeFieldType & operator[](unsigned int index)
Definition monomiallocalbasis.hh:41
│ │ │ │ +
~EvalAccess()
Definition monomiallocalbasis.hh:37
│ │ │ │ +
EvalAccess(std::vector< typename Traits::RangeType > &out_)
Definition monomiallocalbasis.hh:30
│ │ │ │ +
Access output vector of evaluateJacobian()
Definition monomiallocalbasis.hh:54
│ │ │ │ +
~JacobianAccess()
Definition monomiallocalbasis.hh:70
│ │ │ │ +
Traits::RangeFieldType & operator[](unsigned int index)
Definition monomiallocalbasis.hh:74
│ │ │ │ +
JacobianAccess(std::vector< typename Traits::JacobianType > &out_, unsigned int row_)
Definition monomiallocalbasis.hh:62
│ │ │ │ +
Definition monomiallocalbasis.hh:99
│ │ │ │ +
static constexpr int d
The next dimension to try for factors.
Definition monomiallocalbasis.hh:101
│ │ │ │ +
static void eval(const typename Traits::DomainType &in, const std::array< unsigned int, Traits::dimDomain > &derivatives, typename Traits::RangeFieldType prod, int bound, int &index, Access &access)
Definition monomiallocalbasis.hh:110
│ │ │ │ +
static void eval(const typename Traits::DomainType &in, const std::array< unsigned int, Traits::dimDomain > &derivatives, typename Traits::RangeFieldType prod, int bound, int &index, Access &access)
Definition monomiallocalbasis.hh:166
│ │ │ │ +
Constant shape function.
Definition monomiallocalbasis.hh:201
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition monomiallocalbasis.hh:271
│ │ │ │ +
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 monomiallocalbasis.hh:239
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition monomiallocalbasis.hh:252
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition monomiallocalbasis.hh:222
│ │ │ │ +
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 monomiallocalbasis.hh:213
│ │ │ │ +
static constexpr unsigned int size()
Number of shape functions.
Definition monomiallocalbasis.hh:216
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,43 +7,322 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -p23d.hh │ │ │ │ │ + * monomial │ │ │ │ │ +monomiallocalbasis.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_MONOMIAL_MONOMIALLOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#warning This header is deprecated │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ 11 │ │ │ │ │ - 12namespace Dune │ │ │ │ │ - 13{ │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ 14 │ │ │ │ │ - 22 template │ │ │ │ │ -23 using P23DLocalFiniteElement │ │ │ │ │ - 24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ - 25 = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ - 26 │ │ │ │ │ - 27} │ │ │ │ │ + 15#include "../common/localbasis.hh" │ │ │ │ │ + 16 │ │ │ │ │ + 17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ +19 namespace MonomImp │ │ │ │ │ + 20 { │ │ │ │ │ + 22 template │ │ │ │ │ +23 class EvalAccess { │ │ │ │ │ + 24 std::vector &out; │ │ │ │ │ + 25#ifndef NDEBUG │ │ │ │ │ + 26 unsigned int first_unused_index; │ │ │ │ │ + 27#endif │ │ │ │ │ 28 │ │ │ │ │ - 29#endif │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ + 29 public: │ │ │ │ │ +30 EvalAccess(std::vector &out_) │ │ │ │ │ + 31 : out(out_) │ │ │ │ │ + 32#ifndef NDEBUG │ │ │ │ │ + 33 , first_unused_index(0) │ │ │ │ │ + 34#endif │ │ │ │ │ + 35 { } │ │ │ │ │ + 36#ifndef NDEBUG │ │ │ │ │ +37 ~EvalAccess() { │ │ │ │ │ + 38 assert(first_unused_index == out.size()); │ │ │ │ │ + 39 } │ │ │ │ │ + 40#endif │ │ │ │ │ +41 typename Traits::RangeFieldType &operator[](unsigned int index) │ │ │ │ │ + 42 { │ │ │ │ │ + 43 assert(index < out.size()); │ │ │ │ │ + 44#ifndef NDEBUG │ │ │ │ │ + 45 if(first_unused_index <= index) │ │ │ │ │ + 46 first_unused_index = index+1; │ │ │ │ │ + 47#endif │ │ │ │ │ + 48 return out[index][0]; │ │ │ │ │ + 49 } │ │ │ │ │ + 50 }; │ │ │ │ │ + 51 │ │ │ │ │ + 53 template │ │ │ │ │ +54 class JacobianAccess { │ │ │ │ │ + 55 std::vector &out; │ │ │ │ │ + 56 unsigned int row; │ │ │ │ │ + 57#ifndef NDEBUG │ │ │ │ │ + 58 unsigned int first_unused_index; │ │ │ │ │ + 59#endif │ │ │ │ │ + 60 │ │ │ │ │ + 61 public: │ │ │ │ │ +62 JacobianAccess(std::vector &out_, │ │ │ │ │ + 63 unsigned int row_) │ │ │ │ │ + 64 : out(out_), row(row_) │ │ │ │ │ + 65#ifndef NDEBUG │ │ │ │ │ + 66 , first_unused_index(0) │ │ │ │ │ + 67#endif │ │ │ │ │ + 68 { } │ │ │ │ │ + 69#ifndef NDEBUG │ │ │ │ │ +70 ~JacobianAccess() { │ │ │ │ │ + 71 assert(first_unused_index == out.size()); │ │ │ │ │ + 72 } │ │ │ │ │ + 73#endif │ │ │ │ │ +74 typename Traits::RangeFieldType &operator[](unsigned int index) │ │ │ │ │ + 75 { │ │ │ │ │ + 76 assert(index < out.size()); │ │ │ │ │ + 77#ifndef NDEBUG │ │ │ │ │ + 78 if(first_unused_index <= index) │ │ │ │ │ + 79 first_unused_index = index+1; │ │ │ │ │ + 80#endif │ │ │ │ │ + 81 return out[index][0][row]; │ │ │ │ │ + 82 } │ │ │ │ │ + 83 }; │ │ │ │ │ + 84 │ │ │ │ │ + 97 template │ │ │ │ │ +98 struct Evaluate │ │ │ │ │ + 99 { │ │ │ │ │ +101 constexpr static int d = Traits::dimDomain - c; │ │ │ │ │ + 102 │ │ │ │ │ + 109 template │ │ │ │ │ +110 static void eval ( │ │ │ │ │ + 111 const typename Traits::DomainType &in, │ │ │ │ │ + 114 const std::array &derivatives, │ │ │ │ │ + 117 typename Traits::RangeFieldType prod, │ │ │ │ │ + 119 int bound, │ │ │ │ │ + 121 int& index, │ │ │ │ │ + 123 Access &access) │ │ │ │ │ + 124 { │ │ │ │ │ + 125 // start with the highest exponent for this dimension, then work down │ │ │ │ │ + 126 for (int e = bound; e >= 0; --e) │ │ │ │ │ + 127 { │ │ │ │ │ + 128 // the rest of the available exponents, to be used by the other │ │ │ │ │ + 129 // dimensions │ │ │ │ │ + 130 int newbound = bound - e; │ │ │ │ │ + 131 if(e < (int)derivatives[d]) │ │ │ │ │ + 132 Evaluate:: │ │ │ │ │ + 133eval(in, derivatives, 0, newbound, index, access); │ │ │ │ │ + 134 else { │ │ │ │ │ + 135 int coeff = 1; │ │ │ │ │ + 136 for(int i = e - derivatives[d] + 1; i <= e; ++i) │ │ │ │ │ + 137 coeff *= i; │ │ │ │ │ + 138 // call the evaluator for the next dimension │ │ │ │ │ + 139 Evaluate:: │ │ │ │ │ + 140eval( // pass the coordinate and the derivatives unchanged │ │ │ │ │ + 141 in, derivatives, │ │ │ │ │ + 142 // also pass the product accumulated so far, but also │ │ │ │ │ + 143 // include the current dimension │ │ │ │ │ + 144 prod * power(in[d], e-derivatives[d]) * coeff, │ │ │ │ │ + 145 // pass the number of remaining exponents to the next │ │ │ │ │ + 146 // dimension │ │ │ │ │ + 147 newbound, │ │ │ │ │ + 148 // pass the next index to fill and the output access │ │ │ │ │ + 149 // wrapper │ │ │ │ │ + 150 index, access); │ │ │ │ │ + 151 } │ │ │ │ │ + 152 } │ │ │ │ │ + 153 } │ │ │ │ │ + 154 }; │ │ │ │ │ + 155 │ │ │ │ │ + 160 template │ │ │ │ │ +161 struct Evaluate │ │ │ │ │ + 162 { │ │ │ │ │ +163 constexpr static int d = Traits::dimDomain-1; │ │ │ │ │ + 165 template │ │ │ │ │ +166 static void eval (const typename Traits::DomainType &in, │ │ │ │ │ + 167 const std::array &derivatives, │ │ │ │ │ + 168 typename Traits::RangeFieldType prod, │ │ │ │ │ + 169 int bound, int& index, Access &access) │ │ │ │ │ + 170 { │ │ │ │ │ + 171 if(bound < (int)derivatives[d]) │ │ │ │ │ + 172 prod = 0; │ │ │ │ │ + 173 else { │ │ │ │ │ + 174 int coeff = 1; │ │ │ │ │ + 175 for(int i = bound - derivatives[d] + 1; i <= bound; ++i) │ │ │ │ │ + 176 coeff *= i; │ │ │ │ │ + 177 prod *= power(in[d], bound-derivatives[d]) * coeff; │ │ │ │ │ + 178 } │ │ │ │ │ + 179 access[index] = prod; │ │ │ │ │ + 180 ++index; │ │ │ │ │ + 181 } │ │ │ │ │ + 182 }; │ │ │ │ │ + 183 │ │ │ │ │ + 184 } //namespace MonomImp │ │ │ │ │ + 185 │ │ │ │ │ + 199 template │ │ │ │ │ +200 class MonomialLocalBasis │ │ │ │ │ + 201 { │ │ │ │ │ + 202 // Helper: Number of shape functions for a k-th order element in dimension │ │ │ │ │ +dd │ │ │ │ │ + 203 static constexpr unsigned int size (int dd, int k) │ │ │ │ │ + 204 { │ │ │ │ │ + 205 if (dd==0 || k==0) │ │ │ │ │ + 206 return 1; │ │ │ │ │ + 207 return size(dd,k-1) + size(dd-1,k); │ │ │ │ │ + 208 } │ │ │ │ │ + 209 │ │ │ │ │ + 210 public: │ │ │ │ │ + 212 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +213 Dune::FieldMatrix > Traits; │ │ │ │ │ + 214 │ │ │ │ │ +216 static constexpr unsigned int size () │ │ │ │ │ + 217 { │ │ │ │ │ + 218 return size(d,p); │ │ │ │ │ + 219 } │ │ │ │ │ + 220 │ │ │ │ │ +222 inline void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ + 223 std::vector& out) const │ │ │ │ │ + 224 { │ │ │ │ │ + 225 out.resize(size()); │ │ │ │ │ + 226 int index = 0; │ │ │ │ │ + 227 std::array derivatives; │ │ │ │ │ + 228 std::fill(derivatives.begin(), derivatives.end(), 0); │ │ │ │ │ + 229 MonomImp::EvalAccess access(out); │ │ │ │ │ + 230 for (unsigned int lp = 0; lp <= p; ++lp) │ │ │ │ │ + 231 MonomImp::Evaluate::eval(in, derivatives, 1, lp, index, │ │ │ │ │ +access); │ │ │ │ │ + 232 } │ │ │ │ │ + 233 │ │ │ │ │ +239 inline void partial(const std::array& order, │ │ │ │ │ + 240 const typename Traits::DomainType& in, │ │ │ │ │ + 241 std::vector& out) const │ │ │ │ │ + 242 { │ │ │ │ │ + 243 out.resize(size()); │ │ │ │ │ + 244 int index = 0; │ │ │ │ │ + 245 MonomImp::EvalAccess access(out); │ │ │ │ │ + 246 for (unsigned int lp = 0; lp <= p; ++lp) │ │ │ │ │ + 247 MonomImp::Evaluate::eval(in, order, 1, lp, index, access); │ │ │ │ │ + 248 } │ │ │ │ │ + 249 │ │ │ │ │ + 251 inline void │ │ │ │ │ +252 evaluateJacobian (const typename Traits::DomainType& in, // position │ │ │ │ │ + 253 std::vector& out) const // return value │ │ │ │ │ + 254 { │ │ │ │ │ + 255 out.resize(size()); │ │ │ │ │ + 256 std::array derivatives; │ │ │ │ │ + 257 for(unsigned int i = 0; i < d; ++i) │ │ │ │ │ + 258 derivatives[i] = 0; │ │ │ │ │ + 259 for(unsigned int i = 0; i < d; ++i) │ │ │ │ │ + 260 { │ │ │ │ │ + 261 derivatives[i] = 1; │ │ │ │ │ + 262 int index = 0; │ │ │ │ │ + 263 MonomImp::JacobianAccess access(out, i); │ │ │ │ │ + 264 for(unsigned int lp = 0; lp <= p; ++lp) │ │ │ │ │ + 265 MonomImp::Evaluate::eval(in, derivatives, 1, lp, index, │ │ │ │ │ +access); │ │ │ │ │ + 266 derivatives[i] = 0; │ │ │ │ │ + 267 } │ │ │ │ │ + 268 } │ │ │ │ │ + 269 │ │ │ │ │ +271 unsigned int order () const │ │ │ │ │ + 272 { │ │ │ │ │ + 273 return p; │ │ │ │ │ + 274 } │ │ │ │ │ + 275 }; │ │ │ │ │ + 276 │ │ │ │ │ + 277} │ │ │ │ │ + 278 │ │ │ │ │ + 279#endif // DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALBASIS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -Definition lagrangesimplex.hh:838 │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::MonomImp::EvalAccess │ │ │ │ │ +Access output vector of evaluateFunction() and evaluate() │ │ │ │ │ +Definition monomiallocalbasis.hh:23 │ │ │ │ │ +Dune::MonomImp::EvalAccess::operator[] │ │ │ │ │ +Traits::RangeFieldType & operator[](unsigned int index) │ │ │ │ │ +Definition monomiallocalbasis.hh:41 │ │ │ │ │ +Dune::MonomImp::EvalAccess::~EvalAccess │ │ │ │ │ +~EvalAccess() │ │ │ │ │ +Definition monomiallocalbasis.hh:37 │ │ │ │ │ +Dune::MonomImp::EvalAccess::EvalAccess │ │ │ │ │ +EvalAccess(std::vector< typename Traits::RangeType > &out_) │ │ │ │ │ +Definition monomiallocalbasis.hh:30 │ │ │ │ │ +Dune::MonomImp::JacobianAccess │ │ │ │ │ +Access output vector of evaluateJacobian() │ │ │ │ │ +Definition monomiallocalbasis.hh:54 │ │ │ │ │ +Dune::MonomImp::JacobianAccess::~JacobianAccess │ │ │ │ │ +~JacobianAccess() │ │ │ │ │ +Definition monomiallocalbasis.hh:70 │ │ │ │ │ +Dune::MonomImp::JacobianAccess::operator[] │ │ │ │ │ +Traits::RangeFieldType & operator[](unsigned int index) │ │ │ │ │ +Definition monomiallocalbasis.hh:74 │ │ │ │ │ +Dune::MonomImp::JacobianAccess::JacobianAccess │ │ │ │ │ +JacobianAccess(std::vector< typename Traits::JacobianType > &out_, unsigned int │ │ │ │ │ +row_) │ │ │ │ │ +Definition monomiallocalbasis.hh:62 │ │ │ │ │ +Dune::MonomImp::Evaluate │ │ │ │ │ +Definition monomiallocalbasis.hh:99 │ │ │ │ │ +Dune::MonomImp::Evaluate::d │ │ │ │ │ +static constexpr int d │ │ │ │ │ +The next dimension to try for factors. │ │ │ │ │ +Definition monomiallocalbasis.hh:101 │ │ │ │ │ +Dune::MonomImp::Evaluate::eval │ │ │ │ │ +static void eval(const typename Traits::DomainType &in, const std::array< │ │ │ │ │ +unsigned int, Traits::dimDomain > &derivatives, typename Traits::RangeFieldType │ │ │ │ │ +prod, int bound, int &index, Access &access) │ │ │ │ │ +Definition monomiallocalbasis.hh:110 │ │ │ │ │ +Dune::MonomImp::Evaluate<_Traits,_1_>::eval │ │ │ │ │ +static void eval(const typename Traits::DomainType &in, const std::array< │ │ │ │ │ +unsigned int, Traits::dimDomain > &derivatives, typename Traits::RangeFieldType │ │ │ │ │ +prod, int bound, int &index, Access &access) │ │ │ │ │ +Definition monomiallocalbasis.hh:166 │ │ │ │ │ +Dune::MonomialLocalBasis │ │ │ │ │ +Constant shape function. │ │ │ │ │ +Definition monomiallocalbasis.hh:201 │ │ │ │ │ +Dune::MonomialLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition monomiallocalbasis.hh:271 │ │ │ │ │ +Dune::MonomialLocalBasis::partial │ │ │ │ │ +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 monomiallocalbasis.hh:239 │ │ │ │ │ +Dune::MonomialLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition monomiallocalbasis.hh:252 │ │ │ │ │ +Dune::MonomialLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition monomiallocalbasis.hh:222 │ │ │ │ │ +Dune::MonomialLocalBasis::Traits │ │ │ │ │ +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 monomiallocalbasis.hh:213 │ │ │ │ │ +Dune::MonomialLocalBasis::size │ │ │ │ │ +static constexpr unsigned int size() │ │ │ │ │ +Number of shape functions. │ │ │ │ │ +Definition monomiallocalbasis.hh:216 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00149.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas.hh File Reference │ │ │ │ +dune-localfunctions: monomiallocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
monomiallocalinterpolation.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 <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::MonomialLocalInterpolation< LB, size >
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,25 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -raviartthomas.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * monomial │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +monomiallocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ + Classes │ │ │ │ │ +class  Dune::MonomialLocalInterpolation<_LB,_size_> │ │ │ │ │ +  │ │ │ │ │ + Namespaces │ │ │ │ │ +namespace  Dune │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00149_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas.hh Source File │ │ │ │ +dune-localfunctions: monomiallocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,59 +70,120 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas.hh
│ │ │ │ +
monomiallocalinterpolation.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_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALINTERPOLATION_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 <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/quadraturerules.hh>
│ │ │ │ + │ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
20 template<class LB, unsigned int size>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 {
│ │ │ │ +
23 typedef typename LB::Traits::DomainType D;
│ │ │ │ +
24 typedef typename LB::Traits::DomainFieldType DF;
│ │ │ │ +
25 static const int dimD=LB::Traits::dimDomain;
│ │ │ │ +
26 typedef typename LB::Traits::RangeType R;
│ │ │ │ +
27 typedef typename LB::Traits::RangeFieldType RF;
│ │ │ │ +
28
│ │ │ │ +
29 typedef QuadratureRule<DF,dimD> QR;
│ │ │ │ +
30 typedef typename QR::iterator QRiterator;
│ │ │ │ +
31
│ │ │ │ +
32 public:
│ │ │ │ +
│ │ │ │ +
33 MonomialLocalInterpolation (const GeometryType &gt_,
│ │ │ │ +
34 const LB &lb_)
│ │ │ │ +
35 : gt(gt_), lb(lb_), Minv(0)
│ │ │ │ +
36 , qr(QuadratureRules<DF,dimD>::rule(gt, 2*lb.order()))
│ │ │ │ +
37 {
│ │ │ │ +
38 // Compute inverse of the mass matrix of the local basis, and store it in Minv
│ │ │ │ +
39 if(size != lb.size())
│ │ │ │ +
40 DUNE_THROW(Exception, "size template parameter does not match size of "
│ │ │ │ +
41 "local basis");
│ │ │ │ +
42
│ │ │ │ +
43 const QRiterator qrend = qr.end();
│ │ │ │ +
44 for(QRiterator qrit = qr.begin(); qrit != qrend; ++qrit) {
│ │ │ │ +
45 std::vector<R> base;
│ │ │ │ +
46 lb.evaluateFunction(qrit->position(),base);
│ │ │ │ +
47
│ │ │ │ +
48 for(unsigned int i = 0; i < size; ++i)
│ │ │ │ +
49 for(unsigned int j = 0; j < size; ++j)
│ │ │ │ +
50 Minv[i][j] += qrit->weight() * base[i] * base[j];
│ │ │ │ +
51 }
│ │ │ │ +
52 Minv.invert();
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
62 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
63 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
64 {
│ │ │ │ +
65 using DomainType = std::decay_t<decltype(qr.begin()->position())>;
│ │ │ │ +
66
│ │ │ │ +
67 auto&& f = Impl::makeFunctionWithCallOperator<DomainType>(ff);
│ │ │ │ +
68
│ │ │ │ +
69 out.clear();
│ │ │ │ +
70 out.resize(size, 0);
│ │ │ │ +
71
│ │ │ │ +
72 const QRiterator qrend = qr.end();
│ │ │ │ +
73 for(QRiterator qrit = qr.begin(); qrit != qrend; ++qrit) {
│ │ │ │ +
74 //TODO: mass matrix
│ │ │ │ +
75 R y = f(qrit->position());
│ │ │ │ +
76
│ │ │ │ +
77 std::vector<R> base;
│ │ │ │ +
78 lb.evaluateFunction(qrit->position(),base);
│ │ │ │ +
79
│ │ │ │ +
80 for(unsigned int i = 0; i < size; ++i)
│ │ │ │ +
81 for(unsigned int j = 0; j < size; ++j)
│ │ │ │ +
82 out[i] += Minv[i][j] * qrit->weight() * y * base[j];
│ │ │ │ +
83 }
│ │ │ │ +
84 }
│ │ │ │ +
│ │ │ │ +
85
│ │ │ │ +
86 private:
│ │ │ │ +
87 GeometryType gt;
│ │ │ │ +
88 const LB &lb;
│ │ │ │ +
89 FieldMatrix<RF, size, size> Minv;
│ │ │ │ +
90 const QR &qr;
│ │ │ │ +
91 };
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │ +
93}
│ │ │ │ +
94
│ │ │ │ +
95#endif //DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALINTERPOLATION_HH
│ │ │ │ +
Definition bdfmcube.hh:18
│ │ │ │ +
Definition monomiallocalinterpolation.hh:22
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Determine coefficients interpolating a given function.
Definition monomiallocalinterpolation.hh:63
│ │ │ │ +
MonomialLocalInterpolation(const GeometryType &gt_, const LB &lb_)
Definition monomiallocalinterpolation.hh:33
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,55 +7,115 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -raviartthomas.hh │ │ │ │ │ + * monomial │ │ │ │ │ +monomiallocalinterpolation.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_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8// Raviart-Thomas implementations with run-time order │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12// Raviart-Thomas implementations with compile-time order │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include │ │ │ │ │ - 20#include │ │ │ │ │ - 21#include │ │ │ │ │ - 22#include │ │ │ │ │ - 23#include │ │ │ │ │ - 24 │ │ │ │ │ - 25#endif // #ifndef DUNE_RAVIARTTHOMASFINITEELEMENT_HH │ │ │ │ │ -raviartthomassimplex.hh │ │ │ │ │ -Raviart-Thomas local finite elements of arbitrary order for simplices of │ │ │ │ │ -arbitrary dimension. │ │ │ │ │ -raviartthomas0prism.hh │ │ │ │ │ -raviartthomas02d.hh │ │ │ │ │ -raviartthomas0pyramid.hh │ │ │ │ │ -raviartthomas0cube3d.hh │ │ │ │ │ -raviartthomas03d.hh │ │ │ │ │ -raviartthomas12d.hh │ │ │ │ │ -raviartthomas3cube2d.hh │ │ │ │ │ -raviartthomascube.hh │ │ │ │ │ -Convenience header that includes all available Raviart-Thomas local finite │ │ │ │ │ -elements for cubes. │ │ │ │ │ -raviartthomas1cube3d.hh │ │ │ │ │ -raviartthomas2cube2d.hh │ │ │ │ │ -raviartthomas0cube2d.hh │ │ │ │ │ -raviartthomas1cube2d.hh │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16 │ │ │ │ │ + 17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ + 19 │ │ │ │ │ + 20 template │ │ │ │ │ +21 class MonomialLocalInterpolation │ │ │ │ │ + 22 { │ │ │ │ │ + 23 typedef typename LB::Traits::DomainType D; │ │ │ │ │ + 24 typedef typename LB::Traits::DomainFieldType DF; │ │ │ │ │ + 25 static const int dimD=LB::Traits::dimDomain; │ │ │ │ │ + 26 typedef typename LB::Traits::RangeType R; │ │ │ │ │ + 27 typedef typename LB::Traits::RangeFieldType RF; │ │ │ │ │ + 28 │ │ │ │ │ + 29 typedef QuadratureRule QR; │ │ │ │ │ + 30 typedef typename QR::iterator QRiterator; │ │ │ │ │ + 31 │ │ │ │ │ + 32 public: │ │ │ │ │ +33 MonomialLocalInterpolation (const GeometryType >_, │ │ │ │ │ + 34 const LB &lb_) │ │ │ │ │ + 35 : gt(gt_), lb(lb_), Minv(0) │ │ │ │ │ + 36 , qr(QuadratureRules::rule(gt, 2*lb.order())) │ │ │ │ │ + 37 { │ │ │ │ │ + 38 // Compute inverse of the mass matrix of the local basis, and store it in │ │ │ │ │ +Minv │ │ │ │ │ + 39 if(size != lb.size()) │ │ │ │ │ + 40 DUNE_THROW(Exception, "size template parameter does not match size of " │ │ │ │ │ + 41 "local basis"); │ │ │ │ │ + 42 │ │ │ │ │ + 43 const QRiterator qrend = qr.end(); │ │ │ │ │ + 44 for(QRiterator qrit = qr.begin(); qrit != qrend; ++qrit) { │ │ │ │ │ + 45 std::vector base; │ │ │ │ │ + 46 lb.evaluateFunction(qrit->position(),base); │ │ │ │ │ + 47 │ │ │ │ │ + 48 for(unsigned int i = 0; i < size; ++i) │ │ │ │ │ + 49 for(unsigned int j = 0; j < size; ++j) │ │ │ │ │ + 50 Minv[i][j] += qrit->weight() * base[i] * base[j]; │ │ │ │ │ + 51 } │ │ │ │ │ + 52 Minv.invert(); │ │ │ │ │ + 53 } │ │ │ │ │ + 54 │ │ │ │ │ + 62 template │ │ │ │ │ +63 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ + 64 { │ │ │ │ │ + 65 using DomainType = std::decay_tposition())>; │ │ │ │ │ + 66 │ │ │ │ │ + 67 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ + 68 │ │ │ │ │ + 69 out.clear(); │ │ │ │ │ + 70 out.resize(size, 0); │ │ │ │ │ + 71 │ │ │ │ │ + 72 const QRiterator qrend = qr.end(); │ │ │ │ │ + 73 for(QRiterator qrit = qr.begin(); qrit != qrend; ++qrit) { │ │ │ │ │ + 74 //TODO: mass matrix │ │ │ │ │ + 75 R y = f(qrit->position()); │ │ │ │ │ + 76 │ │ │ │ │ + 77 std::vector base; │ │ │ │ │ + 78 lb.evaluateFunction(qrit->position(),base); │ │ │ │ │ + 79 │ │ │ │ │ + 80 for(unsigned int i = 0; i < size; ++i) │ │ │ │ │ + 81 for(unsigned int j = 0; j < size; ++j) │ │ │ │ │ + 82 out[i] += Minv[i][j] * qrit->weight() * y * base[j]; │ │ │ │ │ + 83 } │ │ │ │ │ + 84 } │ │ │ │ │ + 85 │ │ │ │ │ + 86 private: │ │ │ │ │ + 87 GeometryType gt; │ │ │ │ │ + 88 const LB &lb; │ │ │ │ │ + 89 FieldMatrix Minv; │ │ │ │ │ + 90 const QR &qr; │ │ │ │ │ + 91 }; │ │ │ │ │ + 92 │ │ │ │ │ + 93} │ │ │ │ │ + 94 │ │ │ │ │ + 95#endif //DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALINTERPOLATION_HH │ │ │ │ │ +Dune │ │ │ │ │ +Definition bdfmcube.hh:18 │ │ │ │ │ +Dune::MonomialLocalInterpolation │ │ │ │ │ +Definition monomiallocalinterpolation.hh:22 │ │ │ │ │ +Dune::MonomialLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Determine coefficients interpolating a given function. │ │ │ │ │ +Definition monomiallocalinterpolation.hh:63 │ │ │ │ │ +Dune::MonomialLocalInterpolation::MonomialLocalInterpolation │ │ │ │ │ +MonomialLocalInterpolation(const GeometryType >_, const LB &lb_) │ │ │ │ │ +Definition monomiallocalinterpolation.hh:33 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00152.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomial.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,48 +69,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
monomial.hh File Reference
│ │ │ │ +
raviartthomas.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"
│ │ │ │ + │ │ │ │

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::MonomialFiniteElementFactory< Geometry, RF, p >
 Factory for global-valued MonomFiniteElement objects. More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

namespace  Dune
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,34 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -monomial.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "common/localtoglobaladaptors.hh" │ │ │ │ │ -#include "monomial/monomiallocalbasis.hh" │ │ │ │ │ -#include "monomial/monomiallocalcoefficients.hh" │ │ │ │ │ -#include "monomial/monomiallocalinterpolation.hh" │ │ │ │ │ +raviartthomas.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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::MonomialFiniteElementFactory<_Geometry,_RF,_p_> │ │ │ │ │ -  Factory for global-valued MonomFiniteElement objects. More... │ │ │ │ │ -  │ │ │ │ │ - Namespaces │ │ │ │ │ -namespace  Dune │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00152_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomial.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,219 +74,55 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
monomial.hh
│ │ │ │ +
raviartthomas.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>
│ │ │ │ -
14
│ │ │ │ -
15#include <dune/geometry/type.hh>
│ │ │ │ -
16
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
22
│ │ │ │ -
23namespace Dune
│ │ │ │ -
24{
│ │ │ │ -
25
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
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
│ │ │ │ +
5#ifndef DUNE_RAVIARTTHOMASFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_RAVIARTTHOMASFINITEELEMENT_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
│ │ │ │ + │ │ │ │ +
Convenience header that includes all available Raviart-Thomas local finite elements for cubes.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Raviart-Thomas local finite elements of arbitrary order for simplices of arbitrary dimension.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,250 +7,55 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -monomial.hh │ │ │ │ │ +raviartthomas.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 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include │ │ │ │ │ - 16 │ │ │ │ │ - 17#include "common/localfiniteelementtraits.hh" │ │ │ │ │ - 18#include "common/localtoglobaladaptors.hh" │ │ │ │ │ - 19#include "monomial/monomiallocalbasis.hh" │ │ │ │ │ - 20#include "monomial/monomiallocalcoefficients.hh" │ │ │ │ │ - 21#include "monomial/monomiallocalinterpolation.hh" │ │ │ │ │ - 22 │ │ │ │ │ - 23namespace Dune │ │ │ │ │ - 24{ │ │ │ │ │ - 25 │ │ │ │ │ - 26 │ │ │ │ │ - 39 template │ │ │ │ │ -40 class MonomialLocalFiniteElement │ │ │ │ │ - 41 { │ │ │ │ │ - 42 constexpr static int static_size = MonomialLocalBasis::size(); │ │ │ │ │ - 43 │ │ │ │ │ - 44 public: │ │ │ │ │ - 47 typedef LocalFiniteElementTraits< │ │ │ │ │ - 48 MonomialLocalBasis, │ │ │ │ │ - 49 MonomialLocalCoefficients, │ │ │ │ │ - 50 MonomialLocalInterpolation,static_size> │ │ │ │ │ -51 > Traits; │ │ │ │ │ - 52 │ │ │ │ │ -54 MonomialLocalFiniteElement (const GeometryType >_) │ │ │ │ │ - 55 : basis(), interpolation(gt_, basis), gt(gt_) │ │ │ │ │ - 56 {} │ │ │ │ │ - 57 │ │ │ │ │ -60 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 61 { │ │ │ │ │ - 62 return basis; │ │ │ │ │ - 63 } │ │ │ │ │ - 64 │ │ │ │ │ -67 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 68 { │ │ │ │ │ - 69 return coefficients; │ │ │ │ │ - 70 } │ │ │ │ │ - 71 │ │ │ │ │ -74 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 93 MonomialLocalBasis basis; │ │ │ │ │ - 94 MonomialLocalCoefficients coefficients; │ │ │ │ │ - 95 MonomialLocalInterpolation,static_size> │ │ │ │ │ -interpolation; │ │ │ │ │ - 96 GeometryType gt; │ │ │ │ │ - 97 }; │ │ │ │ │ - 98 │ │ │ │ │ - 100 │ │ │ │ │ - 112 template │ │ │ │ │ -113 class MonomialFiniteElementFactory { │ │ │ │ │ - 114 typedef typename Geometry::ctype DF; │ │ │ │ │ - 115 static const std::size_t dim = Geometry::mydimension; │ │ │ │ │ - 116 │ │ │ │ │ - 117 typedef MonomialLocalFiniteElement LocalFE; │ │ │ │ │ - 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 LocalFE(gt)); │ │ │ │ │ - 126 } │ │ │ │ │ - 127 │ │ │ │ │ - 128 public: │ │ │ │ │ - 129 typedef ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ -130 FiniteElement; │ │ │ │ │ - 131 │ │ │ │ │ - 133 │ │ │ │ │ - 137 template │ │ │ │ │ -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 >) │ │ │ │ │ - 150 { init(gt); } │ │ │ │ │ - 151 │ │ │ │ │ - 153 │ │ │ │ │ -156 MonomialFiniteElementFactory() { │ │ │ │ │ - 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 │ │ │ │ │ -monomiallocalinterpolation.hh │ │ │ │ │ -monomiallocalbasis.hh │ │ │ │ │ -monomiallocalcoefficients.hh │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -localtoglobaladaptors.hh │ │ │ │ │ -Dune │ │ │ │ │ -Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ -Convert a simple scalar local finite element into a global finite element. │ │ │ │ │ -Definition localtoglobaladaptors.hh:187 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptor::type │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -Definition localtoglobaladaptors.hh:229 │ │ │ │ │ -Dune::MonomialLocalFiniteElement │ │ │ │ │ -Monomial basis for discontinuous Galerkin methods. │ │ │ │ │ -Definition monomial.hh:41 │ │ │ │ │ -Dune::MonomialLocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition monomial.hh:80 │ │ │ │ │ -Dune::MonomialLocalFiniteElement::type │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -Definition monomial.hh:87 │ │ │ │ │ -Dune::MonomialLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition monomial.hh:74 │ │ │ │ │ -Dune::MonomialLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< MonomialLocalBasis< D, R, d, p >, │ │ │ │ │ -MonomialLocalCoefficients< static_size >, MonomialLocalInterpolation< │ │ │ │ │ -MonomialLocalBasis< D, R, d, p >, static_size > > Traits │ │ │ │ │ -Definition monomial.hh:51 │ │ │ │ │ -Dune::MonomialLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition monomial.hh:67 │ │ │ │ │ -Dune::MonomialLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition monomial.hh:60 │ │ │ │ │ -Dune::MonomialLocalFiniteElement::MonomialLocalFiniteElement │ │ │ │ │ -MonomialLocalFiniteElement(const GeometryType >_) │ │ │ │ │ -Construct a MonomLocalFiniteElement. │ │ │ │ │ -Definition monomial.hh:54 │ │ │ │ │ -Dune::MonomialFiniteElementFactory │ │ │ │ │ -Factory for global-valued MonomFiniteElement objects. │ │ │ │ │ -Definition monomial.hh:113 │ │ │ │ │ -Dune::MonomialFiniteElementFactory::MonomialFiniteElementFactory │ │ │ │ │ -MonomialFiniteElementFactory(const ForwardIterator &begin, const │ │ │ │ │ -ForwardIterator &end) │ │ │ │ │ -construct a MonomialFiniteElementFactory from a list of GeometryType's │ │ │ │ │ -Definition monomial.hh:138 │ │ │ │ │ -Dune::MonomialFiniteElementFactory::MonomialFiniteElementFactory │ │ │ │ │ -MonomialFiniteElementFactory(const GeometryType >) │ │ │ │ │ -construct a MonomialFiniteElementFactory from a single GeometryType │ │ │ │ │ -Definition monomial.hh:149 │ │ │ │ │ -Dune::MonomialFiniteElementFactory::make │ │ │ │ │ -const FiniteElement make(const Geometry &geometry) │ │ │ │ │ -construct a global-valued MonomFiniteElement │ │ │ │ │ -Definition monomial.hh:196 │ │ │ │ │ -Dune::MonomialFiniteElementFactory::FiniteElement │ │ │ │ │ -ScalarLocalToGlobalFiniteElementAdaptor< LocalFE, Geometry > FiniteElement │ │ │ │ │ -Definition monomial.hh:130 │ │ │ │ │ -Dune::MonomialFiniteElementFactory::MonomialFiniteElementFactory │ │ │ │ │ -MonomialFiniteElementFactory() │ │ │ │ │ -construct a MonomFiniteElementFactory for all applicable GeometryType's │ │ │ │ │ -Definition monomial.hh:156 │ │ │ │ │ -Dune::MonomialLocalBasis │ │ │ │ │ -Constant shape function. │ │ │ │ │ -Definition monomiallocalbasis.hh:201 │ │ │ │ │ -Dune::MonomialLocalBasis::size │ │ │ │ │ -static constexpr unsigned int size() │ │ │ │ │ -Number of shape functions. │ │ │ │ │ -Definition monomiallocalbasis.hh:216 │ │ │ │ │ -Dune::MonomialLocalCoefficients │ │ │ │ │ -Layout map for monomial finite elements. │ │ │ │ │ -Definition monomiallocalcoefficients.hh:24 │ │ │ │ │ -Dune::MonomialLocalInterpolation │ │ │ │ │ -Definition monomiallocalinterpolation.hh:22 │ │ │ │ │ + 5#ifndef DUNE_RAVIARTTHOMASFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_RAVIARTTHOMASFINITEELEMENT_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8// Raviart-Thomas implementations with run-time order │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12// Raviart-Thomas implementations with compile-time order │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ + 17#include │ │ │ │ │ + 18#include │ │ │ │ │ + 19#include │ │ │ │ │ + 20#include │ │ │ │ │ + 21#include │ │ │ │ │ + 22#include │ │ │ │ │ + 23#include │ │ │ │ │ + 24 │ │ │ │ │ + 25#endif // #ifndef DUNE_RAVIARTTHOMASFINITEELEMENT_HH │ │ │ │ │ +raviartthomas0cube2d.hh │ │ │ │ │ +raviartthomascube.hh │ │ │ │ │ +Convenience header that includes all available Raviart-Thomas local finite │ │ │ │ │ +elements for cubes. │ │ │ │ │ +raviartthomas2cube2d.hh │ │ │ │ │ +raviartthomas1cube3d.hh │ │ │ │ │ +raviartthomas0cube3d.hh │ │ │ │ │ +raviartthomas0prism.hh │ │ │ │ │ +raviartthomassimplex.hh │ │ │ │ │ +Raviart-Thomas local finite elements of arbitrary order for simplices of │ │ │ │ │ +arbitrary dimension. │ │ │ │ │ +raviartthomas02d.hh │ │ │ │ │ +raviartthomas3cube2d.hh │ │ │ │ │ +raviartthomas1cube2d.hh │ │ │ │ │ +raviartthomas0pyramid.hh │ │ │ │ │ +raviartthomas12d.hh │ │ │ │ │ +raviartthomas03d.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00155.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomiallocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: rannacherturek3dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
monomiallocalinterpolation.hh File Reference
│ │ │ │ +
rannacherturek3dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ +
#include <numeric>
│ │ │ │ +#include <vector>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ #include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::MonomialLocalInterpolation< LB, size >
class  Dune::RannacherTurek3DLocalBasis< D, R >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * monomial │ │ │ │ │ + * rannacherturek │ │ │ │ │ + * rannacherturek3d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -monomiallocalinterpolation.hh File Reference │ │ │ │ │ +rannacherturek3dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::MonomialLocalInterpolation<_LB,_size_> │ │ │ │ │ +class  Dune::RannacherTurek3DLocalBasis<_D,_R_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00155_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomiallocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: rannacherturek3dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,120 +70,167 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
monomiallocalinterpolation.hh
│ │ │ │ +
rannacherturek3dlocalbasis.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_MONOMIAL_MONOMIALLOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_RANNACHER_TUREK_3D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_RANNACHER_TUREK_3D_LOCALBASIS_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/quadraturerules.hh>
│ │ │ │ - │ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
19
│ │ │ │ -
20 template<class LB, unsigned int size>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 {
│ │ │ │ -
23 typedef typename LB::Traits::DomainType D;
│ │ │ │ -
24 typedef typename LB::Traits::DomainFieldType DF;
│ │ │ │ -
25 static const int dimD=LB::Traits::dimDomain;
│ │ │ │ -
26 typedef typename LB::Traits::RangeType R;
│ │ │ │ -
27 typedef typename LB::Traits::RangeFieldType RF;
│ │ │ │ +
8#include <numeric>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
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;
│ │ │ │
28
│ │ │ │ -
29 typedef QuadratureRule<DF,dimD> QR;
│ │ │ │ -
30 typedef typename QR::iterator QRiterator;
│ │ │ │ -
31
│ │ │ │ -
32 public:
│ │ │ │ -
│ │ │ │ -
33 MonomialLocalInterpolation (const GeometryType &gt_,
│ │ │ │ -
34 const LB &lb_)
│ │ │ │ -
35 : gt(gt_), lb(lb_), Minv(0)
│ │ │ │ -
36 , qr(QuadratureRules<DF,dimD>::rule(gt, 2*lb.order()))
│ │ │ │ -
37 {
│ │ │ │ -
38 // Compute inverse of the mass matrix of the local basis, and store it in Minv
│ │ │ │ -
39 if(size != lb.size())
│ │ │ │ -
40 DUNE_THROW(Exception, "size template parameter does not match size of "
│ │ │ │ -
41 "local basis");
│ │ │ │ -
42
│ │ │ │ -
43 const QRiterator qrend = qr.end();
│ │ │ │ -
44 for(QRiterator qrit = qr.begin(); qrit != qrend; ++qrit) {
│ │ │ │ -
45 std::vector<R> base;
│ │ │ │ -
46 lb.evaluateFunction(qrit->position(),base);
│ │ │ │ -
47
│ │ │ │ -
48 for(unsigned int i = 0; i < size; ++i)
│ │ │ │ -
49 for(unsigned int j = 0; j < size; ++j)
│ │ │ │ -
50 Minv[i][j] += qrit->weight() * base[i] * base[j];
│ │ │ │ -
51 }
│ │ │ │ -
52 Minv.invert();
│ │ │ │ -
53 }
│ │ │ │ -
│ │ │ │ -
54
│ │ │ │ -
62 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
63 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
64 {
│ │ │ │ -
65 using DomainType = std::decay_t<decltype(qr.begin()->position())>;
│ │ │ │ -
66
│ │ │ │ -
67 auto&& f = Impl::makeFunctionWithCallOperator<DomainType>(ff);
│ │ │ │ -
68
│ │ │ │ -
69 out.clear();
│ │ │ │ -
70 out.resize(size, 0);
│ │ │ │ -
71
│ │ │ │ -
72 const QRiterator qrend = qr.end();
│ │ │ │ -
73 for(QRiterator qrit = qr.begin(); qrit != qrend; ++qrit) {
│ │ │ │ -
74 //TODO: mass matrix
│ │ │ │ -
75 R y = f(qrit->position());
│ │ │ │ -
76
│ │ │ │ -
77 std::vector<R> base;
│ │ │ │ -
78 lb.evaluateFunction(qrit->position(),base);
│ │ │ │ -
79
│ │ │ │ -
80 for(unsigned int i = 0; i < size; ++i)
│ │ │ │ -
81 for(unsigned int j = 0; j < size; ++j)
│ │ │ │ -
82 out[i] += Minv[i][j] * qrit->weight() * y * base[j];
│ │ │ │ -
83 }
│ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
86 private:
│ │ │ │ -
87 GeometryType gt;
│ │ │ │ -
88 const LB &lb;
│ │ │ │ -
89 FieldMatrix<RF, size, size> Minv;
│ │ │ │ -
90 const QR &qr;
│ │ │ │ -
91 };
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
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}
│ │ │ │ -
94
│ │ │ │ -
95#endif //DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALINTERPOLATION_HH
│ │ │ │ +
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
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition monomiallocalinterpolation.hh:22
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Determine coefficients interpolating a given function.
Definition monomiallocalinterpolation.hh:63
│ │ │ │ -
MonomialLocalInterpolation(const GeometryType &gt_, const LB &lb_)
Definition monomiallocalinterpolation.hh:33
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,115 +7,181 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * monomial │ │ │ │ │ -monomiallocalinterpolation.hh │ │ │ │ │ + * rannacherturek │ │ │ │ │ + * rannacherturek3d │ │ │ │ │ +rannacherturek3dlocalbasis.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_MONOMIAL_MONOMIALLOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_RANNACHER_TUREK_3D_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_RANNACHER_TUREK_3D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16 │ │ │ │ │ - 17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ - 19 │ │ │ │ │ - 20 template │ │ │ │ │ -21 class MonomialLocalInterpolation │ │ │ │ │ - 22 { │ │ │ │ │ - 23 typedef typename LB::Traits::DomainType D; │ │ │ │ │ - 24 typedef typename LB::Traits::DomainFieldType DF; │ │ │ │ │ - 25 static const int dimD=LB::Traits::dimDomain; │ │ │ │ │ - 26 typedef typename LB::Traits::RangeType R; │ │ │ │ │ - 27 typedef typename LB::Traits::RangeFieldType RF; │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16namespace Dune │ │ │ │ │ + 17{ │ │ │ │ │ + 18 │ │ │ │ │ + 19 template< class D, class R > │ │ │ │ │ +20 class RannacherTurek3DLocalBasis │ │ │ │ │ + 21 { │ │ │ │ │ + 22 static const int coefficients[ 6 ][ 6 ]; │ │ │ │ │ + 23 │ │ │ │ │ + 24 public: │ │ │ │ │ + 25 typedef LocalBasisTraits<_D,_3,_FieldVector<_D,_3_>, │ │ │ │ │ + 26 R, 1, FieldVector< R, 1 >, │ │ │ │ │ +27 FieldMatrix< R, 1, 3 > > Traits; │ │ │ │ │ 28 │ │ │ │ │ - 29 typedef QuadratureRule QR; │ │ │ │ │ - 30 typedef typename QR::iterator QRiterator; │ │ │ │ │ - 31 │ │ │ │ │ - 32 public: │ │ │ │ │ -33 MonomialLocalInterpolation (const GeometryType >_, │ │ │ │ │ - 34 const LB &lb_) │ │ │ │ │ - 35 : gt(gt_), lb(lb_), Minv(0) │ │ │ │ │ - 36 , qr(QuadratureRules::rule(gt, 2*lb.order())) │ │ │ │ │ - 37 { │ │ │ │ │ - 38 // Compute inverse of the mass matrix of the local basis, and store it in │ │ │ │ │ -Minv │ │ │ │ │ - 39 if(size != lb.size()) │ │ │ │ │ - 40 DUNE_THROW(Exception, "size template parameter does not match size of " │ │ │ │ │ - 41 "local basis"); │ │ │ │ │ - 42 │ │ │ │ │ - 43 const QRiterator qrend = qr.end(); │ │ │ │ │ - 44 for(QRiterator qrit = qr.begin(); qrit != qrend; ++qrit) { │ │ │ │ │ - 45 std::vector base; │ │ │ │ │ - 46 lb.evaluateFunction(qrit->position(),base); │ │ │ │ │ - 47 │ │ │ │ │ - 48 for(unsigned int i = 0; i < size; ++i) │ │ │ │ │ - 49 for(unsigned int j = 0; j < size; ++j) │ │ │ │ │ - 50 Minv[i][j] += qrit->weight() * base[i] * base[j]; │ │ │ │ │ +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 Minv.invert(); │ │ │ │ │ - 53 } │ │ │ │ │ - 54 │ │ │ │ │ - 62 template │ │ │ │ │ -63 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ + 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 using DomainType = std::decay_tposition())>; │ │ │ │ │ - 66 │ │ │ │ │ - 67 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ - 68 │ │ │ │ │ - 69 out.clear(); │ │ │ │ │ - 70 out.resize(size, 0); │ │ │ │ │ - 71 │ │ │ │ │ - 72 const QRiterator qrend = qr.end(); │ │ │ │ │ - 73 for(QRiterator qrit = qr.begin(); qrit != qrend; ++qrit) { │ │ │ │ │ - 74 //TODO: mass matrix │ │ │ │ │ - 75 R y = f(qrit->position()); │ │ │ │ │ - 76 │ │ │ │ │ - 77 std::vector base; │ │ │ │ │ - 78 lb.evaluateFunction(qrit->position(),base); │ │ │ │ │ - 79 │ │ │ │ │ - 80 for(unsigned int i = 0; i < size; ++i) │ │ │ │ │ - 81 for(unsigned int j = 0; j < size; ++j) │ │ │ │ │ - 82 out[i] += Minv[i][j] * qrit->weight() * y * base[j]; │ │ │ │ │ - 83 } │ │ │ │ │ - 84 } │ │ │ │ │ - 85 │ │ │ │ │ - 86 private: │ │ │ │ │ - 87 GeometryType gt; │ │ │ │ │ - 88 const LB &lb; │ │ │ │ │ - 89 FieldMatrix Minv; │ │ │ │ │ - 90 const QR &qr; │ │ │ │ │ - 91 }; │ │ │ │ │ + 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& order, │ │ │ │ │ + 78 const typename Traits::DomainType& in, // position │ │ │ │ │ + 79 std::vector& 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} │ │ │ │ │ - 94 │ │ │ │ │ - 95#endif //DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALINTERPOLATION_HH │ │ │ │ │ + 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::MonomialLocalInterpolation │ │ │ │ │ -Definition monomiallocalinterpolation.hh:22 │ │ │ │ │ -Dune::MonomialLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Determine coefficients interpolating a given function. │ │ │ │ │ -Definition monomiallocalinterpolation.hh:63 │ │ │ │ │ -Dune::MonomialLocalInterpolation::MonomialLocalInterpolation │ │ │ │ │ -MonomialLocalInterpolation(const GeometryType >_, const LB &lb_) │ │ │ │ │ -Definition monomiallocalinterpolation.hh:33 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LocalBasisTraits::RangeFieldType │ │ │ │ │ +RF RangeFieldType │ │ │ │ │ +Export type for range field. │ │ │ │ │ +Definition common/localbasis.hh:45 │ │ │ │ │ +Dune::RannacherTurek3DLocalBasis │ │ │ │ │ +Definition rannacherturek3dlocalbasis.hh:21 │ │ │ │ │ +Dune::RannacherTurek3DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 3, FieldVector< D, 3 >, R, 1, FieldVector< R, 1 >, │ │ │ │ │ +FieldMatrix< R, 1, 3 > > Traits │ │ │ │ │ +Definition rannacherturek3dlocalbasis.hh:27 │ │ │ │ │ +Dune::RannacherTurek3DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +evaluate all shape functions │ │ │ │ │ +Definition rannacherturek3dlocalbasis.hh:36 │ │ │ │ │ +Dune::RannacherTurek3DLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition rannacherturek3dlocalbasis.hh:30 │ │ │ │ │ +Dune::RannacherTurek3DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +evaluate jacobian of all shape functions │ │ │ │ │ +Definition rannacherturek3dlocalbasis.hh:54 │ │ │ │ │ +Dune::RannacherTurek3DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +polynomial order of the shape functions │ │ │ │ │ +Definition rannacherturek3dlocalbasis.hh:105 │ │ │ │ │ +Dune::RannacherTurek3DLocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00158.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomiallocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: rannacherturek2dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,55 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
monomiallocalbasis.hh File Reference
│ │ │ │ +
rannacherturek2dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <numeric>
│ │ │ │ +
#include <numeric>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ #include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/math.hh>
│ │ │ │ -#include "../common/localbasis.hh"
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::MonomImp::EvalAccess< Traits >
 Access output vector of evaluateFunction() and evaluate() More...
 
class  Dune::MonomImp::JacobianAccess< Traits >
 Access output vector of evaluateJacobian() More...
 
struct  Dune::MonomImp::Evaluate< Traits, c >
 
struct  Dune::MonomImp::Evaluate< Traits, 1 >
 
class  Dune::MonomialLocalBasis< D, R, d, p >
 Constant shape function. More...
struct  Dune::RannacherTurek2DLocalBasis< D, R >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
namespace  Dune::MonomImp
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,39 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * monomial │ │ │ │ │ + * rannacherturek │ │ │ │ │ + * rannacherturek2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -monomiallocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +rannacherturek2dlocalbasis.hh File Reference │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include "../common/localbasis.hh" │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ - class  Dune::MonomImp::EvalAccess<_Traits_> │ │ │ │ │ -  Access output vector of evaluateFunction() and evaluate() More... │ │ │ │ │ -  │ │ │ │ │ - class  Dune::MonomImp::JacobianAccess<_Traits_> │ │ │ │ │ -  Access output vector of evaluateJacobian() More... │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::MonomImp::Evaluate<_Traits,_c_> │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::MonomImp::Evaluate<_Traits,_1_> │ │ │ │ │ -  │ │ │ │ │ - class  Dune::MonomialLocalBasis<_D,_R,_d,_p_> │ │ │ │ │ -  Constant shape function. More... │ │ │ │ │ +struct  Dune::RannacherTurek2DLocalBasis<_D,_R_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ -namespace  Dune::MonomImp │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00158_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomiallocalbasis.hh Source File │ │ │ │ +dune-localfunctions: rannacherturek2dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,304 +70,159 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
monomiallocalbasis.hh
│ │ │ │ +
rannacherturek2dlocalbasis.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_MONOMIAL_MONOMIALLOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_RANNACHER_TUREK_2D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_RANNACHER_TUREK_2D_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <cassert>
│ │ │ │ -
10#include <numeric>
│ │ │ │ -
11
│ │ │ │ +
8#include <numeric>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/fvector.hh>
│ │ │ │
12#include <dune/common/fmatrix.hh>
│ │ │ │ -
13#include <dune/common/math.hh>
│ │ │ │ -
14
│ │ │ │ -
15#include "../common/localbasis.hh"
│ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
│ │ │ │ -
19 namespace MonomImp
│ │ │ │ -
20 {
│ │ │ │ -
22 template <typename Traits>
│ │ │ │ -
│ │ │ │ -
23 class EvalAccess {
│ │ │ │ -
24 std::vector<typename Traits::RangeType> &out;
│ │ │ │ -
25#ifndef NDEBUG
│ │ │ │ -
26 unsigned int first_unused_index;
│ │ │ │ -
27#endif
│ │ │ │ -
28
│ │ │ │ -
29 public:
│ │ │ │ -
│ │ │ │ -
30 EvalAccess(std::vector<typename Traits::RangeType> &out_)
│ │ │ │ -
31 : out(out_)
│ │ │ │ -
32#ifndef NDEBUG
│ │ │ │ -
33 , first_unused_index(0)
│ │ │ │ -
34#endif
│ │ │ │ -
35 { }
│ │ │ │ -
│ │ │ │ -
36#ifndef NDEBUG
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 assert(first_unused_index == out.size());
│ │ │ │ -
39 }
│ │ │ │ -
│ │ │ │ -
40#endif
│ │ │ │ -
│ │ │ │ -
41 typename Traits::RangeFieldType &operator[](unsigned int index)
│ │ │ │ -
42 {
│ │ │ │ -
43 assert(index < out.size());
│ │ │ │ -
44#ifndef NDEBUG
│ │ │ │ -
45 if(first_unused_index <= index)
│ │ │ │ -
46 first_unused_index = index+1;
│ │ │ │ -
47#endif
│ │ │ │ -
48 return out[index][0];
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50 };
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
53 template <typename Traits>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
55 std::vector<typename Traits::JacobianType> &out;
│ │ │ │ -
56 unsigned int row;
│ │ │ │ -
57#ifndef NDEBUG
│ │ │ │ -
58 unsigned int first_unused_index;
│ │ │ │ -
59#endif
│ │ │ │ -
60
│ │ │ │ -
61 public:
│ │ │ │ -
│ │ │ │ -
62 JacobianAccess(std::vector<typename Traits::JacobianType> &out_,
│ │ │ │ -
63 unsigned int row_)
│ │ │ │ -
64 : out(out_), row(row_)
│ │ │ │ -
65#ifndef NDEBUG
│ │ │ │ -
66 , first_unused_index(0)
│ │ │ │ -
67#endif
│ │ │ │ -
68 { }
│ │ │ │ -
│ │ │ │ -
69#ifndef NDEBUG
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
71 assert(first_unused_index == out.size());
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73#endif
│ │ │ │ -
│ │ │ │ -
74 typename Traits::RangeFieldType &operator[](unsigned int index)
│ │ │ │ -
75 {
│ │ │ │ -
76 assert(index < out.size());
│ │ │ │ -
77#ifndef NDEBUG
│ │ │ │ -
78 if(first_unused_index <= index)
│ │ │ │ -
79 first_unused_index = index+1;
│ │ │ │ -
80#endif
│ │ │ │ -
81 return out[index][0][row];
│ │ │ │ -
82 }
│ │ │ │ -
│ │ │ │ -
83 };
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
97 template <typename Traits, int c>
│ │ │ │ -
│ │ │ │ -
98 struct Evaluate
│ │ │ │ -
99 {
│ │ │ │ -
101 constexpr static int d = Traits::dimDomain - c;
│ │ │ │ -
102
│ │ │ │ -
109 template <typename Access>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │ +
15
│ │ │ │ +
16namespace Dune
│ │ │ │ +
17{
│ │ │ │ +
18
│ │ │ │ +
19 template< class D, class R >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
21 {
│ │ │ │ + │ │ │ │ +
23 R, 1, FieldVector< R, 1 >,
│ │ │ │ +
24 FieldMatrix< R, 1, 2 > > Traits;
│ │ │ │ +
25
│ │ │ │ +
│ │ │ │ +
27 unsigned int size () const
│ │ │ │ +
28 {
│ │ │ │ +
29 return 4;
│ │ │ │ +
30 }
│ │ │ │ +
│ │ │ │ +
31
│ │ │ │ +
│ │ │ │ +
33 inline void evaluateFunction ( const typename Traits::DomainType &in,
│ │ │ │ +
34 std::vector< typename Traits::RangeType > &out ) const
│ │ │ │ +
35 {
│ │ │ │ +
36 out.resize(4);
│ │ │ │ +
37 typename Traits::DomainFieldType qbase = in[0]*in[0]-in[1]*in[1];
│ │ │ │ +
38 out[0] = .75 - 2*in[0] + in[1] + qbase;
│ │ │ │ +
39 out[1] = -.25 + in[1] + qbase;
│ │ │ │ +
40 out[2] = .75 + in[0] - 2*in[1] - qbase;
│ │ │ │ +
41 out[3] = -.25 + in[0] - qbase;
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
│ │ │ │ +
45 inline void evaluateJacobian ( const typename Traits::DomainType &in,
│ │ │ │ +
46 std::vector< typename Traits::JacobianType > &out ) const
│ │ │ │ +
47 {
│ │ │ │ +
48 out.resize(4);
│ │ │ │ +
49
│ │ │ │ +
50 // see http://www.dune-project.org/doc/doxygen/html/classDune_1_1C1LocalBasisInterface.html#d6f8368f8aa43439cc7ef10419f6e2ea
│ │ │ │ +
51 // out[i][j][k] = d_k \phi^i_j , where \phi^i_j is the j'th component of the i'th shape function.
│ │ │ │ +
52
│ │ │ │ +
53 out[0][0][0] = -2 + 2*in[0]; out[0][0][1] = 1 - 2*in[1];
│ │ │ │ +
54 out[1][0][0] = 2*in[0]; out[1][0][1] = 1 - 2*in[1];
│ │ │ │ +
55 out[2][0][0] = 1 - 2*in[0]; out[2][0][1] = -2 + 2*in[1];
│ │ │ │ +
56 out[3][0][0] = 1 - 2*in[0]; out[3][0][1] = 2*in[1];
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
60 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
61 const typename Traits::DomainType& in, // position
│ │ │ │ +
62 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
63 {
│ │ │ │ +
64 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
65 if (totalOrder == 0) {
│ │ │ │ +
66 evaluateFunction(in, out);
│ │ │ │ +
67 } else if (totalOrder == 1) {
│ │ │ │ +
68 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
69 out.resize(size());
│ │ │ │ +
70
│ │ │ │ +
71 switch (direction) {
│ │ │ │ +
72 case 0:
│ │ │ │ +
73 out[0] = -2 + 2*in[0];
│ │ │ │ +
74 out[1] = 2*in[0];
│ │ │ │ +
75 out[2] = 1 - 2*in[0];
│ │ │ │ +
76 out[3] = 1 - 2*in[0];
│ │ │ │ +
77 break;
│ │ │ │ +
78 case 1:
│ │ │ │ +
79 out[0] = 1 - 2*in[1];
│ │ │ │ +
80 out[1] = 1 - 2*in[1];
│ │ │ │ +
81 out[2] = -2 + 2*in[1];
│ │ │ │ +
82 out[3] = 2*in[1];
│ │ │ │ +
83 break;
│ │ │ │ +
84 default:
│ │ │ │ +
85 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
86 }
│ │ │ │ +
87 } else if (totalOrder == 2) {
│ │ │ │ +
88 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 2));
│ │ │ │ +
89 out.resize(size());
│ │ │ │ +
90
│ │ │ │ +
91 switch (direction) {
│ │ │ │ +
92 case 0:
│ │ │ │ +
93 out[0] = out[1] = 2;
│ │ │ │ +
94 out[2] = out[3] =-2;
│ │ │ │ +
95 break;
│ │ │ │ +
96 case 1:
│ │ │ │ +
97 out[0] = out[1] =-2;
│ │ │ │ +
98 out[2] = out[3] = 2;
│ │ │ │ +
99 break;
│ │ │ │ +
100 default:
│ │ │ │ +
101 out[0] = out[1] = out[2] = out[3] = 0;
│ │ │ │ +
102 break;
│ │ │ │ +
103 }
│ │ │ │ +
104 } else {
│ │ │ │ +
105 out[0] = out[1] = out[2] = out[3] = 0;
│ │ │ │ +
106 }
│ │ │ │ +
107 }
│ │ │ │ +
│ │ │ │ +
108
│ │ │ │
│ │ │ │ -
110 static void eval (
│ │ │ │ -
111 const typename Traits::DomainType &in,
│ │ │ │ -
114 const std::array<unsigned int, Traits::dimDomain> &derivatives,
│ │ │ │ -
117 typename Traits::RangeFieldType prod,
│ │ │ │ -
119 int bound,
│ │ │ │ -
121 int& index,
│ │ │ │ -
123 Access &access)
│ │ │ │ -
124 {
│ │ │ │ -
125 // start with the highest exponent for this dimension, then work down
│ │ │ │ -
126 for (int e = bound; e >= 0; --e)
│ │ │ │ -
127 {
│ │ │ │ -
128 // the rest of the available exponents, to be used by the other
│ │ │ │ -
129 // dimensions
│ │ │ │ -
130 int newbound = bound - e;
│ │ │ │ -
131 if(e < (int)derivatives[d])
│ │ │ │ - │ │ │ │ -
133 eval(in, derivatives, 0, newbound, index, access);
│ │ │ │ -
134 else {
│ │ │ │ -
135 int coeff = 1;
│ │ │ │ -
136 for(int i = e - derivatives[d] + 1; i <= e; ++i)
│ │ │ │ -
137 coeff *= i;
│ │ │ │ -
138 // call the evaluator for the next dimension
│ │ │ │ - │ │ │ │ -
140 eval( // pass the coordinate and the derivatives unchanged
│ │ │ │ -
141 in, derivatives,
│ │ │ │ -
142 // also pass the product accumulated so far, but also
│ │ │ │ -
143 // include the current dimension
│ │ │ │ -
144 prod * power(in[d], e-derivatives[d]) * coeff,
│ │ │ │ -
145 // pass the number of remaining exponents to the next
│ │ │ │ -
146 // dimension
│ │ │ │ -
147 newbound,
│ │ │ │ -
148 // pass the next index to fill and the output access
│ │ │ │ -
149 // wrapper
│ │ │ │ -
150 index, access);
│ │ │ │ -
151 }
│ │ │ │ -
152 }
│ │ │ │ -
153 }
│ │ │ │ -
│ │ │ │ -
154 };
│ │ │ │ -
│ │ │ │ -
155
│ │ │ │ -
160 template <typename Traits>
│ │ │ │ -
│ │ │ │ -
161 struct Evaluate<Traits, 1>
│ │ │ │ -
162 {
│ │ │ │ -
163 constexpr static int d = Traits::dimDomain-1;
│ │ │ │ -
165 template <typename Access>
│ │ │ │ -
│ │ │ │ -
166 static void eval (const typename Traits::DomainType &in,
│ │ │ │ -
167 const std::array<unsigned int, Traits::dimDomain> &derivatives,
│ │ │ │ -
168 typename Traits::RangeFieldType prod,
│ │ │ │ -
169 int bound, int& index, Access &access)
│ │ │ │ -
170 {
│ │ │ │ -
171 if(bound < (int)derivatives[d])
│ │ │ │ -
172 prod = 0;
│ │ │ │ -
173 else {
│ │ │ │ -
174 int coeff = 1;
│ │ │ │ -
175 for(int i = bound - derivatives[d] + 1; i <= bound; ++i)
│ │ │ │ -
176 coeff *= i;
│ │ │ │ -
177 prod *= power(in[d], bound-derivatives[d]) * coeff;
│ │ │ │ -
178 }
│ │ │ │ -
179 access[index] = prod;
│ │ │ │ -
180 ++index;
│ │ │ │ -
181 }
│ │ │ │ -
│ │ │ │ -
182 };
│ │ │ │ -
│ │ │ │ -
183
│ │ │ │ -
184 } //namespace MonomImp
│ │ │ │ -
│ │ │ │ -
185
│ │ │ │ -
199 template<class D, class R, unsigned int d, unsigned int p>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
201 {
│ │ │ │ -
202 // Helper: Number of shape functions for a k-th order element in dimension dd
│ │ │ │ -
203 static constexpr unsigned int size (int dd, int k)
│ │ │ │ -
204 {
│ │ │ │ -
205 if (dd==0 || k==0)
│ │ │ │ -
206 return 1;
│ │ │ │ -
207 return size(dd,k-1) + size(dd-1,k);
│ │ │ │ -
208 }
│ │ │ │ -
209
│ │ │ │ -
210 public:
│ │ │ │ -
212 typedef LocalBasisTraits<D,d,Dune::FieldVector<D,d>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ -
213 Dune::FieldMatrix<R,1,d> > Traits;
│ │ │ │ -
214
│ │ │ │ -
│ │ │ │ -
216 static constexpr unsigned int size ()
│ │ │ │ -
217 {
│ │ │ │ -
218 return size(d,p);
│ │ │ │ -
219 }
│ │ │ │ -
│ │ │ │ -
220
│ │ │ │ -
│ │ │ │ -
222 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
223 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
224 {
│ │ │ │ -
225 out.resize(size());
│ │ │ │ -
226 int index = 0;
│ │ │ │ -
227 std::array<unsigned int, d> derivatives;
│ │ │ │ -
228 std::fill(derivatives.begin(), derivatives.end(), 0);
│ │ │ │ - │ │ │ │ -
230 for (unsigned int lp = 0; lp <= p; ++lp)
│ │ │ │ -
231 MonomImp::Evaluate<Traits, d>::eval(in, derivatives, 1, lp, index, access);
│ │ │ │ -
232 }
│ │ │ │ -
│ │ │ │ -
233
│ │ │ │ -
│ │ │ │ -
239 inline void partial(const std::array<unsigned int,d>& order,
│ │ │ │ -
240 const typename Traits::DomainType& in,
│ │ │ │ -
241 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
242 {
│ │ │ │ -
243 out.resize(size());
│ │ │ │ -
244 int index = 0;
│ │ │ │ - │ │ │ │ -
246 for (unsigned int lp = 0; lp <= p; ++lp)
│ │ │ │ -
247 MonomImp::Evaluate<Traits, d>::eval(in, order, 1, lp, index, access);
│ │ │ │ -
248 }
│ │ │ │ -
│ │ │ │ -
249
│ │ │ │ -
251 inline void
│ │ │ │ -
│ │ │ │ -
252 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
253 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
254 {
│ │ │ │ -
255 out.resize(size());
│ │ │ │ -
256 std::array<unsigned int, d> derivatives;
│ │ │ │ -
257 for(unsigned int i = 0; i < d; ++i)
│ │ │ │ -
258 derivatives[i] = 0;
│ │ │ │ -
259 for(unsigned int i = 0; i < d; ++i)
│ │ │ │ -
260 {
│ │ │ │ -
261 derivatives[i] = 1;
│ │ │ │ -
262 int index = 0;
│ │ │ │ - │ │ │ │ -
264 for(unsigned int lp = 0; lp <= p; ++lp)
│ │ │ │ -
265 MonomImp::Evaluate<Traits, d>::eval(in, derivatives, 1, lp, index, access);
│ │ │ │ -
266 derivatives[i] = 0;
│ │ │ │ -
267 }
│ │ │ │ -
268 }
│ │ │ │ -
│ │ │ │ -
269
│ │ │ │ -
│ │ │ │ -
271 unsigned int order () const
│ │ │ │ -
272 {
│ │ │ │ -
273 return p;
│ │ │ │ -
274 }
│ │ │ │ -
│ │ │ │ -
275 };
│ │ │ │ -
│ │ │ │ -
276
│ │ │ │ -
277}
│ │ │ │ -
278
│ │ │ │ -
279#endif // DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALBASIS_HH
│ │ │ │ +
110 unsigned int order () const
│ │ │ │ +
111 {
│ │ │ │ +
112 // must be 2 here since it contains x^2 and x^2
│ │ │ │ +
113 return 2;
│ │ │ │ +
114 }
│ │ │ │ +
│ │ │ │ +
115 };
│ │ │ │ +
│ │ │ │ +
116
│ │ │ │ +
117} //namespace Dune
│ │ │ │ +
118
│ │ │ │ +
119#endif // #ifndef DUNE_RANNACHER_TUREK_2D_LOCALBASIS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
Access output vector of evaluateFunction() and evaluate()
Definition monomiallocalbasis.hh:23
│ │ │ │ -
Traits::RangeFieldType & operator[](unsigned int index)
Definition monomiallocalbasis.hh:41
│ │ │ │ -
~EvalAccess()
Definition monomiallocalbasis.hh:37
│ │ │ │ -
EvalAccess(std::vector< typename Traits::RangeType > &out_)
Definition monomiallocalbasis.hh:30
│ │ │ │ -
Access output vector of evaluateJacobian()
Definition monomiallocalbasis.hh:54
│ │ │ │ -
~JacobianAccess()
Definition monomiallocalbasis.hh:70
│ │ │ │ -
Traits::RangeFieldType & operator[](unsigned int index)
Definition monomiallocalbasis.hh:74
│ │ │ │ -
JacobianAccess(std::vector< typename Traits::JacobianType > &out_, unsigned int row_)
Definition monomiallocalbasis.hh:62
│ │ │ │ -
Definition monomiallocalbasis.hh:99
│ │ │ │ -
static constexpr int d
The next dimension to try for factors.
Definition monomiallocalbasis.hh:101
│ │ │ │ -
static void eval(const typename Traits::DomainType &in, const std::array< unsigned int, Traits::dimDomain > &derivatives, typename Traits::RangeFieldType prod, int bound, int &index, Access &access)
Definition monomiallocalbasis.hh:110
│ │ │ │ -
static void eval(const typename Traits::DomainType &in, const std::array< unsigned int, Traits::dimDomain > &derivatives, typename Traits::RangeFieldType prod, int bound, int &index, Access &access)
Definition monomiallocalbasis.hh:166
│ │ │ │ -
Constant shape function.
Definition monomiallocalbasis.hh:201
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition monomiallocalbasis.hh:271
│ │ │ │ -
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 monomiallocalbasis.hh:239
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition monomiallocalbasis.hh:252
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition monomiallocalbasis.hh:222
│ │ │ │ -
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 monomiallocalbasis.hh:213
│ │ │ │ -
static constexpr unsigned int size()
Number of shape functions.
Definition monomiallocalbasis.hh:216
│ │ │ │ +
DF DomainFieldType
Export type for domain field.
Definition common/localbasis.hh:36
│ │ │ │ +
Definition rannacherturek2dlocalbasis.hh:21
│ │ │ │ +
LocalBasisTraits< D, 2, FieldVector< D, 2 >, R, 1, FieldVector< R, 1 >, FieldMatrix< R, 1, 2 > > Traits
Definition rannacherturek2dlocalbasis.hh:24
│ │ │ │ +
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 rannacherturek2dlocalbasis.hh:60
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition rannacherturek2dlocalbasis.hh:27
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
evaluate all shape functions
Definition rannacherturek2dlocalbasis.hh:33
│ │ │ │ +
unsigned int order() const
polynomial order of the shape functions
Definition rannacherturek2dlocalbasis.hh:110
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
evaluate jacobian of all shape functions
Definition rannacherturek2dlocalbasis.hh:45
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,322 +7,176 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * monomial │ │ │ │ │ -monomiallocalbasis.hh │ │ │ │ │ + * rannacherturek │ │ │ │ │ + * rannacherturek2d │ │ │ │ │ +rannacherturek2dlocalbasis.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_MONOMIAL_MONOMIALLOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_RANNACHER_TUREK_2D_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_RANNACHER_TUREK_2D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include "../common/localbasis.hh" │ │ │ │ │ - 16 │ │ │ │ │ - 17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ -19 namespace MonomImp │ │ │ │ │ - 20 { │ │ │ │ │ - 22 template │ │ │ │ │ -23 class EvalAccess { │ │ │ │ │ - 24 std::vector &out; │ │ │ │ │ - 25#ifndef NDEBUG │ │ │ │ │ - 26 unsigned int first_unused_index; │ │ │ │ │ - 27#endif │ │ │ │ │ - 28 │ │ │ │ │ - 29 public: │ │ │ │ │ -30 EvalAccess(std::vector &out_) │ │ │ │ │ - 31 : out(out_) │ │ │ │ │ - 32#ifndef NDEBUG │ │ │ │ │ - 33 , first_unused_index(0) │ │ │ │ │ - 34#endif │ │ │ │ │ - 35 { } │ │ │ │ │ - 36#ifndef NDEBUG │ │ │ │ │ -37 ~EvalAccess() { │ │ │ │ │ - 38 assert(first_unused_index == out.size()); │ │ │ │ │ - 39 } │ │ │ │ │ - 40#endif │ │ │ │ │ -41 typename Traits::RangeFieldType &operator[](unsigned int index) │ │ │ │ │ - 42 { │ │ │ │ │ - 43 assert(index < out.size()); │ │ │ │ │ - 44#ifndef NDEBUG │ │ │ │ │ - 45 if(first_unused_index <= index) │ │ │ │ │ - 46 first_unused_index = index+1; │ │ │ │ │ - 47#endif │ │ │ │ │ - 48 return out[index][0]; │ │ │ │ │ - 49 } │ │ │ │ │ - 50 }; │ │ │ │ │ - 51 │ │ │ │ │ - 53 template │ │ │ │ │ -54 class JacobianAccess { │ │ │ │ │ - 55 std::vector &out; │ │ │ │ │ - 56 unsigned int row; │ │ │ │ │ - 57#ifndef NDEBUG │ │ │ │ │ - 58 unsigned int first_unused_index; │ │ │ │ │ - 59#endif │ │ │ │ │ - 60 │ │ │ │ │ - 61 public: │ │ │ │ │ -62 JacobianAccess(std::vector &out_, │ │ │ │ │ - 63 unsigned int row_) │ │ │ │ │ - 64 : out(out_), row(row_) │ │ │ │ │ - 65#ifndef NDEBUG │ │ │ │ │ - 66 , first_unused_index(0) │ │ │ │ │ - 67#endif │ │ │ │ │ - 68 { } │ │ │ │ │ - 69#ifndef NDEBUG │ │ │ │ │ -70 ~JacobianAccess() { │ │ │ │ │ - 71 assert(first_unused_index == out.size()); │ │ │ │ │ - 72 } │ │ │ │ │ - 73#endif │ │ │ │ │ -74 typename Traits::RangeFieldType &operator[](unsigned int index) │ │ │ │ │ - 75 { │ │ │ │ │ - 76 assert(index < out.size()); │ │ │ │ │ - 77#ifndef NDEBUG │ │ │ │ │ - 78 if(first_unused_index <= index) │ │ │ │ │ - 79 first_unused_index = index+1; │ │ │ │ │ - 80#endif │ │ │ │ │ - 81 return out[index][0][row]; │ │ │ │ │ - 82 } │ │ │ │ │ - 83 }; │ │ │ │ │ - 84 │ │ │ │ │ - 97 template │ │ │ │ │ -98 struct Evaluate │ │ │ │ │ - 99 { │ │ │ │ │ -101 constexpr static int d = Traits::dimDomain - c; │ │ │ │ │ - 102 │ │ │ │ │ - 109 template │ │ │ │ │ -110 static void eval ( │ │ │ │ │ - 111 const typename Traits::DomainType &in, │ │ │ │ │ - 114 const std::array &derivatives, │ │ │ │ │ - 117 typename Traits::RangeFieldType prod, │ │ │ │ │ - 119 int bound, │ │ │ │ │ - 121 int& index, │ │ │ │ │ - 123 Access &access) │ │ │ │ │ - 124 { │ │ │ │ │ - 125 // start with the highest exponent for this dimension, then work down │ │ │ │ │ - 126 for (int e = bound; e >= 0; --e) │ │ │ │ │ - 127 { │ │ │ │ │ - 128 // the rest of the available exponents, to be used by the other │ │ │ │ │ - 129 // dimensions │ │ │ │ │ - 130 int newbound = bound - e; │ │ │ │ │ - 131 if(e < (int)derivatives[d]) │ │ │ │ │ - 132 Evaluate:: │ │ │ │ │ - 133eval(in, derivatives, 0, newbound, index, access); │ │ │ │ │ - 134 else { │ │ │ │ │ - 135 int coeff = 1; │ │ │ │ │ - 136 for(int i = e - derivatives[d] + 1; i <= e; ++i) │ │ │ │ │ - 137 coeff *= i; │ │ │ │ │ - 138 // call the evaluator for the next dimension │ │ │ │ │ - 139 Evaluate:: │ │ │ │ │ - 140eval( // pass the coordinate and the derivatives unchanged │ │ │ │ │ - 141 in, derivatives, │ │ │ │ │ - 142 // also pass the product accumulated so far, but also │ │ │ │ │ - 143 // include the current dimension │ │ │ │ │ - 144 prod * power(in[d], e-derivatives[d]) * coeff, │ │ │ │ │ - 145 // pass the number of remaining exponents to the next │ │ │ │ │ - 146 // dimension │ │ │ │ │ - 147 newbound, │ │ │ │ │ - 148 // pass the next index to fill and the output access │ │ │ │ │ - 149 // wrapper │ │ │ │ │ - 150 index, access); │ │ │ │ │ - 151 } │ │ │ │ │ - 152 } │ │ │ │ │ - 153 } │ │ │ │ │ - 154 }; │ │ │ │ │ - 155 │ │ │ │ │ - 160 template │ │ │ │ │ -161 struct Evaluate │ │ │ │ │ - 162 { │ │ │ │ │ -163 constexpr static int d = Traits::dimDomain-1; │ │ │ │ │ - 165 template │ │ │ │ │ -166 static void eval (const typename Traits::DomainType &in, │ │ │ │ │ - 167 const std::array &derivatives, │ │ │ │ │ - 168 typename Traits::RangeFieldType prod, │ │ │ │ │ - 169 int bound, int& index, Access &access) │ │ │ │ │ - 170 { │ │ │ │ │ - 171 if(bound < (int)derivatives[d]) │ │ │ │ │ - 172 prod = 0; │ │ │ │ │ - 173 else { │ │ │ │ │ - 174 int coeff = 1; │ │ │ │ │ - 175 for(int i = bound - derivatives[d] + 1; i <= bound; ++i) │ │ │ │ │ - 176 coeff *= i; │ │ │ │ │ - 177 prod *= power(in[d], bound-derivatives[d]) * coeff; │ │ │ │ │ - 178 } │ │ │ │ │ - 179 access[index] = prod; │ │ │ │ │ - 180 ++index; │ │ │ │ │ - 181 } │ │ │ │ │ - 182 }; │ │ │ │ │ - 183 │ │ │ │ │ - 184 } //namespace MonomImp │ │ │ │ │ - 185 │ │ │ │ │ - 199 template │ │ │ │ │ -200 class MonomialLocalBasis │ │ │ │ │ - 201 { │ │ │ │ │ - 202 // Helper: Number of shape functions for a k-th order element in dimension │ │ │ │ │ -dd │ │ │ │ │ - 203 static constexpr unsigned int size (int dd, int k) │ │ │ │ │ - 204 { │ │ │ │ │ - 205 if (dd==0 || k==0) │ │ │ │ │ - 206 return 1; │ │ │ │ │ - 207 return size(dd,k-1) + size(dd-1,k); │ │ │ │ │ - 208 } │ │ │ │ │ - 209 │ │ │ │ │ - 210 public: │ │ │ │ │ - 212 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -213 Dune::FieldMatrix > Traits; │ │ │ │ │ - 214 │ │ │ │ │ -216 static constexpr unsigned int size () │ │ │ │ │ - 217 { │ │ │ │ │ - 218 return size(d,p); │ │ │ │ │ - 219 } │ │ │ │ │ - 220 │ │ │ │ │ -222 inline void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ - 223 std::vector& out) const │ │ │ │ │ - 224 { │ │ │ │ │ - 225 out.resize(size()); │ │ │ │ │ - 226 int index = 0; │ │ │ │ │ - 227 std::array derivatives; │ │ │ │ │ - 228 std::fill(derivatives.begin(), derivatives.end(), 0); │ │ │ │ │ - 229 MonomImp::EvalAccess access(out); │ │ │ │ │ - 230 for (unsigned int lp = 0; lp <= p; ++lp) │ │ │ │ │ - 231 MonomImp::Evaluate::eval(in, derivatives, 1, lp, index, │ │ │ │ │ -access); │ │ │ │ │ - 232 } │ │ │ │ │ - 233 │ │ │ │ │ -239 inline void partial(const std::array& order, │ │ │ │ │ - 240 const typename Traits::DomainType& in, │ │ │ │ │ - 241 std::vector& out) const │ │ │ │ │ - 242 { │ │ │ │ │ - 243 out.resize(size()); │ │ │ │ │ - 244 int index = 0; │ │ │ │ │ - 245 MonomImp::EvalAccess access(out); │ │ │ │ │ - 246 for (unsigned int lp = 0; lp <= p; ++lp) │ │ │ │ │ - 247 MonomImp::Evaluate::eval(in, order, 1, lp, index, access); │ │ │ │ │ - 248 } │ │ │ │ │ - 249 │ │ │ │ │ - 251 inline void │ │ │ │ │ -252 evaluateJacobian (const typename Traits::DomainType& in, // position │ │ │ │ │ - 253 std::vector& out) const // return value │ │ │ │ │ - 254 { │ │ │ │ │ - 255 out.resize(size()); │ │ │ │ │ - 256 std::array derivatives; │ │ │ │ │ - 257 for(unsigned int i = 0; i < d; ++i) │ │ │ │ │ - 258 derivatives[i] = 0; │ │ │ │ │ - 259 for(unsigned int i = 0; i < d; ++i) │ │ │ │ │ - 260 { │ │ │ │ │ - 261 derivatives[i] = 1; │ │ │ │ │ - 262 int index = 0; │ │ │ │ │ - 263 MonomImp::JacobianAccess access(out, i); │ │ │ │ │ - 264 for(unsigned int lp = 0; lp <= p; ++lp) │ │ │ │ │ - 265 MonomImp::Evaluate::eval(in, derivatives, 1, lp, index, │ │ │ │ │ -access); │ │ │ │ │ - 266 derivatives[i] = 0; │ │ │ │ │ - 267 } │ │ │ │ │ - 268 } │ │ │ │ │ - 269 │ │ │ │ │ -271 unsigned int order () const │ │ │ │ │ - 272 { │ │ │ │ │ - 273 return p; │ │ │ │ │ - 274 } │ │ │ │ │ - 275 }; │ │ │ │ │ - 276 │ │ │ │ │ - 277} │ │ │ │ │ - 278 │ │ │ │ │ - 279#endif // DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALBASIS_HH │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16namespace Dune │ │ │ │ │ + 17{ │ │ │ │ │ + 18 │ │ │ │ │ + 19 template< class D, class R > │ │ │ │ │ +20 struct RannacherTurek2DLocalBasis │ │ │ │ │ + 21 { │ │ │ │ │ + 22 typedef LocalBasisTraits<_D,_2,_FieldVector<_D,_2_>, │ │ │ │ │ + 23 R, 1, FieldVector< R, 1 >, │ │ │ │ │ +24 FieldMatrix< R, 1, 2 > > Traits; │ │ │ │ │ + 25 │ │ │ │ │ +27 unsigned int size () const │ │ │ │ │ + 28 { │ │ │ │ │ + 29 return 4; │ │ │ │ │ + 30 } │ │ │ │ │ + 31 │ │ │ │ │ +33 inline void evaluateFunction ( const typename Traits::DomainType &in, │ │ │ │ │ + 34 std::vector< typename Traits::RangeType > &out ) const │ │ │ │ │ + 35 { │ │ │ │ │ + 36 out.resize(4); │ │ │ │ │ + 37 typename Traits::DomainFieldType qbase = in[0]*in[0]-in[1]*in[1]; │ │ │ │ │ + 38 out[0] = .75 - 2*in[0] + in[1] + qbase; │ │ │ │ │ + 39 out[1] = -.25 + in[1] + qbase; │ │ │ │ │ + 40 out[2] = .75 + in[0] - 2*in[1] - qbase; │ │ │ │ │ + 41 out[3] = -.25 + in[0] - qbase; │ │ │ │ │ + 42 } │ │ │ │ │ + 43 │ │ │ │ │ +45 inline void evaluateJacobian ( const typename Traits::DomainType &in, │ │ │ │ │ + 46 std::vector< typename Traits::JacobianType > &out ) const │ │ │ │ │ + 47 { │ │ │ │ │ + 48 out.resize(4); │ │ │ │ │ + 49 │ │ │ │ │ + 50 // see http://www.dune-project.org/doc/doxygen/html/ │ │ │ │ │ +classDune_1_1C1LocalBasisInterface.html#d6f8368f8aa43439cc7ef10419f6e2ea │ │ │ │ │ + 51 // out[i][j][k] = d_k \phi^i_j , where \phi^i_j is the j'th component of │ │ │ │ │ +the i'th shape function. │ │ │ │ │ + 52 │ │ │ │ │ + 53 out[0][0][0] = -2 + 2*in[0]; out[0][0][1] = 1 - 2*in[1]; │ │ │ │ │ + 54 out[1][0][0] = 2*in[0]; out[1][0][1] = 1 - 2*in[1]; │ │ │ │ │ + 55 out[2][0][0] = 1 - 2*in[0]; out[2][0][1] = -2 + 2*in[1]; │ │ │ │ │ + 56 out[3][0][0] = 1 - 2*in[0]; out[3][0][1] = 2*in[1]; │ │ │ │ │ + 57 } │ │ │ │ │ + 58 │ │ │ │ │ +60 void partial (const std::array& order, │ │ │ │ │ + 61 const typename Traits::DomainType& in, // position │ │ │ │ │ + 62 std::vector& out) const // return value │ │ │ │ │ + 63 { │ │ │ │ │ + 64 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ + 65 if (totalOrder == 0) { │ │ │ │ │ + 66 evaluateFunction(in, out); │ │ │ │ │ + 67 } else if (totalOrder == 1) { │ │ │ │ │ + 68 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ +(), order.end(), 1)); │ │ │ │ │ + 69 out.resize(size()); │ │ │ │ │ + 70 │ │ │ │ │ + 71 switch (direction) { │ │ │ │ │ + 72 case 0: │ │ │ │ │ + 73 out[0] = -2 + 2*in[0]; │ │ │ │ │ + 74 out[1] = 2*in[0]; │ │ │ │ │ + 75 out[2] = 1 - 2*in[0]; │ │ │ │ │ + 76 out[3] = 1 - 2*in[0]; │ │ │ │ │ + 77 break; │ │ │ │ │ + 78 case 1: │ │ │ │ │ + 79 out[0] = 1 - 2*in[1]; │ │ │ │ │ + 80 out[1] = 1 - 2*in[1]; │ │ │ │ │ + 81 out[2] = -2 + 2*in[1]; │ │ │ │ │ + 82 out[3] = 2*in[1]; │ │ │ │ │ + 83 break; │ │ │ │ │ + 84 default: │ │ │ │ │ + 85 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ + 86 } │ │ │ │ │ + 87 } else if (totalOrder == 2) { │ │ │ │ │ + 88 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ +(), order.end(), 2)); │ │ │ │ │ + 89 out.resize(size()); │ │ │ │ │ + 90 │ │ │ │ │ + 91 switch (direction) { │ │ │ │ │ + 92 case 0: │ │ │ │ │ + 93 out[0] = out[1] = 2; │ │ │ │ │ + 94 out[2] = out[3] =-2; │ │ │ │ │ + 95 break; │ │ │ │ │ + 96 case 1: │ │ │ │ │ + 97 out[0] = out[1] =-2; │ │ │ │ │ + 98 out[2] = out[3] = 2; │ │ │ │ │ + 99 break; │ │ │ │ │ + 100 default: │ │ │ │ │ + 101 out[0] = out[1] = out[2] = out[3] = 0; │ │ │ │ │ + 102 break; │ │ │ │ │ + 103 } │ │ │ │ │ + 104 } else { │ │ │ │ │ + 105 out[0] = out[1] = out[2] = out[3] = 0; │ │ │ │ │ + 106 } │ │ │ │ │ + 107 } │ │ │ │ │ + 108 │ │ │ │ │ +110 unsigned int order () const │ │ │ │ │ + 111 { │ │ │ │ │ + 112 // must be 2 here since it contains x^2 and x^2 │ │ │ │ │ + 113 return 2; │ │ │ │ │ + 114 } │ │ │ │ │ + 115 }; │ │ │ │ │ + 116 │ │ │ │ │ + 117} //namespace Dune │ │ │ │ │ + 118 │ │ │ │ │ + 119#endif // #ifndef DUNE_RANNACHER_TUREK_2D_LOCALBASIS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalBasisTraits │ │ │ │ │ Type traits for LocalBasisVirtualInterface. │ │ │ │ │ Definition common/localbasis.hh:34 │ │ │ │ │ Dune::LocalBasisTraits::DomainType │ │ │ │ │ D DomainType │ │ │ │ │ domain type │ │ │ │ │ Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::MonomImp::EvalAccess │ │ │ │ │ -Access output vector of evaluateFunction() and evaluate() │ │ │ │ │ -Definition monomiallocalbasis.hh:23 │ │ │ │ │ -Dune::MonomImp::EvalAccess::operator[] │ │ │ │ │ -Traits::RangeFieldType & operator[](unsigned int index) │ │ │ │ │ -Definition monomiallocalbasis.hh:41 │ │ │ │ │ -Dune::MonomImp::EvalAccess::~EvalAccess │ │ │ │ │ -~EvalAccess() │ │ │ │ │ -Definition monomiallocalbasis.hh:37 │ │ │ │ │ -Dune::MonomImp::EvalAccess::EvalAccess │ │ │ │ │ -EvalAccess(std::vector< typename Traits::RangeType > &out_) │ │ │ │ │ -Definition monomiallocalbasis.hh:30 │ │ │ │ │ -Dune::MonomImp::JacobianAccess │ │ │ │ │ -Access output vector of evaluateJacobian() │ │ │ │ │ -Definition monomiallocalbasis.hh:54 │ │ │ │ │ -Dune::MonomImp::JacobianAccess::~JacobianAccess │ │ │ │ │ -~JacobianAccess() │ │ │ │ │ -Definition monomiallocalbasis.hh:70 │ │ │ │ │ -Dune::MonomImp::JacobianAccess::operator[] │ │ │ │ │ -Traits::RangeFieldType & operator[](unsigned int index) │ │ │ │ │ -Definition monomiallocalbasis.hh:74 │ │ │ │ │ -Dune::MonomImp::JacobianAccess::JacobianAccess │ │ │ │ │ -JacobianAccess(std::vector< typename Traits::JacobianType > &out_, unsigned int │ │ │ │ │ -row_) │ │ │ │ │ -Definition monomiallocalbasis.hh:62 │ │ │ │ │ -Dune::MonomImp::Evaluate │ │ │ │ │ -Definition monomiallocalbasis.hh:99 │ │ │ │ │ -Dune::MonomImp::Evaluate::d │ │ │ │ │ -static constexpr int d │ │ │ │ │ -The next dimension to try for factors. │ │ │ │ │ -Definition monomiallocalbasis.hh:101 │ │ │ │ │ -Dune::MonomImp::Evaluate::eval │ │ │ │ │ -static void eval(const typename Traits::DomainType &in, const std::array< │ │ │ │ │ -unsigned int, Traits::dimDomain > &derivatives, typename Traits::RangeFieldType │ │ │ │ │ -prod, int bound, int &index, Access &access) │ │ │ │ │ -Definition monomiallocalbasis.hh:110 │ │ │ │ │ -Dune::MonomImp::Evaluate<_Traits,_1_>::eval │ │ │ │ │ -static void eval(const typename Traits::DomainType &in, const std::array< │ │ │ │ │ -unsigned int, Traits::dimDomain > &derivatives, typename Traits::RangeFieldType │ │ │ │ │ -prod, int bound, int &index, Access &access) │ │ │ │ │ -Definition monomiallocalbasis.hh:166 │ │ │ │ │ -Dune::MonomialLocalBasis │ │ │ │ │ -Constant shape function. │ │ │ │ │ -Definition monomiallocalbasis.hh:201 │ │ │ │ │ -Dune::MonomialLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition monomiallocalbasis.hh:271 │ │ │ │ │ -Dune::MonomialLocalBasis::partial │ │ │ │ │ -void partial(const std::array< unsigned int, d > &order, const typename │ │ │ │ │ +Dune::LocalBasisTraits::DomainFieldType │ │ │ │ │ +DF DomainFieldType │ │ │ │ │ +Export type for domain field. │ │ │ │ │ +Definition common/localbasis.hh:36 │ │ │ │ │ +Dune::RannacherTurek2DLocalBasis │ │ │ │ │ +Definition rannacherturek2dlocalbasis.hh:21 │ │ │ │ │ +Dune::RannacherTurek2DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 2, FieldVector< D, 2 >, R, 1, FieldVector< R, 1 >, │ │ │ │ │ +FieldMatrix< R, 1, 2 > > Traits │ │ │ │ │ +Definition rannacherturek2dlocalbasis.hh:24 │ │ │ │ │ +Dune::RannacherTurek2DLocalBasis::partial │ │ │ │ │ +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 any order of all shape functions. │ │ │ │ │ -Definition monomiallocalbasis.hh:239 │ │ │ │ │ -Dune::MonomialLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition monomiallocalbasis.hh:252 │ │ │ │ │ -Dune::MonomialLocalBasis::evaluateFunction │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +Definition rannacherturek2dlocalbasis.hh:60 │ │ │ │ │ +Dune::RannacherTurek2DLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition rannacherturek2dlocalbasis.hh:27 │ │ │ │ │ +Dune::RannacherTurek2DLocalBasis::evaluateFunction │ │ │ │ │ void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition monomiallocalbasis.hh:222 │ │ │ │ │ -Dune::MonomialLocalBasis::Traits │ │ │ │ │ -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 monomiallocalbasis.hh:213 │ │ │ │ │ -Dune::MonomialLocalBasis::size │ │ │ │ │ -static constexpr unsigned int size() │ │ │ │ │ -Number of shape functions. │ │ │ │ │ -Definition monomiallocalbasis.hh:216 │ │ │ │ │ +evaluate all shape functions │ │ │ │ │ +Definition rannacherturek2dlocalbasis.hh:33 │ │ │ │ │ +Dune::RannacherTurek2DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +polynomial order of the shape functions │ │ │ │ │ +Definition rannacherturek2dlocalbasis.hh:110 │ │ │ │ │ +Dune::RannacherTurek2DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +evaluate jacobian of all shape functions │ │ │ │ │ +Definition rannacherturek2dlocalbasis.hh:45 │ │ │ │ │ +localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00161.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomiallocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: rannachertureklocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
monomiallocalcoefficients.hh File Reference
│ │ │ │ +
rannachertureklocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../common/localkey.hh"
│ │ │ │ +
#include <algorithm>
│ │ │ │ +#include <array>
│ │ │ │ +#include <cassert>
│ │ │ │ +#include <cstddef>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::MonomialLocalCoefficients< static_size >
 Layout map for monomial finite elements. More...
struct  Dune::RannacherTurekLocalCoefficients< d >
 layout for Rannacher-Turek elements More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,24 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * monomial │ │ │ │ │ + * rannacherturek │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -monomiallocalcoefficients.hh File Reference │ │ │ │ │ +rannachertureklocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include "../common/localkey.hh" │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::MonomialLocalCoefficients<_static_size_> │ │ │ │ │ -  Layout map for monomial finite elements. More... │ │ │ │ │ +struct  Dune::RannacherTurekLocalCoefficients<_d_> │ │ │ │ │ +  layout for Rannacher-Turek elements More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00161_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomiallocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: rannachertureklocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,77 +70,96 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
monomiallocalcoefficients.hh
│ │ │ │ +
rannachertureklocalcoefficients.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_MONOMIAL_MONOMIALLOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include "../common/localkey.hh"
│ │ │ │ +
8#include <algorithm>
│ │ │ │ +
9#include <array>
│ │ │ │ +
10#include <cassert>
│ │ │ │ +
11#include <cstddef>
│ │ │ │
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
22 template<int static_size>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25 public:
│ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
24 template< unsigned int d >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │
│ │ │ │ - │ │ │ │ -
28 : index(static_size, LocalKey(0,0,0))
│ │ │ │ -
29 {
│ │ │ │ -
30 for(int i = 0; i < static_size; ++i)
│ │ │ │ -
31 index[i].index(i);
│ │ │ │ -
32 }
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ -
35 std::size_t size () const
│ │ │ │ -
36 {
│ │ │ │ -
37 return static_size;
│ │ │ │ -
38 }
│ │ │ │ -
│ │ │ │ -
39
│ │ │ │ -
│ │ │ │ -
41 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
42 {
│ │ │ │ -
43 return index[i];
│ │ │ │ -
44 }
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
46 private:
│ │ │ │ -
47 std::vector<LocalKey> index;
│ │ │ │ -
48 };
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29 for( std::size_t i = 0; i < 2*d; ++i )
│ │ │ │ +
30 localKeys_[ i ] = LocalKey( i, 1, 0 );
│ │ │ │ +
31 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
50}
│ │ │ │ -
51#endif //DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALCOEFFICIENTS_HH
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
Layout map for monomial finite elements.
Definition monomiallocalcoefficients.hh:24
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition monomiallocalcoefficients.hh:35
│ │ │ │ -
MonomialLocalCoefficients()
Standard constructor.
Definition monomiallocalcoefficients.hh:27
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition monomiallocalcoefficients.hh:41
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,76 +7,98 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * monomial │ │ │ │ │ -monomiallocalcoefficients.hh │ │ │ │ │ + * rannacherturek │ │ │ │ │ +rannachertureklocalcoefficients.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_MONOMIAL_MONOMIALLOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include "../common/localkey.hh" │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 22 template │ │ │ │ │ -23 class MonomialLocalCoefficients │ │ │ │ │ - 24 { │ │ │ │ │ - 25 public: │ │ │ │ │ -27 MonomialLocalCoefficients () │ │ │ │ │ - 28 : index(static_size, LocalKey(0,0,0)) │ │ │ │ │ - 29 { │ │ │ │ │ - 30 for(int i = 0; i < static_size; ++i) │ │ │ │ │ - 31 index[i].index(i); │ │ │ │ │ - 32 } │ │ │ │ │ - 33 │ │ │ │ │ -35 std::size_t size () const │ │ │ │ │ - 36 { │ │ │ │ │ - 37 return static_size; │ │ │ │ │ - 38 } │ │ │ │ │ - 39 │ │ │ │ │ -41 const LocalKey& localKey (std::size_t i) const │ │ │ │ │ - 42 { │ │ │ │ │ - 43 return index[i]; │ │ │ │ │ - 44 } │ │ │ │ │ - 45 │ │ │ │ │ - 46 private: │ │ │ │ │ - 47 std::vector index; │ │ │ │ │ - 48 }; │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 24 template< unsigned int d > │ │ │ │ │ +25 struct RannacherTurekLocalCoefficients │ │ │ │ │ + 26 { │ │ │ │ │ +27 RannacherTurekLocalCoefficients () │ │ │ │ │ + 28 { │ │ │ │ │ + 29 for( std::size_t i = 0; i < 2*d; ++i ) │ │ │ │ │ + 30 localKeys_[ i ] = LocalKey( i, 1, 0 ); │ │ │ │ │ + 31 } │ │ │ │ │ + 32 │ │ │ │ │ +33 RannacherTurekLocalCoefficients ( const RannacherTurekLocalCoefficients │ │ │ │ │ +&other ) │ │ │ │ │ + 34 { │ │ │ │ │ + 35 (*this) = other; │ │ │ │ │ + 36 } │ │ │ │ │ + 37 │ │ │ │ │ +38 RannacherTurekLocalCoefficients &operator=( const │ │ │ │ │ +RannacherTurekLocalCoefficients &other ) │ │ │ │ │ + 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 │ │ │ │ │ - 50} │ │ │ │ │ - 51#endif //DUNE_LOCALFUNCTIONS_MONOMIAL_MONOMIALLOCALCOEFFICIENTS_HH │ │ │ │ │ +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 │ │ │ │ │ +localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalKey │ │ │ │ │ Describe position of one degree of freedom. │ │ │ │ │ Definition localkey.hh:23 │ │ │ │ │ -Dune::MonomialLocalCoefficients │ │ │ │ │ -Layout map for monomial finite elements. │ │ │ │ │ -Definition monomiallocalcoefficients.hh:24 │ │ │ │ │ -Dune::MonomialLocalCoefficients::size │ │ │ │ │ +Dune::RannacherTurekLocalCoefficients │ │ │ │ │ +layout for Rannacher-Turek elements │ │ │ │ │ +Definition rannachertureklocalcoefficients.hh:26 │ │ │ │ │ +Dune::RannacherTurekLocalCoefficients::RannacherTurekLocalCoefficients │ │ │ │ │ +RannacherTurekLocalCoefficients() │ │ │ │ │ +Definition rannachertureklocalcoefficients.hh:27 │ │ │ │ │ +Dune::RannacherTurekLocalCoefficients::RannacherTurekLocalCoefficients │ │ │ │ │ +RannacherTurekLocalCoefficients(const RannacherTurekLocalCoefficients &other) │ │ │ │ │ +Definition rannachertureklocalcoefficients.hh:33 │ │ │ │ │ +Dune::RannacherTurekLocalCoefficients::operator= │ │ │ │ │ +RannacherTurekLocalCoefficients & operator=(const │ │ │ │ │ +RannacherTurekLocalCoefficients &other) │ │ │ │ │ +Definition rannachertureklocalcoefficients.hh:38 │ │ │ │ │ +Dune::RannacherTurekLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +map index i to local key │ │ │ │ │ +Definition rannachertureklocalcoefficients.hh:51 │ │ │ │ │ +Dune::RannacherTurekLocalCoefficients::size │ │ │ │ │ std::size_t size() const │ │ │ │ │ number of coefficients │ │ │ │ │ -Definition monomiallocalcoefficients.hh:35 │ │ │ │ │ -Dune::MonomialLocalCoefficients::MonomialLocalCoefficients │ │ │ │ │ -MonomialLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition monomiallocalcoefficients.hh:27 │ │ │ │ │ -Dune::MonomialLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition monomiallocalcoefficients.hh:41 │ │ │ │ │ +Definition rannachertureklocalcoefficients.hh:45 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00164.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplex.hh File Reference │ │ │ │ +dune-localfunctions: rannachertureklocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomassimplex.hh File Reference
│ │ │ │ +
rannachertureklocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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

│ │ │ │ -
#include <dune/localfunctions/utility/localfiniteelement.hh>
│ │ │ │ -#include "raviartthomassimplex/raviartthomassimplexbasis.hh"
│ │ │ │ +
#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::RaviartThomasSimplexLocalFiniteElement< dimDomain, D, R, SF, CF >
 Raviart-Thomas local finite elements of arbitrary order for simplices of arbitrary dimension. More...
class  Dune::RannacherTurekLocalInterpolation< D, R, d >
 please doc me More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

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

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,29 +6,27 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * raviartthomas │ │ │ │ │ + * rannacherturek │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomassimplex.hh File Reference │ │ │ │ │ -Raviart-Thomas local finite elements of arbitrary order for simplices of │ │ │ │ │ -arbitrary dimension. More... │ │ │ │ │ -#include │ │ │ │ │ -#include "raviartthomassimplex/raviartthomassimplexbasis.hh" │ │ │ │ │ +rannachertureklocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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::RannacherTurekLocalInterpolation<_D,_R,_d_> │ │ │ │ │ +  please doc me More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ -***** Detailed Description ***** │ │ │ │ │ -Raviart-Thomas local finite elements of arbitrary order for simplices of │ │ │ │ │ -arbitrary dimension. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00164_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplex.hh Source File │ │ │ │ +dune-localfunctions: rannachertureklocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,66 +70,89 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomassimplex.hh
│ │ │ │ +
rannachertureklocalinterpolation.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_RANNACHER_TUREK_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_RANNACHER_TUREK_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <cassert>
│ │ │ │ +
9#include <vector>
│ │ │ │
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,74 +7,88 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * raviartthomas │ │ │ │ │ -raviartthomassimplex.hh │ │ │ │ │ + * rannacherturek │ │ │ │ │ +rannachertureklocalinterpolation.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_RANNACHER_TUREK_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_RANNACHER_TUREK_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include "raviartthomassimplex/raviartthomassimplexbasis.hh" │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ 10 │ │ │ │ │ - 17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ - 35 template │ │ │ │ │ -37 class RaviartThomasSimplexLocalFiniteElement │ │ │ │ │ - 38 : public GenericLocalFiniteElement, │ │ │ │ │ - 39 RaviartThomasCoefficientsFactory, │ │ │ │ │ - 40 RaviartThomasL2InterpolationFactory > │ │ │ │ │ - 41 { │ │ │ │ │ - 42 typedef GenericLocalFiniteElement, │ │ │ │ │ - 43 RaviartThomasCoefficientsFactory, │ │ │ │ │ - 44 RaviartThomasL2InterpolationFactory > Base; │ │ │ │ │ - 45 public: │ │ │ │ │ - 46 using typename Base::Traits; │ │ │ │ │ - 47 │ │ │ │ │ -49 RaviartThomasSimplexLocalFiniteElement(const GeometryType >, unsigned int │ │ │ │ │ -order) │ │ │ │ │ - 50 : Base(gt, order) │ │ │ │ │ - 51 {} │ │ │ │ │ - 52 }; │ │ │ │ │ - 53} // namespace Dune │ │ │ │ │ - 54 │ │ │ │ │ - 55#endif // #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH │ │ │ │ │ -raviartthomassimplexbasis.hh │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ + 17 │ │ │ │ │ + 18namespace Dune │ │ │ │ │ + 19{ │ │ │ │ │ + 20 │ │ │ │ │ + 28 template< class D, class R, unsigned int d > │ │ │ │ │ +29 class RannacherTurekLocalInterpolation │ │ │ │ │ + 30 { │ │ │ │ │ + 31 typedef LocalBasisTraits<_D,_d,_FieldVector<_D,_d_>, │ │ │ │ │ + 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(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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RaviartThomasSimplexLocalFiniteElement │ │ │ │ │ -Raviart-Thomas local finite elements of arbitrary order for simplices of │ │ │ │ │ -arbitrary dimension. │ │ │ │ │ -Definition raviartthomassimplex.hh:41 │ │ │ │ │ -Dune::RaviartThomasSimplexLocalFiniteElement:: │ │ │ │ │ -RaviartThomasSimplexLocalFiniteElement │ │ │ │ │ -RaviartThomasSimplexLocalFiniteElement(const GeometryType >, unsigned int │ │ │ │ │ -order) │ │ │ │ │ -Definition raviartthomassimplex.hh:49 │ │ │ │ │ -Dune::RaviartThomasL2InterpolationFactory │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:421 │ │ │ │ │ -Dune::RaviartThomasCoefficientsFactory │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:70 │ │ │ │ │ -Dune::GenericLocalFiniteElement │ │ │ │ │ -A LocalFiniteElement implementation based on three TopologyFactories providing │ │ │ │ │ -the LocalBasis,... │ │ │ │ │ -Definition localfunctions/utility/localfiniteelement.hh:25 │ │ │ │ │ -Dune::GenericLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< typename BasisF::Object, typename CoeffF::Object, │ │ │ │ │ -typename InterpolF::Object > Traits │ │ │ │ │ -Definition localfunctions/utility/localfiniteelement.hh:29 │ │ │ │ │ -localfiniteelement.hh │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::RannacherTurekLocalInterpolation │ │ │ │ │ +please doc me │ │ │ │ │ +Definition rannachertureklocalinterpolation.hh:30 │ │ │ │ │ +Dune::RannacherTurekLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Definition rannachertureklocalinterpolation.hh:37 │ │ │ │ │ +localbasis.hh │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00167.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0cube3dall.hh File Reference │ │ │ │ +dune-localfunctions: rannachertureklocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0cube3dall.hh File Reference
│ │ │ │ +
rannachertureklocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#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::RT0Cube3DLocalBasis< D, R >
 Lowest order Raviart-Thomas shape functions on the reference hexahedron. More...
struct  Dune::RannacherTurekLocalBasis< D, R, 2 >
 
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...
struct  Dune::RannacherTurekLocalBasis< D, R, 3 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,37 +6,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * raviartthomas │ │ │ │ │ - * raviartthomas0cube3d │ │ │ │ │ + * rannacherturek │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas0cube3dall.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +rannachertureklocalbasis.hh File Reference │ │ │ │ │ +#include "rannacherturek2d/rannacherturek2dlocalbasis.hh" │ │ │ │ │ +#include "rannacherturek3d/rannacherturek3dlocalbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT0Cube3DLocalBasis<_D,_R_> │ │ │ │ │ -  Lowest order Raviart-Thomas shape functions on the reference │ │ │ │ │ - hexahedron. More... │ │ │ │ │ +struct  Dune::RannacherTurekLocalBasis<_D,_R,_2_> │ │ │ │ │   │ │ │ │ │ -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... │ │ │ │ │ +struct  Dune::RannacherTurekLocalBasis<_D,_R,_3_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00167_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0cube3dall.hh Source File │ │ │ │ +dune-localfunctions: rannachertureklocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,281 +70,60 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas0cube3dall.hh
│ │ │ │ +
rannachertureklocalbasis.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_ALL_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH
│ │ │ │ +
5#ifndef DUNE_RANNACHER_TUREK_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_RANNACHER_TUREK_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <numeric>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/fmatrix.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11namespace Dune
│ │ │ │ +
12{
│ │ │ │
13
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
Definition rannacherturek2dlocalbasis.hh:21
│ │ │ │ +
Definition rannacherturek3dlocalbasis.hh:21
│ │ │ │ +
Rannacher-Turek shape functions.
Definition rannachertureklocalbasis.hh:24
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,302 +7,54 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * raviartthomas │ │ │ │ │ - * raviartthomas0cube3d │ │ │ │ │ -raviartthomas0cube3dall.hh │ │ │ │ │ + * rannacherturek │ │ │ │ │ +rannachertureklocalbasis.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_ALL_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH │ │ │ │ │ + 5#ifndef DUNE_RANNACHER_TUREK_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_RANNACHER_TUREK_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ + 8#include "rannacherturek2d/rannacherturek2dlocalbasis.hh" │ │ │ │ │ + 9#include "rannacherturek3d/rannacherturek3dlocalbasis.hh" │ │ │ │ │ + 10 │ │ │ │ │ + 11namespace Dune │ │ │ │ │ + 12{ │ │ │ │ │ 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ - 17 │ │ │ │ │ - 18namespace Dune │ │ │ │ │ - 19{ │ │ │ │ │ - 28 template │ │ │ │ │ -29 class RT0Cube3DLocalBasis │ │ │ │ │ - 30 { │ │ │ │ │ - 31 public: │ │ │ │ │ - 32 typedef LocalBasisTraits,R,3,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -33 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ - 99 const typename Traits::DomainType& in, // position │ │ │ │ │ - 100 std::vector& 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 │ │ │ │ │ -156 class RT0Cube3DLocalInterpolation │ │ │ │ │ - 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 │ │ │ │ │ -187 void interpolate (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); │ │ │ │ │ - 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 │ │ │ │ │ -214 class RT0Cube3DLocalCoefficients │ │ │ │ │ - 215 { │ │ │ │ │ - 216 public: │ │ │ │ │ -218 RT0Cube3DLocalCoefficients () : li(6) │ │ │ │ │ - 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 li; │ │ │ │ │ - 238 }; │ │ │ │ │ - 239 │ │ │ │ │ - 240} │ │ │ │ │ - 241#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH │ │ │ │ │ -localkey.hh │ │ │ │ │ + 23 template< class D, class R, unsigned int d > │ │ │ │ │ +24 struct RannacherTurekLocalBasis; │ │ │ │ │ + 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 │ │ │ │ │ +rannacherturek3dlocalbasis.hh │ │ │ │ │ +rannacherturek2dlocalbasis.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::RT0Cube3DLocalBasis │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:30 │ │ │ │ │ -Dune::RT0Cube3DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:48 │ │ │ │ │ -Dune::RT0Cube3DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:68 │ │ │ │ │ -Dune::RT0Cube3DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:138 │ │ │ │ │ -Dune::RT0Cube3DLocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::RT0Cube3DLocalBasis::RT0Cube3DLocalBasis │ │ │ │ │ -RT0Cube3DLocalBasis(unsigned int s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 64. │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:36 │ │ │ │ │ -Dune::RT0Cube3DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ -3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:33 │ │ │ │ │ -Dune::RT0Cube3DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:54 │ │ │ │ │ -Dune::RT0Cube3DLocalInterpolation │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:157 │ │ │ │ │ -Dune::RT0Cube3DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:187 │ │ │ │ │ -Dune::RT0Cube3DLocalInterpolation::RT0Cube3DLocalInterpolation │ │ │ │ │ -RT0Cube3DLocalInterpolation(unsigned int s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 64. │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:161 │ │ │ │ │ -Dune::RT0Cube3DLocalCoefficients │ │ │ │ │ -Layout map for RT0 elements on quadrilaterals. │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:215 │ │ │ │ │ -Dune::RT0Cube3DLocalCoefficients::RT0Cube3DLocalCoefficients │ │ │ │ │ -RT0Cube3DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:218 │ │ │ │ │ -Dune::RT0Cube3DLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:225 │ │ │ │ │ -Dune::RT0Cube3DLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition raviartthomas0cube3dall.hh:231 │ │ │ │ │ -localbasis.hh │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::RannacherTurek2DLocalBasis │ │ │ │ │ +Definition rannacherturek2dlocalbasis.hh:21 │ │ │ │ │ +Dune::RannacherTurek3DLocalBasis │ │ │ │ │ +Definition rannacherturek3dlocalbasis.hh:21 │ │ │ │ │ +Dune::RannacherTurekLocalBasis │ │ │ │ │ +Rannacher-Turek shape functions. │ │ │ │ │ +Definition rannachertureklocalbasis.hh:24 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00170.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas12dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0cube2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas12dlocalcoefficients.hh File Reference
│ │ │ │ +
raviartthomas0cube2d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../../common/localkey.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::RT12DLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on the reference triangle. More...
class  Dune::RT0Cube2DLocalFiniteElement< D, R >
 Zero order Raviart-Thomas shape functions on rectangles. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,23 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas12d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas12dlocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localkey.hh" │ │ │ │ │ +raviartthomas0cube2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "raviartthomas0cube2d/raviartthomas0cube2dall.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT12DLocalCoefficients │ │ │ │ │ -  Layout map for Raviart-Thomas-1 elements on the reference triangle. │ │ │ │ │ - More... │ │ │ │ │ +class  Dune::RT0Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ +  Zero order Raviart-Thomas shape functions on rectangles. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00170_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas12dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0cube2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,82 +70,119 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas12dlocalcoefficients.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_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include "../../common/localkey.hh"
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │
12
│ │ │ │
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 }
│ │ │ │ +
23 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
25 {
│ │ │ │ +
26 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
31
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 basis(s),
│ │ │ │ +
37 interpolation(s)
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
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::quadrilateral;
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
66 private:
│ │ │ │ + │ │ │ │ +
68 RT0Cube2DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
70 };
│ │ │ │ +
│ │ │ │ +
71}
│ │ │ │ +
72#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,81 +8,131 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas12d │ │ │ │ │ -raviartthomas12dlocalcoefficients.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_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include "../../common/localkey.hh" │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include "raviartthomas0cube2d/raviartthomas0cube2dall.hh" │ │ │ │ │ 12 │ │ │ │ │ 13namespace Dune │ │ │ │ │ 14{ │ │ │ │ │ - 15 │ │ │ │ │ -22 class RT12DLocalCoefficients │ │ │ │ │ - 23 { │ │ │ │ │ - 24 │ │ │ │ │ - 25 public: │ │ │ │ │ -27 RT12DLocalCoefficients () : li(8) │ │ │ │ │ - 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 } │ │ │ │ │ + 23 template │ │ │ │ │ +24 class RT0Cube2DLocalFiniteElement │ │ │ │ │ + 25 { │ │ │ │ │ + 26 public: │ │ │ │ │ + 27 typedef LocalFiniteElementTraits< │ │ │ │ │ + 28 RT0Cube2DLocalBasis, │ │ │ │ │ + 29 RT0Cube2DLocalCoefficients, │ │ │ │ │ +30 RT0Cube2DLocalInterpolation > > Traits; │ │ │ │ │ + 31 │ │ │ │ │ +32 RT0Cube2DLocalFiniteElement () │ │ │ │ │ + 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 } │ │ │ │ │ +35 RT0Cube2DLocalFiniteElement (int s) : │ │ │ │ │ + 36 basis(s), │ │ │ │ │ + 37 interpolation(s) │ │ │ │ │ + 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 li; │ │ │ │ │ - 54 }; │ │ │ │ │ - 55} │ │ │ │ │ - 56#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH │ │ │ │ │ +40 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 41 { │ │ │ │ │ + 42 return basis; │ │ │ │ │ + 43 } │ │ │ │ │ + 44 │ │ │ │ │ +45 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 46 { │ │ │ │ │ + 47 return coefficients; │ │ │ │ │ + 48 } │ │ │ │ │ + 49 │ │ │ │ │ +50 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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::quadrilateral; │ │ │ │ │ + 64 } │ │ │ │ │ + 65 │ │ │ │ │ + 66 private: │ │ │ │ │ + 67 RT0Cube2DLocalBasis basis; │ │ │ │ │ + 68 RT0Cube2DLocalCoefficients coefficients; │ │ │ │ │ + 69 RT0Cube2DLocalInterpolation > interpolation; │ │ │ │ │ + 70 }; │ │ │ │ │ + 71} │ │ │ │ │ + 72#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ +raviartthomas0cube2dall.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::RT12DLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-1 elements on the reference triangle. │ │ │ │ │ -Definition raviartthomas12dlocalcoefficients.hh:23 │ │ │ │ │ -Dune::RT12DLocalCoefficients::RT12DLocalCoefficients │ │ │ │ │ -RT12DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas12dlocalcoefficients.hh:27 │ │ │ │ │ -Dune::RT12DLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition raviartthomas12dlocalcoefficients.hh:47 │ │ │ │ │ -Dune::RT12DLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition raviartthomas12dlocalcoefficients.hh:41 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::RT0Cube2DLocalFiniteElement │ │ │ │ │ +Zero order Raviart-Thomas shape functions on rectangles. │ │ │ │ │ +Definition raviartthomas0cube2d.hh:25 │ │ │ │ │ +Dune::RT0Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition raviartthomas0cube2d.hh:45 │ │ │ │ │ +Dune::RT0Cube2DLocalFiniteElement::RT0Cube2DLocalFiniteElement │ │ │ │ │ +RT0Cube2DLocalFiniteElement() │ │ │ │ │ +Definition raviartthomas0cube2d.hh:32 │ │ │ │ │ +Dune::RT0Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition raviartthomas0cube2d.hh:50 │ │ │ │ │ +Dune::RT0Cube2DLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< RT0Cube2DLocalBasis< D, R >, │ │ │ │ │ +RT0Cube2DLocalCoefficients, RT0Cube2DLocalInterpolation< RT0Cube2DLocalBasis< │ │ │ │ │ +D, R > > > Traits │ │ │ │ │ +Definition raviartthomas0cube2d.hh:30 │ │ │ │ │ +Dune::RT0Cube2DLocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition raviartthomas0cube2d.hh:56 │ │ │ │ │ +Dune::RT0Cube2DLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition raviartthomas0cube2d.hh:40 │ │ │ │ │ +Dune::RT0Cube2DLocalFiniteElement::RT0Cube2DLocalFiniteElement │ │ │ │ │ +RT0Cube2DLocalFiniteElement(int s) │ │ │ │ │ +Definition raviartthomas0cube2d.hh:35 │ │ │ │ │ +Dune::RT0Cube2DLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition raviartthomas0cube2d.hh:61 │ │ │ │ │ +Dune::RT0Cube2DLocalBasis │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:30 │ │ │ │ │ +Dune::RT0Cube2DLocalInterpolation │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:134 │ │ │ │ │ +Dune::RT0Cube2DLocalCoefficients │ │ │ │ │ +Layout map for RT0 elements on quadrilaterals. │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:186 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00173.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas12dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomaslfecache.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,44 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
raviartthomas12dlocalinterpolation.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
raviartthomaslfecache.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +
#include <tuple>
│ │ │ │ +#include <utility>
│ │ │ │ +#include <dune/geometry/type.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::RT12DLocalInterpolation< LB >
 First order Raviart-Thomas shape functions on the reference quadrilateral. 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 {} │ │ │ │ │ @@ -7,25 +7,30 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas12d │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -raviartthomas12dlocalinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +Namespaces | Typedefs │ │ │ │ │ +raviartthomaslfecache.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -class  Dune::RT12DLocalInterpolation<_LB_> │ │ │ │ │ -  First order Raviart-Thomas shape functions on the reference │ │ │ │ │ - quadrilateral. More... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +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. │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00173_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas12dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomaslfecache.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,128 +70,124 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas12dlocalinterpolation.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_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
24 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ -
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;
│ │ │ │ +
8#include <tuple>
│ │ │ │ +
9#include <utility>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/geometry/type.hh>
│ │ │ │ +
12#include <dune/geometry/typeindex.hh>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │ +
16
│ │ │ │ +
17namespace Dune {
│ │ │ │ +
18
│ │ │ │ +
19namespace Impl {
│ │ │ │ +
20
│ │ │ │ +
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 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 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;
│ │ │ │ +
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 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 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 }
│ │ │ │ +
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
│ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ -
116}
│ │ │ │ -
117#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
A cache storing a compile time selection of local finite element implementations.
Definition localfiniteelementvariantcache.hh:68
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -8,130 +8,135 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas12d │ │ │ │ │ -raviartthomas12dlocalinterpolation.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_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 24 template │ │ │ │ │ -25 class RT12DLocalInterpolation │ │ │ │ │ - 26 { │ │ │ │ │ - 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 │ │ │ │ │ -59 void interpolate (const F& ff, std::vector& 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; │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16 │ │ │ │ │ + 17namespace Dune { │ │ │ │ │ + 18 │ │ │ │ │ + 19namespace Impl { │ │ │ │ │ + 20 │ │ │ │ │ + 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 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 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 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; │ │ │ │ │ + 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 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 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 } │ │ │ │ │ + 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 │ │ │ │ │ - 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 │ │ │ │ │ + 103template │ │ │ │ │ +104using RaviartThomasLocalFiniteElementCache = │ │ │ │ │ +LocalFiniteElementVariantCache>; │ │ │ │ │ + 105 │ │ │ │ │ + 106} // namespace Dune │ │ │ │ │ + 107 │ │ │ │ │ + 108#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH │ │ │ │ │ +localfiniteelementvariantcache.hh │ │ │ │ │ +raviartthomas.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RT12DLocalInterpolation │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas12dlocalinterpolation.hh:26 │ │ │ │ │ -Dune::RT12DLocalInterpolation::RT12DLocalInterpolation │ │ │ │ │ -RT12DLocalInterpolation(std::bitset< 3 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 8. │ │ │ │ │ -Definition raviartthomas12dlocalinterpolation.hh:35 │ │ │ │ │ -Dune::RT12DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Interpolate a given function with shape functions. │ │ │ │ │ -Definition raviartthomas12dlocalinterpolation.hh:59 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalFiniteElementVariantCache │ │ │ │ │ +A cache storing a compile time selection of local finite element │ │ │ │ │ +implementations. │ │ │ │ │ +Definition localfiniteelementvariantcache.hh:68 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00176.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas12dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomascube.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,68 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas12dlocalbasis.hh File Reference
│ │ │ │ +
raviartthomascube.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include "../../common/localbasis.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::RT12DLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference triangle. 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...
 
class  Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 3 >
 Raviart-Thomas local finite elements for cubes with dimension 2 and order 3. 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
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

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

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,26 +7,57 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas12d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas12dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localbasis.hh" │ │ │ │ │ +raviartthomascube.hh File Reference │ │ │ │ │ +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::RT12DLocalBasis<_D,_R_> │ │ │ │ │ -  First order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ - 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... │ │ │ │ │ +  │ │ │ │ │ +class  Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_3_> │ │ │ │ │ +  Raviart-Thomas local finite elements for cubes with dimension 2 and │ │ │ │ │ + order 3. 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 │ │ │ │ │   │ │ │ │ │ +***** Detailed Description ***** │ │ │ │ │ +Convenience header that includes all available Raviart-Thomas local finite │ │ │ │ │ +elements for cubes. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00176_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas12dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomascube.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,215 +70,213 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas12dlocalbasis.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_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH
│ │ │ │
7
│ │ │ │ -
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
│ │ │ │ -
│ │ │ │ -
46 unsigned int size () const
│ │ │ │ -
47 {
│ │ │ │ -
48 return 8;
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
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]);
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
15
│ │ │ │ +
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 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 };
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
107 {}
│ │ │ │
│ │ │ │ -
197}
│ │ │ │ -
198#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH
│ │ │ │ +
108 };
│ │ │ │ +
│ │ │ │ +
109
│ │ │ │ +
113 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
115 : public RT4Cube2DLocalFiniteElement<D, R>
│ │ │ │ +
116 {
│ │ │ │ +
117 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
120 {}
│ │ │ │ +
│ │ │ │ +
121
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
124 {}
│ │ │ │ +
│ │ │ │ +
125 };
│ │ │ │ +
│ │ │ │ +
126
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,230 +8,222 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas12d │ │ │ │ │ -raviartthomas12dlocalbasis.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_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include "../../common/localbasis.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 26 template │ │ │ │ │ -27 class RT12DLocalBasis │ │ │ │ │ - 28 { │ │ │ │ │ - 29 │ │ │ │ │ - 30 public: │ │ │ │ │ - 31 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -32 Dune::FieldMatrix > 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 │ │ │ │ │ -46 unsigned int size () const │ │ │ │ │ - 47 { │ │ │ │ │ - 48 return 8; │ │ │ │ │ - 49 } │ │ │ │ │ - 50 │ │ │ │ │ -57 inline void evaluateFunction (const typename Traits::DomainType& 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 │ │ │ │ │ -85 inline void evaluateJacobian (const typename Traits::DomainType& 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]); │ │ │ │ │ + 8#include "raviartthomas0cube2d.hh" │ │ │ │ │ + 9#include "raviartthomas0cube3d.hh" │ │ │ │ │ + 10#include "raviartthomas1cube2d.hh" │ │ │ │ │ + 11#include "raviartthomas1cube3d.hh" │ │ │ │ │ + 12#include "raviartthomas2cube2d.hh" │ │ │ │ │ + 13#include "raviartthomas3cube2d.hh" │ │ │ │ │ + 14#include "raviartthomas4cube2d.hh" │ │ │ │ │ + 15 │ │ │ │ │ + 22namespace Dune │ │ │ │ │ + 23{ │ │ │ │ │ + 39 template │ │ │ │ │ +40 class RaviartThomasCubeLocalFiniteElement; │ │ │ │ │ + 41 │ │ │ │ │ + 45 template │ │ │ │ │ +46 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ + 47 : public RT0Cube2DLocalFiniteElement │ │ │ │ │ + 48 { │ │ │ │ │ + 49 public: │ │ │ │ │ +50 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ + 51 : RT0Cube2DLocalFiniteElement::RT0Cube2DLocalFiniteElement() │ │ │ │ │ + 52 {} │ │ │ │ │ + 53 │ │ │ │ │ +54 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ + 55 : RT0Cube2DLocalFiniteElement::RT0Cube2DLocalFiniteElement(s) │ │ │ │ │ + 56 {} │ │ │ │ │ + 57 }; │ │ │ │ │ + 58 │ │ │ │ │ + 62 template │ │ │ │ │ +63 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ + 64 : public RT1Cube2DLocalFiniteElement │ │ │ │ │ + 65 { │ │ │ │ │ + 66 public: │ │ │ │ │ +67 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ + 68 : RT1Cube2DLocalFiniteElement::RT1Cube2DLocalFiniteElement() │ │ │ │ │ + 69 {} │ │ │ │ │ + 70 │ │ │ │ │ +71 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ + 72 : RT1Cube2DLocalFiniteElement::RT1Cube2DLocalFiniteElement(s) │ │ │ │ │ + 73 {} │ │ │ │ │ + 74 }; │ │ │ │ │ + 75 │ │ │ │ │ + 79 template │ │ │ │ │ +80 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ + 81 : public RT2Cube2DLocalFiniteElement │ │ │ │ │ + 82 { │ │ │ │ │ + 83 public: │ │ │ │ │ +84 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ + 85 : RT2Cube2DLocalFiniteElement::RT2Cube2DLocalFiniteElement() │ │ │ │ │ + 86 {} │ │ │ │ │ + 87 │ │ │ │ │ +88 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ + 89 : RT2Cube2DLocalFiniteElement::RT2Cube2DLocalFiniteElement(s) │ │ │ │ │ + 90 {} │ │ │ │ │ + 91 }; │ │ │ │ │ + 92 │ │ │ │ │ + 96 template │ │ │ │ │ +97 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ + 98 : public RT3Cube2DLocalFiniteElement │ │ │ │ │ + 99 { │ │ │ │ │ + 100 public: │ │ │ │ │ +101 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ + 102 : RT3Cube2DLocalFiniteElement::RT3Cube2DLocalFiniteElement() │ │ │ │ │ + 103 {} │ │ │ │ │ 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]; │ │ │ │ │ +105 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ + 106 : RT3Cube2DLocalFiniteElement::RT3Cube2DLocalFiniteElement(s) │ │ │ │ │ + 107 {} │ │ │ │ │ + 108 }; │ │ │ │ │ 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& order, │ │ │ │ │ - 133 const typename Traits::DomainType& in, // position │ │ │ │ │ - 134 std::vector& 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 sign_; │ │ │ │ │ - 196 }; │ │ │ │ │ - 197} │ │ │ │ │ - 198#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH │ │ │ │ │ + 113 template │ │ │ │ │ +114 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ + 115 : public RT4Cube2DLocalFiniteElement │ │ │ │ │ + 116 { │ │ │ │ │ + 117 public: │ │ │ │ │ +118 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ + 119 : RT4Cube2DLocalFiniteElement::RT4Cube2DLocalFiniteElement() │ │ │ │ │ + 120 {} │ │ │ │ │ + 121 │ │ │ │ │ +122 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ + 123 : RT4Cube2DLocalFiniteElement::RT4Cube2DLocalFiniteElement(s) │ │ │ │ │ + 124 {} │ │ │ │ │ + 125 }; │ │ │ │ │ + 126 │ │ │ │ │ + 130 template │ │ │ │ │ +131 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ + 132 : public RT0Cube3DLocalFiniteElement │ │ │ │ │ + 133 { │ │ │ │ │ + 134 public: │ │ │ │ │ +135 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ + 136 : RT0Cube3DLocalFiniteElement::RT0Cube3DLocalFiniteElement() │ │ │ │ │ + 137 {} │ │ │ │ │ + 138 │ │ │ │ │ +139 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ + 140 : RT0Cube3DLocalFiniteElement::RT0Cube3DLocalFiniteElement(s) │ │ │ │ │ + 141 {} │ │ │ │ │ + 142 }; │ │ │ │ │ + 143 │ │ │ │ │ + 147 template │ │ │ │ │ +148 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ + 149 : public RT1Cube3DLocalFiniteElement │ │ │ │ │ + 150 { │ │ │ │ │ + 151 public: │ │ │ │ │ +152 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ + 153 : RT1Cube3DLocalFiniteElement::RT1Cube3DLocalFiniteElement() │ │ │ │ │ + 154 {} │ │ │ │ │ + 155 │ │ │ │ │ +156 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ + 157 : RT1Cube3DLocalFiniteElement::RT1Cube3DLocalFiniteElement(s) │ │ │ │ │ + 158 {} │ │ │ │ │ + 159 }; │ │ │ │ │ + 160} // namespace Dune │ │ │ │ │ + 161 │ │ │ │ │ + 162#endif // #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH │ │ │ │ │ +raviartthomas0cube2d.hh │ │ │ │ │ +raviartthomas2cube2d.hh │ │ │ │ │ +raviartthomas1cube3d.hh │ │ │ │ │ +raviartthomas0cube3d.hh │ │ │ │ │ +raviartthomas4cube2d.hh │ │ │ │ │ +raviartthomas3cube2d.hh │ │ │ │ │ +raviartthomas1cube2d.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::RT12DLocalBasis │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ -Definition raviartthomas12dlocalbasis.hh:28 │ │ │ │ │ -Dune::RT12DLocalBasis::RT12DLocalBasis │ │ │ │ │ -RT12DLocalBasis(std::bitset< 3 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 8. │ │ │ │ │ -Definition raviartthomas12dlocalbasis.hh:39 │ │ │ │ │ -Dune::RT12DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition raviartthomas12dlocalbasis.hh:46 │ │ │ │ │ -Dune::RT12DLocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::RT12DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition raviartthomas12dlocalbasis.hh:85 │ │ │ │ │ -Dune::RT12DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition raviartthomas12dlocalbasis.hh:189 │ │ │ │ │ -Dune::RT12DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ -2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ -Definition raviartthomas12dlocalbasis.hh:32 │ │ │ │ │ -Dune::RT12DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition raviartthomas12dlocalbasis.hh:57 │ │ │ │ │ +Dune::RT0Cube2DLocalFiniteElement │ │ │ │ │ +Zero order Raviart-Thomas shape functions on rectangles. │ │ │ │ │ +Definition raviartthomas0cube2d.hh:25 │ │ │ │ │ +Dune::RT0Cube3DLocalFiniteElement │ │ │ │ │ +Zero order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +Definition raviartthomas0cube3d.hh:25 │ │ │ │ │ +Dune::RT1Cube2DLocalFiniteElement │ │ │ │ │ +First order Raviart-Thomas shape functions on quadrilaterals. │ │ │ │ │ +Definition raviartthomas1cube2d.hh:28 │ │ │ │ │ +Dune::RT1Cube3DLocalFiniteElement │ │ │ │ │ +First order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +Definition raviartthomas1cube3d.hh:27 │ │ │ │ │ +Dune::RT2Cube2DLocalFiniteElement │ │ │ │ │ +Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +Definition raviartthomas2cube2d.hh:27 │ │ │ │ │ +Dune::RT3Cube2DLocalFiniteElement │ │ │ │ │ +Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +Definition raviartthomas3cube2d.hh:29 │ │ │ │ │ +Dune::RT4Cube2DLocalFiniteElement │ │ │ │ │ +Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +Definition raviartthomas4cube2d.hh:29 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +Raviart-Thomas local finite elements for cubes. │ │ │ │ │ +Definition raviartthomascube.hh:40 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_0_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +Definition raviartthomascube.hh:54 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_0_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +Definition raviartthomascube.hh:50 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_1_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +Definition raviartthomascube.hh:67 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_1_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +Definition raviartthomascube.hh:71 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_2_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +Definition raviartthomascube.hh:84 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_2_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +Definition raviartthomascube.hh:88 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_3_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +Definition raviartthomascube.hh:105 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_3_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +Definition raviartthomascube.hh:101 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_4_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +Definition raviartthomascube.hh:122 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_4_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +Definition raviartthomascube.hh:118 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_3,_0_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +Definition raviartthomascube.hh:135 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_3,_0_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +Definition raviartthomascube.hh:139 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_3,_1_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +Definition raviartthomascube.hh:152 │ │ │ │ │ +Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_3,_1_>:: │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +Definition raviartthomascube.hh:156 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00179.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas2cube2dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas2cube2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,36 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas2cube2dlocalcoefficients.hh File Reference
│ │ │ │ +
raviartthomas2cube2d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../../common/localkey.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::RT2Cube2DLocalCoefficients
 Layout map for Raviart-Thomas-2 elements on quadrilaterals. More...
class  Dune::RT2Cube2DLocalFiniteElement< D, R >
 Second order Raviart-Thomas shape functions on cubes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,24 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas2cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas2cube2dlocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localkey.hh" │ │ │ │ │ +raviartthomas2cube2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#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::RT2Cube2DLocalCoefficients │ │ │ │ │ -  Layout map for Raviart-Thomas-2 elements on quadrilaterals. More... │ │ │ │ │ +class  Dune::RT2Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on cubes. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00179_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas2cube2dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas2cube2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,83 +70,123 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas2cube2dlocalcoefficients.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_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
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[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 }
│ │ │ │ -
│ │ │ │ -
41
│ │ │ │ -
│ │ │ │ -
43 std::size_t size () const
│ │ │ │ -
44 {
│ │ │ │ -
45 return 24;
│ │ │ │ -
46 }
│ │ │ │ +
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 {}
│ │ │ │
│ │ │ │ -
47
│ │ │ │ +
48
│ │ │ │
│ │ │ │ -
49 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
49 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │
50 {
│ │ │ │ -
51 return li[i];
│ │ │ │ +
51 return basis;
│ │ │ │
52 }
│ │ │ │
│ │ │ │
53
│ │ │ │ -
54 private:
│ │ │ │ -
55 std::vector<LocalKey> li;
│ │ │ │ -
56 };
│ │ │ │ -
│ │ │ │ -
57}
│ │ │ │ -
58#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
Second order Raviart-Thomas shape functions on the reference triangle.
Definition raviartthomas2cube2dlocalinterpolation.hh:26
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -8,82 +8,137 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas2cube2d │ │ │ │ │ -raviartthomas2cube2dlocalcoefficients.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_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include "../../common/localkey.hh" │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ -22 class RT2Cube2DLocalCoefficients │ │ │ │ │ - 23 { │ │ │ │ │ - 24 │ │ │ │ │ - 25 public: │ │ │ │ │ -27 RT2Cube2DLocalCoefficients () : li(24) │ │ │ │ │ - 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 } │ │ │ │ │ - 41 │ │ │ │ │ -43 std::size_t size () const │ │ │ │ │ - 44 { │ │ │ │ │ - 45 return 24; │ │ │ │ │ - 46 } │ │ │ │ │ - 47 │ │ │ │ │ -49 const LocalKey& localKey (std::size_t i) const │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ + 11#include "raviartthomas2cube2d/raviartthomas2cube2dlocalbasis.hh" │ │ │ │ │ + 12#include "raviartthomas2cube2d/raviartthomas2cube2dlocalcoefficients.hh" │ │ │ │ │ + 13#include "raviartthomas2cube2d/raviartthomas2cube2dlocalinterpolation.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 25 template │ │ │ │ │ +26 class RT2Cube2DLocalFiniteElement │ │ │ │ │ + 27 { │ │ │ │ │ + 28 │ │ │ │ │ + 29 public: │ │ │ │ │ + 30 typedef LocalFiniteElementTraits< │ │ │ │ │ + 31 RT2Cube2DLocalBasis, │ │ │ │ │ + 32 RT2Cube2DLocalCoefficients, │ │ │ │ │ +33 RT2Cube2DLocalInterpolation > > Traits; │ │ │ │ │ + 34 │ │ │ │ │ +36 RT2Cube2DLocalFiniteElement () │ │ │ │ │ + 37 {} │ │ │ │ │ + 38 │ │ │ │ │ +44 RT2Cube2DLocalFiniteElement (int s) : │ │ │ │ │ + 45 basis(s), │ │ │ │ │ + 46 interpolation(s) │ │ │ │ │ + 47 {} │ │ │ │ │ + 48 │ │ │ │ │ +49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ 50 { │ │ │ │ │ - 51 return li[i]; │ │ │ │ │ + 51 return basis; │ │ │ │ │ 52 } │ │ │ │ │ 53 │ │ │ │ │ - 54 private: │ │ │ │ │ - 55 std::vector li; │ │ │ │ │ - 56 }; │ │ │ │ │ - 57} │ │ │ │ │ - 58#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ +54 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 55 { │ │ │ │ │ + 56 return coefficients; │ │ │ │ │ + 57 } │ │ │ │ │ + 58 │ │ │ │ │ +59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 76 RT2Cube2DLocalBasis basis; │ │ │ │ │ + 77 RT2Cube2DLocalCoefficients coefficients; │ │ │ │ │ + 78 RT2Cube2DLocalInterpolation > interpolation; │ │ │ │ │ + 79 }; │ │ │ │ │ + 80} │ │ │ │ │ + 81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +raviartthomas2cube2dlocalinterpolation.hh │ │ │ │ │ +raviartthomas2cube2dlocalcoefficients.hh │ │ │ │ │ +raviartthomas2cube2dlocalbasis.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::RT2Cube2DLocalFiniteElement │ │ │ │ │ +Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +Definition raviartthomas2cube2d.hh:27 │ │ │ │ │ +Dune::RT2Cube2DLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition raviartthomas2cube2d.hh:49 │ │ │ │ │ +Dune::RT2Cube2DLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< RT2Cube2DLocalBasis< D, R >, │ │ │ │ │ +RT2Cube2DLocalCoefficients, RT2Cube2DLocalInterpolation< RT2Cube2DLocalBasis< │ │ │ │ │ +D, R > > > Traits │ │ │ │ │ +Definition raviartthomas2cube2d.hh:33 │ │ │ │ │ +Dune::RT2Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition raviartthomas2cube2d.hh:54 │ │ │ │ │ +Dune::RT2Cube2DLocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition raviartthomas2cube2d.hh:65 │ │ │ │ │ +Dune::RT2Cube2DLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition raviartthomas2cube2d.hh:70 │ │ │ │ │ +Dune::RT2Cube2DLocalFiniteElement::RT2Cube2DLocalFiniteElement │ │ │ │ │ +RT2Cube2DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition raviartthomas2cube2d.hh:44 │ │ │ │ │ +Dune::RT2Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition raviartthomas2cube2d.hh:59 │ │ │ │ │ +Dune::RT2Cube2DLocalFiniteElement::RT2Cube2DLocalFiniteElement │ │ │ │ │ +RT2Cube2DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas2cube2d.hh:36 │ │ │ │ │ +Dune::RT2Cube2DLocalBasis │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas2cube2dlocalbasis.hh:28 │ │ │ │ │ Dune::RT2Cube2DLocalCoefficients │ │ │ │ │ Layout map for Raviart-Thomas-2 elements on quadrilaterals. │ │ │ │ │ Definition raviartthomas2cube2dlocalcoefficients.hh:23 │ │ │ │ │ -Dune::RT2Cube2DLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition raviartthomas2cube2dlocalcoefficients.hh:43 │ │ │ │ │ -Dune::RT2Cube2DLocalCoefficients::RT2Cube2DLocalCoefficients │ │ │ │ │ -RT2Cube2DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas2cube2dlocalcoefficients.hh:27 │ │ │ │ │ -Dune::RT2Cube2DLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition raviartthomas2cube2dlocalcoefficients.hh:49 │ │ │ │ │ +Dune::RT2Cube2DLocalInterpolation │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +Definition raviartthomas2cube2dlocalinterpolation.hh:26 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00182.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas2cube2dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas2cube2dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,28 +72,27 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas2cube2dlocalbasis.hh File Reference
│ │ │ │ +
raviartthomas2cube2dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include "../../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::RT2Cube2DLocalBasis< D, R >
 Second order Raviart-Thomas shape functions on the reference quadrilateral. More...
class  Dune::RT2Cube2DLocalInterpolation< LB >
 Second order Raviart-Thomas shape functions on the reference triangle. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -9,24 +9,23 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ * raviartthomas2cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas2cube2dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas2cube2dlocalinterpolation.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localbasis.hh" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT2Cube2DLocalBasis<_D,_R_> │ │ │ │ │ -  Second order Raviart-Thomas shape functions on the reference │ │ │ │ │ - quadrilateral. More... │ │ │ │ │ +class  Dune::RT2Cube2DLocalInterpolation<_LB_> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00182_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas2cube2dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas2cube2dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,296 +74,136 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
raviartthomas2cube2dlocalbasis.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_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/fmatrix.hh>
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │
12
│ │ │ │ -
13#include "../../common/localbasis.hh"
│ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
26 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
28 {
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
24 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27
│ │ │ │ +
28 public:
│ │ │ │
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
│ │ │ │ -
│ │ │ │ -
61 unsigned int size () const
│ │ │ │ -
62 {
│ │ │ │ -
63 return 24;
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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 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 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
│ │ │ │ -
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 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 };
│ │ │ │ +
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 };
│ │ │ │
│ │ │ │ -
282}
│ │ │ │ -
283#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
128}
│ │ │ │ +
129#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -9,437 +9,142 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ * raviartthomas2cube2d │ │ │ │ │ -raviartthomas2cube2dlocalbasis.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_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13#include "../../common/localbasis.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 26 template │ │ │ │ │ -27 class RT2Cube2DLocalBasis │ │ │ │ │ - 28 { │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ + 24 template │ │ │ │ │ +25 class RT2Cube2DLocalInterpolation │ │ │ │ │ + 26 { │ │ │ │ │ + 27 │ │ │ │ │ + 28 public: │ │ │ │ │ 29 │ │ │ │ │ - 30 public: │ │ │ │ │ - 31 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -32 Dune::FieldMatrix > 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 │ │ │ │ │ -61 unsigned int size () const │ │ │ │ │ - 62 { │ │ │ │ │ - 63 return 24; │ │ │ │ │ - 64 } │ │ │ │ │ +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 │ │ │ │ │ +55 void interpolate (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 │ │ │ │ │ -72 inline void evaluateFunction (const typename Traits::DomainType& 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 │ │ │ │ │ -133 inline void evaluateJacobian (const typename Traits::DomainType& 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 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 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 │ │ │ │ │ - 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 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& order, │ │ │ │ │ - 262 const typename Traits::DomainType& in, // position │ │ │ │ │ - 263 std::vector& 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 │ │ │ │ │ + 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::RT2Cube2DLocalBasis │ │ │ │ │ -Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas2cube2dlocalbasis.hh:28 │ │ │ │ │ -Dune::RT2Cube2DLocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::RT2Cube2DLocalBasis::RT2Cube2DLocalBasis │ │ │ │ │ -RT2Cube2DLocalBasis(unsigned int s=0) │ │ │ │ │ +Dune::RT2Cube2DLocalInterpolation │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +Definition raviartthomas2cube2dlocalinterpolation.hh:26 │ │ │ │ │ +Dune::RT2Cube2DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +Definition raviartthomas2cube2dlocalinterpolation.hh:55 │ │ │ │ │ +Dune::RT2Cube2DLocalInterpolation::RT2Cube2DLocalInterpolation │ │ │ │ │ +RT2Cube2DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition raviartthomas2cube2dlocalbasis.hh:39 │ │ │ │ │ -Dune::RT2Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition raviartthomas2cube2dlocalbasis.hh:133 │ │ │ │ │ -Dune::RT2Cube2DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition raviartthomas2cube2dlocalbasis.hh:274 │ │ │ │ │ -Dune::RT2Cube2DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ -2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ -Definition raviartthomas2cube2dlocalbasis.hh:32 │ │ │ │ │ -Dune::RT2Cube2DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition raviartthomas2cube2dlocalbasis.hh:61 │ │ │ │ │ -Dune::RT2Cube2DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition raviartthomas2cube2dlocalbasis.hh:72 │ │ │ │ │ +Definition raviartthomas2cube2dlocalinterpolation.hh:35 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00185.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas2cube2dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas2cube2dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,27 +72,27 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas2cube2dlocalinterpolation.hh File Reference
│ │ │ │ +
raviartthomas2cube2dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.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...
class  Dune::RT2Cube2DLocalCoefficients
 Layout map for Raviart-Thomas-2 elements on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -9,23 +9,22 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ * raviartthomas2cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas2cube2dlocalinterpolation.hh File Reference │ │ │ │ │ +raviartthomas2cube2dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include "../../common/localkey.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... │ │ │ │ │ +class  Dune::RT2Cube2DLocalCoefficients │ │ │ │ │ +  Layout map for Raviart-Thomas-2 elements on quadrilaterals. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00185_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas2cube2dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas2cube2dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,136 +74,79 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
raviartthomas2cube2dlocalinterpolation.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_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_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/geometry/quadraturerules.hh>
│ │ │ │ - │ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include "../../common/localkey.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 };
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 {
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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 };
│ │ │ │
│ │ │ │ -
128}
│ │ │ │ -
129#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
57}
│ │ │ │ +
58#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -9,142 +9,81 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ * raviartthomas2cube2d │ │ │ │ │ -raviartthomas2cube2dlocalinterpolation.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_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include "../../common/localkey.hh" │ │ │ │ │ 12 │ │ │ │ │ 13namespace Dune │ │ │ │ │ 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 24 template │ │ │ │ │ -25 class RT2Cube2DLocalInterpolation │ │ │ │ │ - 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 │ │ │ │ │ -55 void interpolate (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 │ │ │ │ │ +22 class RT2Cube2DLocalCoefficients │ │ │ │ │ + 23 { │ │ │ │ │ + 24 │ │ │ │ │ + 25 public: │ │ │ │ │ +27 RT2Cube2DLocalCoefficients () : li(24) │ │ │ │ │ + 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 } │ │ │ │ │ + 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 li; │ │ │ │ │ + 56 }; │ │ │ │ │ + 57} │ │ │ │ │ + 58#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RT2Cube2DLocalInterpolation │ │ │ │ │ -Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ -Definition raviartthomas2cube2dlocalinterpolation.hh:26 │ │ │ │ │ -Dune::RT2Cube2DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Interpolate a given function with shape functions. │ │ │ │ │ -Definition raviartthomas2cube2dlocalinterpolation.hh:55 │ │ │ │ │ -Dune::RT2Cube2DLocalInterpolation::RT2Cube2DLocalInterpolation │ │ │ │ │ -RT2Cube2DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition raviartthomas2cube2dlocalinterpolation.hh:35 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::RT2Cube2DLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-2 elements on quadrilaterals. │ │ │ │ │ +Definition raviartthomas2cube2dlocalcoefficients.hh:23 │ │ │ │ │ +Dune::RT2Cube2DLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition raviartthomas2cube2dlocalcoefficients.hh:43 │ │ │ │ │ +Dune::RT2Cube2DLocalCoefficients::RT2Cube2DLocalCoefficients │ │ │ │ │ +RT2Cube2DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas2cube2dlocalcoefficients.hh:27 │ │ │ │ │ +Dune::RT2Cube2DLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition raviartthomas2cube2dlocalcoefficients.hh:49 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00188.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0prism.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas2cube2dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,35 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0prism.hh File Reference
│ │ │ │ +
raviartthomas2cube2dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include "../common/localfiniteelementtraits.hh"
│ │ │ │ -#include "raviartthomas0prism/raviartthomas0prismlocalbasis.hh"
│ │ │ │ -#include "raviartthomas0prism/raviartthomas0prismlocalcoefficients.hh"
│ │ │ │ -#include "raviartthomas0prism/raviartthomas0prismlocalinterpolation.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::RT0PrismLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on prisms. More...
class  Dune::RT2Cube2DLocalBasis< D, R >
 Second order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,26 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ + * raviartthomas2cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas0prism.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "raviartthomas0prism/raviartthomas0prismlocalbasis.hh" │ │ │ │ │ -#include "raviartthomas0prism/raviartthomas0prismlocalcoefficients.hh" │ │ │ │ │ -#include "raviartthomas0prism/raviartthomas0prismlocalinterpolation.hh" │ │ │ │ │ +raviartthomas2cube2dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT0PrismLocalFiniteElement<_D,_R_> │ │ │ │ │ -  First order Raviart-Thomas shape functions on prisms. More... │ │ │ │ │ +class  Dune::RT2Cube2DLocalBasis<_D,_R_> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00188_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0prism.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas2cube2dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,124 +70,300 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas0prism.hh
│ │ │ │ +
raviartthomas2cube2dlocalbasis.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_PRISM_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ -
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <numeric>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │ +
12
│ │ │ │ +
13#include "../../common/localbasis.hh"
│ │ │ │
14
│ │ │ │
15namespace Dune
│ │ │ │
16{
│ │ │ │ -
25 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
27 {
│ │ │ │ -
28
│ │ │ │ -
29 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
34
│ │ │ │ -
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;
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
61 unsigned int size () const
│ │ │ │ +
62 {
│ │ │ │ +
63 return 24;
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │ +
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 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 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
│ │ │ │ +
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 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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,138 +8,438 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -raviartthomas0prism.hh │ │ │ │ │ + * raviartthomas2cube2d │ │ │ │ │ +raviartthomas2cube2dlocalbasis.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_PRISM_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "raviartthomas0prism/raviartthomas0prismlocalbasis.hh" │ │ │ │ │ - 12#include "raviartthomas0prism/raviartthomas0prismlocalcoefficients.hh" │ │ │ │ │ - 13#include "raviartthomas0prism/raviartthomas0prismlocalinterpolation.hh" │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include "../../common/localbasis.hh" │ │ │ │ │ 14 │ │ │ │ │ 15namespace Dune │ │ │ │ │ 16{ │ │ │ │ │ - 25 template │ │ │ │ │ -26 class RT0PrismLocalFiniteElement │ │ │ │ │ - 27 { │ │ │ │ │ - 28 │ │ │ │ │ - 29 public: │ │ │ │ │ - 30 typedef LocalFiniteElementTraits< │ │ │ │ │ - 31 RT0PrismLocalBasis, │ │ │ │ │ - 32 RT0PrismLocalCoefficients, │ │ │ │ │ -33 RT0PrismLocalInterpolation > > Traits; │ │ │ │ │ - 34 │ │ │ │ │ - 35 │ │ │ │ │ -37 RT0PrismLocalFiniteElement () │ │ │ │ │ - 38 {} │ │ │ │ │ - 39 │ │ │ │ │ -45 RT0PrismLocalFiniteElement (int s) : │ │ │ │ │ - 46 basis(s), │ │ │ │ │ - 47 interpolation(s) │ │ │ │ │ - 48 {} │ │ │ │ │ - 49 │ │ │ │ │ -50 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 26 template │ │ │ │ │ +27 class RT2Cube2DLocalBasis │ │ │ │ │ + 28 { │ │ │ │ │ + 29 │ │ │ │ │ + 30 public: │ │ │ │ │ + 31 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +32 Dune::FieldMatrix > 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 return basis; │ │ │ │ │ + 52 sign2 = -1.0; │ │ │ │ │ 53 } │ │ │ │ │ - 54 │ │ │ │ │ -55 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 56 { │ │ │ │ │ - 57 return coefficients; │ │ │ │ │ + 54 if (s & 8) │ │ │ │ │ + 55 { │ │ │ │ │ + 56 sign3 = -1.0; │ │ │ │ │ + 57 } │ │ │ │ │ 58 } │ │ │ │ │ 59 │ │ │ │ │ -60 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 77 RT0PrismLocalBasis basis; │ │ │ │ │ - 78 RT0PrismLocalCoefficients coefficients; │ │ │ │ │ - 79 RT0PrismLocalInterpolation > interpolation; │ │ │ │ │ - 80 }; │ │ │ │ │ - 81} │ │ │ │ │ - 82#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH │ │ │ │ │ -raviartthomas0prismlocalbasis.hh │ │ │ │ │ -raviartthomas0prismlocalcoefficients.hh │ │ │ │ │ -raviartthomas0prismlocalinterpolation.hh │ │ │ │ │ +61 unsigned int size () const │ │ │ │ │ + 62 { │ │ │ │ │ + 63 return 24; │ │ │ │ │ + 64 } │ │ │ │ │ + 65 │ │ │ │ │ +72 inline void evaluateFunction (const typename Traits::DomainType& 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 │ │ │ │ │ +133 inline void evaluateJacobian (const typename Traits::DomainType& 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 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 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 │ │ │ │ │ + 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 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& order, │ │ │ │ │ + 262 const typename Traits::DomainType& in, // position │ │ │ │ │ + 263 std::vector& 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::RT0PrismLocalFiniteElement │ │ │ │ │ -First order Raviart-Thomas shape functions on prisms. │ │ │ │ │ -Definition raviartthomas0prism.hh:27 │ │ │ │ │ -Dune::RT0PrismLocalFiniteElement::size │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::RT2Cube2DLocalBasis │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas2cube2dlocalbasis.hh:28 │ │ │ │ │ +Dune::RT2Cube2DLocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::RT2Cube2DLocalBasis::RT2Cube2DLocalBasis │ │ │ │ │ +RT2Cube2DLocalBasis(unsigned int s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition raviartthomas2cube2dlocalbasis.hh:39 │ │ │ │ │ +Dune::RT2Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition raviartthomas2cube2dlocalbasis.hh:133 │ │ │ │ │ +Dune::RT2Cube2DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition raviartthomas2cube2dlocalbasis.hh:274 │ │ │ │ │ +Dune::RT2Cube2DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +Definition raviartthomas2cube2dlocalbasis.hh:32 │ │ │ │ │ +Dune::RT2Cube2DLocalBasis::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition raviartthomas0prism.hh:66 │ │ │ │ │ -Dune::RT0PrismLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< RT0PrismLocalBasis< D, R >, │ │ │ │ │ -RT0PrismLocalCoefficients, RT0PrismLocalInterpolation< RT0PrismLocalBasis< D, R │ │ │ │ │ -> > > Traits │ │ │ │ │ -Definition raviartthomas0prism.hh:33 │ │ │ │ │ -Dune::RT0PrismLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition raviartthomas0prism.hh:60 │ │ │ │ │ -Dune::RT0PrismLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition raviartthomas0prism.hh:50 │ │ │ │ │ -Dune::RT0PrismLocalFiniteElement::RT0PrismLocalFiniteElement │ │ │ │ │ -RT0PrismLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas0prism.hh:37 │ │ │ │ │ -Dune::RT0PrismLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition raviartthomas0prism.hh:55 │ │ │ │ │ -Dune::RT0PrismLocalFiniteElement::RT0PrismLocalFiniteElement │ │ │ │ │ -RT0PrismLocalFiniteElement(int s) │ │ │ │ │ -Make set number s, where 0 <= s < 32. │ │ │ │ │ -Definition raviartthomas0prism.hh:45 │ │ │ │ │ -Dune::RT0PrismLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition raviartthomas0prism.hh:71 │ │ │ │ │ -Dune::RT0PrismLocalBasis │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ -Definition raviartthomas0prismlocalbasis.hh:28 │ │ │ │ │ -Dune::RT0PrismLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-1 elements on prisms. │ │ │ │ │ -Definition raviartthomas0prismlocalcoefficients.hh:24 │ │ │ │ │ -Dune::RT0PrismLocalInterpolation │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ -Definition raviartthomas0prismlocalinterpolation.hh:24 │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition raviartthomas2cube2dlocalbasis.hh:61 │ │ │ │ │ +Dune::RT2Cube2DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition raviartthomas2cube2dlocalbasis.hh:72 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00191.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube3d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,29 +72,29 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas02d.hh File Reference
│ │ │ │ +
raviartthomas1cube3d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include "raviartthomas02d/raviartthomas02dlocalbasis.hh"
│ │ │ │ -#include "raviartthomas02d/raviartthomas02dlocalcoefficients.hh"
│ │ │ │ -#include "raviartthomas02d/raviartthomas02dlocalinterpolation.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::RT02DLocalFiniteElement< D, R >
 Zero order Raviart-Thomas shape functions on triangles. More...
class  Dune::RT1Cube3DLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on cubes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -8,24 +8,24 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas02d.hh File Reference │ │ │ │ │ +raviartthomas1cube3d.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include "raviartthomas02d/raviartthomas02dlocalbasis.hh" │ │ │ │ │ -#include "raviartthomas02d/raviartthomas02dlocalcoefficients.hh" │ │ │ │ │ -#include "raviartthomas02d/raviartthomas02dlocalinterpolation.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::RT02DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  Zero order Raviart-Thomas shape functions on triangles. More... │ │ │ │ │ +class  Dune::RT1Cube3DLocalFiniteElement<_D,_R_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on cubes. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00191_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube3d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,121 +74,119 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
raviartthomas02d.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 DUNE_RAVIARTTHOMAS02DLOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_RAVIARTTHOMAS02DLOCALFINITEELEMENT_HH
│ │ │ │ +
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{
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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::hexahedron;
│ │ │ │ +
73 }
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
75 private:
│ │ │ │ + │ │ │ │ +
77 RT1Cube3DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
79 };
│ │ │ │ +
│ │ │ │ +
80}
│ │ │ │ +
81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_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 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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,137 +8,137 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -raviartthomas02d.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 DUNE_RAVIARTTHOMAS02DLOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_RAVIARTTHOMAS02DLOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include "raviartthomas02d/raviartthomas02dlocalbasis.hh" │ │ │ │ │ - 12#include "raviartthomas02d/raviartthomas02dlocalcoefficients.hh" │ │ │ │ │ - 13#include "raviartthomas02d/raviartthomas02dlocalinterpolation.hh" │ │ │ │ │ + 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ + 11#include "raviartthomas1cube3d/raviartthomas1cube3dlocalbasis.hh" │ │ │ │ │ + 12#include "raviartthomas1cube3d/raviartthomas1cube3dlocalcoefficients.hh" │ │ │ │ │ + 13#include "raviartthomas1cube3d/raviartthomas1cube3dlocalinterpolation.hh" │ │ │ │ │ 14 │ │ │ │ │ 15namespace Dune │ │ │ │ │ 16{ │ │ │ │ │ - 17 │ │ │ │ │ - 26 template │ │ │ │ │ -27 class │ │ │ │ │ - 28 RT02DLocalFiniteElement │ │ │ │ │ - 29 { │ │ │ │ │ - 30 public: │ │ │ │ │ - 31 typedef │ │ │ │ │ -LocalFiniteElementTraits,RT02DLocalCoefficients, │ │ │ │ │ -32 RT02DLocalInterpolation > > Traits; │ │ │ │ │ - 33 │ │ │ │ │ -35 RT02DLocalFiniteElement () │ │ │ │ │ - 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 │ │ │ │ │ -53 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 54 { │ │ │ │ │ - 55 return coefficients; │ │ │ │ │ - 56 } │ │ │ │ │ - 57 │ │ │ │ │ -58 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 74 RT02DLocalBasis basis; │ │ │ │ │ - 75 RT02DLocalCoefficients coefficients; │ │ │ │ │ - 76 RT02DLocalInterpolation > interpolation; │ │ │ │ │ - 77 }; │ │ │ │ │ - 78 │ │ │ │ │ - 79} │ │ │ │ │ - 80 │ │ │ │ │ - 81#endif │ │ │ │ │ -raviartthomas02dlocalcoefficients.hh │ │ │ │ │ -raviartthomas02dlocalinterpolation.hh │ │ │ │ │ -raviartthomas02dlocalbasis.hh │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ + 25 template │ │ │ │ │ +26 class RT1Cube3DLocalFiniteElement │ │ │ │ │ + 27 { │ │ │ │ │ + 28 │ │ │ │ │ + 29 public: │ │ │ │ │ + 30 typedef LocalFiniteElementTraits< │ │ │ │ │ + 31 RT1Cube3DLocalBasis, │ │ │ │ │ + 32 RT1Cube3DLocalCoefficients, │ │ │ │ │ +33 RT1Cube3DLocalInterpolation > > Traits; │ │ │ │ │ + 34 │ │ │ │ │ +36 RT1Cube3DLocalFiniteElement () │ │ │ │ │ + 37 {} │ │ │ │ │ + 38 │ │ │ │ │ +44 RT1Cube3DLocalFiniteElement (int s) : │ │ │ │ │ + 45 basis(s), │ │ │ │ │ + 46 interpolation(s) │ │ │ │ │ + 47 {} │ │ │ │ │ + 48 │ │ │ │ │ +49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 50 { │ │ │ │ │ + 51 return basis; │ │ │ │ │ + 52 } │ │ │ │ │ + 53 │ │ │ │ │ +54 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 55 { │ │ │ │ │ + 56 return coefficients; │ │ │ │ │ + 57 } │ │ │ │ │ + 58 │ │ │ │ │ +59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 76 RT1Cube3DLocalBasis basis; │ │ │ │ │ + 77 RT1Cube3DLocalCoefficients coefficients; │ │ │ │ │ + 78 RT1Cube3DLocalInterpolation > interpolation; │ │ │ │ │ + 79 }; │ │ │ │ │ + 80} │ │ │ │ │ + 81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ +raviartthomas1cube3dlocalcoefficients.hh │ │ │ │ │ +raviartthomas1cube3dlocalbasis.hh │ │ │ │ │ +raviartthomas1cube3dlocalinterpolation.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalFiniteElementTraits │ │ │ │ │ traits helper struct │ │ │ │ │ Definition localfiniteelementtraits.hh:13 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ LB LocalBasisType │ │ │ │ │ Definition localfiniteelementtraits.hh:16 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ LC LocalCoefficientsType │ │ │ │ │ Definition localfiniteelementtraits.hh:20 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ LI LocalInterpolationType │ │ │ │ │ Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::RT02DLocalFiniteElement │ │ │ │ │ -Zero order Raviart-Thomas shape functions on triangles. │ │ │ │ │ -Definition raviartthomas02d.hh:29 │ │ │ │ │ -Dune::RT02DLocalFiniteElement::RT02DLocalFiniteElement │ │ │ │ │ -RT02DLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas02d.hh:35 │ │ │ │ │ -Dune::RT02DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< RT02DLocalBasis< D, R >, RT02DLocalCoefficients, │ │ │ │ │ -RT02DLocalInterpolation< RT02DLocalBasis< D, R > > > Traits │ │ │ │ │ -Definition raviartthomas02d.hh:32 │ │ │ │ │ -Dune::RT02DLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition raviartthomas02d.hh:68 │ │ │ │ │ -Dune::RT02DLocalFiniteElement::localInterpolation │ │ │ │ │ +Dune::RT1Cube3DLocalFiniteElement │ │ │ │ │ +First order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +Definition raviartthomas1cube3d.hh:27 │ │ │ │ │ +Dune::RT1Cube3DLocalFiniteElement::localInterpolation │ │ │ │ │ const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition raviartthomas02d.hh:58 │ │ │ │ │ -Dune::RT02DLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition raviartthomas02d.hh:48 │ │ │ │ │ -Dune::RT02DLocalFiniteElement::RT02DLocalFiniteElement │ │ │ │ │ -RT02DLocalFiniteElement(std::bitset< 3 > s) │ │ │ │ │ -Constructor with explicitly given edge orientations. │ │ │ │ │ -Definition raviartthomas02d.hh:43 │ │ │ │ │ -Dune::RT02DLocalFiniteElement::localCoefficients │ │ │ │ │ +Definition raviartthomas1cube3d.hh:59 │ │ │ │ │ +Dune::RT1Cube3DLocalFiniteElement::localCoefficients │ │ │ │ │ const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition raviartthomas02d.hh:53 │ │ │ │ │ -Dune::RT02DLocalFiniteElement::size │ │ │ │ │ +Definition raviartthomas1cube3d.hh:54 │ │ │ │ │ +Dune::RT1Cube3DLocalFiniteElement::RT1Cube3DLocalFiniteElement │ │ │ │ │ +RT1Cube3DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas1cube3d.hh:36 │ │ │ │ │ +Dune::RT1Cube3DLocalFiniteElement::RT1Cube3DLocalFiniteElement │ │ │ │ │ +RT1Cube3DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 64. │ │ │ │ │ +Definition raviartthomas1cube3d.hh:44 │ │ │ │ │ +Dune::RT1Cube3DLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< RT1Cube3DLocalBasis< D, R >, │ │ │ │ │ +RT1Cube3DLocalCoefficients, RT1Cube3DLocalInterpolation< RT1Cube3DLocalBasis< │ │ │ │ │ +D, R > > > Traits │ │ │ │ │ +Definition raviartthomas1cube3d.hh:33 │ │ │ │ │ +Dune::RT1Cube3DLocalFiniteElement::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Definition raviartthomas02d.hh:63 │ │ │ │ │ -Dune::RT02DLocalBasis │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ -Definition raviartthomas02dlocalbasis.hh:26 │ │ │ │ │ -Dune::RT02DLocalCoefficients │ │ │ │ │ -Layout map for RT0 elements. │ │ │ │ │ -Definition raviartthomas02dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::RT02DLocalInterpolation │ │ │ │ │ -Definition raviartthomas02dlocalinterpolation.hh:18 │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition raviartthomas1cube3d.hh:65 │ │ │ │ │ +Dune::RT1Cube3DLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition raviartthomas1cube3d.hh:70 │ │ │ │ │ +Dune::RT1Cube3DLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition raviartthomas1cube3d.hh:49 │ │ │ │ │ +Dune::RT1Cube3DLocalBasis │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +Definition raviartthomas1cube3dlocalbasis.hh:28 │ │ │ │ │ +Dune::RT1Cube3DLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ │ +Definition raviartthomas1cube3dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::RT1Cube3DLocalInterpolation │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +Definition raviartthomas1cube3dlocalinterpolation.hh:25 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00194.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0pyramidlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas02dlocalcoefficients.hh File Reference
│ │ │ │ +
raviartthomas0pyramidlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <cstddef>
│ │ │ │ -#include <iostream>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::RT02DLocalCoefficients
 Layout map for RT0 elements. More...
class  Dune::RT0PyramidLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on pyramids. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,24 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas02d │ │ │ │ │ + * raviartthomas0pyramid │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas02dlocalcoefficients.hh File Reference │ │ │ │ │ +raviartthomas0pyramidlocalcoefficients.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include "../../common/localkey.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT02DLocalCoefficients │ │ │ │ │ -  Layout map for RT0 elements. More... │ │ │ │ │ +class  Dune::RT0PyramidLocalCoefficients │ │ │ │ │ +  Layout map for Raviart-Thomas-1 elements on pyramids. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00194_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0pyramidlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,78 +70,75 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas02dlocalcoefficients.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_RT0TRIANGLELOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_RT0TRIANGLELOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │
8#include <cstddef>
│ │ │ │ -
9#include <iostream>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
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 };
│ │ │ │ +
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 };
│ │ │ │
│ │ │ │ -
48
│ │ │ │
49}
│ │ │ │ -
50
│ │ │ │ -
51#endif
│ │ │ │ - │ │ │ │ +
50#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,77 +8,74 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas02d │ │ │ │ │ -raviartthomas02dlocalcoefficients.hh │ │ │ │ │ + * raviartthomas0pyramid │ │ │ │ │ +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_RT0TRIANGLELOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_RT0TRIANGLELOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14namespace Dune │ │ │ │ │ - 15{ │ │ │ │ │ - 16 │ │ │ │ │ -23 class RT02DLocalCoefficients │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include "../../common/localkey.hh" │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ +23 class RT0PyramidLocalCoefficients │ │ │ │ │ 24 { │ │ │ │ │ - 25 public: │ │ │ │ │ -27 RT02DLocalCoefficients () : li(3) │ │ │ │ │ - 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 li; │ │ │ │ │ - 47 }; │ │ │ │ │ - 48 │ │ │ │ │ + 25 │ │ │ │ │ + 26 public: │ │ │ │ │ +28 RT0PyramidLocalCoefficients () : li(size()) │ │ │ │ │ + 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 li; │ │ │ │ │ + 48 }; │ │ │ │ │ 49} │ │ │ │ │ - 50 │ │ │ │ │ - 51#endif │ │ │ │ │ -localkey.hh │ │ │ │ │ + 50#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalKey │ │ │ │ │ Describe position of one degree of freedom. │ │ │ │ │ Definition localkey.hh:23 │ │ │ │ │ -Dune::RT02DLocalCoefficients │ │ │ │ │ -Layout map for RT0 elements. │ │ │ │ │ -Definition raviartthomas02dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::RT02DLocalCoefficients::RT02DLocalCoefficients │ │ │ │ │ -RT02DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas02dlocalcoefficients.hh:27 │ │ │ │ │ -Dune::RT02DLocalCoefficients::localKey │ │ │ │ │ +Dune::RT0PyramidLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on pyramids. │ │ │ │ │ +Definition raviartthomas0pyramidlocalcoefficients.hh:24 │ │ │ │ │ +Dune::RT0PyramidLocalCoefficients::localKey │ │ │ │ │ const LocalKey & localKey(std::size_t i) const │ │ │ │ │ get i'th index │ │ │ │ │ -Definition raviartthomas02dlocalcoefficients.hh:40 │ │ │ │ │ -Dune::RT02DLocalCoefficients::size │ │ │ │ │ +Definition raviartthomas0pyramidlocalcoefficients.hh:41 │ │ │ │ │ +Dune::RT0PyramidLocalCoefficients::RT0PyramidLocalCoefficients │ │ │ │ │ +RT0PyramidLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas0pyramidlocalcoefficients.hh:28 │ │ │ │ │ +Dune::RT0PyramidLocalCoefficients::size │ │ │ │ │ std::size_t size() const │ │ │ │ │ number of coefficients │ │ │ │ │ -Definition raviartthomas02dlocalcoefficients.hh:34 │ │ │ │ │ +Definition raviartthomas0pyramidlocalcoefficients.hh:35 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00197.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0pyramidlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas02dlocalinterpolation.hh File Reference
│ │ │ │ +
raviartthomas0pyramidlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cmath>
│ │ │ │ -#include <array>
│ │ │ │ -#include <bitset>
│ │ │ │ +
#include <numeric>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include "../../common/localbasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::RT02DLocalInterpolation< LB >
class  Dune::RT0PyramidLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference pyramid. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,26 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas02d │ │ │ │ │ + * raviartthomas0pyramid │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas02dlocalinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas0pyramidlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT02DLocalInterpolation<_LB_> │ │ │ │ │ +class  Dune::RT0PyramidLocalBasis<_D,_R_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference pyramid. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00197_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0pyramidlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,97 +70,148 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas02dlocalinterpolation.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_RT02DLOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_RT02DLOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_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;
│ │ │ │ -
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);
│ │ │ │ +
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 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
│ │ │ │ -
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
│ │ │ │ +
│ │ │ │ +
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 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 }
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -8,92 +8,160 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas02d │ │ │ │ │ -raviartthomas02dlocalinterpolation.hh │ │ │ │ │ + * raviartthomas0pyramid │ │ │ │ │ +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_RT02DLOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_RT02DLOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14namespace Dune │ │ │ │ │ - 15{ │ │ │ │ │ - 16 template │ │ │ │ │ -17 class RT02DLocalInterpolation │ │ │ │ │ - 18 { │ │ │ │ │ - 19 public: │ │ │ │ │ - 20 │ │ │ │ │ -22 RT02DLocalInterpolation (std::bitset<3> s = 0) │ │ │ │ │ - 23 { │ │ │ │ │ - 24 using std::sqrt; │ │ │ │ │ - 25 for (std::size_t i=0; i │ │ │ │ │ -40 void interpolate (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); │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include "../../common/localbasis.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 26 template │ │ │ │ │ +27 class RT0PyramidLocalBasis │ │ │ │ │ + 28 { │ │ │ │ │ + 29 │ │ │ │ │ + 30 public: │ │ │ │ │ + 31 typedef LocalBasisTraits,R,3,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +32 Dune::FieldMatrix > Traits; │ │ │ │ │ + 33 │ │ │ │ │ +39 RT0PyramidLocalBasis (std::bitset<5> s = 0) │ │ │ │ │ + 40 { │ │ │ │ │ + 41 for (size_t i=0; i 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 │ │ │ │ │ +46 unsigned int size () const │ │ │ │ │ + 47 { │ │ │ │ │ + 48 return 5; │ │ │ │ │ + 49 } │ │ │ │ │ + 50 │ │ │ │ │ +57 inline void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ + 58 std::vector& out) const │ │ │ │ │ + 59 { │ │ │ │ │ + 60 out.resize(5); │ │ │ │ │ + 61 for (std::size_t i=0; i& out) const │ │ │ │ │ + 89 { │ │ │ │ │ + 90 out.resize(5); │ │ │ │ │ + 91 │ │ │ │ │ + 92 for(int i=0; i& order, │ │ │ │ │ + 110 const typename Traits::DomainType& in, // position │ │ │ │ │ + 111 std::vector& 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 sign; │ │ │ │ │ + 129 }; │ │ │ │ │ + 130} │ │ │ │ │ + 131#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RT02DLocalInterpolation │ │ │ │ │ -Definition raviartthomas02dlocalinterpolation.hh:18 │ │ │ │ │ -Dune::RT02DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Definition raviartthomas02dlocalinterpolation.hh:40 │ │ │ │ │ -Dune::RT02DLocalInterpolation::RT02DLocalInterpolation │ │ │ │ │ -RT02DLocalInterpolation(std::bitset< 3 > s=0) │ │ │ │ │ -Constructor with given set of edge orientations. │ │ │ │ │ -Definition raviartthomas02dlocalinterpolation.hh:22 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::RT0PyramidLocalBasis │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference pyramid. │ │ │ │ │ +Definition raviartthomas0pyramidlocalbasis.hh:28 │ │ │ │ │ +Dune::RT0PyramidLocalBasis::RT0PyramidLocalBasis │ │ │ │ │ +RT0PyramidLocalBasis(std::bitset< 5 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 32. │ │ │ │ │ +Definition raviartthomas0pyramidlocalbasis.hh:39 │ │ │ │ │ +Dune::RT0PyramidLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition raviartthomas0pyramidlocalbasis.hh:57 │ │ │ │ │ +Dune::RT0PyramidLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition raviartthomas0pyramidlocalbasis.hh:87 │ │ │ │ │ +Dune::RT0PyramidLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ +3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ +Definition raviartthomas0pyramidlocalbasis.hh:32 │ │ │ │ │ +Dune::RT0PyramidLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition raviartthomas0pyramidlocalbasis.hh:122 │ │ │ │ │ +Dune::RT0PyramidLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition raviartthomas0pyramidlocalbasis.hh:46 │ │ │ │ │ +Dune::RT0PyramidLocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00200.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0pyramidlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas02dlocalbasis.hh File Reference
│ │ │ │ +
raviartthomas0pyramidlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.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::RT0PyramidLocalInterpolation< LB >
 First order Raviart-Thomas shape functions on the reference hexahedron. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,24 +7,23 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas02d │ │ │ │ │ + * raviartthomas0pyramid │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas02dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas0pyramidlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT02DLocalBasis<_D,_R_> │ │ │ │ │ -  Lowest order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +class  Dune::RT0PyramidLocalInterpolation<_LB_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00200_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0pyramidlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,138 +70,102 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas02dlocalbasis.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_RT0TRIANGLELOCALBASIS_HH
│ │ │ │ -
6#define DUNE_RT0TRIANGLELOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_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>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
22 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25
│ │ │ │ +
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
│ │ │ │ -
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());
│ │ │ │ +
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 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 };
│ │ │ │ +
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 };
│ │ │ │
│ │ │ │ -
104}
│ │ │ │ -
105#endif
│ │ │ │ +
90}
│ │ │ │ +
91#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_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
│ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -8,151 +8,99 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas02d │ │ │ │ │ -raviartthomas02dlocalbasis.hh │ │ │ │ │ + * raviartthomas0pyramid │ │ │ │ │ +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_RT0TRIANGLELOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_RT0TRIANGLELOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ + 10#include │ │ │ │ │ 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14namespace Dune │ │ │ │ │ - 15{ │ │ │ │ │ - 24 template │ │ │ │ │ -25 class RT02DLocalBasis │ │ │ │ │ - 26 { │ │ │ │ │ - 27 public: │ │ │ │ │ - 28 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -29 Dune::FieldMatrix > 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& 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 } │ │ │ │ │ + 12namespace Dune │ │ │ │ │ + 13{ │ │ │ │ │ + 22 template │ │ │ │ │ +23 class RT0PyramidLocalInterpolation │ │ │ │ │ + 24 { │ │ │ │ │ + 25 │ │ │ │ │ + 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 │ │ │ │ │ - 55 inline void │ │ │ │ │ -56 evaluateJacobian (const typename Traits::DomainType& 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 │ │ │ │ │ -68 void partial (const std::array& order, │ │ │ │ │ - 69 const typename Traits::DomainType& in, // position │ │ │ │ │ - 70 std::vector& out) const // return value │ │ │ │ │ + 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 │ │ │ │ │ +70 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ 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()); │ │ │ │ │ + 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 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 sign_; │ │ │ │ │ - 103 }; │ │ │ │ │ - 104} │ │ │ │ │ - 105#endif │ │ │ │ │ + 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::RT02DLocalBasis │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ -Definition raviartthomas02dlocalbasis.hh:26 │ │ │ │ │ -Dune::RT02DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition raviartthomas02dlocalbasis.hh:94 │ │ │ │ │ -Dune::RT02DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition raviartthomas02dlocalbasis.hh:56 │ │ │ │ │ -Dune::RT02DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ -2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ -Definition raviartthomas02dlocalbasis.hh:29 │ │ │ │ │ -Dune::RT02DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition raviartthomas02dlocalbasis.hh:45 │ │ │ │ │ -Dune::RT02DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition raviartthomas02dlocalbasis.hh:39 │ │ │ │ │ -Dune::RT02DLocalBasis::RT02DLocalBasis │ │ │ │ │ -RT02DLocalBasis(std::bitset< 3 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 8. │ │ │ │ │ -Definition raviartthomas02dlocalbasis.hh:32 │ │ │ │ │ -Dune::RT02DLocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -localbasis.hh │ │ │ │ │ +Dune::RT0PyramidLocalInterpolation │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +Definition raviartthomas0pyramidlocalinterpolation.hh:24 │ │ │ │ │ +Dune::RT0PyramidLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +Definition raviartthomas0pyramidlocalinterpolation.hh:70 │ │ │ │ │ +Dune::RT0PyramidLocalInterpolation::RT0PyramidLocalInterpolation │ │ │ │ │ +RT0PyramidLocalInterpolation(std::bitset< 5 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 32. │ │ │ │ │ +Definition raviartthomas0pyramidlocalinterpolation.hh:33 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00203.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0pyramid.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas4cube2dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,36 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0pyramid.hh File Reference
│ │ │ │ +
raviartthomas4cube2dlocalbasis.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 <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::RT0PyramidLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on pyramids. More...
class  Dune::RT4Cube2DLocalBasis< D, R >
 Second order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,27 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ + * raviartthomas4cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas0pyramid.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "raviartthomas0pyramid/raviartthomas0pyramidlocalbasis.hh" │ │ │ │ │ -#include "raviartthomas0pyramid/raviartthomas0pyramidlocalcoefficients.hh" │ │ │ │ │ -#include "raviartthomas0pyramid/raviartthomas0pyramidlocalinterpolation.hh" │ │ │ │ │ +raviartthomas4cube2dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localbasis.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::RT4Cube2DLocalBasis<_D,_R_> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00203_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0pyramid.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas4cube2dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,123 +70,814 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas0pyramid.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_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_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:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 {}
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
45 basis(s),
│ │ │ │ -
46 interpolation(s)
│ │ │ │ -
47 {}
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
48
│ │ │ │ +
47
│ │ │ │
│ │ │ │ -
49 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
49 unsigned int size () const
│ │ │ │
50 {
│ │ │ │ -
51 return basis;
│ │ │ │ +
51 return 60;
│ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,137 +8,827 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -raviartthomas0pyramid.hh │ │ │ │ │ + * raviartthomas4cube2d │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "raviartthomas0pyramid/raviartthomas0pyramidlocalbasis.hh" │ │ │ │ │ - 12#include "raviartthomas0pyramid/raviartthomas0pyramidlocalcoefficients.hh" │ │ │ │ │ - 13#include "raviartthomas0pyramid/raviartthomas0pyramidlocalinterpolation.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 25 template │ │ │ │ │ -26 class RT0PyramidLocalFiniteElement │ │ │ │ │ - 27 { │ │ │ │ │ - 28 │ │ │ │ │ - 29 public: │ │ │ │ │ - 30 typedef LocalFiniteElementTraits< │ │ │ │ │ - 31 RT0PyramidLocalBasis, │ │ │ │ │ - 32 RT0PyramidLocalCoefficients, │ │ │ │ │ -33 RT0PyramidLocalInterpolation > > Traits; │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include "../../common/localbasis.hh" │ │ │ │ │ + 15 │ │ │ │ │ + 16namespace Dune │ │ │ │ │ + 17{ │ │ │ │ │ + 27 template │ │ │ │ │ +28 class RT4Cube2DLocalBasis │ │ │ │ │ + 29 { │ │ │ │ │ + 30 │ │ │ │ │ + 31 public: │ │ │ │ │ + 32 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +33 Dune::FieldMatrix > Traits; │ │ │ │ │ 34 │ │ │ │ │ -36 RT0PyramidLocalFiniteElement () │ │ │ │ │ - 37 {} │ │ │ │ │ - 38 │ │ │ │ │ -44 RT0PyramidLocalFiniteElement (int s) : │ │ │ │ │ - 45 basis(s), │ │ │ │ │ - 46 interpolation(s) │ │ │ │ │ - 47 {} │ │ │ │ │ - 48 │ │ │ │ │ -49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ +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 basis; │ │ │ │ │ + 51 return 60; │ │ │ │ │ 52 } │ │ │ │ │ 53 │ │ │ │ │ -54 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 55 { │ │ │ │ │ - 56 return coefficients; │ │ │ │ │ - 57 } │ │ │ │ │ - 58 │ │ │ │ │ -59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 76 RT0PyramidLocalBasis basis; │ │ │ │ │ - 77 RT0PyramidLocalCoefficients coefficients; │ │ │ │ │ - 78 RT0PyramidLocalInterpolation > interpolation; │ │ │ │ │ - 79 }; │ │ │ │ │ - 80} │ │ │ │ │ - 81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH │ │ │ │ │ -raviartthomas0pyramidlocalcoefficients.hh │ │ │ │ │ -raviartthomas0pyramidlocalbasis.hh │ │ │ │ │ -raviartthomas0pyramidlocalinterpolation.hh │ │ │ │ │ +60 inline void evaluateFunction (const typename Traits::DomainType& 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 │ │ │ │ │ +210 inline void evaluateJacobian (const typename Traits::DomainType& 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 │ │ │ │ │ +492 void partial (const std::array& order, │ │ │ │ │ + 493 const typename Traits::DomainType& in, // position │ │ │ │ │ + 494 std::vector& 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::RT0PyramidLocalFiniteElement │ │ │ │ │ -First order Raviart-Thomas shape functions on pyramids. │ │ │ │ │ -Definition raviartthomas0pyramid.hh:27 │ │ │ │ │ -Dune::RT0PyramidLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition raviartthomas0pyramid.hh:54 │ │ │ │ │ -Dune::RT0PyramidLocalFiniteElement::size │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::RT4Cube2DLocalBasis │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas4cube2dlocalbasis.hh:29 │ │ │ │ │ +Dune::RT4Cube2DLocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::RT4Cube2DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition raviartthomas4cube2dlocalbasis.hh:60 │ │ │ │ │ +Dune::RT4Cube2DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +Definition raviartthomas4cube2dlocalbasis.hh:33 │ │ │ │ │ +Dune::RT4Cube2DLocalBasis::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition raviartthomas0pyramid.hh:65 │ │ │ │ │ -Dune::RT0PyramidLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition raviartthomas0pyramid.hh:70 │ │ │ │ │ -Dune::RT0PyramidLocalFiniteElement::RT0PyramidLocalFiniteElement │ │ │ │ │ -RT0PyramidLocalFiniteElement(int s) │ │ │ │ │ -Make set number s, where 0 <= s < 32. │ │ │ │ │ -Definition raviartthomas0pyramid.hh:44 │ │ │ │ │ -Dune::RT0PyramidLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< RT0PyramidLocalBasis< D, R >, │ │ │ │ │ -RT0PyramidLocalCoefficients, RT0PyramidLocalInterpolation< │ │ │ │ │ -RT0PyramidLocalBasis< D, R > > > Traits │ │ │ │ │ -Definition raviartthomas0pyramid.hh:33 │ │ │ │ │ -Dune::RT0PyramidLocalFiniteElement::RT0PyramidLocalFiniteElement │ │ │ │ │ -RT0PyramidLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas0pyramid.hh:36 │ │ │ │ │ -Dune::RT0PyramidLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition raviartthomas0pyramid.hh:49 │ │ │ │ │ -Dune::RT0PyramidLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition raviartthomas0pyramid.hh:59 │ │ │ │ │ -Dune::RT0PyramidLocalBasis │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference pyramid. │ │ │ │ │ -Definition raviartthomas0pyramidlocalbasis.hh:28 │ │ │ │ │ -Dune::RT0PyramidLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-1 elements on pyramids. │ │ │ │ │ -Definition raviartthomas0pyramidlocalcoefficients.hh:24 │ │ │ │ │ -Dune::RT0PyramidLocalInterpolation │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ -Definition raviartthomas0pyramidlocalinterpolation.hh:24 │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition raviartthomas4cube2dlocalbasis.hh:49 │ │ │ │ │ +Dune::RT4Cube2DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition raviartthomas4cube2dlocalbasis.hh:787 │ │ │ │ │ +Dune::RT4Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition raviartthomas4cube2dlocalbasis.hh:210 │ │ │ │ │ +Dune::RT4Cube2DLocalBasis::RT4Cube2DLocalBasis │ │ │ │ │ +RT4Cube2DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition raviartthomas4cube2dlocalbasis.hh:40 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00206.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube2dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas4cube2dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,34 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas1cube2dlocalinterpolation.hh File Reference
│ │ │ │ +
raviartthomas4cube2dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::RT1Cube2DLocalInterpolation< LB >
 First order Raviart-Thomas shape functions on the reference quadrilateral. More...
class  Dune::RT4Cube2DLocalCoefficients
 Layout map for Raviart-Thomas-4 elements on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,24 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas1cube2d │ │ │ │ │ + * raviartthomas4cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas1cube2dlocalinterpolation.hh File Reference │ │ │ │ │ +raviartthomas4cube2dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include "../../common/localkey.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT1Cube2DLocalInterpolation<_LB_> │ │ │ │ │ -  First order Raviart-Thomas shape functions on the reference │ │ │ │ │ - quadrilateral. More... │ │ │ │ │ +class  Dune::RT4Cube2DLocalCoefficients │ │ │ │ │ +  Layout map for Raviart-Thomas-4 elements on quadrilaterals. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00206_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube2dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas4cube2dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,127 +70,85 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas1cube2dlocalinterpolation.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#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ - │ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │
12
│ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
25 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
27 {
│ │ │ │ -
28
│ │ │ │ -
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 };
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 };
│ │ │ │
│ │ │ │ -
115}
│ │ │ │ -
116#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
59}
│ │ │ │ +
60#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -8,126 +8,84 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas1cube2d │ │ │ │ │ -raviartthomas1cube2dlocalinterpolation.hh │ │ │ │ │ + * raviartthomas4cube2d │ │ │ │ │ +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#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include "../../common/localkey.hh" │ │ │ │ │ 12 │ │ │ │ │ - 13 │ │ │ │ │ - 14namespace Dune │ │ │ │ │ - 15{ │ │ │ │ │ - 16 │ │ │ │ │ - 25 template │ │ │ │ │ -26 class RT1Cube2DLocalInterpolation │ │ │ │ │ - 27 { │ │ │ │ │ - 28 │ │ │ │ │ - 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 │ │ │ │ │ -55 void interpolate (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 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ +22 class RT4Cube2DLocalCoefficients │ │ │ │ │ + 23 { │ │ │ │ │ + 24 │ │ │ │ │ + 25 public: │ │ │ │ │ +27 RT4Cube2DLocalCoefficients () : li(60) │ │ │ │ │ + 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 li; │ │ │ │ │ + 58 }; │ │ │ │ │ + 59} │ │ │ │ │ + 60#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RT1Cube2DLocalInterpolation │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas1cube2dlocalinterpolation.hh:27 │ │ │ │ │ -Dune::RT1Cube2DLocalInterpolation::RT1Cube2DLocalInterpolation │ │ │ │ │ -RT1Cube2DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition raviartthomas1cube2dlocalinterpolation.hh:35 │ │ │ │ │ -Dune::RT1Cube2DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Interpolate a given function with shape functions. │ │ │ │ │ -Definition raviartthomas1cube2dlocalinterpolation.hh:55 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::RT4Cube2DLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-4 elements on quadrilaterals. │ │ │ │ │ +Definition raviartthomas4cube2dlocalcoefficients.hh:23 │ │ │ │ │ +Dune::RT4Cube2DLocalCoefficients::RT4Cube2DLocalCoefficients │ │ │ │ │ +RT4Cube2DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas4cube2dlocalcoefficients.hh:27 │ │ │ │ │ +Dune::RT4Cube2DLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition raviartthomas4cube2dlocalcoefficients.hh:45 │ │ │ │ │ +Dune::RT4Cube2DLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition raviartthomas4cube2dlocalcoefficients.hh:51 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00209.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube2dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas4cube2dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,34 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas1cube2dlocalcoefficients.hh File Reference
│ │ │ │ +
raviartthomas4cube2dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../../common/localkey.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::RT1Cube2DLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on quadrilaterals. More...
class  Dune::RT4Cube2DLocalInterpolation< LB >
 Second order Raviart-Thomas shape functions on the reference triangle. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,24 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas1cube2d │ │ │ │ │ + * raviartthomas4cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas1cube2dlocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas4cube2dlocalinterpolation.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include "../../common/localkey.hh" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT1Cube2DLocalCoefficients │ │ │ │ │ -  Layout map for Raviart-Thomas-1 elements on quadrilaterals. More... │ │ │ │ │ +class  Dune::RT4Cube2DLocalInterpolation<_LB_> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00209_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube2dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas4cube2dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,83 +70,177 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas1cube2dlocalcoefficients.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_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include "../../common/localkey.hh"
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │
12
│ │ │ │
13namespace Dune
│ │ │ │
14{
│ │ │ │
15
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25
│ │ │ │ -
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
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,82 +8,193 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas1cube2d │ │ │ │ │ -raviartthomas1cube2dlocalcoefficients.hh │ │ │ │ │ + * raviartthomas4cube2d │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include "../../common/localkey.hh" │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ 13namespace Dune │ │ │ │ │ 14{ │ │ │ │ │ 15 │ │ │ │ │ -23 class RT1Cube2DLocalCoefficients │ │ │ │ │ - 24 { │ │ │ │ │ - 25 │ │ │ │ │ - 26 public: │ │ │ │ │ -28 RT1Cube2DLocalCoefficients () : li(12) │ │ │ │ │ - 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 │ │ │ │ │ -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 li; │ │ │ │ │ - 56 }; │ │ │ │ │ - 57} │ │ │ │ │ - 58#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 24 template │ │ │ │ │ +25 class RT4Cube2DLocalInterpolation │ │ │ │ │ + 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 │ │ │ │ │ +74 void interpolate (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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::RT1Cube2DLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ │ -Definition raviartthomas1cube2dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::RT1Cube2DLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition raviartthomas1cube2dlocalcoefficients.hh:49 │ │ │ │ │ -Dune::RT1Cube2DLocalCoefficients::RT1Cube2DLocalCoefficients │ │ │ │ │ -RT1Cube2DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas1cube2dlocalcoefficients.hh:28 │ │ │ │ │ -Dune::RT1Cube2DLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition raviartthomas1cube2dlocalcoefficients.hh:43 │ │ │ │ │ +Dune::RT4Cube2DLocalInterpolation │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +Definition raviartthomas4cube2dlocalinterpolation.hh:26 │ │ │ │ │ +Dune::RT4Cube2DLocalInterpolation::RT4Cube2DLocalInterpolation │ │ │ │ │ +RT4Cube2DLocalInterpolation(unsigned int s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition raviartthomas4cube2dlocalinterpolation.hh:35 │ │ │ │ │ +Dune::RT4Cube2DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +Definition raviartthomas4cube2dlocalinterpolation.hh:74 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00212.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube2dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0cube2dall.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas1cube2dlocalbasis.hh File Reference
│ │ │ │ +
raviartthomas0cube2dall.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <numeric>
│ │ │ │ #include <vector>
│ │ │ │ #include <dune/common/fmatrix.hh>
│ │ │ │ -#include "../../common/localbasis.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::RT1Cube2DLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference quadrilateral. More...
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 {} │ │ │ │ │ @@ -7,26 +7,36 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas1cube2d │ │ │ │ │ + * raviartthomas0cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas1cube2dlocalbasis.hh File Reference │ │ │ │ │ +raviartthomas0cube2dall.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include "../../common/localbasis.hh" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT1Cube2DLocalBasis<_D,_R_> │ │ │ │ │ -  First order Raviart-Thomas shape functions on the reference │ │ │ │ │ +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 │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00212_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube2dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0cube2dall.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,200 +70,252 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas1cube2dlocalbasis.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_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH
│ │ │ │
7
│ │ │ │ -
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 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
│ │ │ │ -
│ │ │ │ -
57 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
58 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
59 {
│ │ │ │ -
60 out.resize(12);
│ │ │ │ -
61
│ │ │ │ -
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 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;
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <numeric>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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]);
│ │ │ │ +
│ │ │ │ +
115 unsigned int order () const
│ │ │ │ +
116 {
│ │ │ │ +
117 return 1;
│ │ │ │ +
118 }
│ │ │ │ +
│ │ │ │ +
119
│ │ │ │ +
120 private:
│ │ │ │ +
121 std::array<R,4> sign_;
│ │ │ │ +
122 };
│ │ │ │ +
│ │ │ │
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 }
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ +
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
│ │ │ │ -
179 private:
│ │ │ │ -
180 std::array<R,4> sign_;
│ │ │ │ -
181 };
│ │ │ │ -
│ │ │ │ -
182}
│ │ │ │ -
183#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,220 +8,272 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas1cube2d │ │ │ │ │ -raviartthomas1cube2dlocalbasis.hh │ │ │ │ │ + * raviartthomas0cube2d │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include "../../common/localbasis.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 26 template │ │ │ │ │ -27 class RT1Cube2DLocalBasis │ │ │ │ │ - 28 { │ │ │ │ │ - 29 │ │ │ │ │ - 30 public: │ │ │ │ │ - 31 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ + 17 │ │ │ │ │ + 18namespace Dune │ │ │ │ │ + 19{ │ │ │ │ │ + 28 template │ │ │ │ │ +29 class RT0Cube2DLocalBasis │ │ │ │ │ + 30 { │ │ │ │ │ + 31 public: │ │ │ │ │ + 32 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ FieldVector, │ │ │ │ │ -32 Dune::FieldMatrix > 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 │ │ │ │ │ -57 inline void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ - 58 std::vector& out) const │ │ │ │ │ - 59 { │ │ │ │ │ - 60 out.resize(12); │ │ │ │ │ - 61 │ │ │ │ │ - 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& out) const │ │ │ │ │ - 96 { │ │ │ │ │ - 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; │ │ │ │ │ +33 Dune::FieldMatrix > 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& 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& 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 } │ │ │ │ │ + 77 │ │ │ │ │ +79 void partial (const std::array& order, │ │ │ │ │ + 80 const typename Traits::DomainType& in, // position │ │ │ │ │ + 81 std::vector& 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 │ │ │ │ │ - 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]); │ │ │ │ │ +115 unsigned int order () const │ │ │ │ │ + 116 { │ │ │ │ │ + 117 return 1; │ │ │ │ │ + 118 } │ │ │ │ │ + 119 │ │ │ │ │ + 120 private: │ │ │ │ │ + 121 std::array sign_; │ │ │ │ │ + 122 }; │ │ │ │ │ 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; │ │ │ │ │ + 124 │ │ │ │ │ + 132 template │ │ │ │ │ +133 class RT0Cube2DLocalInterpolation │ │ │ │ │ + 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 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 } │ │ │ │ │ + 154 template │ │ │ │ │ +155 void interpolate (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 │ │ │ │ │ -161 void partial (const std::array& order, │ │ │ │ │ - 162 const typename Traits::DomainType& in, // position │ │ │ │ │ - 163 std::vector& 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 } │ │ │ │ │ + 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 │ │ │ │ │ - 179 private: │ │ │ │ │ - 180 std::array sign_; │ │ │ │ │ - 181 }; │ │ │ │ │ - 182} │ │ │ │ │ - 183#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ +185 class RT0Cube2DLocalCoefficients │ │ │ │ │ + 186 { │ │ │ │ │ + 187 public: │ │ │ │ │ +189 RT0Cube2DLocalCoefficients () : li(4) │ │ │ │ │ + 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 li; │ │ │ │ │ + 209 }; │ │ │ │ │ + 210 │ │ │ │ │ + 211} │ │ │ │ │ + 212#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH │ │ │ │ │ +localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalBasisTraits │ │ │ │ │ Type traits for LocalBasisVirtualInterface. │ │ │ │ │ Definition common/localbasis.hh:34 │ │ │ │ │ Dune::LocalBasisTraits::DomainType │ │ │ │ │ D DomainType │ │ │ │ │ domain type │ │ │ │ │ Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::RT1Cube2DLocalBasis │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas1cube2dlocalbasis.hh:28 │ │ │ │ │ -Dune::RT1Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition raviartthomas1cube2dlocalbasis.hh:94 │ │ │ │ │ -Dune::RT1Cube2DLocalBasis::Traits │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::RT0Cube2DLocalBasis │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:30 │ │ │ │ │ +Dune::RT0Cube2DLocalBasis::RT0Cube2DLocalBasis │ │ │ │ │ +RT0Cube2DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ +Constructor with a set of edge orientations. │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:36 │ │ │ │ │ +Dune::RT0Cube2DLocalBasis::Traits │ │ │ │ │ LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ -Definition raviartthomas1cube2dlocalbasis.hh:32 │ │ │ │ │ -Dune::RT1Cube2DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition raviartthomas1cube2dlocalbasis.hh:174 │ │ │ │ │ -Dune::RT1Cube2DLocalBasis::evaluateFunction │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:33 │ │ │ │ │ +Dune::RT0Cube2DLocalBasis::evaluateFunction │ │ │ │ │ void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ typename Traits::RangeType > &out) const │ │ │ │ │ Evaluate all shape functions. │ │ │ │ │ -Definition raviartthomas1cube2dlocalbasis.hh:57 │ │ │ │ │ -Dune::RT1Cube2DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition raviartthomas1cube2dlocalbasis.hh:46 │ │ │ │ │ -Dune::RT1Cube2DLocalBasis::RT1Cube2DLocalBasis │ │ │ │ │ -RT1Cube2DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition raviartthomas1cube2dlocalbasis.hh:39 │ │ │ │ │ -Dune::RT1Cube2DLocalBasis::partial │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:49 │ │ │ │ │ +Dune::RT0Cube2DLocalBasis::partial │ │ │ │ │ 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 │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:79 │ │ │ │ │ +Dune::RT0Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:61 │ │ │ │ │ +Dune::RT0Cube2DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:115 │ │ │ │ │ +Dune::RT0Cube2DLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:43 │ │ │ │ │ +Dune::RT0Cube2DLocalInterpolation │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:134 │ │ │ │ │ +Dune::RT0Cube2DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:155 │ │ │ │ │ +Dune::RT0Cube2DLocalInterpolation::RT0Cube2DLocalInterpolation │ │ │ │ │ +RT0Cube2DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ +Constructor with explicitly given edge orientations. │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:138 │ │ │ │ │ +Dune::RT0Cube2DLocalCoefficients │ │ │ │ │ +Layout map for RT0 elements on quadrilaterals. │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:186 │ │ │ │ │ +Dune::RT0Cube2DLocalCoefficients::RT0Cube2DLocalCoefficients │ │ │ │ │ +RT0Cube2DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:189 │ │ │ │ │ +Dune::RT0Cube2DLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:196 │ │ │ │ │ +Dune::RT0Cube2DLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition raviartthomas0cube2dall.hh:202 │ │ │ │ │ +localbasis.hh │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00215.html │ │ │ │ @@ -76,16 +76,16 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
raviartthomas0cube3d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include "raviartthomas0cube3d/raviartthomas0cube3dall.hh"
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include "raviartthomas0cube3d/raviartthomas0cube3dall.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00215_source.html │ │ │ │ @@ -86,16 +86,16 @@ │ │ │ │
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
│ │ │ │
7
│ │ │ │
8#include <dune/geometry/type.hh>
│ │ │ │
9
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
12
│ │ │ │
13namespace Dune
│ │ │ │
14{
│ │ │ │
23 template<class D, class R>
│ │ │ │
│ │ │ │ │ │ │ │
25 {
│ │ │ │ @@ -156,16 +156,16 @@ │ │ │ │ │ │ │ │
68 RT0Cube3DLocalCoefficients coefficients;
│ │ │ │ │ │ │ │
70 };
│ │ │ │
│ │ │ │
71}
│ │ │ │
72#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_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
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -74,16 +74,16 @@ │ │ │ │ │ 66 private: │ │ │ │ │ 67 RT0Cube3DLocalBasis basis; │ │ │ │ │ 68 RT0Cube3DLocalCoefficients coefficients; │ │ │ │ │ 69 RT0Cube3DLocalInterpolation > interpolation; │ │ │ │ │ 70 }; │ │ │ │ │ 71} │ │ │ │ │ 72#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ -raviartthomas0cube3dall.hh │ │ │ │ │ localfiniteelementtraits.hh │ │ │ │ │ +raviartthomas0cube3dall.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalFiniteElementTraits │ │ │ │ │ traits helper struct │ │ │ │ │ Definition localfiniteelementtraits.hh:13 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ LB LocalBasisType │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00218.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas02dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas03dlocalbasis.hh File Reference
│ │ │ │ +
raviartthomas02dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.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::RT0Cube3DLocalFiniteElement< D, R >
 Zero order Raviart-Thomas shape functions on cubes. More...
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

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

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas03d │ │ │ │ │ + * raviartthomas02d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas03dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas02dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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::RT02DLocalInterpolation<_LB_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00218_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas02dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,143 +70,97 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas03dlocalbasis.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_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_RT02DLOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_RT02DLOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/fmatrix.hh>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ +
8#include <cmath>
│ │ │ │ +
9#include <array>
│ │ │ │ +
10#include <bitset>
│ │ │ │ +
11#include <vector>
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -8,158 +8,92 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas03d │ │ │ │ │ -raviartthomas03dlocalbasis.hh │ │ │ │ │ + * raviartthomas02d │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH │ │ │ │ │ - 6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_RT02DLOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_RT02DLOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ 13 │ │ │ │ │ 14namespace Dune │ │ │ │ │ 15{ │ │ │ │ │ - 24 template │ │ │ │ │ -25 class RT03DLocalBasis │ │ │ │ │ - 26 { │ │ │ │ │ - 27 public: │ │ │ │ │ - 28 typedef LocalBasisTraits,R,3,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -29 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ - 73 const typename Traits::DomainType& in, // position │ │ │ │ │ - 74 std::vector& 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 sign_; │ │ │ │ │ - 108 }; │ │ │ │ │ - 109} │ │ │ │ │ - 110#endif │ │ │ │ │ + 16 template │ │ │ │ │ +17 class RT02DLocalInterpolation │ │ │ │ │ + 18 { │ │ │ │ │ + 19 public: │ │ │ │ │ + 20 │ │ │ │ │ +22 RT02DLocalInterpolation (std::bitset<3> s = 0) │ │ │ │ │ + 23 { │ │ │ │ │ + 24 using std::sqrt; │ │ │ │ │ + 25 for (std::size_t i=0; i │ │ │ │ │ +40 void interpolate (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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::RT03DLocalBasis │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference tetrahedron. │ │ │ │ │ -Definition raviartthomas03dlocalbasis.hh:26 │ │ │ │ │ -Dune::RT03DLocalBasis::RT03DLocalBasis │ │ │ │ │ -RT03DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition raviartthomas03dlocalbasis.hh:32 │ │ │ │ │ -Dune::RT03DLocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::RT03DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition raviartthomas03dlocalbasis.hh:99 │ │ │ │ │ -Dune::RT03DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition raviartthomas03dlocalbasis.hh:39 │ │ │ │ │ -Dune::RT03DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition raviartthomas03dlocalbasis.hh:58 │ │ │ │ │ -Dune::RT03DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition raviartthomas03dlocalbasis.hh:45 │ │ │ │ │ -Dune::RT03DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ -3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ -Definition raviartthomas03dlocalbasis.hh:29 │ │ │ │ │ -localbasis.hh │ │ │ │ │ +Dune::RT02DLocalInterpolation │ │ │ │ │ +Definition raviartthomas02dlocalinterpolation.hh:18 │ │ │ │ │ +Dune::RT02DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Definition raviartthomas02dlocalinterpolation.hh:40 │ │ │ │ │ +Dune::RT02DLocalInterpolation::RT02DLocalInterpolation │ │ │ │ │ +RT02DLocalInterpolation(std::bitset< 3 > s=0) │ │ │ │ │ +Constructor with given set of edge orientations. │ │ │ │ │ +Definition raviartthomas02dlocalinterpolation.hh:22 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00221.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas02dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas03dlocalinterpolation.hh File Reference
│ │ │ │ +
raviartthomas02dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cmath>
│ │ │ │ -#include <array>
│ │ │ │ -#include <bitset>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.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::RT03DLocalInterpolation< LB >
class  Dune::RT02DLocalBasis< D, R >
 Lowest order Raviart-Thomas shape functions on the reference triangle. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas03d │ │ │ │ │ + * raviartthomas02d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas03dlocalinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas02dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT03DLocalInterpolation<_LB_> │ │ │ │ │ +class  Dune::RT02DLocalBasis<_D,_R_> │ │ │ │ │ +  Lowest order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00221_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas02dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,100 +70,138 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas03dlocalinterpolation.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_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_RT0TRIANGLELOCALBASIS_HH
│ │ │ │ +
6#define DUNE_RT0TRIANGLELOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cmath>
│ │ │ │ -
9#include <array>
│ │ │ │ -
10#include <bitset>
│ │ │ │ -
11#include <vector>
│ │ │ │ - │ │ │ │ +
8#include <numeric>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/fmatrix.hh>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
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 private:
│ │ │ │ +
100
│ │ │ │ +
101 // Signs of the edge normals
│ │ │ │ +
102 std::array<R,3> sign_;
│ │ │ │ +
103 };
│ │ │ │ +
│ │ │ │ +
104}
│ │ │ │ +
105#endif
│ │ │ │
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,97 +8,151 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas03d │ │ │ │ │ -raviartthomas03dlocalinterpolation.hh │ │ │ │ │ + * raviartthomas02d │ │ │ │ │ +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_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH │ │ │ │ │ - 6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_RT0TRIANGLELOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_RT0TRIANGLELOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ 13 │ │ │ │ │ 14namespace Dune │ │ │ │ │ 15{ │ │ │ │ │ - 16 template │ │ │ │ │ -17 class RT03DLocalInterpolation │ │ │ │ │ - 18 { │ │ │ │ │ - 19 public: │ │ │ │ │ - 20 │ │ │ │ │ -22 RT03DLocalInterpolation (std::bitset<4> s = 0) │ │ │ │ │ - 23 { │ │ │ │ │ - 24 using std::sqrt; │ │ │ │ │ - 25 for (std::size_t i=0; i │ │ │ │ │ -43 void interpolate (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 │ │ │ │ │ + 24 template │ │ │ │ │ +25 class RT02DLocalBasis │ │ │ │ │ + 26 { │ │ │ │ │ + 27 public: │ │ │ │ │ + 28 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +29 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ + 69 const typename Traits::DomainType& in, // position │ │ │ │ │ + 70 std::vector& 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 sign_; │ │ │ │ │ + 103 }; │ │ │ │ │ + 104} │ │ │ │ │ + 105#endif │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RT03DLocalInterpolation │ │ │ │ │ -Definition raviartthomas03dlocalinterpolation.hh:18 │ │ │ │ │ -Dune::RT03DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Definition raviartthomas03dlocalinterpolation.hh:43 │ │ │ │ │ -Dune::RT03DLocalInterpolation::RT03DLocalInterpolation │ │ │ │ │ -RT03DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ -Constructor with given set of face orientations. │ │ │ │ │ -Definition raviartthomas03dlocalinterpolation.hh:22 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::RT02DLocalBasis │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +Definition raviartthomas02dlocalbasis.hh:26 │ │ │ │ │ +Dune::RT02DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition raviartthomas02dlocalbasis.hh:94 │ │ │ │ │ +Dune::RT02DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition raviartthomas02dlocalbasis.hh:56 │ │ │ │ │ +Dune::RT02DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +Definition raviartthomas02dlocalbasis.hh:29 │ │ │ │ │ +Dune::RT02DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition raviartthomas02dlocalbasis.hh:45 │ │ │ │ │ +Dune::RT02DLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition raviartthomas02dlocalbasis.hh:39 │ │ │ │ │ +Dune::RT02DLocalBasis::RT02DLocalBasis │ │ │ │ │ +RT02DLocalBasis(std::bitset< 3 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +Definition raviartthomas02dlocalbasis.hh:32 │ │ │ │ │ +Dune::RT02DLocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00224.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas02dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas03dlocalcoefficients.hh File Reference
│ │ │ │ +
raviartthomas02dlocalcoefficients.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::RT03DLocalCoefficients
 Layout map for RT0 elements. More...
class  Dune::RT02DLocalCoefficients
 Layout map for RT0 elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,24 +7,24 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas03d │ │ │ │ │ + * raviartthomas02d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas03dlocalcoefficients.hh File Reference │ │ │ │ │ +raviartthomas02dlocalcoefficients.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT03DLocalCoefficients │ │ │ │ │ +class  Dune::RT02DLocalCoefficients │ │ │ │ │   Layout map for RT0 elements. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00224_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas02dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,78 +70,78 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas03dlocalcoefficients.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_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_RT0TRIANGLELOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_RT0TRIANGLELOCALCOEFFICIENTS_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++)
│ │ │ │ +
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
│ │ │ │ +
34 std::size_t size () const
│ │ │ │
35 {
│ │ │ │ -
36 return 4;
│ │ │ │ +
36 return 3;
│ │ │ │
37 }
│ │ │ │
│ │ │ │
38
│ │ │ │
│ │ │ │ -
40 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
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 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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,48 +8,46 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas03d │ │ │ │ │ -raviartthomas03dlocalcoefficients.hh │ │ │ │ │ + * raviartthomas02d │ │ │ │ │ +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_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_RT0TRIANGLELOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_RT0TRIANGLELOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9#include │ │ │ │ │ 10#include │ │ │ │ │ 11 │ │ │ │ │ 12#include │ │ │ │ │ 13 │ │ │ │ │ 14namespace Dune │ │ │ │ │ 15{ │ │ │ │ │ 16 │ │ │ │ │ -23 class RT03DLocalCoefficients │ │ │ │ │ +23 class RT02DLocalCoefficients │ │ │ │ │ 24 { │ │ │ │ │ 25 public: │ │ │ │ │ -27 RT03DLocalCoefficients () : li(4) │ │ │ │ │ +27 RT02DLocalCoefficients () : li(3) │ │ │ │ │ 28 { │ │ │ │ │ - 29 for (std::size_t i=0; i<4; i++) │ │ │ │ │ + 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 4; │ │ │ │ │ + 36 return 3; │ │ │ │ │ 37 } │ │ │ │ │ 38 │ │ │ │ │ 40 const LocalKey& localKey (std::size_t i) const │ │ │ │ │ 41 { │ │ │ │ │ 42 return li[i]; │ │ │ │ │ 43 } │ │ │ │ │ 44 │ │ │ │ │ @@ -62,25 +60,25 @@ │ │ │ │ │ 51#endif │ │ │ │ │ localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalKey │ │ │ │ │ Describe position of one degree of freedom. │ │ │ │ │ Definition localkey.hh:23 │ │ │ │ │ -Dune::RT03DLocalCoefficients │ │ │ │ │ +Dune::RT02DLocalCoefficients │ │ │ │ │ Layout map for RT0 elements. │ │ │ │ │ -Definition raviartthomas03dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::RT03DLocalCoefficients::localKey │ │ │ │ │ +Definition raviartthomas02dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::RT02DLocalCoefficients::RT02DLocalCoefficients │ │ │ │ │ +RT02DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas02dlocalcoefficients.hh:27 │ │ │ │ │ +Dune::RT02DLocalCoefficients::localKey │ │ │ │ │ const LocalKey & localKey(std::size_t i) const │ │ │ │ │ get i'th index │ │ │ │ │ -Definition raviartthomas03dlocalcoefficients.hh:40 │ │ │ │ │ -Dune::RT03DLocalCoefficients::RT03DLocalCoefficients │ │ │ │ │ -RT03DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas03dlocalcoefficients.hh:27 │ │ │ │ │ -Dune::RT03DLocalCoefficients::size │ │ │ │ │ +Definition raviartthomas02dlocalcoefficients.hh:40 │ │ │ │ │ +Dune::RT02DLocalCoefficients::size │ │ │ │ │ std::size_t size() const │ │ │ │ │ number of coefficients │ │ │ │ │ -Definition raviartthomas03dlocalcoefficients.hh:34 │ │ │ │ │ +Definition raviartthomas02dlocalcoefficients.hh:34 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00227.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas4cube2d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0prism.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,29 +72,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas4cube2d.hh File Reference
│ │ │ │ +
raviartthomas0prism.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

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

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -8,24 +8,24 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas4cube2d.hh File Reference │ │ │ │ │ +raviartthomas0prism.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "raviartthomas4cube2d/raviartthomas4cube2dlocalbasis.hh" │ │ │ │ │ -#include "raviartthomas4cube2d/raviartthomas4cube2dlocalcoefficients.hh" │ │ │ │ │ -#include "raviartthomas4cube2d/raviartthomas4cube2dlocalinterpolation.hh" │ │ │ │ │ +#include "raviartthomas0prism/raviartthomas0prismlocalbasis.hh" │ │ │ │ │ +#include "raviartthomas0prism/raviartthomas0prismlocalcoefficients.hh" │ │ │ │ │ +#include "raviartthomas0prism/raviartthomas0prismlocalinterpolation.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT4Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  Second order Raviart-Thomas shape functions on cubes. More... │ │ │ │ │ +class  Dune::RT0PrismLocalFiniteElement<_D,_R_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on prisms. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00227_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas4cube2d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0prism.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,119 +74,120 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
raviartthomas4cube2d.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_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH
│ │ │ │
7
│ │ │ │
8#include <dune/geometry/type.hh>
│ │ │ │
9
│ │ │ │
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │
15namespace Dune
│ │ │ │
16{
│ │ │ │ -
27 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ -
30
│ │ │ │ -
31 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
36
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 {}
│ │ │ │ -
│ │ │ │ -
40
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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 RT4Cube2DLocalCoefficients coefficients;
│ │ │ │ - │ │ │ │ -
81 };
│ │ │ │ -
│ │ │ │ -
82}
│ │ │ │ -
83#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
25 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
27 {
│ │ │ │ +
28
│ │ │ │ +
29 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
34
│ │ │ │ +
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::prism;
│ │ │ │ +
74 }
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
76 private:
│ │ │ │ + │ │ │ │ +
78 RT0PrismLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
80 };
│ │ │ │ +
│ │ │ │ +
81}
│ │ │ │ +
82#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,137 +8,138 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -raviartthomas4cube2d.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_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9 │ │ │ │ │ 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "raviartthomas4cube2d/raviartthomas4cube2dlocalbasis.hh" │ │ │ │ │ - 12#include "raviartthomas4cube2d/raviartthomas4cube2dlocalcoefficients.hh" │ │ │ │ │ - 13#include "raviartthomas4cube2d/raviartthomas4cube2dlocalinterpolation.hh" │ │ │ │ │ + 11#include "raviartthomas0prism/raviartthomas0prismlocalbasis.hh" │ │ │ │ │ + 12#include "raviartthomas0prism/raviartthomas0prismlocalcoefficients.hh" │ │ │ │ │ + 13#include "raviartthomas0prism/raviartthomas0prismlocalinterpolation.hh" │ │ │ │ │ 14 │ │ │ │ │ 15namespace Dune │ │ │ │ │ 16{ │ │ │ │ │ - 27 template │ │ │ │ │ -28 class RT4Cube2DLocalFiniteElement │ │ │ │ │ - 29 { │ │ │ │ │ - 30 │ │ │ │ │ - 31 public: │ │ │ │ │ - 32 typedef LocalFiniteElementTraits< │ │ │ │ │ - 33 RT4Cube2DLocalBasis, │ │ │ │ │ - 34 RT4Cube2DLocalCoefficients, │ │ │ │ │ -35 RT4Cube2DLocalInterpolation > > Traits; │ │ │ │ │ - 36 │ │ │ │ │ -38 RT4Cube2DLocalFiniteElement () │ │ │ │ │ - 39 {} │ │ │ │ │ - 40 │ │ │ │ │ -46 RT4Cube2DLocalFiniteElement (int s) : │ │ │ │ │ - 47 basis(s), │ │ │ │ │ - 48 interpolation(s) │ │ │ │ │ - 49 {} │ │ │ │ │ - 50 │ │ │ │ │ -51 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 52 { │ │ │ │ │ - 53 return basis; │ │ │ │ │ - 54 } │ │ │ │ │ - 55 │ │ │ │ │ -56 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 57 { │ │ │ │ │ - 58 return coefficients; │ │ │ │ │ - 59 } │ │ │ │ │ - 60 │ │ │ │ │ -61 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 78 RT4Cube2DLocalBasis basis; │ │ │ │ │ - 79 RT4Cube2DLocalCoefficients coefficients; │ │ │ │ │ - 80 RT4Cube2DLocalInterpolation > interpolation; │ │ │ │ │ - 81 }; │ │ │ │ │ - 82} │ │ │ │ │ - 83#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ -raviartthomas4cube2dlocalcoefficients.hh │ │ │ │ │ -raviartthomas4cube2dlocalinterpolation.hh │ │ │ │ │ -raviartthomas4cube2dlocalbasis.hh │ │ │ │ │ + 25 template │ │ │ │ │ +26 class RT0PrismLocalFiniteElement │ │ │ │ │ + 27 { │ │ │ │ │ + 28 │ │ │ │ │ + 29 public: │ │ │ │ │ + 30 typedef LocalFiniteElementTraits< │ │ │ │ │ + 31 RT0PrismLocalBasis, │ │ │ │ │ + 32 RT0PrismLocalCoefficients, │ │ │ │ │ +33 RT0PrismLocalInterpolation > > Traits; │ │ │ │ │ + 34 │ │ │ │ │ + 35 │ │ │ │ │ +37 RT0PrismLocalFiniteElement () │ │ │ │ │ + 38 {} │ │ │ │ │ + 39 │ │ │ │ │ +45 RT0PrismLocalFiniteElement (int s) : │ │ │ │ │ + 46 basis(s), │ │ │ │ │ + 47 interpolation(s) │ │ │ │ │ + 48 {} │ │ │ │ │ + 49 │ │ │ │ │ +50 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 51 { │ │ │ │ │ + 52 return basis; │ │ │ │ │ + 53 } │ │ │ │ │ + 54 │ │ │ │ │ +55 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 56 { │ │ │ │ │ + 57 return coefficients; │ │ │ │ │ + 58 } │ │ │ │ │ + 59 │ │ │ │ │ +60 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 77 RT0PrismLocalBasis basis; │ │ │ │ │ + 78 RT0PrismLocalCoefficients coefficients; │ │ │ │ │ + 79 RT0PrismLocalInterpolation > interpolation; │ │ │ │ │ + 80 }; │ │ │ │ │ + 81} │ │ │ │ │ + 82#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH │ │ │ │ │ +raviartthomas0prismlocalbasis.hh │ │ │ │ │ +raviartthomas0prismlocalcoefficients.hh │ │ │ │ │ +raviartthomas0prismlocalinterpolation.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalFiniteElementTraits │ │ │ │ │ traits helper struct │ │ │ │ │ Definition localfiniteelementtraits.hh:13 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ LB LocalBasisType │ │ │ │ │ Definition localfiniteelementtraits.hh:16 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ LC LocalCoefficientsType │ │ │ │ │ Definition localfiniteelementtraits.hh:20 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ LI LocalInterpolationType │ │ │ │ │ Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::RT4Cube2DLocalFiniteElement │ │ │ │ │ -Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ -Definition raviartthomas4cube2d.hh:29 │ │ │ │ │ -Dune::RT4Cube2DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< RT4Cube2DLocalBasis< D, R >, │ │ │ │ │ -RT4Cube2DLocalCoefficients, RT4Cube2DLocalInterpolation< RT4Cube2DLocalBasis< │ │ │ │ │ -D, R > > > Traits │ │ │ │ │ -Definition raviartthomas4cube2d.hh:35 │ │ │ │ │ -Dune::RT4Cube2DLocalFiniteElement::size │ │ │ │ │ +Dune::RT0PrismLocalFiniteElement │ │ │ │ │ +First order Raviart-Thomas shape functions on prisms. │ │ │ │ │ +Definition raviartthomas0prism.hh:27 │ │ │ │ │ +Dune::RT0PrismLocalFiniteElement::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ Number of shape functions in this finite element. │ │ │ │ │ -Definition raviartthomas4cube2d.hh:67 │ │ │ │ │ -Dune::RT4Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition raviartthomas4cube2d.hh:56 │ │ │ │ │ -Dune::RT4Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ +Definition raviartthomas0prism.hh:66 │ │ │ │ │ +Dune::RT0PrismLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< RT0PrismLocalBasis< D, R >, │ │ │ │ │ +RT0PrismLocalCoefficients, RT0PrismLocalInterpolation< RT0PrismLocalBasis< D, R │ │ │ │ │ +> > > Traits │ │ │ │ │ +Definition raviartthomas0prism.hh:33 │ │ │ │ │ +Dune::RT0PrismLocalFiniteElement::localInterpolation │ │ │ │ │ const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition raviartthomas4cube2d.hh:61 │ │ │ │ │ -Dune::RT4Cube2DLocalFiniteElement::localBasis │ │ │ │ │ +Definition raviartthomas0prism.hh:60 │ │ │ │ │ +Dune::RT0PrismLocalFiniteElement::localBasis │ │ │ │ │ const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition raviartthomas4cube2d.hh:51 │ │ │ │ │ -Dune::RT4Cube2DLocalFiniteElement::RT4Cube2DLocalFiniteElement │ │ │ │ │ -RT4Cube2DLocalFiniteElement(int s) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition raviartthomas4cube2d.hh:46 │ │ │ │ │ -Dune::RT4Cube2DLocalFiniteElement::RT4Cube2DLocalFiniteElement │ │ │ │ │ -RT4Cube2DLocalFiniteElement() │ │ │ │ │ +Definition raviartthomas0prism.hh:50 │ │ │ │ │ +Dune::RT0PrismLocalFiniteElement::RT0PrismLocalFiniteElement │ │ │ │ │ +RT0PrismLocalFiniteElement() │ │ │ │ │ Standard constructor. │ │ │ │ │ -Definition raviartthomas4cube2d.hh:38 │ │ │ │ │ -Dune::RT4Cube2DLocalFiniteElement::type │ │ │ │ │ +Definition raviartthomas0prism.hh:37 │ │ │ │ │ +Dune::RT0PrismLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition raviartthomas0prism.hh:55 │ │ │ │ │ +Dune::RT0PrismLocalFiniteElement::RT0PrismLocalFiniteElement │ │ │ │ │ +RT0PrismLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 32. │ │ │ │ │ +Definition raviartthomas0prism.hh:45 │ │ │ │ │ +Dune::RT0PrismLocalFiniteElement::type │ │ │ │ │ static constexpr GeometryType type() │ │ │ │ │ -Definition raviartthomas4cube2d.hh:72 │ │ │ │ │ -Dune::RT4Cube2DLocalBasis │ │ │ │ │ -Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas4cube2dlocalbasis.hh:29 │ │ │ │ │ -Dune::RT4Cube2DLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-4 elements on quadrilaterals. │ │ │ │ │ -Definition raviartthomas4cube2dlocalcoefficients.hh:23 │ │ │ │ │ -Dune::RT4Cube2DLocalInterpolation │ │ │ │ │ -Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ -Definition raviartthomas4cube2dlocalinterpolation.hh:26 │ │ │ │ │ +Definition raviartthomas0prism.hh:71 │ │ │ │ │ +Dune::RT0PrismLocalBasis │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ +Definition raviartthomas0prismlocalbasis.hh:28 │ │ │ │ │ +Dune::RT0PrismLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on prisms. │ │ │ │ │ +Definition raviartthomas0prismlocalcoefficients.hh:24 │ │ │ │ │ +Dune::RT0PrismLocalInterpolation │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ +Definition raviartthomas0prismlocalinterpolation.hh:24 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00230.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube3dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas03d.hh File Reference
│ │ │ │ +
raviartthomas1cube3dlocalcoefficients.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"
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::RT03DLocalFiniteElement< D, R >
 Zero order Raviart-Thomas shape functions on tetrahedra. More...
class  Dune::RT1Cube3DLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,24 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ + * raviartthomas1cube3d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas03d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "raviartthomas03d/raviartthomas03dlocalbasis.hh" │ │ │ │ │ -#include "raviartthomas03d/raviartthomas03dlocalcoefficients.hh" │ │ │ │ │ -#include "raviartthomas03d/raviartthomas03dlocalinterpolation.hh" │ │ │ │ │ +raviartthomas1cube3dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localkey.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT03DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  Zero order Raviart-Thomas shape functions on tetrahedra. More... │ │ │ │ │ +class  Dune::RT1Cube3DLocalCoefficients │ │ │ │ │ +  Layout map for Raviart-Thomas-1 elements on quadrilaterals. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00230_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube3dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,125 +70,85 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas03d.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_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_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 {}
│ │ │ │ -
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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 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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,137 +8,84 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -raviartthomas03d.hh │ │ │ │ │ + * raviartthomas1cube3d │ │ │ │ │ +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_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include "raviartthomas03d/raviartthomas03dlocalbasis.hh" │ │ │ │ │ - 12#include "raviartthomas03d/raviartthomas03dlocalcoefficients.hh" │ │ │ │ │ - 13#include "raviartthomas03d/raviartthomas03dlocalinterpolation.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 17 │ │ │ │ │ - 26 template │ │ │ │ │ -27 class │ │ │ │ │ - 28 RT03DLocalFiniteElement │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include "../../common/localkey.hh" │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ +23 class RT1Cube3DLocalCoefficients │ │ │ │ │ + 24 { │ │ │ │ │ + 25 │ │ │ │ │ + 26 public: │ │ │ │ │ +28 RT1Cube3DLocalCoefficients () : li(36) │ │ │ │ │ 29 { │ │ │ │ │ - 30 public: │ │ │ │ │ - 31 typedef │ │ │ │ │ -LocalFiniteElementTraits,RT03DLocalCoefficients, │ │ │ │ │ -32 RT03DLocalInterpolation > > Traits; │ │ │ │ │ - 33 │ │ │ │ │ -35 RT03DLocalFiniteElement () │ │ │ │ │ - 36 {} │ │ │ │ │ + 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 │ │ │ │ │ -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 │ │ │ │ │ -53 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 54 { │ │ │ │ │ - 55 return coefficients; │ │ │ │ │ - 56 } │ │ │ │ │ - 57 │ │ │ │ │ -58 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 74 RT03DLocalBasis basis; │ │ │ │ │ - 75 RT03DLocalCoefficients coefficients; │ │ │ │ │ - 76 RT03DLocalInterpolation > interpolation; │ │ │ │ │ - 77 }; │ │ │ │ │ - 78 │ │ │ │ │ - 79} │ │ │ │ │ - 80 │ │ │ │ │ - 81#endif │ │ │ │ │ -raviartthomas03dlocalbasis.hh │ │ │ │ │ -raviartthomas03dlocalinterpolation.hh │ │ │ │ │ -raviartthomas03dlocalcoefficients.hh │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ + 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 return li[i]; │ │ │ │ │ + 54 } │ │ │ │ │ + 55 │ │ │ │ │ + 56 private: │ │ │ │ │ + 57 std::vector li; │ │ │ │ │ + 58 }; │ │ │ │ │ + 59} │ │ │ │ │ + 60#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::RT03DLocalFiniteElement │ │ │ │ │ -Zero order Raviart-Thomas shape functions on tetrahedra. │ │ │ │ │ -Definition raviartthomas03d.hh:29 │ │ │ │ │ -Dune::RT03DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< RT03DLocalBasis< D, R >, RT03DLocalCoefficients, │ │ │ │ │ -RT03DLocalInterpolation< RT03DLocalBasis< D, R > > > Traits │ │ │ │ │ -Definition raviartthomas03d.hh:32 │ │ │ │ │ -Dune::RT03DLocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Definition raviartthomas03d.hh:63 │ │ │ │ │ -Dune::RT03DLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition raviartthomas03d.hh:68 │ │ │ │ │ -Dune::RT03DLocalFiniteElement::RT03DLocalFiniteElement │ │ │ │ │ -RT03DLocalFiniteElement(std::bitset< 4 > s) │ │ │ │ │ -Constructor with explicitly given face orientations. │ │ │ │ │ -Definition raviartthomas03d.hh:43 │ │ │ │ │ -Dune::RT03DLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition raviartthomas03d.hh:53 │ │ │ │ │ -Dune::RT03DLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition raviartthomas03d.hh:48 │ │ │ │ │ -Dune::RT03DLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition raviartthomas03d.hh:58 │ │ │ │ │ -Dune::RT03DLocalFiniteElement::RT03DLocalFiniteElement │ │ │ │ │ -RT03DLocalFiniteElement() │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::RT1Cube3DLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ │ +Definition raviartthomas1cube3dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::RT1Cube3DLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition raviartthomas1cube3dlocalcoefficients.hh:45 │ │ │ │ │ +Dune::RT1Cube3DLocalCoefficients::RT1Cube3DLocalCoefficients │ │ │ │ │ +RT1Cube3DLocalCoefficients() │ │ │ │ │ Standard constructor. │ │ │ │ │ -Definition raviartthomas03d.hh:35 │ │ │ │ │ -Dune::RT03DLocalBasis │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference tetrahedron. │ │ │ │ │ -Definition raviartthomas03dlocalbasis.hh:26 │ │ │ │ │ -Dune::RT03DLocalCoefficients │ │ │ │ │ -Layout map for RT0 elements. │ │ │ │ │ -Definition raviartthomas03dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::RT03DLocalInterpolation │ │ │ │ │ -Definition raviartthomas03dlocalinterpolation.hh:18 │ │ │ │ │ +Definition raviartthomas1cube3dlocalcoefficients.hh:28 │ │ │ │ │ +Dune::RT1Cube3DLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition raviartthomas1cube3dlocalcoefficients.hh:51 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00233.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas4cube2dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube3dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas4cube2dlocalcoefficients.hh File Reference
│ │ │ │ +
raviartthomas1cube3dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ +
#include <numeric>
│ │ │ │ #include <vector>
│ │ │ │ -#include "../../common/localkey.hh"
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include "../../common/localbasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::RT4Cube2DLocalCoefficients
 Layout map for Raviart-Thomas-4 elements on quadrilaterals. More...
class  Dune::RT1Cube3DLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference hexahedron. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,24 +7,26 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas4cube2d │ │ │ │ │ + * raviartthomas1cube3d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas4cube2dlocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas1cube3dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include "../../common/localkey.hh" │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT4Cube2DLocalCoefficients │ │ │ │ │ -  Layout map for Raviart-Thomas-4 elements on quadrilaterals. More... │ │ │ │ │ +class  Dune::RT1Cube3DLocalBasis<_D,_R_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00233_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas4cube2dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube3dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,85 +70,642 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas4cube2dlocalcoefficients.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#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ +
8#include <numeric>
│ │ │ │
9#include <vector>
│ │ │ │
10
│ │ │ │ -
11#include "../../common/localkey.hh"
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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 };
│ │ │ │ +
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 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 };
│ │ │ │
│ │ │ │ -
59}
│ │ │ │ -
60#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
624}
│ │ │ │ +
625#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,84 +8,759 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas4cube2d │ │ │ │ │ -raviartthomas4cube2dlocalcoefficients.hh │ │ │ │ │ + * raviartthomas1cube3d │ │ │ │ │ +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#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9#include │ │ │ │ │ 10 │ │ │ │ │ - 11#include "../../common/localkey.hh" │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ -22 class RT4Cube2DLocalCoefficients │ │ │ │ │ - 23 { │ │ │ │ │ - 24 │ │ │ │ │ - 25 public: │ │ │ │ │ -27 RT4Cube2DLocalCoefficients () : li(60) │ │ │ │ │ + 13#include "../../common/localbasis.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 26 template │ │ │ │ │ +27 class RT1Cube3DLocalBasis │ │ │ │ │ 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 li; │ │ │ │ │ - 58 }; │ │ │ │ │ - 59} │ │ │ │ │ - 60#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 29 │ │ │ │ │ + 30 public: │ │ │ │ │ + 31 typedef LocalBasisTraits,R,3,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +32 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ + 604 const typename Traits::DomainType& in, // position │ │ │ │ │ + 605 std::vector& 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::RT4Cube2DLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-4 elements on quadrilaterals. │ │ │ │ │ -Definition raviartthomas4cube2dlocalcoefficients.hh:23 │ │ │ │ │ -Dune::RT4Cube2DLocalCoefficients::RT4Cube2DLocalCoefficients │ │ │ │ │ -RT4Cube2DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas4cube2dlocalcoefficients.hh:27 │ │ │ │ │ -Dune::RT4Cube2DLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition raviartthomas4cube2dlocalcoefficients.hh:45 │ │ │ │ │ -Dune::RT4Cube2DLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition raviartthomas4cube2dlocalcoefficients.hh:51 │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::RT1Cube3DLocalBasis │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +Definition raviartthomas1cube3dlocalbasis.hh:28 │ │ │ │ │ +Dune::RT1Cube3DLocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::RT1Cube3DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ +3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ +Definition raviartthomas1cube3dlocalbasis.hh:32 │ │ │ │ │ +Dune::RT1Cube3DLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition raviartthomas1cube3dlocalbasis.hh:69 │ │ │ │ │ +Dune::RT1Cube3DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition raviartthomas1cube3dlocalbasis.hh:80 │ │ │ │ │ +Dune::RT1Cube3DLocalBasis::RT1Cube3DLocalBasis │ │ │ │ │ +RT1Cube3DLocalBasis(unsigned int s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 64. │ │ │ │ │ +Definition raviartthomas1cube3dlocalbasis.hh:39 │ │ │ │ │ +Dune::RT1Cube3DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition raviartthomas1cube3dlocalbasis.hh:236 │ │ │ │ │ +Dune::RT1Cube3DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition raviartthomas1cube3dlocalbasis.hh:616 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00236.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas4cube2dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube3dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,34 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas4cube2dlocalinterpolation.hh File Reference
│ │ │ │ +
raviartthomas1cube3dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#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...
class  Dune::RT1Cube3DLocalInterpolation< LB >
 First order Raviart-Thomas shape functions on the reference hexahedron. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,24 +7,24 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas4cube2d │ │ │ │ │ + * raviartthomas1cube3d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas4cube2dlocalinterpolation.hh File Reference │ │ │ │ │ +raviartthomas1cube3dlocalinterpolation.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT4Cube2DLocalInterpolation<_LB_> │ │ │ │ │ -  Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +class  Dune::RT1Cube3DLocalInterpolation<_LB_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00236_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas4cube2dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube3dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,176 +70,157 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas4cube2dlocalinterpolation.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_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │
8#include <vector>
│ │ │ │
9
│ │ │ │
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);
│ │ │ │ +
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 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;
│ │ │ │ +
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[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
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,193 +8,181 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas4cube2d │ │ │ │ │ -raviartthomas4cube2dlocalinterpolation.hh │ │ │ │ │ + * raviartthomas1cube3d │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9 │ │ │ │ │ 10#include │ │ │ │ │ 11#include │ │ │ │ │ 12 │ │ │ │ │ 13namespace Dune │ │ │ │ │ 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 24 template │ │ │ │ │ -25 class RT4Cube2DLocalInterpolation │ │ │ │ │ - 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; │ │ │ │ │ + 23 template │ │ │ │ │ +24 class RT1Cube3DLocalInterpolation │ │ │ │ │ + 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 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 │ │ │ │ │ -74 void interpolate (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 │ │ │ │ │ +56 void interpolate (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 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; │ │ │ │ │ + 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[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 │ │ │ │ │ + 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RT4Cube2DLocalInterpolation │ │ │ │ │ -Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ -Definition raviartthomas4cube2dlocalinterpolation.hh:26 │ │ │ │ │ -Dune::RT4Cube2DLocalInterpolation::RT4Cube2DLocalInterpolation │ │ │ │ │ -RT4Cube2DLocalInterpolation(unsigned int s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition raviartthomas4cube2dlocalinterpolation.hh:35 │ │ │ │ │ -Dune::RT4Cube2DLocalInterpolation::interpolate │ │ │ │ │ +Dune::RT1Cube3DLocalInterpolation │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +Definition raviartthomas1cube3dlocalinterpolation.hh:25 │ │ │ │ │ +Dune::RT1Cube3DLocalInterpolation::interpolate │ │ │ │ │ void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ Interpolate a given function with shape functions. │ │ │ │ │ -Definition raviartthomas4cube2dlocalinterpolation.hh:74 │ │ │ │ │ +Definition raviartthomas1cube3dlocalinterpolation.hh:56 │ │ │ │ │ +Dune::RT1Cube3DLocalInterpolation::RT1Cube3DLocalInterpolation │ │ │ │ │ +RT1Cube3DLocalInterpolation(std::bitset< 6 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 64. │ │ │ │ │ +Definition raviartthomas1cube3dlocalinterpolation.hh:34 │ │ │ │ │ localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00239.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas4cube2dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube2dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas4cube2dlocalbasis.hh File Reference
│ │ │ │ +
raviartthomas1cube2dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <bitset>
│ │ │ │ -#include <numeric>
│ │ │ │ +
#include <cstddef>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include "../../common/localbasis.hh"
│ │ │ │ +#include "../../common/localkey.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...
class  Dune::RT1Cube2DLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,27 +7,24 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas4cube2d │ │ │ │ │ + * raviartthomas1cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas4cube2dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas1cube2dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localbasis.hh" │ │ │ │ │ +#include "../../common/localkey.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... │ │ │ │ │ +class  Dune::RT1Cube2DLocalCoefficients │ │ │ │ │ +  Layout map for Raviart-Thomas-1 elements on quadrilaterals. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00239_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas4cube2dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube2dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,814 +70,83 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas4cube2dlocalbasis.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_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <bitset>
│ │ │ │ -
9#include <numeric>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/fmatrix.hh>
│ │ │ │ -
13
│ │ │ │ -
14#include "../../common/localbasis.hh"
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │
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;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
43 std::size_t size () const
│ │ │ │ +
44 {
│ │ │ │ +
45 return 12;
│ │ │ │
46 }
│ │ │ │
│ │ │ │
47
│ │ │ │
│ │ │ │ -
49 unsigned int size () const
│ │ │ │ +
49 const LocalKey& localKey (std::size_t i) const
│ │ │ │
50 {
│ │ │ │ -
51 return 60;
│ │ │ │ +
51 return li[i];
│ │ │ │
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
│ │ │ │ +
54 private:
│ │ │ │ +
55 std::vector<LocalKey> li;
│ │ │ │ +
56 };
│ │ │ │ +
│ │ │ │ +
57}
│ │ │ │ +
58#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,827 +8,82 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas4cube2d │ │ │ │ │ -raviartthomas4cube2dlocalbasis.hh │ │ │ │ │ + * raviartthomas1cube2d │ │ │ │ │ +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_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include "../../common/localbasis.hh" │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include "../../common/localkey.hh" │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ 15 │ │ │ │ │ - 16namespace Dune │ │ │ │ │ - 17{ │ │ │ │ │ - 27 template │ │ │ │ │ -28 class RT4Cube2DLocalBasis │ │ │ │ │ +23 class RT1Cube2DLocalCoefficients │ │ │ │ │ + 24 { │ │ │ │ │ + 25 │ │ │ │ │ + 26 public: │ │ │ │ │ +28 RT1Cube2DLocalCoefficients () : li(12) │ │ │ │ │ 29 { │ │ │ │ │ - 30 │ │ │ │ │ - 31 public: │ │ │ │ │ - 32 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -33 Dune::FieldMatrix > 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; │ │ │ │ │ + 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 │ │ │ │ │ +43 std::size_t size () const │ │ │ │ │ + 44 { │ │ │ │ │ + 45 return 12; │ │ │ │ │ 46 } │ │ │ │ │ 47 │ │ │ │ │ -49 unsigned int size () const │ │ │ │ │ +49 const LocalKey& localKey (std::size_t i) const │ │ │ │ │ 50 { │ │ │ │ │ - 51 return 60; │ │ │ │ │ + 51 return li[i]; │ │ │ │ │ 52 } │ │ │ │ │ 53 │ │ │ │ │ -60 inline void evaluateFunction (const typename Traits::DomainType& 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 │ │ │ │ │ -210 inline void evaluateJacobian (const typename Traits::DomainType& 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 │ │ │ │ │ -492 void partial (const std::array& order, │ │ │ │ │ - 493 const typename Traits::DomainType& in, // position │ │ │ │ │ - 494 std::vector& 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 │ │ │ │ │ + 54 private: │ │ │ │ │ + 55 std::vector li; │ │ │ │ │ + 56 }; │ │ │ │ │ + 57} │ │ │ │ │ + 58#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::RT4Cube2DLocalBasis │ │ │ │ │ -Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas4cube2dlocalbasis.hh:29 │ │ │ │ │ -Dune::RT4Cube2DLocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::RT4Cube2DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition raviartthomas4cube2dlocalbasis.hh:60 │ │ │ │ │ -Dune::RT4Cube2DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ -2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ -Definition raviartthomas4cube2dlocalbasis.hh:33 │ │ │ │ │ -Dune::RT4Cube2DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition raviartthomas4cube2dlocalbasis.hh:49 │ │ │ │ │ -Dune::RT4Cube2DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition raviartthomas4cube2dlocalbasis.hh:787 │ │ │ │ │ -Dune::RT4Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition raviartthomas4cube2dlocalbasis.hh:210 │ │ │ │ │ -Dune::RT4Cube2DLocalBasis::RT4Cube2DLocalBasis │ │ │ │ │ -RT4Cube2DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition raviartthomas4cube2dlocalbasis.hh:40 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::RT1Cube2DLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ │ +Definition raviartthomas1cube2dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::RT1Cube2DLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition raviartthomas1cube2dlocalcoefficients.hh:49 │ │ │ │ │ +Dune::RT1Cube2DLocalCoefficients::RT1Cube2DLocalCoefficients │ │ │ │ │ +RT1Cube2DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas1cube2dlocalcoefficients.hh:28 │ │ │ │ │ +Dune::RT1Cube2DLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition raviartthomas1cube2dlocalcoefficients.hh:43 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00242.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0cube2dall.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube2dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,35 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0cube2dall.hh File Reference
│ │ │ │ +
raviartthomas1cube2dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <numeric>
│ │ │ │ +
#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>
│ │ │ │ +#include "../../common/localbasis.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::RT0Cube2DLocalInterpolation< LB >
 Lowest order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
class  Dune::RT0Cube2DLocalCoefficients
 Layout map for RT0 elements on quadrilaterals. More...
class  Dune::RT1Cube2DLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,36 +7,26 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0cube2d │ │ │ │ │ + * raviartthomas1cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas0cube2dall.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas1cube2dlocalbasis.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include "../../common/localbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT0Cube2DLocalBasis<_D,_R_> │ │ │ │ │ -  Lowest order Raviart-Thomas shape functions on the reference │ │ │ │ │ +class  Dune::RT1Cube2DLocalBasis<_D,_R_> │ │ │ │ │ +  First 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 │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00242_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0cube2dall.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube2dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,252 +70,200 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas0cube2dall.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_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <numeric>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
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 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
│ │ │ │ +
│ │ │ │ +
57 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
58 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
59 {
│ │ │ │ +
60 out.resize(12);
│ │ │ │ +
61
│ │ │ │ +
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 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
│ │ │ │ -
│ │ │ │ -
115 unsigned int order () const
│ │ │ │ -
116 {
│ │ │ │ -
117 return 1;
│ │ │ │ -
118 }
│ │ │ │ -
│ │ │ │ -
119
│ │ │ │ -
120 private:
│ │ │ │ -
121 std::array<R,4> sign_;
│ │ │ │ -
122 };
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
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 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);
│ │ │ │ +
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
│ │ │ │ -
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 };
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
179 private:
│ │ │ │ +
180 std::array<R,4> sign_;
│ │ │ │ +
181 };
│ │ │ │ +
│ │ │ │ +
182}
│ │ │ │ +
183#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -8,272 +8,220 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0cube2d │ │ │ │ │ -raviartthomas0cube2dall.hh │ │ │ │ │ + * raviartthomas1cube2d │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ - 17 │ │ │ │ │ - 18namespace Dune │ │ │ │ │ - 19{ │ │ │ │ │ - 28 template │ │ │ │ │ -29 class RT0Cube2DLocalBasis │ │ │ │ │ - 30 { │ │ │ │ │ - 31 public: │ │ │ │ │ - 32 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include "../../common/localbasis.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 26 template │ │ │ │ │ +27 class RT1Cube2DLocalBasis │ │ │ │ │ + 28 { │ │ │ │ │ + 29 │ │ │ │ │ + 30 public: │ │ │ │ │ + 31 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ FieldVector, │ │ │ │ │ -33 Dune::FieldMatrix > 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& 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& 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 } │ │ │ │ │ - 77 │ │ │ │ │ -79 void partial (const std::array& order, │ │ │ │ │ - 80 const typename Traits::DomainType& in, // position │ │ │ │ │ - 81 std::vector& 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 } │ │ │ │ │ +32 Dune::FieldMatrix > 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 │ │ │ │ │ +57 inline void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ + 58 std::vector& out) const │ │ │ │ │ + 59 { │ │ │ │ │ + 60 out.resize(12); │ │ │ │ │ + 61 │ │ │ │ │ + 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& out) const │ │ │ │ │ + 96 { │ │ │ │ │ + 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 │ │ │ │ │ -115 unsigned int order () const │ │ │ │ │ - 116 { │ │ │ │ │ - 117 return 1; │ │ │ │ │ - 118 } │ │ │ │ │ - 119 │ │ │ │ │ - 120 private: │ │ │ │ │ - 121 std::array sign_; │ │ │ │ │ - 122 }; │ │ │ │ │ + 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 │ │ │ │ │ - 132 template │ │ │ │ │ -133 class RT0Cube2DLocalInterpolation │ │ │ │ │ - 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 } │ │ │ │ │ + 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 template │ │ │ │ │ -155 void interpolate (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); │ │ │ │ │ + 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 │ │ │ │ │ - 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 }; │ │ │ │ │ +161 void partial (const std::array& order, │ │ │ │ │ + 162 const typename Traits::DomainType& in, // position │ │ │ │ │ + 163 std::vector& 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 │ │ │ │ │ -185 class RT0Cube2DLocalCoefficients │ │ │ │ │ - 186 { │ │ │ │ │ - 187 public: │ │ │ │ │ -189 RT0Cube2DLocalCoefficients () : li(4) │ │ │ │ │ - 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 li; │ │ │ │ │ - 209 }; │ │ │ │ │ - 210 │ │ │ │ │ - 211} │ │ │ │ │ - 212#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH │ │ │ │ │ -localkey.hh │ │ │ │ │ + 179 private: │ │ │ │ │ + 180 std::array sign_; │ │ │ │ │ + 181 }; │ │ │ │ │ + 182} │ │ │ │ │ + 183#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalBasisTraits │ │ │ │ │ Type traits for LocalBasisVirtualInterface. │ │ │ │ │ Definition common/localbasis.hh:34 │ │ │ │ │ Dune::LocalBasisTraits::DomainType │ │ │ │ │ D DomainType │ │ │ │ │ domain type │ │ │ │ │ Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::RT0Cube2DLocalBasis │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:30 │ │ │ │ │ -Dune::RT0Cube2DLocalBasis::RT0Cube2DLocalBasis │ │ │ │ │ -RT0Cube2DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ -Constructor with a set of edge orientations. │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:36 │ │ │ │ │ -Dune::RT0Cube2DLocalBasis::Traits │ │ │ │ │ +Dune::RT1Cube2DLocalBasis │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas1cube2dlocalbasis.hh:28 │ │ │ │ │ +Dune::RT1Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition raviartthomas1cube2dlocalbasis.hh:94 │ │ │ │ │ +Dune::RT1Cube2DLocalBasis::Traits │ │ │ │ │ LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:33 │ │ │ │ │ -Dune::RT0Cube2DLocalBasis::evaluateFunction │ │ │ │ │ +Definition raviartthomas1cube2dlocalbasis.hh:32 │ │ │ │ │ +Dune::RT1Cube2DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition raviartthomas1cube2dlocalbasis.hh:174 │ │ │ │ │ +Dune::RT1Cube2DLocalBasis::evaluateFunction │ │ │ │ │ void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ typename Traits::RangeType > &out) const │ │ │ │ │ Evaluate all shape functions. │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:49 │ │ │ │ │ -Dune::RT0Cube2DLocalBasis::partial │ │ │ │ │ +Definition raviartthomas1cube2dlocalbasis.hh:57 │ │ │ │ │ +Dune::RT1Cube2DLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition raviartthomas1cube2dlocalbasis.hh:46 │ │ │ │ │ +Dune::RT1Cube2DLocalBasis::RT1Cube2DLocalBasis │ │ │ │ │ +RT1Cube2DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition raviartthomas1cube2dlocalbasis.hh:39 │ │ │ │ │ +Dune::RT1Cube2DLocalBasis::partial │ │ │ │ │ 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 │ │ │ │ │ -Dune::RT0Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:61 │ │ │ │ │ -Dune::RT0Cube2DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:115 │ │ │ │ │ -Dune::RT0Cube2DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:43 │ │ │ │ │ -Dune::RT0Cube2DLocalInterpolation │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:134 │ │ │ │ │ -Dune::RT0Cube2DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:155 │ │ │ │ │ -Dune::RT0Cube2DLocalInterpolation::RT0Cube2DLocalInterpolation │ │ │ │ │ -RT0Cube2DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ -Constructor with explicitly given edge orientations. │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:138 │ │ │ │ │ -Dune::RT0Cube2DLocalCoefficients │ │ │ │ │ -Layout map for RT0 elements on quadrilaterals. │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:186 │ │ │ │ │ -Dune::RT0Cube2DLocalCoefficients::RT0Cube2DLocalCoefficients │ │ │ │ │ -RT0Cube2DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:189 │ │ │ │ │ -Dune::RT0Cube2DLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:196 │ │ │ │ │ -Dune::RT0Cube2DLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:202 │ │ │ │ │ -localbasis.hh │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Definition raviartthomas1cube2dlocalbasis.hh:161 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00245.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas12d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube2dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,34 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas12d.hh File Reference
│ │ │ │ +
raviartthomas1cube2dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include "../common/localfiniteelementtraits.hh"
│ │ │ │ -#include "raviartthomas12d/raviartthomas12dlocalbasis.hh"
│ │ │ │ -#include "raviartthomas12d/raviartthomas12dlocalcoefficients.hh"
│ │ │ │ -#include "raviartthomas12d/raviartthomas12dlocalinterpolation.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::RT12DLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on triangles. More...
class  Dune::RT1Cube2DLocalInterpolation< LB >
 First order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ + * raviartthomas1cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas12d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "raviartthomas12d/raviartthomas12dlocalbasis.hh" │ │ │ │ │ -#include "raviartthomas12d/raviartthomas12dlocalcoefficients.hh" │ │ │ │ │ -#include "raviartthomas12d/raviartthomas12dlocalinterpolation.hh" │ │ │ │ │ +raviartthomas1cube2dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT12DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  First order Raviart-Thomas shape functions on triangles. More... │ │ │ │ │ +class  Dune::RT1Cube2DLocalInterpolation<_LB_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00245_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas12d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube2dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,124 +70,127 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas12d.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_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ +
8#include <vector>
│ │ │ │
9
│ │ │ │ -
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
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 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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
25 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
27 {
│ │ │ │ +
28
│ │ │ │ +
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
│ │ │ │ -
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 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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,138 +8,126 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -raviartthomas12d.hh │ │ │ │ │ + * raviartthomas1cube2d │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "raviartthomas12d/raviartthomas12dlocalbasis.hh" │ │ │ │ │ - 12#include "raviartthomas12d/raviartthomas12dlocalcoefficients.hh" │ │ │ │ │ - 13#include "raviartthomas12d/raviartthomas12dlocalinterpolation.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 17 │ │ │ │ │ - 26 template │ │ │ │ │ -27 class │ │ │ │ │ - 28 RT12DLocalFiniteElement │ │ │ │ │ - 29 { │ │ │ │ │ - 30 │ │ │ │ │ - 31 public: │ │ │ │ │ - 32 typedef │ │ │ │ │ -LocalFiniteElementTraits,RT12DLocalCoefficients, │ │ │ │ │ -33 RT12DLocalInterpolation > > Traits; │ │ │ │ │ - 34 │ │ │ │ │ -36 RT12DLocalFiniteElement () │ │ │ │ │ - 37 {} │ │ │ │ │ - 38 │ │ │ │ │ -44 RT12DLocalFiniteElement (int s) : │ │ │ │ │ - 45 basis(s), │ │ │ │ │ - 46 interpolation(s) │ │ │ │ │ - 47 {} │ │ │ │ │ - 48 │ │ │ │ │ -49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 50 { │ │ │ │ │ - 51 return basis; │ │ │ │ │ - 52 } │ │ │ │ │ - 53 │ │ │ │ │ -54 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 55 { │ │ │ │ │ - 56 return coefficients; │ │ │ │ │ - 57 } │ │ │ │ │ - 58 │ │ │ │ │ -59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 76 RT12DLocalBasis basis; │ │ │ │ │ - 77 RT12DLocalCoefficients coefficients; │ │ │ │ │ - 78 RT12DLocalInterpolation > interpolation; │ │ │ │ │ - 79 }; │ │ │ │ │ - 80} │ │ │ │ │ - 81 │ │ │ │ │ - 82#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH │ │ │ │ │ -raviartthomas12dlocalcoefficients.hh │ │ │ │ │ -raviartthomas12dlocalinterpolation.hh │ │ │ │ │ -raviartthomas12dlocalbasis.hh │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13 │ │ │ │ │ + 14namespace Dune │ │ │ │ │ + 15{ │ │ │ │ │ + 16 │ │ │ │ │ + 25 template │ │ │ │ │ +26 class RT1Cube2DLocalInterpolation │ │ │ │ │ + 27 { │ │ │ │ │ + 28 │ │ │ │ │ + 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 │ │ │ │ │ +55 void interpolate (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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::RT12DLocalFiniteElement │ │ │ │ │ -First order Raviart-Thomas shape functions on triangles. │ │ │ │ │ -Definition raviartthomas12d.hh:29 │ │ │ │ │ -Dune::RT12DLocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition raviartthomas12d.hh:65 │ │ │ │ │ -Dune::RT12DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< RT12DLocalBasis< D, R >, RT12DLocalCoefficients, │ │ │ │ │ -RT12DLocalInterpolation< RT12DLocalBasis< D, R > > > Traits │ │ │ │ │ -Definition raviartthomas12d.hh:33 │ │ │ │ │ -Dune::RT12DLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition raviartthomas12d.hh:49 │ │ │ │ │ -Dune::RT12DLocalFiniteElement::RT12DLocalFiniteElement │ │ │ │ │ -RT12DLocalFiniteElement(int s) │ │ │ │ │ -Make set number s, where 0 <= s < 8. │ │ │ │ │ -Definition raviartthomas12d.hh:44 │ │ │ │ │ -Dune::RT12DLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition raviartthomas12d.hh:54 │ │ │ │ │ -Dune::RT12DLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition raviartthomas12d.hh:70 │ │ │ │ │ -Dune::RT12DLocalFiniteElement::RT12DLocalFiniteElement │ │ │ │ │ -RT12DLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas12d.hh:36 │ │ │ │ │ -Dune::RT12DLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition raviartthomas12d.hh:59 │ │ │ │ │ -Dune::RT12DLocalBasis │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ -Definition raviartthomas12dlocalbasis.hh:28 │ │ │ │ │ -Dune::RT12DLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-1 elements on the reference triangle. │ │ │ │ │ -Definition raviartthomas12dlocalcoefficients.hh:23 │ │ │ │ │ -Dune::RT12DLocalInterpolation │ │ │ │ │ +Dune::RT1Cube2DLocalInterpolation │ │ │ │ │ First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas12dlocalinterpolation.hh:26 │ │ │ │ │ +Definition raviartthomas1cube2dlocalinterpolation.hh:27 │ │ │ │ │ +Dune::RT1Cube2DLocalInterpolation::RT1Cube2DLocalInterpolation │ │ │ │ │ +RT1Cube2DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition raviartthomas1cube2dlocalinterpolation.hh:35 │ │ │ │ │ +Dune::RT1Cube2DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +Definition raviartthomas1cube2dlocalinterpolation.hh:55 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00248.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas3cube2d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas03dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas3cube2d.hh File Reference
│ │ │ │ +
raviartthomas03dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include "../common/localfiniteelementtraits.hh"
│ │ │ │ -#include "raviartthomas3cube2d/raviartthomas3cube2dlocalbasis.hh"
│ │ │ │ -#include "raviartthomas3cube2d/raviartthomas3cube2dlocalcoefficients.hh"
│ │ │ │ -#include "raviartthomas3cube2d/raviartthomas3cube2dlocalinterpolation.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::RT3Cube2DLocalFiniteElement< D, R >
 Second order Raviart-Thomas shape functions on cubes. More...
class  Dune::RT03DLocalBasis< D, R >
 Lowest order Raviart-Thomas shape functions on the reference tetrahedron. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ + * raviartthomas03d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas3cube2d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "raviartthomas3cube2d/raviartthomas3cube2dlocalbasis.hh" │ │ │ │ │ -#include "raviartthomas3cube2d/raviartthomas3cube2dlocalcoefficients.hh" │ │ │ │ │ -#include "raviartthomas3cube2d/raviartthomas3cube2dlocalinterpolation.hh" │ │ │ │ │ +raviartthomas03dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT3Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  Second order Raviart-Thomas shape functions on cubes. More... │ │ │ │ │ +class  Dune::RT03DLocalBasis<_D,_R_> │ │ │ │ │ +  Lowest order Raviart-Thomas shape functions on the reference │ │ │ │ │ + tetrahedron. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00248_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas3cube2d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas03dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,123 +70,143 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas3cube2d.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_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ +
8#include <numeric>
│ │ │ │
9
│ │ │ │ -
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
27 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ +
10#include <dune/common/fmatrix.hh>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
31 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
36
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 {}
│ │ │ │ -
│ │ │ │ -
40
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
47 basis(s),
│ │ │ │ -
48 interpolation(s)
│ │ │ │ -
49 {}
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
51 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
52 {
│ │ │ │ -
53 return basis;
│ │ │ │ +
│ │ │ │ +
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 {
│ │ │ │ -
58 return coefficients;
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
62 {
│ │ │ │ -
63 return interpolation;
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ -
65
│ │ │ │ -
│ │ │ │ -
67 unsigned int size () const
│ │ │ │ -
68 {
│ │ │ │ -
69 return basis.size();
│ │ │ │ -
70 }
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
71
│ │ │ │ +
70
│ │ │ │
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,137 +8,158 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -raviartthomas3cube2d.hh │ │ │ │ │ + * raviartthomas03d │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH │ │ │ │ │ + 6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "raviartthomas3cube2d/raviartthomas3cube2dlocalbasis.hh" │ │ │ │ │ - 12#include "raviartthomas3cube2d/raviartthomas3cube2dlocalcoefficients.hh" │ │ │ │ │ - 13#include "raviartthomas3cube2d/raviartthomas3cube2dlocalinterpolation.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 27 template │ │ │ │ │ -28 class RT3Cube2DLocalFiniteElement │ │ │ │ │ - 29 { │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14namespace Dune │ │ │ │ │ + 15{ │ │ │ │ │ + 24 template │ │ │ │ │ +25 class RT03DLocalBasis │ │ │ │ │ + 26 { │ │ │ │ │ + 27 public: │ │ │ │ │ + 28 typedef LocalBasisTraits,R,3,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +29 Dune::FieldMatrix > Traits; │ │ │ │ │ 30 │ │ │ │ │ - 31 public: │ │ │ │ │ - 32 typedef LocalFiniteElementTraits< │ │ │ │ │ - 33 RT3Cube2DLocalBasis, │ │ │ │ │ - 34 RT3Cube2DLocalCoefficients, │ │ │ │ │ -35 RT3Cube2DLocalInterpolation > > Traits; │ │ │ │ │ - 36 │ │ │ │ │ -38 RT3Cube2DLocalFiniteElement () │ │ │ │ │ - 39 {} │ │ │ │ │ - 40 │ │ │ │ │ -46 RT3Cube2DLocalFiniteElement (int s) : │ │ │ │ │ - 47 basis(s), │ │ │ │ │ - 48 interpolation(s) │ │ │ │ │ - 49 {} │ │ │ │ │ - 50 │ │ │ │ │ -51 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 52 { │ │ │ │ │ - 53 return basis; │ │ │ │ │ +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& 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 │ │ │ │ │ -56 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 57 { │ │ │ │ │ - 58 return coefficients; │ │ │ │ │ - 59 } │ │ │ │ │ - 60 │ │ │ │ │ -61 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 78 RT3Cube2DLocalBasis basis; │ │ │ │ │ - 79 RT3Cube2DLocalCoefficients coefficients; │ │ │ │ │ - 80 RT3Cube2DLocalInterpolation > interpolation; │ │ │ │ │ - 81 }; │ │ │ │ │ - 82} │ │ │ │ │ - 83#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ -raviartthomas3cube2dlocalbasis.hh │ │ │ │ │ -raviartthomas3cube2dlocalinterpolation.hh │ │ │ │ │ -raviartthomas3cube2dlocalcoefficients.hh │ │ │ │ │ + 57 inline void │ │ │ │ │ +58 evaluateJacobian (const typename Traits::DomainType& 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 │ │ │ │ │ +72 void partial (const std::array& order, │ │ │ │ │ + 73 const typename Traits::DomainType& in, // position │ │ │ │ │ + 74 std::vector& 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 sign_; │ │ │ │ │ + 108 }; │ │ │ │ │ + 109} │ │ │ │ │ + 110#endif │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::RT3Cube2DLocalFiniteElement │ │ │ │ │ -Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ -Definition raviartthomas3cube2d.hh:29 │ │ │ │ │ -Dune::RT3Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition raviartthomas3cube2d.hh:56 │ │ │ │ │ -Dune::RT3Cube2DLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition raviartthomas3cube2d.hh:72 │ │ │ │ │ -Dune::RT3Cube2DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< RT3Cube2DLocalBasis< D, R >, │ │ │ │ │ -RT3Cube2DLocalCoefficients, RT3Cube2DLocalInterpolation< RT3Cube2DLocalBasis< │ │ │ │ │ -D, R > > > Traits │ │ │ │ │ -Definition raviartthomas3cube2d.hh:35 │ │ │ │ │ -Dune::RT3Cube2DLocalFiniteElement::RT3Cube2DLocalFiniteElement │ │ │ │ │ -RT3Cube2DLocalFiniteElement(int s) │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::RT03DLocalBasis │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference tetrahedron. │ │ │ │ │ +Definition raviartthomas03dlocalbasis.hh:26 │ │ │ │ │ +Dune::RT03DLocalBasis::RT03DLocalBasis │ │ │ │ │ +RT03DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition raviartthomas3cube2d.hh:46 │ │ │ │ │ -Dune::RT3Cube2DLocalFiniteElement::RT3Cube2DLocalFiniteElement │ │ │ │ │ -RT3Cube2DLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas3cube2d.hh:38 │ │ │ │ │ -Dune::RT3Cube2DLocalFiniteElement::size │ │ │ │ │ +Definition raviartthomas03dlocalbasis.hh:32 │ │ │ │ │ +Dune::RT03DLocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::RT03DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition raviartthomas03dlocalbasis.hh:99 │ │ │ │ │ +Dune::RT03DLocalBasis::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition raviartthomas3cube2d.hh:67 │ │ │ │ │ -Dune::RT3Cube2DLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition raviartthomas3cube2d.hh:51 │ │ │ │ │ -Dune::RT3Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition raviartthomas3cube2d.hh:61 │ │ │ │ │ -Dune::RT3Cube2DLocalBasis │ │ │ │ │ -Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas3cube2dlocalbasis.hh:29 │ │ │ │ │ -Dune::RT3Cube2DLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-3 elements on quadrilaterals. │ │ │ │ │ -Definition raviartthomas3cube2dlocalcoefficients.hh:23 │ │ │ │ │ -Dune::RT3Cube2DLocalInterpolation │ │ │ │ │ -Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas3cube2dlocalinterpolation.hh:26 │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition raviartthomas03dlocalbasis.hh:39 │ │ │ │ │ +Dune::RT03DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition raviartthomas03dlocalbasis.hh:58 │ │ │ │ │ +Dune::RT03DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition raviartthomas03dlocalbasis.hh:45 │ │ │ │ │ +Dune::RT03DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ +3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ +Definition raviartthomas03dlocalbasis.hh:29 │ │ │ │ │ +localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00251.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomascube.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas03dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,68 +65,42 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomascube.hh File Reference
│ │ │ │ +
raviartthomas03dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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"
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

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...
 
class  Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 3 >
 Raviart-Thomas local finite elements for cubes with dimension 2 and order 3. 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...
class  Dune::RT03DLocalCoefficients
 Layout map for RT0 elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

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

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,57 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ + * raviartthomas03d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomascube.hh File Reference │ │ │ │ │ -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" │ │ │ │ │ +raviartthomas03dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -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... │ │ │ │ │ -  │ │ │ │ │ -class  Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_3_> │ │ │ │ │ -  Raviart-Thomas local finite elements for cubes with dimension 2 and │ │ │ │ │ - order 3. 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... │ │ │ │ │ +class  Dune::RT03DLocalCoefficients │ │ │ │ │ +  Layout map for RT0 elements. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ -***** Detailed Description ***** │ │ │ │ │ -Convenience header that includes all available Raviart-Thomas local finite │ │ │ │ │ -elements for cubes. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00251_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomascube.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas03dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,213 +70,78 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomascube.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// 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_CUBE_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
107 {}
│ │ │ │ -
│ │ │ │ -
108 };
│ │ │ │ -
│ │ │ │ -
109
│ │ │ │ -
113 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
115 : public RT4Cube2DLocalFiniteElement<D, R>
│ │ │ │ -
116 {
│ │ │ │ -
117 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
120 {}
│ │ │ │ -
│ │ │ │ -
121
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
124 {}
│ │ │ │ -
│ │ │ │ -
125 };
│ │ │ │ -
│ │ │ │ -
126
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,222 +8,79 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -raviartthomascube.hh │ │ │ │ │ + * raviartthomas03d │ │ │ │ │ +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// 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_CUBE_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH │ │ │ │ │ + 5#ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include "raviartthomas0cube2d.hh" │ │ │ │ │ - 9#include "raviartthomas0cube3d.hh" │ │ │ │ │ - 10#include "raviartthomas1cube2d.hh" │ │ │ │ │ - 11#include "raviartthomas1cube3d.hh" │ │ │ │ │ - 12#include "raviartthomas2cube2d.hh" │ │ │ │ │ - 13#include "raviartthomas3cube2d.hh" │ │ │ │ │ - 14#include "raviartthomas4cube2d.hh" │ │ │ │ │ - 15 │ │ │ │ │ - 22namespace Dune │ │ │ │ │ - 23{ │ │ │ │ │ - 39 template │ │ │ │ │ -40 class RaviartThomasCubeLocalFiniteElement; │ │ │ │ │ - 41 │ │ │ │ │ - 45 template │ │ │ │ │ -46 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ - 47 : public RT0Cube2DLocalFiniteElement │ │ │ │ │ - 48 { │ │ │ │ │ - 49 public: │ │ │ │ │ -50 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ - 51 : RT0Cube2DLocalFiniteElement::RT0Cube2DLocalFiniteElement() │ │ │ │ │ - 52 {} │ │ │ │ │ - 53 │ │ │ │ │ -54 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ - 55 : RT0Cube2DLocalFiniteElement::RT0Cube2DLocalFiniteElement(s) │ │ │ │ │ - 56 {} │ │ │ │ │ - 57 }; │ │ │ │ │ - 58 │ │ │ │ │ - 62 template │ │ │ │ │ -63 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ - 64 : public RT1Cube2DLocalFiniteElement │ │ │ │ │ - 65 { │ │ │ │ │ - 66 public: │ │ │ │ │ -67 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ - 68 : RT1Cube2DLocalFiniteElement::RT1Cube2DLocalFiniteElement() │ │ │ │ │ - 69 {} │ │ │ │ │ - 70 │ │ │ │ │ -71 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ - 72 : RT1Cube2DLocalFiniteElement::RT1Cube2DLocalFiniteElement(s) │ │ │ │ │ - 73 {} │ │ │ │ │ - 74 }; │ │ │ │ │ - 75 │ │ │ │ │ - 79 template │ │ │ │ │ -80 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ - 81 : public RT2Cube2DLocalFiniteElement │ │ │ │ │ - 82 { │ │ │ │ │ - 83 public: │ │ │ │ │ -84 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ - 85 : RT2Cube2DLocalFiniteElement::RT2Cube2DLocalFiniteElement() │ │ │ │ │ - 86 {} │ │ │ │ │ - 87 │ │ │ │ │ -88 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ - 89 : RT2Cube2DLocalFiniteElement::RT2Cube2DLocalFiniteElement(s) │ │ │ │ │ - 90 {} │ │ │ │ │ - 91 }; │ │ │ │ │ - 92 │ │ │ │ │ - 96 template │ │ │ │ │ -97 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ - 98 : public RT3Cube2DLocalFiniteElement │ │ │ │ │ - 99 { │ │ │ │ │ - 100 public: │ │ │ │ │ -101 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ - 102 : RT3Cube2DLocalFiniteElement::RT3Cube2DLocalFiniteElement() │ │ │ │ │ - 103 {} │ │ │ │ │ - 104 │ │ │ │ │ -105 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ - 106 : RT3Cube2DLocalFiniteElement::RT3Cube2DLocalFiniteElement(s) │ │ │ │ │ - 107 {} │ │ │ │ │ - 108 }; │ │ │ │ │ - 109 │ │ │ │ │ - 113 template │ │ │ │ │ -114 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ - 115 : public RT4Cube2DLocalFiniteElement │ │ │ │ │ - 116 { │ │ │ │ │ - 117 public: │ │ │ │ │ -118 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ - 119 : RT4Cube2DLocalFiniteElement::RT4Cube2DLocalFiniteElement() │ │ │ │ │ - 120 {} │ │ │ │ │ - 121 │ │ │ │ │ -122 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ - 123 : RT4Cube2DLocalFiniteElement::RT4Cube2DLocalFiniteElement(s) │ │ │ │ │ - 124 {} │ │ │ │ │ - 125 }; │ │ │ │ │ - 126 │ │ │ │ │ - 130 template │ │ │ │ │ -131 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ - 132 : public RT0Cube3DLocalFiniteElement │ │ │ │ │ - 133 { │ │ │ │ │ - 134 public: │ │ │ │ │ -135 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ - 136 : RT0Cube3DLocalFiniteElement::RT0Cube3DLocalFiniteElement() │ │ │ │ │ - 137 {} │ │ │ │ │ - 138 │ │ │ │ │ -139 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ - 140 : RT0Cube3DLocalFiniteElement::RT0Cube3DLocalFiniteElement(s) │ │ │ │ │ - 141 {} │ │ │ │ │ - 142 }; │ │ │ │ │ - 143 │ │ │ │ │ - 147 template │ │ │ │ │ -148 class RaviartThomasCubeLocalFiniteElement │ │ │ │ │ - 149 : public RT1Cube3DLocalFiniteElement │ │ │ │ │ - 150 { │ │ │ │ │ - 151 public: │ │ │ │ │ -152 RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ - 153 : RT1Cube3DLocalFiniteElement::RT1Cube3DLocalFiniteElement() │ │ │ │ │ - 154 {} │ │ │ │ │ - 155 │ │ │ │ │ -156 RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ - 157 : RT1Cube3DLocalFiniteElement::RT1Cube3DLocalFiniteElement(s) │ │ │ │ │ - 158 {} │ │ │ │ │ - 159 }; │ │ │ │ │ - 160} // namespace Dune │ │ │ │ │ - 161 │ │ │ │ │ - 162#endif // #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH │ │ │ │ │ -raviartthomas0cube3d.hh │ │ │ │ │ -raviartthomas4cube2d.hh │ │ │ │ │ -raviartthomas3cube2d.hh │ │ │ │ │ -raviartthomas1cube3d.hh │ │ │ │ │ -raviartthomas2cube2d.hh │ │ │ │ │ -raviartthomas0cube2d.hh │ │ │ │ │ -raviartthomas1cube2d.hh │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14namespace Dune │ │ │ │ │ + 15{ │ │ │ │ │ + 16 │ │ │ │ │ +23 class RT03DLocalCoefficients │ │ │ │ │ + 24 { │ │ │ │ │ + 25 public: │ │ │ │ │ +27 RT03DLocalCoefficients () : li(4) │ │ │ │ │ + 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 li; │ │ │ │ │ + 47 }; │ │ │ │ │ + 48 │ │ │ │ │ + 49} │ │ │ │ │ + 50 │ │ │ │ │ + 51#endif │ │ │ │ │ +localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RT0Cube2DLocalFiniteElement │ │ │ │ │ -Zero order Raviart-Thomas shape functions on rectangles. │ │ │ │ │ -Definition raviartthomas0cube2d.hh:25 │ │ │ │ │ -Dune::RT0Cube3DLocalFiniteElement │ │ │ │ │ -Zero order Raviart-Thomas shape functions on cubes. │ │ │ │ │ -Definition raviartthomas0cube3d.hh:25 │ │ │ │ │ -Dune::RT1Cube2DLocalFiniteElement │ │ │ │ │ -First order Raviart-Thomas shape functions on quadrilaterals. │ │ │ │ │ -Definition raviartthomas1cube2d.hh:28 │ │ │ │ │ -Dune::RT1Cube3DLocalFiniteElement │ │ │ │ │ -First order Raviart-Thomas shape functions on cubes. │ │ │ │ │ -Definition raviartthomas1cube3d.hh:27 │ │ │ │ │ -Dune::RT2Cube2DLocalFiniteElement │ │ │ │ │ -Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ -Definition raviartthomas2cube2d.hh:27 │ │ │ │ │ -Dune::RT3Cube2DLocalFiniteElement │ │ │ │ │ -Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ -Definition raviartthomas3cube2d.hh:29 │ │ │ │ │ -Dune::RT4Cube2DLocalFiniteElement │ │ │ │ │ -Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ -Definition raviartthomas4cube2d.hh:29 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -Raviart-Thomas local finite elements for cubes. │ │ │ │ │ -Definition raviartthomascube.hh:40 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_0_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ -Definition raviartthomascube.hh:54 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_0_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ -Definition raviartthomascube.hh:50 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_1_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ -Definition raviartthomascube.hh:67 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_1_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ -Definition raviartthomascube.hh:71 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_2_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ -Definition raviartthomascube.hh:84 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_2_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ -Definition raviartthomascube.hh:88 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_3_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ -Definition raviartthomascube.hh:105 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_3_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ -Definition raviartthomascube.hh:101 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_4_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ -Definition raviartthomascube.hh:122 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_2,_4_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ -Definition raviartthomascube.hh:118 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_3,_0_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ -Definition raviartthomascube.hh:135 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_3,_0_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ -Definition raviartthomascube.hh:139 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_3,_1_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ -Definition raviartthomascube.hh:152 │ │ │ │ │ -Dune::RaviartThomasCubeLocalFiniteElement<_D,_R,_3,_1_>:: │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement │ │ │ │ │ -RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ -Definition raviartthomascube.hh:156 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::RT03DLocalCoefficients │ │ │ │ │ +Layout map for RT0 elements. │ │ │ │ │ +Definition raviartthomas03dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::RT03DLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition raviartthomas03dlocalcoefficients.hh:40 │ │ │ │ │ +Dune::RT03DLocalCoefficients::RT03DLocalCoefficients │ │ │ │ │ +RT03DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas03dlocalcoefficients.hh:27 │ │ │ │ │ +Dune::RT03DLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition raviartthomas03dlocalcoefficients.hh:34 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00254.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube3d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas03dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas1cube3d.hh File Reference
│ │ │ │ +
raviartthomas03dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include "../common/localfiniteelementtraits.hh"
│ │ │ │ -#include "raviartthomas1cube3d/raviartthomas1cube3dlocalbasis.hh"
│ │ │ │ -#include "raviartthomas1cube3d/raviartthomas1cube3dlocalcoefficients.hh"
│ │ │ │ -#include "raviartthomas1cube3d/raviartthomas1cube3dlocalinterpolation.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::RT1Cube3DLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on cubes. More...
class  Dune::RT03DLocalInterpolation< LB >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ + * raviartthomas03d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas1cube3d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "raviartthomas1cube3d/raviartthomas1cube3dlocalbasis.hh" │ │ │ │ │ -#include "raviartthomas1cube3d/raviartthomas1cube3dlocalcoefficients.hh" │ │ │ │ │ -#include "raviartthomas1cube3d/raviartthomas1cube3dlocalinterpolation.hh" │ │ │ │ │ +raviartthomas03dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT1Cube3DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  First order Raviart-Thomas shape functions on cubes. More... │ │ │ │ │ +class  Dune::RT03DLocalInterpolation<_LB_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00254_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube3d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas03dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,123 +70,100 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas1cube3d.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_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_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 {}
│ │ │ │ -
│ │ │ │ -
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::hexahedron;
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
75 private:
│ │ │ │ - │ │ │ │ -
77 RT1Cube3DLocalCoefficients coefficients;
│ │ │ │ - │ │ │ │ -
79 };
│ │ │ │ -
│ │ │ │ -
80}
│ │ │ │ -
81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,137 +8,97 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -raviartthomas1cube3d.hh │ │ │ │ │ + * raviartthomas03d │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH │ │ │ │ │ + 6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "raviartthomas1cube3d/raviartthomas1cube3dlocalbasis.hh" │ │ │ │ │ - 12#include "raviartthomas1cube3d/raviartthomas1cube3dlocalcoefficients.hh" │ │ │ │ │ - 13#include "raviartthomas1cube3d/raviartthomas1cube3dlocalinterpolation.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 25 template │ │ │ │ │ -26 class RT1Cube3DLocalFiniteElement │ │ │ │ │ - 27 { │ │ │ │ │ - 28 │ │ │ │ │ - 29 public: │ │ │ │ │ - 30 typedef LocalFiniteElementTraits< │ │ │ │ │ - 31 RT1Cube3DLocalBasis, │ │ │ │ │ - 32 RT1Cube3DLocalCoefficients, │ │ │ │ │ -33 RT1Cube3DLocalInterpolation > > Traits; │ │ │ │ │ - 34 │ │ │ │ │ -36 RT1Cube3DLocalFiniteElement () │ │ │ │ │ - 37 {} │ │ │ │ │ - 38 │ │ │ │ │ -44 RT1Cube3DLocalFiniteElement (int s) : │ │ │ │ │ - 45 basis(s), │ │ │ │ │ - 46 interpolation(s) │ │ │ │ │ - 47 {} │ │ │ │ │ - 48 │ │ │ │ │ -49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 50 { │ │ │ │ │ - 51 return basis; │ │ │ │ │ - 52 } │ │ │ │ │ - 53 │ │ │ │ │ -54 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 55 { │ │ │ │ │ - 56 return coefficients; │ │ │ │ │ - 57 } │ │ │ │ │ - 58 │ │ │ │ │ -59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 76 RT1Cube3DLocalBasis basis; │ │ │ │ │ - 77 RT1Cube3DLocalCoefficients coefficients; │ │ │ │ │ - 78 RT1Cube3DLocalInterpolation > interpolation; │ │ │ │ │ - 79 }; │ │ │ │ │ - 80} │ │ │ │ │ - 81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ -raviartthomas1cube3dlocalinterpolation.hh │ │ │ │ │ -raviartthomas1cube3dlocalbasis.hh │ │ │ │ │ -raviartthomas1cube3dlocalcoefficients.hh │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14namespace Dune │ │ │ │ │ + 15{ │ │ │ │ │ + 16 template │ │ │ │ │ +17 class RT03DLocalInterpolation │ │ │ │ │ + 18 { │ │ │ │ │ + 19 public: │ │ │ │ │ + 20 │ │ │ │ │ +22 RT03DLocalInterpolation (std::bitset<4> s = 0) │ │ │ │ │ + 23 { │ │ │ │ │ + 24 using std::sqrt; │ │ │ │ │ + 25 for (std::size_t i=0; i │ │ │ │ │ +43 void interpolate (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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::RT1Cube3DLocalFiniteElement │ │ │ │ │ -First order Raviart-Thomas shape functions on cubes. │ │ │ │ │ -Definition raviartthomas1cube3d.hh:27 │ │ │ │ │ -Dune::RT1Cube3DLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition raviartthomas1cube3d.hh:59 │ │ │ │ │ -Dune::RT1Cube3DLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition raviartthomas1cube3d.hh:54 │ │ │ │ │ -Dune::RT1Cube3DLocalFiniteElement::RT1Cube3DLocalFiniteElement │ │ │ │ │ -RT1Cube3DLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas1cube3d.hh:36 │ │ │ │ │ -Dune::RT1Cube3DLocalFiniteElement::RT1Cube3DLocalFiniteElement │ │ │ │ │ -RT1Cube3DLocalFiniteElement(int s) │ │ │ │ │ -Make set number s, where 0 <= s < 64. │ │ │ │ │ -Definition raviartthomas1cube3d.hh:44 │ │ │ │ │ -Dune::RT1Cube3DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< RT1Cube3DLocalBasis< D, R >, │ │ │ │ │ -RT1Cube3DLocalCoefficients, RT1Cube3DLocalInterpolation< RT1Cube3DLocalBasis< │ │ │ │ │ -D, R > > > Traits │ │ │ │ │ -Definition raviartthomas1cube3d.hh:33 │ │ │ │ │ -Dune::RT1Cube3DLocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition raviartthomas1cube3d.hh:65 │ │ │ │ │ -Dune::RT1Cube3DLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition raviartthomas1cube3d.hh:70 │ │ │ │ │ -Dune::RT1Cube3DLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition raviartthomas1cube3d.hh:49 │ │ │ │ │ -Dune::RT1Cube3DLocalBasis │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ -Definition raviartthomas1cube3dlocalbasis.hh:28 │ │ │ │ │ -Dune::RT1Cube3DLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ │ -Definition raviartthomas1cube3dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::RT1Cube3DLocalInterpolation │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ -Definition raviartthomas1cube3dlocalinterpolation.hh:25 │ │ │ │ │ +Dune::RT03DLocalInterpolation │ │ │ │ │ +Definition raviartthomas03dlocalinterpolation.hh:18 │ │ │ │ │ +Dune::RT03DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Definition raviartthomas03dlocalinterpolation.hh:43 │ │ │ │ │ +Dune::RT03DLocalInterpolation::RT03DLocalInterpolation │ │ │ │ │ +RT03DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ +Constructor with given set of face orientations. │ │ │ │ │ +Definition raviartthomas03dlocalinterpolation.hh:22 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00257.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplexbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas4cube2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomassimplexbasis.hh File Reference
│ │ │ │ +
raviartthomas4cube2d.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 "../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::RaviartThomasBasisFactory< dim, SF, CF >
class  Dune::RT4Cube2DLocalFiniteElement< D, R >
 Second order Raviart-Thomas shape functions on cubes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomassimplex │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomassimplexbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "raviartthomassimplexinterpolation.hh" │ │ │ │ │ -#include "raviartthomassimplexprebasis.hh" │ │ │ │ │ +raviartthomas4cube2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#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::RaviartThomasBasisFactory<_dim,_SF,_CF_> │ │ │ │ │ +class  Dune::RT4Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on cubes. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00257_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplexbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas4cube2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,72 +70,123 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomassimplexbasis.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_RAVIARTTHOMASBASIS_HH
│ │ │ │ -
6#define DUNE_RAVIARTTHOMASBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_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 * `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 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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
27 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30
│ │ │ │ +
31 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
36
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
39 {}
│ │ │ │ +
│ │ │ │ +
40
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 RT4Cube2DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
81 };
│ │ │ │ +
│ │ │ │ +
82}
│ │ │ │ +
83#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_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
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -8,71 +8,137 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomassimplex │ │ │ │ │ -raviartthomassimplexbasis.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_RAVIARTTHOMASBASIS_HH │ │ │ │ │ - 6#define DUNE_RAVIARTTHOMASBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include "raviartthomassimplexinterpolation.hh" │ │ │ │ │ - 13#include "raviartthomassimplexprebasis.hh" │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ + 11#include "raviartthomas4cube2d/raviartthomas4cube2dlocalbasis.hh" │ │ │ │ │ + 12#include "raviartthomas4cube2d/raviartthomas4cube2dlocalcoefficients.hh" │ │ │ │ │ + 13#include "raviartthomas4cube2d/raviartthomas4cube2dlocalinterpolation.hh" │ │ │ │ │ 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 template< unsigned int dim, class SF, class CF > │ │ │ │ │ -36 struct RaviartThomasBasisFactory │ │ │ │ │ - 37 : public DefaultBasisFactory< RTPreBasisFactory, │ │ │ │ │ - 38 RaviartThomasL2InterpolationFactory, │ │ │ │ │ - 39 dim,dim,SF,CF > │ │ │ │ │ - 40 {}; │ │ │ │ │ - 41} │ │ │ │ │ - 42 │ │ │ │ │ - 43#endif // #ifndef DUNE_RAVIARTTHOMASBASIS_HH │ │ │ │ │ -defaultbasisfactory.hh │ │ │ │ │ -raviartthomassimplexprebasis.hh │ │ │ │ │ -raviartthomassimplexinterpolation.hh │ │ │ │ │ + 27 template │ │ │ │ │ +28 class RT4Cube2DLocalFiniteElement │ │ │ │ │ + 29 { │ │ │ │ │ + 30 │ │ │ │ │ + 31 public: │ │ │ │ │ + 32 typedef LocalFiniteElementTraits< │ │ │ │ │ + 33 RT4Cube2DLocalBasis, │ │ │ │ │ + 34 RT4Cube2DLocalCoefficients, │ │ │ │ │ +35 RT4Cube2DLocalInterpolation > > Traits; │ │ │ │ │ + 36 │ │ │ │ │ +38 RT4Cube2DLocalFiniteElement () │ │ │ │ │ + 39 {} │ │ │ │ │ + 40 │ │ │ │ │ +46 RT4Cube2DLocalFiniteElement (int s) : │ │ │ │ │ + 47 basis(s), │ │ │ │ │ + 48 interpolation(s) │ │ │ │ │ + 49 {} │ │ │ │ │ + 50 │ │ │ │ │ +51 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 52 { │ │ │ │ │ + 53 return basis; │ │ │ │ │ + 54 } │ │ │ │ │ + 55 │ │ │ │ │ +56 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 57 { │ │ │ │ │ + 58 return coefficients; │ │ │ │ │ + 59 } │ │ │ │ │ + 60 │ │ │ │ │ +61 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 78 RT4Cube2DLocalBasis basis; │ │ │ │ │ + 79 RT4Cube2DLocalCoefficients coefficients; │ │ │ │ │ + 80 RT4Cube2DLocalInterpolation > interpolation; │ │ │ │ │ + 81 }; │ │ │ │ │ + 82} │ │ │ │ │ + 83#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +raviartthomas4cube2dlocalbasis.hh │ │ │ │ │ +raviartthomas4cube2dlocalcoefficients.hh │ │ │ │ │ +raviartthomas4cube2dlocalinterpolation.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RaviartThomasBasisFactory │ │ │ │ │ -Definition raviartthomassimplexbasis.hh:40 │ │ │ │ │ -Dune::DefaultBasisFactory │ │ │ │ │ -Definition defaultbasisfactory.hh:38 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::RT4Cube2DLocalFiniteElement │ │ │ │ │ +Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +Definition raviartthomas4cube2d.hh:29 │ │ │ │ │ +Dune::RT4Cube2DLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< RT4Cube2DLocalBasis< D, R >, │ │ │ │ │ +RT4Cube2DLocalCoefficients, RT4Cube2DLocalInterpolation< RT4Cube2DLocalBasis< │ │ │ │ │ +D, R > > > Traits │ │ │ │ │ +Definition raviartthomas4cube2d.hh:35 │ │ │ │ │ +Dune::RT4Cube2DLocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition raviartthomas4cube2d.hh:67 │ │ │ │ │ +Dune::RT4Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition raviartthomas4cube2d.hh:56 │ │ │ │ │ +Dune::RT4Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition raviartthomas4cube2d.hh:61 │ │ │ │ │ +Dune::RT4Cube2DLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition raviartthomas4cube2d.hh:51 │ │ │ │ │ +Dune::RT4Cube2DLocalFiniteElement::RT4Cube2DLocalFiniteElement │ │ │ │ │ +RT4Cube2DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition raviartthomas4cube2d.hh:46 │ │ │ │ │ +Dune::RT4Cube2DLocalFiniteElement::RT4Cube2DLocalFiniteElement │ │ │ │ │ +RT4Cube2DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas4cube2d.hh:38 │ │ │ │ │ +Dune::RT4Cube2DLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition raviartthomas4cube2d.hh:72 │ │ │ │ │ +Dune::RT4Cube2DLocalBasis │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas4cube2dlocalbasis.hh:29 │ │ │ │ │ +Dune::RT4Cube2DLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-4 elements on quadrilaterals. │ │ │ │ │ +Definition raviartthomas4cube2dlocalcoefficients.hh:23 │ │ │ │ │ +Dune::RT4Cube2DLocalInterpolation │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +Definition raviartthomas4cube2dlocalinterpolation.hh:26 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00260.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplexprebasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomassimplex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomassimplexprebasis.hh File Reference
│ │ │ │ +
raviartthomassimplex.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │ + │ │ │ │ +

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

│ │ │ │ + │ │ │ │

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::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 {} │ │ │ │ │ @@ -7,29 +7,28 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomassimplex │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomassimplexprebasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomassimplex.hh File Reference │ │ │ │ │ +Raviart-Thomas local finite elements of arbitrary order for simplices of │ │ │ │ │ +arbitrary dimension. More... │ │ │ │ │ +#include │ │ │ │ │ +#include "raviartthomassimplex/raviartthomassimplexbasis.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::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. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00260_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplexprebasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomassimplex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,283 +70,66 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomassimplexprebasis.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_RAVIARTTHOMASPREBASIS_HH
│ │ │ │ -
6#define DUNE_RAVIARTTHOMASPREBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH
│ │ │ │
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <utility>
│ │ │ │ + │ │ │ │ + │ │ │ │
10
│ │ │ │ -
11#include <dune/geometry/type.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;
│ │ │ │ -
44 }
│ │ │ │ -
│ │ │ │ -
45 static void release( Object *object ) { delete object; }
│ │ │ │ -
46 };
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
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 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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,330 +8,73 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomassimplex │ │ │ │ │ -raviartthomassimplexprebasis.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_RAVIARTTHOMASPREBASIS_HH │ │ │ │ │ - 6#define DUNE_RAVIARTTHOMASPREBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include "raviartthomassimplex/raviartthomassimplexbasis.hh" │ │ │ │ │ 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 17 template < GeometryType::Id geometryId, class Field > │ │ │ │ │ - 18 struct RTVecMatrix; │ │ │ │ │ - 19 │ │ │ │ │ - 20 template │ │ │ │ │ -21 struct RTPreBasisFactory │ │ │ │ │ - 22 { │ │ │ │ │ -23 typedef MonomialBasisProvider MBasisFactory; │ │ │ │ │ -24 typedef typename MBasisFactory::Object MBasis; │ │ │ │ │ -25 typedef StandardEvaluator EvalMBasis; │ │ │ │ │ -26 typedef PolynomialBasisWithMatrix > │ │ │ │ │ -Basis; │ │ │ │ │ - 27 │ │ │ │ │ -28 typedef const Basis Object; │ │ │ │ │ -29 typedef std::size_t Key; │ │ │ │ │ - 30 │ │ │ │ │ - 31 template │ │ │ │ │ -32 struct EvaluationBasisFactory │ │ │ │ │ - 33 { │ │ │ │ │ -34 typedef MonomialBasisProvider Type; │ │ │ │ │ - 35 }; │ │ │ │ │ - 36 template< GeometryType::Id geometryId > │ │ │ │ │ -37 static Object *create ( const Key &order ) │ │ │ │ │ - 38 { │ │ │ │ │ - 39 RTVecMatrix vecMatrix(order); │ │ │ │ │ - 40 MBasis *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 } │ │ │ │ │ -45 static void release( Object *object ) { delete object; } │ │ │ │ │ - 46 }; │ │ │ │ │ + 17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ + 35 template │ │ │ │ │ +37 class RaviartThomasSimplexLocalFiniteElement │ │ │ │ │ + 38 : public GenericLocalFiniteElement, │ │ │ │ │ + 39 RaviartThomasCoefficientsFactory, │ │ │ │ │ + 40 RaviartThomasL2InterpolationFactory > │ │ │ │ │ + 41 { │ │ │ │ │ + 42 typedef GenericLocalFiniteElement, │ │ │ │ │ + 43 RaviartThomasCoefficientsFactory, │ │ │ │ │ + 44 RaviartThomasL2InterpolationFactory > Base; │ │ │ │ │ + 45 public: │ │ │ │ │ + 46 using typename Base::Traits; │ │ │ │ │ 47 │ │ │ │ │ - 48 template │ │ │ │ │ -49 struct RTVecMatrix │ │ │ │ │ - 50 { │ │ │ │ │ -51 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ -52 static const unsigned int dim = geometry.dim(); │ │ │ │ │ -53 typedef MultiIndex MI; │ │ │ │ │ -54 typedef MonomialBasis MIBasis; │ │ │ │ │ -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 │ │ │ │ │ -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 MI │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:53 │ │ │ │ │ -Dune::RTVecMatrix::row │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:196 │ │ │ │ │ -Dune::RTVecMatrix::MIBasis │ │ │ │ │ -MonomialBasis< geometryId, MI > MIBasis │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:54 │ │ │ │ │ -Dune::RTVecMatrix::geometry │ │ │ │ │ -static constexpr GeometryType geometry │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:51 │ │ │ │ │ -Dune::RTVecMatrix::rows │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:191 │ │ │ │ │ -Dune::RTVecMatrix::col_ │ │ │ │ │ -unsigned int col_ │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:203 │ │ │ │ │ -Dune::RTPreBasisFactory │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:22 │ │ │ │ │ -Dune::RTPreBasisFactory::Object │ │ │ │ │ -const Basis Object │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:28 │ │ │ │ │ -Dune::RTPreBasisFactory::MBasisFactory │ │ │ │ │ -MonomialBasisProvider< dim, Field > MBasisFactory │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:23 │ │ │ │ │ -Dune::RTPreBasisFactory::Basis │ │ │ │ │ -PolynomialBasisWithMatrix< EvalMBasis, SparseCoeffMatrix< Field, dim > > Basis │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:26 │ │ │ │ │ -Dune::RTPreBasisFactory::MBasis │ │ │ │ │ -MBasisFactory::Object MBasis │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:24 │ │ │ │ │ -Dune::RTPreBasisFactory::Key │ │ │ │ │ -std::size_t Key │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:29 │ │ │ │ │ -Dune::RTPreBasisFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:45 │ │ │ │ │ -Dune::RTPreBasisFactory::EvalMBasis │ │ │ │ │ -StandardEvaluator< MBasis > EvalMBasis │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:25 │ │ │ │ │ -Dune::RTPreBasisFactory::create │ │ │ │ │ -static Object * create(const Key &order) │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:37 │ │ │ │ │ -Dune::RTPreBasisFactory::EvaluationBasisFactory │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:33 │ │ │ │ │ -Dune::RTPreBasisFactory::EvaluationBasisFactory::Type │ │ │ │ │ -MonomialBasisProvider< dd, FF > Type │ │ │ │ │ -Definition raviartthomassimplexprebasis.hh:34 │ │ │ │ │ -Dune::StandardEvaluator │ │ │ │ │ -Definition basisevaluator.hh:131 │ │ │ │ │ -Dune::MonomialBasis │ │ │ │ │ -Definition monomialbasis.hh:440 │ │ │ │ │ -Dune::MonomialBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Definition monomialbasis.hh:476 │ │ │ │ │ -Dune::MonomialBasis::evaluate │ │ │ │ │ -void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ -values) const │ │ │ │ │ -Definition monomialbasis.hh:498 │ │ │ │ │ -Dune::MonomialBasis::sizes │ │ │ │ │ -const unsigned int * sizes(unsigned int order) const │ │ │ │ │ -Definition monomialbasis.hh:465 │ │ │ │ │ -Dune::MonomialBasisProvider │ │ │ │ │ -Definition monomialbasis.hh:780 │ │ │ │ │ -Dune::MultiIndex │ │ │ │ │ -Definition multiindex.hh:37 │ │ │ │ │ -Dune::PolynomialBasisWithMatrix │ │ │ │ │ -Definition polynomialbasis.hh:348 │ │ │ │ │ +Dune::RaviartThomasSimplexLocalFiniteElement │ │ │ │ │ +Raviart-Thomas local finite elements of arbitrary order for simplices of │ │ │ │ │ +arbitrary dimension. │ │ │ │ │ +Definition raviartthomassimplex.hh:41 │ │ │ │ │ +Dune::RaviartThomasSimplexLocalFiniteElement:: │ │ │ │ │ +RaviartThomasSimplexLocalFiniteElement │ │ │ │ │ +RaviartThomasSimplexLocalFiniteElement(const GeometryType >, unsigned int │ │ │ │ │ +order) │ │ │ │ │ +Definition raviartthomassimplex.hh:49 │ │ │ │ │ +Dune::RaviartThomasL2InterpolationFactory │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:421 │ │ │ │ │ +Dune::RaviartThomasCoefficientsFactory │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:70 │ │ │ │ │ +Dune::GenericLocalFiniteElement │ │ │ │ │ +A LocalFiniteElement implementation based on three TopologyFactories providing │ │ │ │ │ +the LocalBasis,... │ │ │ │ │ +Definition localfunctions/utility/localfiniteelement.hh:25 │ │ │ │ │ +Dune::GenericLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< typename BasisF::Object, typename CoeffF::Object, │ │ │ │ │ +typename InterpolF::Object > Traits │ │ │ │ │ +Definition localfunctions/utility/localfiniteelement.hh:29 │ │ │ │ │ +localfiniteelement.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00263.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplexinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas02d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,50 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomassimplexinterpolation.hh File Reference
│ │ │ │ +
raviartthomas02d.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 <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

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::RT02DLocalFiniteElement< D, R >
 Zero order Raviart-Thomas shape functions on triangles. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,40 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomassimplex │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomassimplexinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas02d.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include "raviartthomas02d/raviartthomas02dlocalbasis.hh" │ │ │ │ │ +#include "raviartthomas02d/raviartthomas02dlocalcoefficients.hh" │ │ │ │ │ +#include "raviartthomas02d/raviartthomas02dlocalinterpolation.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::RT02DLocalFiniteElement<_D,_R_> │ │ │ │ │ +  Zero order Raviart-Thomas shape functions on triangles. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00263_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplexinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas02d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,546 +70,125 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomassimplexinterpolation.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_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_RAVIARTTHOMAS02DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_RAVIARTTHOMAS02DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
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>
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │
17
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
22
│ │ │ │ -
23namespace Dune
│ │ │ │ -
24{
│ │ │ │ -
25
│ │ │ │ -
26 // Internal Forward Declarations
│ │ │ │ -
27 // -----------------------------
│ │ │ │ -
28
│ │ │ │ -
29 template < unsigned int dim, class Field >
│ │ │ │ -
30 struct RaviartThomasL2InterpolationFactory;
│ │ │ │ -
31
│ │ │ │ -
32
│ │ │ │ +
26 template<class D, class R>
│ │ │ │ +
│ │ │ │ +
27 class
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30 public:
│ │ │ │ + │ │ │ │ + │ │ │ │
33
│ │ │ │ -
34 // LocalCoefficientsContainer
│ │ │ │ -
35 // --------------------------
│ │ │ │ -
36
│ │ │ │ -
37 class LocalCoefficientsContainer
│ │ │ │ -
38 {
│ │ │ │ -
39 typedef LocalCoefficientsContainer This;
│ │ │ │ -
40
│ │ │ │ -
41 public:
│ │ │ │ -
42 template <class Setter>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 {}
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │
│ │ │ │ -
43 LocalCoefficientsContainer ( const Setter &setter )
│ │ │ │ -
44 {
│ │ │ │ -
45 setter.setLocalKeys(localKey_);
│ │ │ │ -
46 }
│ │ │ │ +
43 RT02DLocalFiniteElement (std::bitset<3> s) :
│ │ │ │ +
44 basis(s),
│ │ │ │ +
45 interpolation(s)
│ │ │ │ +
46 {}
│ │ │ │
│ │ │ │
47
│ │ │ │
│ │ │ │ -
48 const LocalKey &localKey ( const unsigned int i ) const
│ │ │ │ +
48 const typename Traits::LocalBasisType& localBasis () 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 };
│ │ │ │ +
50 return basis;
│ │ │ │ +
51 }
│ │ │ │ +
│ │ │ │ +
52
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
54 {
│ │ │ │ +
55 return coefficients;
│ │ │ │ +
56 }
│ │ │ │ +
│ │ │ │ +
57
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
59 {
│ │ │ │ +
60 return interpolation;
│ │ │ │ +
61 }
│ │ │ │ +
│ │ │ │
62
│ │ │ │ -
63
│ │ │ │ -
64
│ │ │ │ -
65 // RaviartThomasCoefficientsFactory
│ │ │ │ -
66 // --------------------------------
│ │ │ │ +
│ │ │ │ +
63 unsigned int size () const
│ │ │ │ +
64 {
│ │ │ │ +
65 return 3;
│ │ │ │ +
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,624 +8,137 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomassimplex │ │ │ │ │ -raviartthomassimplexinterpolation.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_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH │ │ │ │ │ - 6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_RAVIARTTHOMAS02DLOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_RAVIARTTHOMAS02DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include "raviartthomas02d/raviartthomas02dlocalbasis.hh" │ │ │ │ │ + 12#include "raviartthomas02d/raviartthomas02dlocalcoefficients.hh" │ │ │ │ │ + 13#include "raviartthomas02d/raviartthomas02dlocalinterpolation.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ 17 │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include │ │ │ │ │ - 20#include │ │ │ │ │ - 21#include │ │ │ │ │ - 22 │ │ │ │ │ - 23namespace Dune │ │ │ │ │ - 24{ │ │ │ │ │ - 25 │ │ │ │ │ - 26 // Internal Forward Declarations │ │ │ │ │ - 27 // ----------------------------- │ │ │ │ │ - 28 │ │ │ │ │ - 29 template < unsigned int dim, class Field > │ │ │ │ │ - 30 struct RaviartThomasL2InterpolationFactory; │ │ │ │ │ - 31 │ │ │ │ │ - 32 │ │ │ │ │ + 26 template │ │ │ │ │ +27 class │ │ │ │ │ + 28 RT02DLocalFiniteElement │ │ │ │ │ + 29 { │ │ │ │ │ + 30 public: │ │ │ │ │ + 31 typedef │ │ │ │ │ +LocalFiniteElementTraits,RT02DLocalCoefficients, │ │ │ │ │ +32 RT02DLocalInterpolation > > Traits; │ │ │ │ │ 33 │ │ │ │ │ - 34 // LocalCoefficientsContainer │ │ │ │ │ - 35 // -------------------------- │ │ │ │ │ - 36 │ │ │ │ │ - 37 class LocalCoefficientsContainer │ │ │ │ │ - 38 { │ │ │ │ │ - 39 typedef LocalCoefficientsContainer This; │ │ │ │ │ - 40 │ │ │ │ │ - 41 public: │ │ │ │ │ - 42 template │ │ │ │ │ -43 LocalCoefficientsContainer ( const Setter &setter ) │ │ │ │ │ - 44 { │ │ │ │ │ - 45 setter.setLocalKeys(localKey_); │ │ │ │ │ - 46 } │ │ │ │ │ +35 RT02DLocalFiniteElement () │ │ │ │ │ + 36 {} │ │ │ │ │ + 37 │ │ │ │ │ +43 RT02DLocalFiniteElement (std::bitset<3> s) : │ │ │ │ │ + 44 basis(s), │ │ │ │ │ + 45 interpolation(s) │ │ │ │ │ + 46 {} │ │ │ │ │ 47 │ │ │ │ │ -48 const LocalKey &localKey ( const unsigned int i ) const │ │ │ │ │ +48 const typename Traits::LocalBasisType& localBasis () 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 }; │ │ │ │ │ + 50 return basis; │ │ │ │ │ + 51 } │ │ │ │ │ + 52 │ │ │ │ │ +53 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 54 { │ │ │ │ │ + 55 return coefficients; │ │ │ │ │ + 56 } │ │ │ │ │ + 57 │ │ │ │ │ +58 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 59 { │ │ │ │ │ + 60 return interpolation; │ │ │ │ │ + 61 } │ │ │ │ │ 62 │ │ │ │ │ - 63 │ │ │ │ │ - 64 │ │ │ │ │ - 65 // RaviartThomasCoefficientsFactory │ │ │ │ │ - 66 // -------------------------------- │ │ │ │ │ +63 unsigned int size () const │ │ │ │ │ + 64 { │ │ │ │ │ + 65 return 3; │ │ │ │ │ + 66 } │ │ │ │ │ 67 │ │ │ │ │ - 68 template < unsigned int dim > │ │ │ │ │ -69 struct RaviartThomasCoefficientsFactory │ │ │ │ │ - 70 { │ │ │ │ │ -71 typedef std::size_t Key; │ │ │ │ │ -72 typedef const LocalCoefficientsContainer Object; │ │ │ │ │ - 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 > │ │ │ │ │ -106 struct RTL2InterpolationBuilder │ │ │ │ │ - 107 { │ │ │ │ │ -108 static const unsigned int dimension = dim; │ │ │ │ │ - 109 │ │ │ │ │ - 110 // for the dofs associated to the element │ │ │ │ │ -111 typedef OrthonormalBasisFactory<_dimension,_Field_> TestBasisFactory; │ │ │ │ │ -112 typedef typename TestBasisFactory::Object TestBasis; │ │ │ │ │ - 113 │ │ │ │ │ - 114 // for the dofs associated to the faces │ │ │ │ │ -115 typedef OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory; │ │ │ │ │ -116 typedef typename TestFaceBasisFactory::Object TestFaceBasis; │ │ │ │ │ - 117 │ │ │ │ │ - 118 // the normals of the faces │ │ │ │ │ -119 typedef FieldVector< Field, dimension > Normal; │ │ │ │ │ - 120 │ │ │ │ │ -121 RTL2InterpolationBuilder () = default; │ │ │ │ │ - 122 │ │ │ │ │ -123 RTL2InterpolationBuilder ( const RTL2InterpolationBuilder & ) = delete; │ │ │ │ │ -124 RTL2InterpolationBuilder ( RTL2InterpolationBuilder && ) = delete; │ │ │ │ │ - 125 │ │ │ │ │ -126 ~RTL2InterpolationBuilder () │ │ │ │ │ - 127 { │ │ │ │ │ - 128 TestBasisFactory::release( testBasis_ ); │ │ │ │ │ - 129 for( FaceStructure &f : faceStructure_ ) │ │ │ │ │ - 130 TestFaceBasisFactory::release( f.basis_ ); │ │ │ │ │ - 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 │ │ │ │ │ -(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> │ │ │ │ │ -211 class RaviartThomasL2Interpolation │ │ │ │ │ - 212 : public InterpolationHelper< F ,dimension > │ │ │ │ │ - 213 { │ │ │ │ │ - 214 typedef RaviartThomasL2Interpolation<_dimension,_F_> This; │ │ │ │ │ - 215 typedef InterpolationHelper Base; │ │ │ │ │ - 216 │ │ │ │ │ - 217 public: │ │ │ │ │ -218 typedef F Field; │ │ │ │ │ -219 typedef RTL2InterpolationBuilder Builder; │ │ │ │ │ -220 RaviartThomasL2Interpolation() │ │ │ │ │ - 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().resize │ │ │ │ │ -(1) ),void >::value,void> │ │ │ │ │ - 228 { │ │ │ │ │ - 229 coefficients.resize(size()); │ │ │ │ │ - 230 typename Base::template Helper 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().rowPtr(0)), typename Matrix::Field* >:: │ │ │ │ │ -value,void> │ │ │ │ │ - 238 { │ │ │ │ │ - 239 matrix.resize( size(), basis.size() ); │ │ │ │ │ - 240 typename Base::template Helper 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 │ │ │ │ │ -253 void build( std::size_t order ) │ │ │ │ │ - 254 { │ │ │ │ │ - 255 size_ = 0; │ │ │ │ │ - 256 order_ = order; │ │ │ │ │ - 257 builder_.template build(order_); │ │ │ │ │ - 258 if (builder_.testBasis()) │ │ │ │ │ - 259 size_ += dimension*builder_.testBasis()->size(); │ │ │ │ │ - 260 for ( unsigned int f=0; fsize(); │ │ │ │ │ - 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; fsize(); ++i,++row) │ │ │ │ │ - 273 keys[row] = LocalKey(f,1,i); │ │ │ │ │ - 274 } │ │ │ │ │ - 275 if (builder_.testBasis()) │ │ │ │ │ - 276 for (unsigned int i=0; isize()*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 ) const │ │ │ │ │ - 284 { │ │ │ │ │ - 285 const Dune::GeometryType geoType = builder_.type(); │ │ │ │ │ - 286 │ │ │ │ │ - 287 std::vector< Field > testBasisVal; │ │ │ │ │ - 288 │ │ │ │ │ - 289 for (unsigned int i=0; i FaceQuadrature; │ │ │ │ │ - 297 typedef Dune::QuadratureRules FaceQuadratureRules; │ │ │ │ │ - 298 │ │ │ │ │ - 299 const auto &refElement = Dune::ReferenceElements< Field, dimension >:: │ │ │ │ │ -general( geoType ); │ │ │ │ │ - 300 │ │ │ │ │ - 301 for (unsigned int f=0; fsize()); │ │ │ │ │ - 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 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_.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 │ │ │ │ │ - 361 void fillBnd (unsigned int startRow, │ │ │ │ │ - 362 const MVal &mVal, │ │ │ │ │ - 363 const RTVal &rtVal, │ │ │ │ │ - 364 const FieldVector &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 │ │ │ │ │ - 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 │ │ │ │ │ -420 struct RaviartThomasL2InterpolationFactory │ │ │ │ │ - 421 { │ │ │ │ │ -422 typedef RTL2InterpolationBuilder Builder; │ │ │ │ │ -423 typedef const RaviartThomasL2Interpolation Object; │ │ │ │ │ -424 typedef std::size_t Key; │ │ │ │ │ -425 typedef typename std::remove_const::type NonConstObject; │ │ │ │ │ - 426 │ │ │ │ │ - 427 template │ │ │ │ │ -428 static Object *create( const Key &key ) │ │ │ │ │ - 429 { │ │ │ │ │ - 430 if ( !supports(key) ) │ │ │ │ │ - 431 return 0; │ │ │ │ │ - 432 NonConstObject *interpol = new NonConstObject(); │ │ │ │ │ - 433 interpol->template build(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 │ │ │ │ │ -interpolationhelper.hh │ │ │ │ │ -polynomialbasis.hh │ │ │ │ │ -orthonormalbasis.hh │ │ │ │ │ -localkey.hh │ │ │ │ │ +68 static constexpr GeometryType type () │ │ │ │ │ + 69 { │ │ │ │ │ + 70 return GeometryTypes::triangle; │ │ │ │ │ + 71 } │ │ │ │ │ + 72 │ │ │ │ │ + 73 private: │ │ │ │ │ + 74 RT02DLocalBasis basis; │ │ │ │ │ + 75 RT02DLocalCoefficients coefficients; │ │ │ │ │ + 76 RT02DLocalInterpolation > interpolation; │ │ │ │ │ + 77 }; │ │ │ │ │ + 78 │ │ │ │ │ + 79} │ │ │ │ │ + 80 │ │ │ │ │ + 81#endif │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ +raviartthomas02dlocalinterpolation.hh │ │ │ │ │ +raviartthomas02dlocalbasis.hh │ │ │ │ │ +raviartthomas02dlocalcoefficients.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::LocalCoefficientsContainer │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:38 │ │ │ │ │ -Dune::LocalCoefficientsContainer::LocalCoefficientsContainer │ │ │ │ │ -LocalCoefficientsContainer(const Setter &setter) │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:43 │ │ │ │ │ -Dune::LocalCoefficientsContainer::localKey │ │ │ │ │ -const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:48 │ │ │ │ │ -Dune::LocalCoefficientsContainer::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:54 │ │ │ │ │ -Dune::OrthonormalBasisFactory │ │ │ │ │ -Definition orthonormalbasis.hh:20 │ │ │ │ │ -Dune::OrthonormalBasisFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition orthonormalbasis.hh:57 │ │ │ │ │ -Dune::RaviartThomasL2InterpolationFactory │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:421 │ │ │ │ │ -Dune::RaviartThomasL2InterpolationFactory::NonConstObject │ │ │ │ │ -std::remove_const< Object >::type NonConstObject │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:425 │ │ │ │ │ -Dune::RaviartThomasL2InterpolationFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:441 │ │ │ │ │ -Dune::RaviartThomasL2InterpolationFactory::supports │ │ │ │ │ -static bool supports(const Key &key) │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:437 │ │ │ │ │ -Dune::RaviartThomasL2InterpolationFactory::create │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:428 │ │ │ │ │ -Dune::RaviartThomasL2InterpolationFactory::Builder │ │ │ │ │ -RTL2InterpolationBuilder< dim, Field > Builder │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:422 │ │ │ │ │ -Dune::RaviartThomasL2InterpolationFactory::Object │ │ │ │ │ -const RaviartThomasL2Interpolation< dim, Field > Object │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:423 │ │ │ │ │ -Dune::RaviartThomasL2InterpolationFactory::Key │ │ │ │ │ -std::size_t Key │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:424 │ │ │ │ │ -Dune::RaviartThomasCoefficientsFactory │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:70 │ │ │ │ │ -Dune::RaviartThomasCoefficientsFactory::Key │ │ │ │ │ -std::size_t Key │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:71 │ │ │ │ │ -Dune::RaviartThomasCoefficientsFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:91 │ │ │ │ │ -Dune::RaviartThomasCoefficientsFactory::supports │ │ │ │ │ -static bool supports(const Key &key) │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:87 │ │ │ │ │ -Dune::RaviartThomasCoefficientsFactory::Object │ │ │ │ │ -const LocalCoefficientsContainer Object │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:72 │ │ │ │ │ -Dune::RaviartThomasCoefficientsFactory::create │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:75 │ │ │ │ │ -Dune::RTL2InterpolationBuilder │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:107 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::testBasis │ │ │ │ │ -TestBasis * testBasis() const │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:141 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::Normal │ │ │ │ │ -FieldVector< Field, dimension > Normal │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:119 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::TestBasis │ │ │ │ │ -TestBasisFactory::Object TestBasis │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:112 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::TestFaceBasis │ │ │ │ │ -TestFaceBasisFactory::Object TestFaceBasis │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:116 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::faceSize │ │ │ │ │ -unsigned int faceSize() const │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:138 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::build │ │ │ │ │ -void build(std::size_t order) │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:150 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::RTL2InterpolationBuilder │ │ │ │ │ -RTL2InterpolationBuilder()=default │ │ │ │ │ -Dune::RTL2InterpolationBuilder::testFaceBasis │ │ │ │ │ -TestFaceBasis * testFaceBasis(unsigned int f) const │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:144 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::type │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:133 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::normal │ │ │ │ │ -const Normal & normal(unsigned int f) const │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:147 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::RTL2InterpolationBuilder │ │ │ │ │ -RTL2InterpolationBuilder(const RTL2InterpolationBuilder &)=delete │ │ │ │ │ -Dune::RTL2InterpolationBuilder::TestFaceBasisFactory │ │ │ │ │ -OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:115 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::RTL2InterpolationBuilder │ │ │ │ │ -RTL2InterpolationBuilder(RTL2InterpolationBuilder &&)=delete │ │ │ │ │ -Dune::RTL2InterpolationBuilder::TestBasisFactory │ │ │ │ │ -OrthonormalBasisFactory< dimension, Field > TestBasisFactory │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:111 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::order │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:135 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:108 │ │ │ │ │ -Dune::RTL2InterpolationBuilder::~RTL2InterpolationBuilder │ │ │ │ │ -~RTL2InterpolationBuilder() │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:126 │ │ │ │ │ -Dune::RaviartThomasL2Interpolation │ │ │ │ │ -An L2-based interpolation for Raviart Thomas. │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:213 │ │ │ │ │ -Dune::RaviartThomasL2Interpolation::order │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:244 │ │ │ │ │ -Dune::RaviartThomasL2Interpolation::RaviartThomasL2Interpolation │ │ │ │ │ -RaviartThomasL2Interpolation() │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:220 │ │ │ │ │ -Dune::RaviartThomasL2Interpolation::interpolate │ │ │ │ │ -void interpolate(typename Base::template Helper< Func, Container, type > &func) │ │ │ │ │ -const │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:283 │ │ │ │ │ -Dune::RaviartThomasL2Interpolation::interpolate │ │ │ │ │ -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 │ │ │ │ │ -Dune::RaviartThomasL2Interpolation::Builder │ │ │ │ │ -RTL2InterpolationBuilder< dimension, Field > Builder │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:219 │ │ │ │ │ -Dune::RaviartThomasL2Interpolation::Field │ │ │ │ │ -F Field │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:218 │ │ │ │ │ -Dune::RaviartThomasL2Interpolation::build │ │ │ │ │ -void build(std::size_t order) │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:253 │ │ │ │ │ -Dune::RaviartThomasL2Interpolation::interpolate │ │ │ │ │ -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 │ │ │ │ │ -Dune::RaviartThomasL2Interpolation::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:248 │ │ │ │ │ -Dune::RaviartThomasL2Interpolation::setLocalKeys │ │ │ │ │ -void setLocalKeys(std::vector< LocalKey > &keys) const │ │ │ │ │ -Definition raviartthomassimplexinterpolation.hh:265 │ │ │ │ │ -Dune::InterpolationHelper │ │ │ │ │ -Definition interpolationhelper.hh:22 │ │ │ │ │ -Dune::InterpolationHelper::Helper │ │ │ │ │ -Definition interpolationhelper.hh:24 │ │ │ │ │ -Dune::PolynomialBasis │ │ │ │ │ -Definition polynomialbasis.hh:65 │ │ │ │ │ -Dune::PolynomialBasis::size │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::RT02DLocalFiniteElement │ │ │ │ │ +Zero order Raviart-Thomas shape functions on triangles. │ │ │ │ │ +Definition raviartthomas02d.hh:29 │ │ │ │ │ +Dune::RT02DLocalFiniteElement::RT02DLocalFiniteElement │ │ │ │ │ +RT02DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas02d.hh:35 │ │ │ │ │ +Dune::RT02DLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< RT02DLocalBasis< D, R >, RT02DLocalCoefficients, │ │ │ │ │ +RT02DLocalInterpolation< RT02DLocalBasis< D, R > > > Traits │ │ │ │ │ +Definition raviartthomas02d.hh:32 │ │ │ │ │ +Dune::RT02DLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition raviartthomas02d.hh:68 │ │ │ │ │ +Dune::RT02DLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition raviartthomas02d.hh:58 │ │ │ │ │ +Dune::RT02DLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition raviartthomas02d.hh:48 │ │ │ │ │ +Dune::RT02DLocalFiniteElement::RT02DLocalFiniteElement │ │ │ │ │ +RT02DLocalFiniteElement(std::bitset< 3 > s) │ │ │ │ │ +Constructor with explicitly given edge orientations. │ │ │ │ │ +Definition raviartthomas02d.hh:43 │ │ │ │ │ +Dune::RT02DLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition raviartthomas02d.hh:53 │ │ │ │ │ +Dune::RT02DLocalFiniteElement::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Definition polynomialbasis.hh:113 │ │ │ │ │ +Definition raviartthomas02d.hh:63 │ │ │ │ │ +Dune::RT02DLocalBasis │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +Definition raviartthomas02dlocalbasis.hh:26 │ │ │ │ │ +Dune::RT02DLocalCoefficients │ │ │ │ │ +Layout map for RT0 elements. │ │ │ │ │ +Definition raviartthomas02dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::RT02DLocalInterpolation │ │ │ │ │ +Definition raviartthomas02dlocalinterpolation.hh:18 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00266.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0pyramidlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas3cube2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0pyramidlocalcoefficients.hh File Reference
│ │ │ │ +
raviartthomas3cube2d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../../common/localkey.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

class  Dune::RT0PyramidLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on pyramids. More...
class  Dune::RT3Cube2DLocalFiniteElement< D, R >
 Second order Raviart-Thomas shape functions on cubes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,24 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0pyramid │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas0pyramidlocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localkey.hh" │ │ │ │ │ +raviartthomas3cube2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#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 │ │ │ │ │ -class  Dune::RT0PyramidLocalCoefficients │ │ │ │ │ -  Layout map for Raviart-Thomas-1 elements on pyramids. More... │ │ │ │ │ +class  Dune::RT3Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on cubes. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00266_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0pyramidlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas3cube2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,75 +70,123 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas0pyramidlocalcoefficients.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_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include "../../common/localkey.hh"
│ │ │ │ -
12
│ │ │ │ -
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
│ │ │ │ -
46 private:
│ │ │ │ -
47 std::vector<LocalKey> li;
│ │ │ │ -
48 };
│ │ │ │ -
│ │ │ │ -
49}
│ │ │ │ -
50#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ +
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
27 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30
│ │ │ │ +
31 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
36
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
39 {}
│ │ │ │ +
│ │ │ │ +
40
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,74 +8,137 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0pyramid │ │ │ │ │ -raviartthomas0pyramidlocalcoefficients.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_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_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 "../../common/localkey.hh" │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ -23 class RT0PyramidLocalCoefficients │ │ │ │ │ - 24 { │ │ │ │ │ - 25 │ │ │ │ │ - 26 public: │ │ │ │ │ -28 RT0PyramidLocalCoefficients () : li(size()) │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ + 11#include "raviartthomas3cube2d/raviartthomas3cube2dlocalbasis.hh" │ │ │ │ │ + 12#include "raviartthomas3cube2d/raviartthomas3cube2dlocalcoefficients.hh" │ │ │ │ │ + 13#include "raviartthomas3cube2d/raviartthomas3cube2dlocalinterpolation.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 27 template │ │ │ │ │ +28 class RT3Cube2DLocalFiniteElement │ │ │ │ │ 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 li; │ │ │ │ │ - 48 }; │ │ │ │ │ - 49} │ │ │ │ │ - 50#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 30 │ │ │ │ │ + 31 public: │ │ │ │ │ + 32 typedef LocalFiniteElementTraits< │ │ │ │ │ + 33 RT3Cube2DLocalBasis, │ │ │ │ │ + 34 RT3Cube2DLocalCoefficients, │ │ │ │ │ +35 RT3Cube2DLocalInterpolation > > Traits; │ │ │ │ │ + 36 │ │ │ │ │ +38 RT3Cube2DLocalFiniteElement () │ │ │ │ │ + 39 {} │ │ │ │ │ + 40 │ │ │ │ │ +46 RT3Cube2DLocalFiniteElement (int s) : │ │ │ │ │ + 47 basis(s), │ │ │ │ │ + 48 interpolation(s) │ │ │ │ │ + 49 {} │ │ │ │ │ + 50 │ │ │ │ │ +51 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 52 { │ │ │ │ │ + 53 return basis; │ │ │ │ │ + 54 } │ │ │ │ │ + 55 │ │ │ │ │ +56 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 57 { │ │ │ │ │ + 58 return coefficients; │ │ │ │ │ + 59 } │ │ │ │ │ + 60 │ │ │ │ │ +61 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 78 RT3Cube2DLocalBasis basis; │ │ │ │ │ + 79 RT3Cube2DLocalCoefficients coefficients; │ │ │ │ │ + 80 RT3Cube2DLocalInterpolation > interpolation; │ │ │ │ │ + 81 }; │ │ │ │ │ + 82} │ │ │ │ │ + 83#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +raviartthomas3cube2dlocalinterpolation.hh │ │ │ │ │ +raviartthomas3cube2dlocalbasis.hh │ │ │ │ │ +raviartthomas3cube2dlocalcoefficients.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::RT0PyramidLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-1 elements on pyramids. │ │ │ │ │ -Definition raviartthomas0pyramidlocalcoefficients.hh:24 │ │ │ │ │ -Dune::RT0PyramidLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition raviartthomas0pyramidlocalcoefficients.hh:41 │ │ │ │ │ -Dune::RT0PyramidLocalCoefficients::RT0PyramidLocalCoefficients │ │ │ │ │ -RT0PyramidLocalCoefficients() │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::RT3Cube2DLocalFiniteElement │ │ │ │ │ +Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +Definition raviartthomas3cube2d.hh:29 │ │ │ │ │ +Dune::RT3Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition raviartthomas3cube2d.hh:56 │ │ │ │ │ +Dune::RT3Cube2DLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition raviartthomas3cube2d.hh:72 │ │ │ │ │ +Dune::RT3Cube2DLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< RT3Cube2DLocalBasis< D, R >, │ │ │ │ │ +RT3Cube2DLocalCoefficients, RT3Cube2DLocalInterpolation< RT3Cube2DLocalBasis< │ │ │ │ │ +D, R > > > Traits │ │ │ │ │ +Definition raviartthomas3cube2d.hh:35 │ │ │ │ │ +Dune::RT3Cube2DLocalFiniteElement::RT3Cube2DLocalFiniteElement │ │ │ │ │ +RT3Cube2DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition raviartthomas3cube2d.hh:46 │ │ │ │ │ +Dune::RT3Cube2DLocalFiniteElement::RT3Cube2DLocalFiniteElement │ │ │ │ │ +RT3Cube2DLocalFiniteElement() │ │ │ │ │ Standard constructor. │ │ │ │ │ -Definition raviartthomas0pyramidlocalcoefficients.hh:28 │ │ │ │ │ -Dune::RT0PyramidLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition raviartthomas0pyramidlocalcoefficients.hh:35 │ │ │ │ │ +Definition raviartthomas3cube2d.hh:38 │ │ │ │ │ +Dune::RT3Cube2DLocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition raviartthomas3cube2d.hh:67 │ │ │ │ │ +Dune::RT3Cube2DLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition raviartthomas3cube2d.hh:51 │ │ │ │ │ +Dune::RT3Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition raviartthomas3cube2d.hh:61 │ │ │ │ │ +Dune::RT3Cube2DLocalBasis │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas3cube2dlocalbasis.hh:29 │ │ │ │ │ +Dune::RT3Cube2DLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-3 elements on quadrilaterals. │ │ │ │ │ +Definition raviartthomas3cube2dlocalcoefficients.hh:23 │ │ │ │ │ +Dune::RT3Cube2DLocalInterpolation │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas3cube2dlocalinterpolation.hh:26 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00269.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0pyramidlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0prismlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0pyramidlocalbasis.hh File Reference
│ │ │ │ +
raviartthomas0prismlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <numeric>
│ │ │ │ #include <vector>
│ │ │ │ #include <dune/common/fmatrix.hh>
│ │ │ │ #include "../../common/localbasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::RT0PyramidLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference pyramid. More...
class  Dune::RT0PrismLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference prism. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0pyramid │ │ │ │ │ + * raviartthomas0prism │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas0pyramidlocalbasis.hh File Reference │ │ │ │ │ +raviartthomas0prismlocalbasis.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ #include "../../common/localbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT0PyramidLocalBasis<_D,_R_> │ │ │ │ │ -  First order Raviart-Thomas shape functions on the reference pyramid. │ │ │ │ │ +class  Dune::RT0PrismLocalBasis<_D,_R_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00269_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0pyramidlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0prismlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,148 +70,146 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas0pyramidlocalbasis.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_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │
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;
│ │ │ │ +
32 Dune::FieldMatrix<R,3,3> > Traits;
│ │ │ │
33
│ │ │ │
│ │ │ │ -
39 RT0PyramidLocalBasis (std::bitset<5> s = 0)
│ │ │ │ +
39 RT0PrismLocalBasis (std::bitset<5> s = 0)
│ │ │ │
40 {
│ │ │ │ -
41 for (size_t i=0; i<size(); i++)
│ │ │ │ +
41 for (size_t i=0; i<size(); i++)
│ │ │ │
42 sign[i] = s[i] ? -1.0 : 1.0;
│ │ │ │
43 }
│ │ │ │
│ │ │ │
44
│ │ │ │
│ │ │ │ -
46 unsigned int size () const
│ │ │ │ +
46 unsigned int size () const
│ │ │ │
47 {
│ │ │ │
48 return 5;
│ │ │ │
49 }
│ │ │ │
│ │ │ │
50
│ │ │ │
│ │ │ │ -
57 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
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};
│ │ │ │ +
61
│ │ │ │ +
62 out[0] = { in[0], -1.0 + in[1], 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;
│ │ │ │ +
64 out[1] = { -1.0 + in[0], in[1], 0.0};
│ │ │ │ +
65
│ │ │ │ +
66 out[2] = { in[0], in[1], 0.0};
│ │ │ │
67
│ │ │ │ -
68 out[1][0] = -2.0 + 3.0*in[0];
│ │ │ │ +
68 out[3] = { 0.0, 0.0, -2.0 + 2.0*in[2]};
│ │ │ │
69
│ │ │ │ -
70 out[2][0] = 3.0*in[0];
│ │ │ │ +
70 out[4] = { 0.0, 0.0, 2.0*in[2]};
│ │ │ │
71
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ -
│ │ │ │ -
87 inline void evaluateJacobian (const typename Traits::DomainType& in,
│ │ │ │ -
88 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
89 {
│ │ │ │ -
90 out.resize(5);
│ │ │ │ +
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 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);
│ │ │ │ +
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[2][0][0] = sign[2]*(3.0);
│ │ │ │ +
101 out[3][2][2] = sign[3]*(2.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 };
│ │ │ │ +
103 out[4][2][2] = sign[4]*(2.0);
│ │ │ │ +
104 }
│ │ │ │
│ │ │ │ -
130}
│ │ │ │ -
131#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH
│ │ │ │ +
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
│ │ │ │
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,160 +8,158 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0pyramid │ │ │ │ │ -raviartthomas0pyramidlocalbasis.hh │ │ │ │ │ + * raviartthomas0prism │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9#include │ │ │ │ │ 10 │ │ │ │ │ 11#include │ │ │ │ │ 12 │ │ │ │ │ 13#include "../../common/localbasis.hh" │ │ │ │ │ 14 │ │ │ │ │ 15namespace Dune │ │ │ │ │ 16{ │ │ │ │ │ 26 template │ │ │ │ │ -27 class RT0PyramidLocalBasis │ │ │ │ │ +27 class RT0PrismLocalBasis │ │ │ │ │ 28 { │ │ │ │ │ 29 │ │ │ │ │ 30 public: │ │ │ │ │ 31 typedef LocalBasisTraits,R,3,Dune:: │ │ │ │ │ FieldVector, │ │ │ │ │ 32 Dune::FieldMatrix > Traits; │ │ │ │ │ 33 │ │ │ │ │ -39 RT0PyramidLocalBasis (std::bitset<5> s = 0) │ │ │ │ │ +39 RT0PrismLocalBasis (std::bitset<5> s = 0) │ │ │ │ │ 40 { │ │ │ │ │ 41 for (size_t i=0; i& out) const │ │ │ │ │ 59 { │ │ │ │ │ 60 out.resize(5); │ │ │ │ │ - 61 for (std::size_t i=0; i& out) const │ │ │ │ │ - 89 { │ │ │ │ │ - 90 out.resize(5); │ │ │ │ │ + 72 for (std::size_t i=0; i& out) const │ │ │ │ │ + 85 { │ │ │ │ │ + 86 out.resize(5); │ │ │ │ │ + 87 │ │ │ │ │ + 88 for(int i=0; i& order, │ │ │ │ │ - 110 const typename Traits::DomainType& in, // position │ │ │ │ │ - 111 std::vector& 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 sign; │ │ │ │ │ - 129 }; │ │ │ │ │ - 130} │ │ │ │ │ - 131#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH │ │ │ │ │ + 103 out[4][2][2] = sign[4]*(2.0); │ │ │ │ │ + 104 } │ │ │ │ │ + 105 │ │ │ │ │ +107 void partial (const std::array& order, │ │ │ │ │ + 108 const typename Traits::DomainType& in, // position │ │ │ │ │ + 109 std::vector& 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 sign; │ │ │ │ │ + 127 }; │ │ │ │ │ + 128} │ │ │ │ │ + 129#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalBasisTraits │ │ │ │ │ Type traits for LocalBasisVirtualInterface. │ │ │ │ │ Definition common/localbasis.hh:34 │ │ │ │ │ Dune::LocalBasisTraits::DomainType │ │ │ │ │ D DomainType │ │ │ │ │ domain type │ │ │ │ │ Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::RT0PyramidLocalBasis │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference pyramid. │ │ │ │ │ -Definition raviartthomas0pyramidlocalbasis.hh:28 │ │ │ │ │ -Dune::RT0PyramidLocalBasis::RT0PyramidLocalBasis │ │ │ │ │ -RT0PyramidLocalBasis(std::bitset< 5 > s=0) │ │ │ │ │ +Dune::RT0PrismLocalBasis │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ +Definition raviartthomas0prismlocalbasis.hh:28 │ │ │ │ │ +Dune::RT0PrismLocalBasis::RT0PrismLocalBasis │ │ │ │ │ +RT0PrismLocalBasis(std::bitset< 5 > s=0) │ │ │ │ │ Make set number s, where 0 <= s < 32. │ │ │ │ │ -Definition raviartthomas0pyramidlocalbasis.hh:39 │ │ │ │ │ -Dune::RT0PyramidLocalBasis::evaluateFunction │ │ │ │ │ +Definition raviartthomas0prismlocalbasis.hh:39 │ │ │ │ │ +Dune::RT0PrismLocalBasis::evaluateFunction │ │ │ │ │ void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ typename Traits::RangeType > &out) const │ │ │ │ │ Evaluate all shape functions. │ │ │ │ │ -Definition raviartthomas0pyramidlocalbasis.hh:57 │ │ │ │ │ -Dune::RT0PyramidLocalBasis::evaluateJacobian │ │ │ │ │ +Definition raviartthomas0prismlocalbasis.hh:57 │ │ │ │ │ +Dune::RT0PrismLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition raviartthomas0prismlocalbasis.hh:46 │ │ │ │ │ +Dune::RT0PrismLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition raviartthomas0prismlocalbasis.hh:120 │ │ │ │ │ +Dune::RT0PrismLocalBasis::evaluateJacobian │ │ │ │ │ void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ typename Traits::JacobianType > &out) const │ │ │ │ │ Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition raviartthomas0pyramidlocalbasis.hh:87 │ │ │ │ │ -Dune::RT0PyramidLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ -3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ -Definition raviartthomas0pyramidlocalbasis.hh:32 │ │ │ │ │ -Dune::RT0PyramidLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition raviartthomas0pyramidlocalbasis.hh:122 │ │ │ │ │ -Dune::RT0PyramidLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition raviartthomas0pyramidlocalbasis.hh:46 │ │ │ │ │ -Dune::RT0PyramidLocalBasis::partial │ │ │ │ │ +Definition raviartthomas0prismlocalbasis.hh:83 │ │ │ │ │ +Dune::RT0PrismLocalBasis::partial │ │ │ │ │ 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 │ │ │ │ │ +Definition raviartthomas0prismlocalbasis.hh:107 │ │ │ │ │ +Dune::RT0PrismLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ +3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ +Definition raviartthomas0prismlocalbasis.hh:32 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00272.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0pyramidlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0prismlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0pyramidlocalinterpolation.hh File Reference
│ │ │ │ +
raviartthomas0prismlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.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...
class  Dune::RT0PrismLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on prisms. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,24 +7,24 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0pyramid │ │ │ │ │ + * raviartthomas0prism │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas0pyramidlocalinterpolation.hh File Reference │ │ │ │ │ +raviartthomas0prismlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include "../../common/localkey.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... │ │ │ │ │ +class  Dune::RT0PrismLocalCoefficients │ │ │ │ │ +  Layout map for Raviart-Thomas-1 elements on prisms. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00272_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0pyramidlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0prismlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,102 +70,75 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas0pyramidlocalinterpolation.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_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
22 template<class LB>
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
24 {
│ │ │ │
25
│ │ │ │
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;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
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 };
│ │ │ │ +
│ │ │ │ +
41 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
42 {
│ │ │ │ +
43 return li[i];
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
46 private:
│ │ │ │ +
47 std::vector<LocalKey> li;
│ │ │ │ +
48 };
│ │ │ │
│ │ │ │ -
90}
│ │ │ │ -
91#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH
│ │ │ │ +
49}
│ │ │ │ +
50#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -8,99 +8,74 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0pyramid │ │ │ │ │ -raviartthomas0pyramidlocalinterpolation.hh │ │ │ │ │ + * raviartthomas0prism │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12namespace Dune │ │ │ │ │ - 13{ │ │ │ │ │ - 22 template │ │ │ │ │ -23 class RT0PyramidLocalInterpolation │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include "../../common/localkey.hh" │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ +23 class RT0PrismLocalCoefficients │ │ │ │ │ 24 { │ │ │ │ │ 25 │ │ │ │ │ 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; │ │ │ │ │ +28 RT0PrismLocalCoefficients () : li(size()) │ │ │ │ │ + 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 │ │ │ │ │ - 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 │ │ │ │ │ -70 void interpolate (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 │ │ │ │ │ +41 const LocalKey& localKey (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_PRISM_LOCALCOEFFICIENTS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RT0PyramidLocalInterpolation │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ -Definition raviartthomas0pyramidlocalinterpolation.hh:24 │ │ │ │ │ -Dune::RT0PyramidLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Interpolate a given function with shape functions. │ │ │ │ │ -Definition raviartthomas0pyramidlocalinterpolation.hh:70 │ │ │ │ │ -Dune::RT0PyramidLocalInterpolation::RT0PyramidLocalInterpolation │ │ │ │ │ -RT0PyramidLocalInterpolation(std::bitset< 5 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 32. │ │ │ │ │ -Definition raviartthomas0pyramidlocalinterpolation.hh:33 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::RT0PrismLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on prisms. │ │ │ │ │ +Definition raviartthomas0prismlocalcoefficients.hh:24 │ │ │ │ │ +Dune::RT0PrismLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition raviartthomas0prismlocalcoefficients.hh:41 │ │ │ │ │ +Dune::RT0PrismLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition raviartthomas0prismlocalcoefficients.hh:35 │ │ │ │ │ +Dune::RT0PrismLocalCoefficients::RT0PrismLocalCoefficients │ │ │ │ │ +RT0PrismLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas0prismlocalcoefficients.hh:28 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00275.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas2cube2d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0prismlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas2cube2d.hh File Reference
│ │ │ │ +
raviartthomas0prismlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include "../common/localfiniteelementtraits.hh"
│ │ │ │ -#include "raviartthomas2cube2d/raviartthomas2cube2dlocalbasis.hh"
│ │ │ │ -#include "raviartthomas2cube2d/raviartthomas2cube2dlocalcoefficients.hh"
│ │ │ │ -#include "raviartthomas2cube2d/raviartthomas2cube2dlocalinterpolation.hh"
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::RT2Cube2DLocalFiniteElement< D, R >
 Second order Raviart-Thomas shape functions on cubes. More...
class  Dune::RT0PrismLocalInterpolation< LB >
 First order Raviart-Thomas shape functions on the reference prism. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,24 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ + * raviartthomas0prism │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas2cube2d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "raviartthomas2cube2d/raviartthomas2cube2dlocalbasis.hh" │ │ │ │ │ -#include "raviartthomas2cube2d/raviartthomas2cube2dlocalcoefficients.hh" │ │ │ │ │ -#include "raviartthomas2cube2d/raviartthomas2cube2dlocalinterpolation.hh" │ │ │ │ │ +raviartthomas0prismlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT2Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  Second order Raviart-Thomas shape functions on cubes. More... │ │ │ │ │ +class  Dune::RT0PrismLocalInterpolation<_LB_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00275_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas2cube2d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0prismlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,123 +70,102 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas2cube2d.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_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ +
8#include <vector>
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
22 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25
│ │ │ │ +
26 public:
│ │ │ │ +
27
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
55 {
│ │ │ │ -
56 return coefficients;
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
60 {
│ │ │ │ -
61 return interpolation;
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
│ │ │ │ -
65 unsigned int size () const
│ │ │ │ -
66 {
│ │ │ │ -
67 return basis.size();
│ │ │ │ -
68 }
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
69
│ │ │ │ +
60
│ │ │ │ +
69 template<class F, class C>
│ │ │ │
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,137 +8,99 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -raviartthomas2cube2d.hh │ │ │ │ │ + * raviartthomas0prism │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "raviartthomas2cube2d/raviartthomas2cube2dlocalbasis.hh" │ │ │ │ │ - 12#include "raviartthomas2cube2d/raviartthomas2cube2dlocalcoefficients.hh" │ │ │ │ │ - 13#include "raviartthomas2cube2d/raviartthomas2cube2dlocalinterpolation.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 25 template │ │ │ │ │ -26 class RT2Cube2DLocalFiniteElement │ │ │ │ │ - 27 { │ │ │ │ │ - 28 │ │ │ │ │ - 29 public: │ │ │ │ │ - 30 typedef LocalFiniteElementTraits< │ │ │ │ │ - 31 RT2Cube2DLocalBasis, │ │ │ │ │ - 32 RT2Cube2DLocalCoefficients, │ │ │ │ │ -33 RT2Cube2DLocalInterpolation > > Traits; │ │ │ │ │ - 34 │ │ │ │ │ -36 RT2Cube2DLocalFiniteElement () │ │ │ │ │ - 37 {} │ │ │ │ │ - 38 │ │ │ │ │ -44 RT2Cube2DLocalFiniteElement (int s) : │ │ │ │ │ - 45 basis(s), │ │ │ │ │ - 46 interpolation(s) │ │ │ │ │ - 47 {} │ │ │ │ │ - 48 │ │ │ │ │ -49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 50 { │ │ │ │ │ - 51 return basis; │ │ │ │ │ - 52 } │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12namespace Dune │ │ │ │ │ + 13{ │ │ │ │ │ + 22 template │ │ │ │ │ +23 class RT0PrismLocalInterpolation │ │ │ │ │ + 24 { │ │ │ │ │ + 25 │ │ │ │ │ + 26 public: │ │ │ │ │ + 27 │ │ │ │ │ +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 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 55 { │ │ │ │ │ - 56 return coefficients; │ │ │ │ │ - 57 } │ │ │ │ │ - 58 │ │ │ │ │ -59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 60 { │ │ │ │ │ - 61 return interpolation; │ │ │ │ │ - 62 } │ │ │ │ │ - 63 │ │ │ │ │ -65 unsigned int size () const │ │ │ │ │ - 66 { │ │ │ │ │ - 67 return basis.size(); │ │ │ │ │ - 68 } │ │ │ │ │ - 69 │ │ │ │ │ -70 static constexpr GeometryType type () │ │ │ │ │ + 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 │ │ │ │ │ +70 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ 71 { │ │ │ │ │ - 72 return GeometryTypes::quadrilateral; │ │ │ │ │ - 73 } │ │ │ │ │ - 74 │ │ │ │ │ - 75 private: │ │ │ │ │ - 76 RT2Cube2DLocalBasis basis; │ │ │ │ │ - 77 RT2Cube2DLocalCoefficients coefficients; │ │ │ │ │ - 78 RT2Cube2DLocalInterpolation > interpolation; │ │ │ │ │ - 79 }; │ │ │ │ │ - 80} │ │ │ │ │ - 81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ -raviartthomas2cube2dlocalcoefficients.hh │ │ │ │ │ -raviartthomas2cube2dlocalbasis.hh │ │ │ │ │ -raviartthomas2cube2dlocalinterpolation.hh │ │ │ │ │ + 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::RT2Cube2DLocalFiniteElement │ │ │ │ │ -Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ -Definition raviartthomas2cube2d.hh:27 │ │ │ │ │ -Dune::RT2Cube2DLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition raviartthomas2cube2d.hh:49 │ │ │ │ │ -Dune::RT2Cube2DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< RT2Cube2DLocalBasis< D, R >, │ │ │ │ │ -RT2Cube2DLocalCoefficients, RT2Cube2DLocalInterpolation< RT2Cube2DLocalBasis< │ │ │ │ │ -D, R > > > Traits │ │ │ │ │ -Definition raviartthomas2cube2d.hh:33 │ │ │ │ │ -Dune::RT2Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition raviartthomas2cube2d.hh:54 │ │ │ │ │ -Dune::RT2Cube2DLocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition raviartthomas2cube2d.hh:65 │ │ │ │ │ -Dune::RT2Cube2DLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition raviartthomas2cube2d.hh:70 │ │ │ │ │ -Dune::RT2Cube2DLocalFiniteElement::RT2Cube2DLocalFiniteElement │ │ │ │ │ -RT2Cube2DLocalFiniteElement(int s) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition raviartthomas2cube2d.hh:44 │ │ │ │ │ -Dune::RT2Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition raviartthomas2cube2d.hh:59 │ │ │ │ │ -Dune::RT2Cube2DLocalFiniteElement::RT2Cube2DLocalFiniteElement │ │ │ │ │ -RT2Cube2DLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas2cube2d.hh:36 │ │ │ │ │ -Dune::RT2Cube2DLocalBasis │ │ │ │ │ -Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas2cube2dlocalbasis.hh:28 │ │ │ │ │ -Dune::RT2Cube2DLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-2 elements on quadrilaterals. │ │ │ │ │ -Definition raviartthomas2cube2dlocalcoefficients.hh:23 │ │ │ │ │ -Dune::RT2Cube2DLocalInterpolation │ │ │ │ │ -Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ -Definition raviartthomas2cube2dlocalinterpolation.hh:26 │ │ │ │ │ +Dune::RT0PrismLocalInterpolation │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ +Definition raviartthomas0prismlocalinterpolation.hh:24 │ │ │ │ │ +Dune::RT0PrismLocalInterpolation::RT0PrismLocalInterpolation │ │ │ │ │ +RT0PrismLocalInterpolation(std::bitset< 5 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 32. │ │ │ │ │ +Definition raviartthomas0prismlocalinterpolation.hh:33 │ │ │ │ │ +Dune::RT0PrismLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +Definition raviartthomas0prismlocalinterpolation.hh:70 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00278.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomaslfecache.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0cube3dall.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
raviartthomaslfecache.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas0cube3dall.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <tuple>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/geometry/typeindex.hh>
│ │ │ │ -#include <dune/localfunctions/raviartthomas.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementvariantcache.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::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
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -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 {} │ │ │ │ │ @@ -7,30 +7,36 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -Namespaces | Typedefs │ │ │ │ │ -raviartthomaslfecache.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * raviartthomas0cube3d │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +raviartthomas0cube3dall.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ + Classes │ │ │ │ │ +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 │ │ │ │ │   │ │ │ │ │ - Typedefs │ │ │ │ │ -template │ │ │ │ │ -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. │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00278_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomaslfecache.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0cube3dall.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,124 +70,281 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomaslfecache.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_RAVIARTTHOMASLFECACHE_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH
│ │ │ │
7
│ │ │ │ -
8#include <tuple>
│ │ │ │ -
9#include <utility>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/geometry/type.hh>
│ │ │ │ -
12#include <dune/geometry/typeindex.hh>
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <numeric>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ +
12#include <dune/common/fmatrix.hh>
│ │ │ │
13
│ │ │ │ - │ │ │ │ - │ │ │ │ -
16
│ │ │ │ -
17namespace Dune {
│ │ │ │ -
18
│ │ │ │ -
19namespace Impl {
│ │ │ │ -
20
│ │ │ │ -
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 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 };
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
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()
│ │ │ │ +
│ │ │ │ +
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 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
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
A cache storing a compile time selection of local finite element implementations.
Definition localfiniteelementvariantcache.hh:68
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,135 +8,301 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -raviartthomaslfecache.hh │ │ │ │ │ + * raviartthomas0cube3d │ │ │ │ │ +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_RAVIARTTHOMASLFECACHE_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16 │ │ │ │ │ - 17namespace Dune { │ │ │ │ │ - 18 │ │ │ │ │ - 19namespace Impl { │ │ │ │ │ - 20 │ │ │ │ │ - 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 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 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 }; │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ + 17 │ │ │ │ │ + 18namespace Dune │ │ │ │ │ + 19{ │ │ │ │ │ + 28 template │ │ │ │ │ +29 class RT0Cube3DLocalBasis │ │ │ │ │ + 30 { │ │ │ │ │ + 31 public: │ │ │ │ │ + 32 typedef LocalBasisTraits,R,3,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +33 Dune::FieldMatrix > 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 │ │ │ │ │ - 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() │ │ │ │ │ +54 inline void evaluateFunction (const typename Traits::DomainType& 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 │ │ │ │ │ +68 evaluateJacobian (const typename Traits::DomainType& in, // position │ │ │ │ │ + 69 std::vector& out) const // return value │ │ │ │ │ 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 │ │ │ │ │ + 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 │ │ │ │ │ - 93 │ │ │ │ │ - 103template │ │ │ │ │ -104using RaviartThomasLocalFiniteElementCache = │ │ │ │ │ -LocalFiniteElementVariantCache>; │ │ │ │ │ - 105 │ │ │ │ │ - 106} // namespace Dune │ │ │ │ │ - 107 │ │ │ │ │ - 108#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH │ │ │ │ │ -raviartthomas.hh │ │ │ │ │ -localfiniteelementvariantcache.hh │ │ │ │ │ + 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& order, │ │ │ │ │ + 99 const typename Traits::DomainType& in, // position │ │ │ │ │ + 100 std::vector& 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 │ │ │ │ │ +156 class RT0Cube3DLocalInterpolation │ │ │ │ │ + 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 │ │ │ │ │ +187 void interpolate (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); │ │ │ │ │ + 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 │ │ │ │ │ +214 class RT0Cube3DLocalCoefficients │ │ │ │ │ + 215 { │ │ │ │ │ + 216 public: │ │ │ │ │ +218 RT0Cube3DLocalCoefficients () : li(6) │ │ │ │ │ + 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 li; │ │ │ │ │ + 238 }; │ │ │ │ │ + 239 │ │ │ │ │ + 240} │ │ │ │ │ + 241#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH │ │ │ │ │ +localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementVariantCache │ │ │ │ │ -A cache storing a compile time selection of local finite element │ │ │ │ │ -implementations. │ │ │ │ │ -Definition localfiniteelementvariantcache.hh:68 │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::RT0Cube3DLocalBasis │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:30 │ │ │ │ │ +Dune::RT0Cube3DLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:48 │ │ │ │ │ +Dune::RT0Cube3DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:68 │ │ │ │ │ +Dune::RT0Cube3DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:138 │ │ │ │ │ +Dune::RT0Cube3DLocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::RT0Cube3DLocalBasis::RT0Cube3DLocalBasis │ │ │ │ │ +RT0Cube3DLocalBasis(unsigned int s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 64. │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:36 │ │ │ │ │ +Dune::RT0Cube3DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ +3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:33 │ │ │ │ │ +Dune::RT0Cube3DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:54 │ │ │ │ │ +Dune::RT0Cube3DLocalInterpolation │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:157 │ │ │ │ │ +Dune::RT0Cube3DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:187 │ │ │ │ │ +Dune::RT0Cube3DLocalInterpolation::RT0Cube3DLocalInterpolation │ │ │ │ │ +RT0Cube3DLocalInterpolation(unsigned int s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 64. │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:161 │ │ │ │ │ +Dune::RT0Cube3DLocalCoefficients │ │ │ │ │ +Layout map for RT0 elements on quadrilaterals. │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:215 │ │ │ │ │ +Dune::RT0Cube3DLocalCoefficients::RT0Cube3DLocalCoefficients │ │ │ │ │ +RT0Cube3DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:218 │ │ │ │ │ +Dune::RT0Cube3DLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:225 │ │ │ │ │ +Dune::RT0Cube3DLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition raviartthomas0cube3dall.hh:231 │ │ │ │ │ +localbasis.hh │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00281.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0cube2d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,27 +72,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0cube2d.hh File Reference
│ │ │ │ +
raviartthomas1cube2d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include "raviartthomas0cube2d/raviartthomas0cube2dall.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::RT0Cube2DLocalFiniteElement< D, R >
 Zero order Raviart-Thomas shape functions on rectangles. More...
class  Dune::RT1Cube2DLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -8,22 +8,24 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas0cube2d.hh File Reference │ │ │ │ │ +raviartthomas1cube2d.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include "raviartthomas0cube2d/raviartthomas0cube2dall.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::RT0Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  Zero order Raviart-Thomas shape functions on rectangles. More... │ │ │ │ │ +class  Dune::RT1Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on quadrilaterals. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00281_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0cube2d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,115 +74,120 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
raviartthomas0cube2d.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_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │
8#include <dune/geometry/type.hh>
│ │ │ │
9
│ │ │ │ - │ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
23 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
25 {
│ │ │ │ -
26 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
31
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
33 {}
│ │ │ │ -
│ │ │ │ -
34
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
36 basis(s),
│ │ │ │ -
37 interpolation(s)
│ │ │ │ +
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17
│ │ │ │ +
26 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29
│ │ │ │ +
30 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
35
│ │ │ │ +
│ │ │ │ + │ │ │ │
38 {}
│ │ │ │
│ │ │ │
39
│ │ │ │ -
│ │ │ │ -
40 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
41 {
│ │ │ │ -
42 return basis;
│ │ │ │ -
43 }
│ │ │ │ -
│ │ │ │ -
44
│ │ │ │
│ │ │ │ - │ │ │ │ -
46 {
│ │ │ │ -
47 return coefficients;
│ │ │ │ -
48 }
│ │ │ │ + │ │ │ │ +
46 basis(s),
│ │ │ │ +
47 interpolation(s)
│ │ │ │ +
48 {}
│ │ │ │
│ │ │ │
49
│ │ │ │
│ │ │ │ - │ │ │ │ +
50 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │
51 {
│ │ │ │ -
52 return interpolation;
│ │ │ │ +
52 return basis;
│ │ │ │
53 }
│ │ │ │
│ │ │ │
54
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,131 +8,138 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -raviartthomas0cube2d.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_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include "raviartthomas0cube2d/raviartthomas0cube2dall.hh" │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 23 template │ │ │ │ │ -24 class RT0Cube2DLocalFiniteElement │ │ │ │ │ - 25 { │ │ │ │ │ - 26 public: │ │ │ │ │ - 27 typedef LocalFiniteElementTraits< │ │ │ │ │ - 28 RT0Cube2DLocalBasis, │ │ │ │ │ - 29 RT0Cube2DLocalCoefficients, │ │ │ │ │ -30 RT0Cube2DLocalInterpolation > > Traits; │ │ │ │ │ - 31 │ │ │ │ │ -32 RT0Cube2DLocalFiniteElement () │ │ │ │ │ - 33 {} │ │ │ │ │ - 34 │ │ │ │ │ -35 RT0Cube2DLocalFiniteElement (int s) : │ │ │ │ │ - 36 basis(s), │ │ │ │ │ - 37 interpolation(s) │ │ │ │ │ + 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ + 11#include "raviartthomas1cube2d/raviartthomas1cube2dlocalbasis.hh" │ │ │ │ │ + 12#include "raviartthomas1cube2d/raviartthomas1cube2dlocalinterpolation.hh" │ │ │ │ │ + 13#include "raviartthomas1cube2d/raviartthomas1cube2dlocalcoefficients.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 17 │ │ │ │ │ + 26 template │ │ │ │ │ +27 class RT1Cube2DLocalFiniteElement │ │ │ │ │ + 28 { │ │ │ │ │ + 29 │ │ │ │ │ + 30 public: │ │ │ │ │ + 31 typedef LocalFiniteElementTraits< │ │ │ │ │ + 32 RT1Cube2DLocalBasis, │ │ │ │ │ + 33 RT1Cube2DLocalCoefficients, │ │ │ │ │ +34 RT1Cube2DLocalInterpolation > > Traits; │ │ │ │ │ + 35 │ │ │ │ │ +37 RT1Cube2DLocalFiniteElement () │ │ │ │ │ 38 {} │ │ │ │ │ 39 │ │ │ │ │ -40 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 41 { │ │ │ │ │ - 42 return basis; │ │ │ │ │ - 43 } │ │ │ │ │ - 44 │ │ │ │ │ -45 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 46 { │ │ │ │ │ - 47 return coefficients; │ │ │ │ │ - 48 } │ │ │ │ │ +45 RT1Cube2DLocalFiniteElement (int s) : │ │ │ │ │ + 46 basis(s), │ │ │ │ │ + 47 interpolation(s) │ │ │ │ │ + 48 {} │ │ │ │ │ 49 │ │ │ │ │ -50 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ +50 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ 51 { │ │ │ │ │ - 52 return interpolation; │ │ │ │ │ + 52 return basis; │ │ │ │ │ 53 } │ │ │ │ │ 54 │ │ │ │ │ -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: │ │ │ │ │ - 67 RT0Cube2DLocalBasis basis; │ │ │ │ │ - 68 RT0Cube2DLocalCoefficients coefficients; │ │ │ │ │ - 69 RT0Cube2DLocalInterpolation > interpolation; │ │ │ │ │ - 70 }; │ │ │ │ │ - 71} │ │ │ │ │ - 72#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ -raviartthomas0cube2dall.hh │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ +55 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 56 { │ │ │ │ │ + 57 return coefficients; │ │ │ │ │ + 58 } │ │ │ │ │ + 59 │ │ │ │ │ +60 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 77 RT1Cube2DLocalBasis basis; │ │ │ │ │ + 78 RT1Cube2DLocalCoefficients coefficients; │ │ │ │ │ + 79 RT1Cube2DLocalInterpolation > interpolation; │ │ │ │ │ + 80 }; │ │ │ │ │ + 81} │ │ │ │ │ + 82#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +raviartthomas1cube2dlocalcoefficients.hh │ │ │ │ │ +raviartthomas1cube2dlocalbasis.hh │ │ │ │ │ +raviartthomas1cube2dlocalinterpolation.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalFiniteElementTraits │ │ │ │ │ traits helper struct │ │ │ │ │ Definition localfiniteelementtraits.hh:13 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ LB LocalBasisType │ │ │ │ │ Definition localfiniteelementtraits.hh:16 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ LC LocalCoefficientsType │ │ │ │ │ Definition localfiniteelementtraits.hh:20 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ LI LocalInterpolationType │ │ │ │ │ Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::RT0Cube2DLocalFiniteElement │ │ │ │ │ -Zero order Raviart-Thomas shape functions on rectangles. │ │ │ │ │ -Definition raviartthomas0cube2d.hh:25 │ │ │ │ │ -Dune::RT0Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ +Dune::RT1Cube2DLocalFiniteElement │ │ │ │ │ +First order Raviart-Thomas shape functions on quadrilaterals. │ │ │ │ │ +Definition raviartthomas1cube2d.hh:28 │ │ │ │ │ +Dune::RT1Cube2DLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition raviartthomas1cube2d.hh:71 │ │ │ │ │ +Dune::RT1Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition raviartthomas0cube2d.hh:45 │ │ │ │ │ -Dune::RT0Cube2DLocalFiniteElement::RT0Cube2DLocalFiniteElement │ │ │ │ │ -RT0Cube2DLocalFiniteElement() │ │ │ │ │ -Definition raviartthomas0cube2d.hh:32 │ │ │ │ │ -Dune::RT0Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ +Definition raviartthomas1cube2d.hh:55 │ │ │ │ │ +Dune::RT1Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition raviartthomas0cube2d.hh:50 │ │ │ │ │ -Dune::RT0Cube2DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< RT0Cube2DLocalBasis< D, R >, │ │ │ │ │ -RT0Cube2DLocalCoefficients, RT0Cube2DLocalInterpolation< RT0Cube2DLocalBasis< │ │ │ │ │ +Definition raviartthomas1cube2d.hh:60 │ │ │ │ │ +Dune::RT1Cube2DLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< RT1Cube2DLocalBasis< D, R >, │ │ │ │ │ +RT1Cube2DLocalCoefficients, RT1Cube2DLocalInterpolation< RT1Cube2DLocalBasis< │ │ │ │ │ D, R > > > Traits │ │ │ │ │ -Definition raviartthomas0cube2d.hh:30 │ │ │ │ │ -Dune::RT0Cube2DLocalFiniteElement::size │ │ │ │ │ +Definition raviartthomas1cube2d.hh:34 │ │ │ │ │ +Dune::RT1Cube2DLocalFiniteElement::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ Number of shape functions in this finite element. │ │ │ │ │ -Definition raviartthomas0cube2d.hh:56 │ │ │ │ │ -Dune::RT0Cube2DLocalFiniteElement::localBasis │ │ │ │ │ +Definition raviartthomas1cube2d.hh:66 │ │ │ │ │ +Dune::RT1Cube2DLocalFiniteElement::localBasis │ │ │ │ │ const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition raviartthomas0cube2d.hh:40 │ │ │ │ │ -Dune::RT0Cube2DLocalFiniteElement::RT0Cube2DLocalFiniteElement │ │ │ │ │ -RT0Cube2DLocalFiniteElement(int s) │ │ │ │ │ -Definition raviartthomas0cube2d.hh:35 │ │ │ │ │ -Dune::RT0Cube2DLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition raviartthomas0cube2d.hh:61 │ │ │ │ │ -Dune::RT0Cube2DLocalBasis │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:30 │ │ │ │ │ -Dune::RT0Cube2DLocalInterpolation │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:134 │ │ │ │ │ -Dune::RT0Cube2DLocalCoefficients │ │ │ │ │ -Layout map for RT0 elements on quadrilaterals. │ │ │ │ │ -Definition raviartthomas0cube2dall.hh:186 │ │ │ │ │ +Definition raviartthomas1cube2d.hh:50 │ │ │ │ │ +Dune::RT1Cube2DLocalFiniteElement::RT1Cube2DLocalFiniteElement │ │ │ │ │ +RT1Cube2DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition raviartthomas1cube2d.hh:45 │ │ │ │ │ +Dune::RT1Cube2DLocalFiniteElement::RT1Cube2DLocalFiniteElement │ │ │ │ │ +RT1Cube2DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas1cube2d.hh:37 │ │ │ │ │ +Dune::RT1Cube2DLocalBasis │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas1cube2dlocalbasis.hh:28 │ │ │ │ │ +Dune::RT1Cube2DLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ │ +Definition raviartthomas1cube2dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::RT1Cube2DLocalInterpolation │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas1cube2dlocalinterpolation.hh:27 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00284.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas3cube2dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomassimplexbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,35 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas3cube2dlocalbasis.hh File Reference
│ │ │ │ +
raviartthomassimplexbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <bitset>
│ │ │ │ -#include <numeric>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include "../../common/localbasis.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::RT3Cube2DLocalBasis< D, R >
 Second order Raviart-Thomas shape functions on the reference quadrilateral. More...
struct  Dune::RaviartThomasBasisFactory< dim, SF, CF >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,27 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas3cube2d │ │ │ │ │ + * raviartthomassimplex │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas3cube2dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localbasis.hh" │ │ │ │ │ +raviartthomassimplexbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "raviartthomassimplexinterpolation.hh" │ │ │ │ │ +#include "raviartthomassimplexprebasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT3Cube2DLocalBasis<_D,_R_> │ │ │ │ │ -  Second order Raviart-Thomas shape functions on the reference │ │ │ │ │ - quadrilateral. More... │ │ │ │ │ +struct  Dune::RaviartThomasBasisFactory<_dim,_SF,_CF_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00284_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas3cube2dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomassimplexbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,659 +70,72 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas3cube2dlocalbasis.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_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_RAVIARTTHOMASBASIS_HH
│ │ │ │ +
6#define DUNE_RAVIARTTHOMASBASIS_HH
│ │ │ │
7
│ │ │ │ -
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;
│ │ │ │ +
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 */
│ │ │ │
34
│ │ │ │ -
│ │ │ │ -
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 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
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
Definition raviartthomassimplexbasis.hh:40
│ │ │ │ +
Definition defaultbasisfactory.hh:38
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -8,672 +8,71 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas3cube2d │ │ │ │ │ -raviartthomas3cube2dlocalbasis.hh │ │ │ │ │ + * raviartthomassimplex │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_RAVIARTTHOMASBASIS_HH │ │ │ │ │ + 6#define DUNE_RAVIARTTHOMASBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include "../../common/localbasis.hh" │ │ │ │ │ - 15 │ │ │ │ │ - 16namespace Dune │ │ │ │ │ - 17{ │ │ │ │ │ - 27 template │ │ │ │ │ -28 class RT3Cube2DLocalBasis │ │ │ │ │ - 29 { │ │ │ │ │ - 30 │ │ │ │ │ - 31 public: │ │ │ │ │ - 32 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -33 Dune::FieldMatrix > Traits; │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include "raviartthomassimplexinterpolation.hh" │ │ │ │ │ + 13#include "raviartthomassimplexprebasis.hh" │ │ │ │ │ + 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 │ │ │ │ │ -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& out) const │ │ │ │ │ - 62 { │ │ │ │ │ - 63 out.resize(40); │ │ │ │ │ - 64 auto const& x = in[0], y = in[1]; │ │ │ │ │ - 65 │ │ │ │ │ - 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& 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& order, │ │ │ │ │ - 402 const typename Traits::DomainType& in, // position │ │ │ │ │ - 403 std::vector& 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 │ │ │ │ │ + 35 template< unsigned int dim, class SF, class CF > │ │ │ │ │ +36 struct RaviartThomasBasisFactory │ │ │ │ │ + 37 : public DefaultBasisFactory< RTPreBasisFactory, │ │ │ │ │ + 38 RaviartThomasL2InterpolationFactory, │ │ │ │ │ + 39 dim,dim,SF,CF > │ │ │ │ │ + 40 {}; │ │ │ │ │ + 41} │ │ │ │ │ + 42 │ │ │ │ │ + 43#endif // #ifndef DUNE_RAVIARTTHOMASBASIS_HH │ │ │ │ │ +raviartthomassimplexinterpolation.hh │ │ │ │ │ +raviartthomassimplexprebasis.hh │ │ │ │ │ +defaultbasisfactory.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::RT3Cube2DLocalBasis │ │ │ │ │ -Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas3cube2dlocalbasis.hh:29 │ │ │ │ │ -Dune::RT3Cube2DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition raviartthomas3cube2dlocalbasis.hh:49 │ │ │ │ │ -Dune::RT3Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition raviartthomas3cube2dlocalbasis.hh:179 │ │ │ │ │ -Dune::RT3Cube2DLocalBasis::RT3Cube2DLocalBasis │ │ │ │ │ -RT3Cube2DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition raviartthomas3cube2dlocalbasis.hh:40 │ │ │ │ │ -Dune::RT3Cube2DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition raviartthomas3cube2dlocalbasis.hh:60 │ │ │ │ │ -Dune::RT3Cube2DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition raviartthomas3cube2dlocalbasis.hh:632 │ │ │ │ │ -Dune::RT3Cube2DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ -2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ -Definition raviartthomas3cube2dlocalbasis.hh:33 │ │ │ │ │ -Dune::RT3Cube2DLocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ +Dune::RaviartThomasBasisFactory │ │ │ │ │ +Definition raviartthomassimplexbasis.hh:40 │ │ │ │ │ +Dune::DefaultBasisFactory │ │ │ │ │ +Definition defaultbasisfactory.hh:38 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00287.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas3cube2dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomassimplexinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas3cube2dlocalinterpolation.hh File Reference
│ │ │ │ +
raviartthomassimplexinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <utility>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ #include <dune/geometry/quadraturerules.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.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>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

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

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,40 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas3cube2d │ │ │ │ │ + * raviartthomassimplex │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas3cube2dlocalinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +raviartthomassimplexinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT3Cube2DLocalInterpolation<_LB_> │ │ │ │ │ -  Second order Raviart-Thomas shape functions on the reference │ │ │ │ │ - quadrilateral. More... │ │ │ │ │ + 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_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00287_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas3cube2dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomassimplexinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,167 +70,546 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas3cube2dlocalinterpolation.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_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_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/geometry/quadraturerules.hh>
│ │ │ │ - │ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <utility>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/exceptions.hh>
│ │ │ │
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
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);
│ │ │ │ +
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 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;
│ │ │ │ +
63
│ │ │ │ +
64
│ │ │ │ +
65 // RaviartThomasCoefficientsFactory
│ │ │ │ +
66 // --------------------------------
│ │ │ │ +
67
│ │ │ │ +
68 template < unsigned int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
70 {
│ │ │ │ +
71 typedef std::size_t Key;
│ │ │ │ + │ │ │ │
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();
│ │ │ │ +
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 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 };
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
154}
│ │ │ │ +
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#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -8,176 +8,624 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas3cube2d │ │ │ │ │ -raviartthomas3cube2dlocalinterpolation.hh │ │ │ │ │ + * raviartthomassimplex │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_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 │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 24 template │ │ │ │ │ -25 class RT3Cube2DLocalInterpolation │ │ │ │ │ - 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 │ │ │ │ │ -55 void interpolate (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); │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ + 17 │ │ │ │ │ + 18#include │ │ │ │ │ + 19#include │ │ │ │ │ + 20#include │ │ │ │ │ + 21#include │ │ │ │ │ + 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 │ │ │ │ │ +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 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) │ │ │ │ │ + 63 │ │ │ │ │ + 64 │ │ │ │ │ + 65 // RaviartThomasCoefficientsFactory │ │ │ │ │ + 66 // -------------------------------- │ │ │ │ │ + 67 │ │ │ │ │ + 68 template < unsigned int dim > │ │ │ │ │ +69 struct RaviartThomasCoefficientsFactory │ │ │ │ │ 70 { │ │ │ │ │ - 71 Scalar qPos = qp.position(); │ │ │ │ │ - 72 typename LB::Traits::DomainType localPos; │ │ │ │ │ +71 typedef std::size_t Key; │ │ │ │ │ +72 typedef const LocalCoefficientsContainer Object; │ │ │ │ │ 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(); │ │ │ │ │ + 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 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} │ │ │ │ │ + 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 > │ │ │ │ │ +106 struct RTL2InterpolationBuilder │ │ │ │ │ + 107 { │ │ │ │ │ +108 static const unsigned int dimension = dim; │ │ │ │ │ + 109 │ │ │ │ │ + 110 // for the dofs associated to the element │ │ │ │ │ +111 typedef OrthonormalBasisFactory<_dimension,_Field_> TestBasisFactory; │ │ │ │ │ +112 typedef typename TestBasisFactory::Object TestBasis; │ │ │ │ │ + 113 │ │ │ │ │ + 114 // for the dofs associated to the faces │ │ │ │ │ +115 typedef OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory; │ │ │ │ │ +116 typedef typename TestFaceBasisFactory::Object TestFaceBasis; │ │ │ │ │ + 117 │ │ │ │ │ + 118 // the normals of the faces │ │ │ │ │ +119 typedef FieldVector< Field, dimension > Normal; │ │ │ │ │ + 120 │ │ │ │ │ +121 RTL2InterpolationBuilder () = default; │ │ │ │ │ + 122 │ │ │ │ │ +123 RTL2InterpolationBuilder ( const RTL2InterpolationBuilder & ) = delete; │ │ │ │ │ +124 RTL2InterpolationBuilder ( RTL2InterpolationBuilder && ) = delete; │ │ │ │ │ + 125 │ │ │ │ │ +126 ~RTL2InterpolationBuilder () │ │ │ │ │ + 127 { │ │ │ │ │ + 128 TestBasisFactory::release( testBasis_ ); │ │ │ │ │ + 129 for( FaceStructure &f : faceStructure_ ) │ │ │ │ │ + 130 TestFaceBasisFactory::release( f.basis_ ); │ │ │ │ │ + 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#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 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 │ │ │ │ │ +(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> │ │ │ │ │ +211 class RaviartThomasL2Interpolation │ │ │ │ │ + 212 : public InterpolationHelper< F ,dimension > │ │ │ │ │ + 213 { │ │ │ │ │ + 214 typedef RaviartThomasL2Interpolation<_dimension,_F_> This; │ │ │ │ │ + 215 typedef InterpolationHelper Base; │ │ │ │ │ + 216 │ │ │ │ │ + 217 public: │ │ │ │ │ +218 typedef F Field; │ │ │ │ │ +219 typedef RTL2InterpolationBuilder Builder; │ │ │ │ │ +220 RaviartThomasL2Interpolation() │ │ │ │ │ + 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().resize │ │ │ │ │ +(1) ),void >::value,void> │ │ │ │ │ + 228 { │ │ │ │ │ + 229 coefficients.resize(size()); │ │ │ │ │ + 230 typename Base::template Helper 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().rowPtr(0)), typename Matrix::Field* >:: │ │ │ │ │ +value,void> │ │ │ │ │ + 238 { │ │ │ │ │ + 239 matrix.resize( size(), basis.size() ); │ │ │ │ │ + 240 typename Base::template Helper 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 │ │ │ │ │ +253 void build( std::size_t order ) │ │ │ │ │ + 254 { │ │ │ │ │ + 255 size_ = 0; │ │ │ │ │ + 256 order_ = order; │ │ │ │ │ + 257 builder_.template build(order_); │ │ │ │ │ + 258 if (builder_.testBasis()) │ │ │ │ │ + 259 size_ += dimension*builder_.testBasis()->size(); │ │ │ │ │ + 260 for ( unsigned int f=0; fsize(); │ │ │ │ │ + 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; fsize(); ++i,++row) │ │ │ │ │ + 273 keys[row] = LocalKey(f,1,i); │ │ │ │ │ + 274 } │ │ │ │ │ + 275 if (builder_.testBasis()) │ │ │ │ │ + 276 for (unsigned int i=0; isize()*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 ) const │ │ │ │ │ + 284 { │ │ │ │ │ + 285 const Dune::GeometryType geoType = builder_.type(); │ │ │ │ │ + 286 │ │ │ │ │ + 287 std::vector< Field > testBasisVal; │ │ │ │ │ + 288 │ │ │ │ │ + 289 for (unsigned int i=0; i FaceQuadrature; │ │ │ │ │ + 297 typedef Dune::QuadratureRules FaceQuadratureRules; │ │ │ │ │ + 298 │ │ │ │ │ + 299 const auto &refElement = Dune::ReferenceElements< Field, dimension >:: │ │ │ │ │ +general( geoType ); │ │ │ │ │ + 300 │ │ │ │ │ + 301 for (unsigned int f=0; fsize()); │ │ │ │ │ + 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 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_.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 │ │ │ │ │ + 361 void fillBnd (unsigned int startRow, │ │ │ │ │ + 362 const MVal &mVal, │ │ │ │ │ + 363 const RTVal &rtVal, │ │ │ │ │ + 364 const FieldVector &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 │ │ │ │ │ + 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 │ │ │ │ │ +420 struct RaviartThomasL2InterpolationFactory │ │ │ │ │ + 421 { │ │ │ │ │ +422 typedef RTL2InterpolationBuilder Builder; │ │ │ │ │ +423 typedef const RaviartThomasL2Interpolation Object; │ │ │ │ │ +424 typedef std::size_t Key; │ │ │ │ │ +425 typedef typename std::remove_const::type NonConstObject; │ │ │ │ │ + 426 │ │ │ │ │ + 427 template │ │ │ │ │ +428 static Object *create( const Key &key ) │ │ │ │ │ + 429 { │ │ │ │ │ + 430 if ( !supports(key) ) │ │ │ │ │ + 431 return 0; │ │ │ │ │ + 432 NonConstObject *interpol = new NonConstObject(); │ │ │ │ │ + 433 interpol->template build(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 │ │ │ │ │ +localkey.hh │ │ │ │ │ +orthonormalbasis.hh │ │ │ │ │ +interpolationhelper.hh │ │ │ │ │ +polynomialbasis.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RT3Cube2DLocalInterpolation │ │ │ │ │ -Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas3cube2dlocalinterpolation.hh:26 │ │ │ │ │ -Dune::RT3Cube2DLocalInterpolation::RT3Cube2DLocalInterpolation │ │ │ │ │ -RT3Cube2DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition raviartthomas3cube2dlocalinterpolation.hh:35 │ │ │ │ │ -Dune::RT3Cube2DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Interpolate a given function with shape functions. │ │ │ │ │ -Definition raviartthomas3cube2dlocalinterpolation.hh:55 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::LocalCoefficientsContainer │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:38 │ │ │ │ │ +Dune::LocalCoefficientsContainer::LocalCoefficientsContainer │ │ │ │ │ +LocalCoefficientsContainer(const Setter &setter) │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:43 │ │ │ │ │ +Dune::LocalCoefficientsContainer::localKey │ │ │ │ │ +const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:48 │ │ │ │ │ +Dune::LocalCoefficientsContainer::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +Definition nedelecsimplexinterpolation.hh:54 │ │ │ │ │ +Dune::OrthonormalBasisFactory │ │ │ │ │ +Definition orthonormalbasis.hh:20 │ │ │ │ │ +Dune::OrthonormalBasisFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition orthonormalbasis.hh:57 │ │ │ │ │ +Dune::RaviartThomasL2InterpolationFactory │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:421 │ │ │ │ │ +Dune::RaviartThomasL2InterpolationFactory::NonConstObject │ │ │ │ │ +std::remove_const< Object >::type NonConstObject │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:425 │ │ │ │ │ +Dune::RaviartThomasL2InterpolationFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:441 │ │ │ │ │ +Dune::RaviartThomasL2InterpolationFactory::supports │ │ │ │ │ +static bool supports(const Key &key) │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:437 │ │ │ │ │ +Dune::RaviartThomasL2InterpolationFactory::create │ │ │ │ │ +static Object * create(const Key &key) │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:428 │ │ │ │ │ +Dune::RaviartThomasL2InterpolationFactory::Builder │ │ │ │ │ +RTL2InterpolationBuilder< dim, Field > Builder │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:422 │ │ │ │ │ +Dune::RaviartThomasL2InterpolationFactory::Object │ │ │ │ │ +const RaviartThomasL2Interpolation< dim, Field > Object │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:423 │ │ │ │ │ +Dune::RaviartThomasL2InterpolationFactory::Key │ │ │ │ │ +std::size_t Key │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:424 │ │ │ │ │ +Dune::RaviartThomasCoefficientsFactory │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:70 │ │ │ │ │ +Dune::RaviartThomasCoefficientsFactory::Key │ │ │ │ │ +std::size_t Key │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:71 │ │ │ │ │ +Dune::RaviartThomasCoefficientsFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:91 │ │ │ │ │ +Dune::RaviartThomasCoefficientsFactory::supports │ │ │ │ │ +static bool supports(const Key &key) │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:87 │ │ │ │ │ +Dune::RaviartThomasCoefficientsFactory::Object │ │ │ │ │ +const LocalCoefficientsContainer Object │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:72 │ │ │ │ │ +Dune::RaviartThomasCoefficientsFactory::create │ │ │ │ │ +static Object * create(const Key &key) │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:75 │ │ │ │ │ +Dune::RTL2InterpolationBuilder │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:107 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::testBasis │ │ │ │ │ +TestBasis * testBasis() const │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:141 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::Normal │ │ │ │ │ +FieldVector< Field, dimension > Normal │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:119 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::TestBasis │ │ │ │ │ +TestBasisFactory::Object TestBasis │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:112 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::TestFaceBasis │ │ │ │ │ +TestFaceBasisFactory::Object TestFaceBasis │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:116 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::faceSize │ │ │ │ │ +unsigned int faceSize() const │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:138 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::build │ │ │ │ │ +void build(std::size_t order) │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:150 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::RTL2InterpolationBuilder │ │ │ │ │ +RTL2InterpolationBuilder()=default │ │ │ │ │ +Dune::RTL2InterpolationBuilder::testFaceBasis │ │ │ │ │ +TestFaceBasis * testFaceBasis(unsigned int f) const │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:144 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::type │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:133 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::normal │ │ │ │ │ +const Normal & normal(unsigned int f) const │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:147 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::RTL2InterpolationBuilder │ │ │ │ │ +RTL2InterpolationBuilder(const RTL2InterpolationBuilder &)=delete │ │ │ │ │ +Dune::RTL2InterpolationBuilder::TestFaceBasisFactory │ │ │ │ │ +OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:115 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::RTL2InterpolationBuilder │ │ │ │ │ +RTL2InterpolationBuilder(RTL2InterpolationBuilder &&)=delete │ │ │ │ │ +Dune::RTL2InterpolationBuilder::TestBasisFactory │ │ │ │ │ +OrthonormalBasisFactory< dimension, Field > TestBasisFactory │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:111 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::order │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:135 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:108 │ │ │ │ │ +Dune::RTL2InterpolationBuilder::~RTL2InterpolationBuilder │ │ │ │ │ +~RTL2InterpolationBuilder() │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:126 │ │ │ │ │ +Dune::RaviartThomasL2Interpolation │ │ │ │ │ +An L2-based interpolation for Raviart Thomas. │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:213 │ │ │ │ │ +Dune::RaviartThomasL2Interpolation::order │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:244 │ │ │ │ │ +Dune::RaviartThomasL2Interpolation::RaviartThomasL2Interpolation │ │ │ │ │ +RaviartThomasL2Interpolation() │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:220 │ │ │ │ │ +Dune::RaviartThomasL2Interpolation::interpolate │ │ │ │ │ +void interpolate(typename Base::template Helper< Func, Container, type > &func) │ │ │ │ │ +const │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:283 │ │ │ │ │ +Dune::RaviartThomasL2Interpolation::interpolate │ │ │ │ │ +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 │ │ │ │ │ +Dune::RaviartThomasL2Interpolation::Builder │ │ │ │ │ +RTL2InterpolationBuilder< dimension, Field > Builder │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:219 │ │ │ │ │ +Dune::RaviartThomasL2Interpolation::Field │ │ │ │ │ +F Field │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:218 │ │ │ │ │ +Dune::RaviartThomasL2Interpolation::build │ │ │ │ │ +void build(std::size_t order) │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:253 │ │ │ │ │ +Dune::RaviartThomasL2Interpolation::interpolate │ │ │ │ │ +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 │ │ │ │ │ +Dune::RaviartThomasL2Interpolation::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:248 │ │ │ │ │ +Dune::RaviartThomasL2Interpolation::setLocalKeys │ │ │ │ │ +void setLocalKeys(std::vector< LocalKey > &keys) const │ │ │ │ │ +Definition raviartthomassimplexinterpolation.hh:265 │ │ │ │ │ +Dune::InterpolationHelper │ │ │ │ │ +Definition interpolationhelper.hh:22 │ │ │ │ │ +Dune::InterpolationHelper::Helper │ │ │ │ │ +Definition interpolationhelper.hh:24 │ │ │ │ │ +Dune::PolynomialBasis │ │ │ │ │ +Definition polynomialbasis.hh:65 │ │ │ │ │ +Dune::PolynomialBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Definition polynomialbasis.hh:113 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00290.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas3cube2dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomassimplexprebasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas3cube2dlocalcoefficients.hh File Reference
│ │ │ │ +
raviartthomassimplexprebasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../../common/localkey.hh"
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <utility>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

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

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,24 +7,29 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas3cube2d │ │ │ │ │ + * raviartthomassimplex │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas3cube2dlocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localkey.hh" │ │ │ │ │ +raviartthomassimplexprebasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT3Cube2DLocalCoefficients │ │ │ │ │ -  Layout map for Raviart-Thomas-3 elements on quadrilaterals. More... │ │ │ │ │ +struct  Dune::RTPreBasisFactory<_dim,_Field_> │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::RTPreBasisFactory<_dim,_Field_>::EvaluationBasisFactory<_dd,_FF │ │ │ │ │ + > │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::RTVecMatrix<_geometryId,_Field_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00290_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas3cube2dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomassimplexprebasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,85 +70,283 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas3cube2dlocalcoefficients.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_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_RAVIARTTHOMASPREBASIS_HH
│ │ │ │ +
6#define DUNE_RAVIARTTHOMASPREBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <vector>
│ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <utility>
│ │ │ │
10
│ │ │ │ -
11#include "../../common/localkey.hh"
│ │ │ │ +
11#include <dune/geometry/type.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 }
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
│ │ │ │ -
44 std::size_t size () const
│ │ │ │ -
45 {
│ │ │ │ -
46 return 40;
│ │ │ │ -
47 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ + │ │ │ │ +
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 /*
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -8,84 +8,330 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas3cube2d │ │ │ │ │ -raviartthomas3cube2dlocalcoefficients.hh │ │ │ │ │ + * raviartthomassimplex │ │ │ │ │ +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_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_RAVIARTTHOMASPREBASIS_HH │ │ │ │ │ + 6#define DUNE_RAVIARTTHOMASPREBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ 10 │ │ │ │ │ - 11#include "../../common/localkey.hh" │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ -22 class RT3Cube2DLocalCoefficients │ │ │ │ │ - 23 { │ │ │ │ │ - 24 │ │ │ │ │ - 25 public: │ │ │ │ │ -27 RT3Cube2DLocalCoefficients () : li(40) │ │ │ │ │ - 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++) │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 17 template < GeometryType::Id geometryId, class Field > │ │ │ │ │ + 18 struct RTVecMatrix; │ │ │ │ │ + 19 │ │ │ │ │ + 20 template │ │ │ │ │ +21 struct RTPreBasisFactory │ │ │ │ │ + 22 { │ │ │ │ │ +23 typedef MonomialBasisProvider MBasisFactory; │ │ │ │ │ +24 typedef typename MBasisFactory::Object MBasis; │ │ │ │ │ +25 typedef StandardEvaluator EvalMBasis; │ │ │ │ │ +26 typedef PolynomialBasisWithMatrix > │ │ │ │ │ +Basis; │ │ │ │ │ + 27 │ │ │ │ │ +28 typedef const Basis Object; │ │ │ │ │ +29 typedef std::size_t Key; │ │ │ │ │ + 30 │ │ │ │ │ + 31 template │ │ │ │ │ +32 struct EvaluationBasisFactory │ │ │ │ │ + 33 { │ │ │ │ │ +34 typedef MonomialBasisProvider Type; │ │ │ │ │ + 35 }; │ │ │ │ │ + 36 template< GeometryType::Id geometryId > │ │ │ │ │ +37 static Object *create ( const Key &order ) │ │ │ │ │ 38 { │ │ │ │ │ - 39 li[16 + i] = LocalKey(0,0,i); │ │ │ │ │ - 40 } │ │ │ │ │ - 41 } │ │ │ │ │ - 42 │ │ │ │ │ -44 std::size_t size () const │ │ │ │ │ - 45 { │ │ │ │ │ - 46 return 40; │ │ │ │ │ - 47 } │ │ │ │ │ - 48 │ │ │ │ │ -50 const LocalKey& localKey (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 │ │ │ │ │ + 39 RTVecMatrix vecMatrix(order); │ │ │ │ │ + 40 MBasis *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 } │ │ │ │ │ +45 static void release( Object *object ) { delete object; } │ │ │ │ │ + 46 }; │ │ │ │ │ + 47 │ │ │ │ │ + 48 template │ │ │ │ │ +49 struct RTVecMatrix │ │ │ │ │ + 50 { │ │ │ │ │ +51 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ +52 static const unsigned int dim = geometry.dim(); │ │ │ │ │ +53 typedef MultiIndex MI; │ │ │ │ │ +54 typedef MonomialBasis MIBasis; │ │ │ │ │ +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 │ │ │ │ │ +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 MI │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:53 │ │ │ │ │ +Dune::RTVecMatrix::row │ │ │ │ │ +void row(const unsigned int row, Vector &vec) const │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:196 │ │ │ │ │ +Dune::RTVecMatrix::MIBasis │ │ │ │ │ +MonomialBasis< geometryId, MI > MIBasis │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:54 │ │ │ │ │ +Dune::RTVecMatrix::geometry │ │ │ │ │ +static constexpr GeometryType geometry │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:51 │ │ │ │ │ +Dune::RTVecMatrix::rows │ │ │ │ │ +unsigned int rows() const │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:191 │ │ │ │ │ +Dune::RTVecMatrix::col_ │ │ │ │ │ +unsigned int col_ │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:203 │ │ │ │ │ +Dune::RTPreBasisFactory │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:22 │ │ │ │ │ +Dune::RTPreBasisFactory::Object │ │ │ │ │ +const Basis Object │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:28 │ │ │ │ │ +Dune::RTPreBasisFactory::MBasisFactory │ │ │ │ │ +MonomialBasisProvider< dim, Field > MBasisFactory │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:23 │ │ │ │ │ +Dune::RTPreBasisFactory::Basis │ │ │ │ │ +PolynomialBasisWithMatrix< EvalMBasis, SparseCoeffMatrix< Field, dim > > Basis │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:26 │ │ │ │ │ +Dune::RTPreBasisFactory::MBasis │ │ │ │ │ +MBasisFactory::Object MBasis │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:24 │ │ │ │ │ +Dune::RTPreBasisFactory::Key │ │ │ │ │ +std::size_t Key │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:29 │ │ │ │ │ +Dune::RTPreBasisFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:45 │ │ │ │ │ +Dune::RTPreBasisFactory::EvalMBasis │ │ │ │ │ +StandardEvaluator< MBasis > EvalMBasis │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:25 │ │ │ │ │ +Dune::RTPreBasisFactory::create │ │ │ │ │ +static Object * create(const Key &order) │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:37 │ │ │ │ │ +Dune::RTPreBasisFactory::EvaluationBasisFactory │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:33 │ │ │ │ │ +Dune::RTPreBasisFactory::EvaluationBasisFactory::Type │ │ │ │ │ +MonomialBasisProvider< dd, FF > Type │ │ │ │ │ +Definition raviartthomassimplexprebasis.hh:34 │ │ │ │ │ +Dune::StandardEvaluator │ │ │ │ │ +Definition basisevaluator.hh:131 │ │ │ │ │ +Dune::MonomialBasis │ │ │ │ │ +Definition monomialbasis.hh:440 │ │ │ │ │ +Dune::MonomialBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Definition monomialbasis.hh:476 │ │ │ │ │ +Dune::MonomialBasis::evaluate │ │ │ │ │ +void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ +values) const │ │ │ │ │ +Definition monomialbasis.hh:498 │ │ │ │ │ +Dune::MonomialBasis::sizes │ │ │ │ │ +const unsigned int * sizes(unsigned int order) const │ │ │ │ │ +Definition monomialbasis.hh:465 │ │ │ │ │ +Dune::MonomialBasisProvider │ │ │ │ │ +Definition monomialbasis.hh:780 │ │ │ │ │ +Dune::MultiIndex │ │ │ │ │ +Definition multiindex.hh:37 │ │ │ │ │ +Dune::PolynomialBasisWithMatrix │ │ │ │ │ +Definition polynomialbasis.hh:348 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00293.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube3dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0pyramid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas1cube3dlocalinterpolation.hh File Reference
│ │ │ │ +
raviartthomas0pyramid.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.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::RT1Cube3DLocalInterpolation< LB >
 First order Raviart-Thomas shape functions on the reference hexahedron. More...
class  Dune::RT0PyramidLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on pyramids. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas1cube3d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas1cube3dlocalinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas0pyramid.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#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::RT1Cube3DLocalInterpolation<_LB_> │ │ │ │ │ -  First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ - More... │ │ │ │ │ +class  Dune::RT0PyramidLocalFiniteElement<_D,_R_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on pyramids. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00293_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube3dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0pyramid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,158 +70,123 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas1cube3dlocalinterpolation.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_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │
9
│ │ │ │ -
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
23 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
25 {
│ │ │ │ -
26
│ │ │ │ -
27 public:
│ │ │ │ +
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
25 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
27 {
│ │ │ │
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;
│ │ │ │ +
29 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
34
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 {}
│ │ │ │ +
│ │ │ │
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);
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
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);
│ │ │ │ +
│ │ │ │ +
65 unsigned int size () const
│ │ │ │ +
66 {
│ │ │ │ +
67 return basis.size();
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │
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 };
│ │ │ │ +
│ │ │ │ +
70 static constexpr GeometryType type ()
│ │ │ │ +
71 {
│ │ │ │ +
72 return GeometryTypes::pyramid;
│ │ │ │ +
73 }
│ │ │ │
│ │ │ │ -
146}
│ │ │ │ -
147#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH
│ │ │ │ +
74
│ │ │ │ +
75 private:
│ │ │ │ + │ │ │ │ +
77 RT0PyramidLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
79 };
│ │ │ │ +
│ │ │ │ +
80}
│ │ │ │ +
81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -8,181 +8,137 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas1cube3d │ │ │ │ │ -raviartthomas1cube3dlocalinterpolation.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_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 23 template │ │ │ │ │ -24 class RT1Cube3DLocalInterpolation │ │ │ │ │ - 25 { │ │ │ │ │ - 26 │ │ │ │ │ - 27 public: │ │ │ │ │ + 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ + 11#include "raviartthomas0pyramid/raviartthomas0pyramidlocalbasis.hh" │ │ │ │ │ + 12#include "raviartthomas0pyramid/raviartthomas0pyramidlocalcoefficients.hh" │ │ │ │ │ + 13#include "raviartthomas0pyramid/raviartthomas0pyramidlocalinterpolation.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 25 template │ │ │ │ │ +26 class RT0PyramidLocalFiniteElement │ │ │ │ │ + 27 { │ │ │ │ │ 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; │ │ │ │ │ + 29 public: │ │ │ │ │ + 30 typedef LocalFiniteElementTraits< │ │ │ │ │ + 31 RT0PyramidLocalBasis, │ │ │ │ │ + 32 RT0PyramidLocalCoefficients, │ │ │ │ │ +33 RT0PyramidLocalInterpolation > > Traits; │ │ │ │ │ + 34 │ │ │ │ │ +36 RT0PyramidLocalFiniteElement () │ │ │ │ │ + 37 {} │ │ │ │ │ 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 │ │ │ │ │ -56 void interpolate (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); │ │ │ │ │ +44 RT0PyramidLocalFiniteElement (int s) : │ │ │ │ │ + 45 basis(s), │ │ │ │ │ + 46 interpolation(s) │ │ │ │ │ + 47 {} │ │ │ │ │ + 48 │ │ │ │ │ +49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 50 { │ │ │ │ │ + 51 return basis; │ │ │ │ │ + 52 } │ │ │ │ │ + 53 │ │ │ │ │ +54 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 55 { │ │ │ │ │ + 56 return coefficients; │ │ │ │ │ + 57 } │ │ │ │ │ + 58 │ │ │ │ │ +59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 60 { │ │ │ │ │ + 61 return interpolation; │ │ │ │ │ + 62 } │ │ │ │ │ 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); │ │ │ │ │ +65 unsigned int size () const │ │ │ │ │ + 66 { │ │ │ │ │ + 67 return basis.size(); │ │ │ │ │ + 68 } │ │ │ │ │ 69 │ │ │ │ │ - 70 for (auto&& qp : rule1) │ │ │ │ │ +70 static constexpr GeometryType type () │ │ │ │ │ 71 { │ │ │ │ │ - 72 Dune::FieldVector qPos = qp.position(); │ │ │ │ │ - 73 typename LB::Traits::DomainType localPos; │ │ │ │ │ + 72 return GeometryTypes::pyramid; │ │ │ │ │ + 73 } │ │ │ │ │ 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 │ │ │ │ │ + 75 private: │ │ │ │ │ + 76 RT0PyramidLocalBasis basis; │ │ │ │ │ + 77 RT0PyramidLocalCoefficients coefficients; │ │ │ │ │ + 78 RT0PyramidLocalInterpolation > interpolation; │ │ │ │ │ + 79 }; │ │ │ │ │ + 80} │ │ │ │ │ + 81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH │ │ │ │ │ +raviartthomas0pyramidlocalcoefficients.hh │ │ │ │ │ +raviartthomas0pyramidlocalbasis.hh │ │ │ │ │ +raviartthomas0pyramidlocalinterpolation.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RT1Cube3DLocalInterpolation │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::RT0PyramidLocalFiniteElement │ │ │ │ │ +First order Raviart-Thomas shape functions on pyramids. │ │ │ │ │ +Definition raviartthomas0pyramid.hh:27 │ │ │ │ │ +Dune::RT0PyramidLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition raviartthomas0pyramid.hh:54 │ │ │ │ │ +Dune::RT0PyramidLocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition raviartthomas0pyramid.hh:65 │ │ │ │ │ +Dune::RT0PyramidLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition raviartthomas0pyramid.hh:70 │ │ │ │ │ +Dune::RT0PyramidLocalFiniteElement::RT0PyramidLocalFiniteElement │ │ │ │ │ +RT0PyramidLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 32. │ │ │ │ │ +Definition raviartthomas0pyramid.hh:44 │ │ │ │ │ +Dune::RT0PyramidLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< RT0PyramidLocalBasis< D, R >, │ │ │ │ │ +RT0PyramidLocalCoefficients, RT0PyramidLocalInterpolation< │ │ │ │ │ +RT0PyramidLocalBasis< D, R > > > Traits │ │ │ │ │ +Definition raviartthomas0pyramid.hh:33 │ │ │ │ │ +Dune::RT0PyramidLocalFiniteElement::RT0PyramidLocalFiniteElement │ │ │ │ │ +RT0PyramidLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas0pyramid.hh:36 │ │ │ │ │ +Dune::RT0PyramidLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition raviartthomas0pyramid.hh:49 │ │ │ │ │ +Dune::RT0PyramidLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition raviartthomas0pyramid.hh:59 │ │ │ │ │ +Dune::RT0PyramidLocalBasis │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference pyramid. │ │ │ │ │ +Definition raviartthomas0pyramidlocalbasis.hh:28 │ │ │ │ │ +Dune::RT0PyramidLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on pyramids. │ │ │ │ │ +Definition raviartthomas0pyramidlocalcoefficients.hh:24 │ │ │ │ │ +Dune::RT0PyramidLocalInterpolation │ │ │ │ │ First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ -Definition raviartthomas1cube3dlocalinterpolation.hh:25 │ │ │ │ │ -Dune::RT1Cube3DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Interpolate a given function with shape functions. │ │ │ │ │ -Definition raviartthomas1cube3dlocalinterpolation.hh:56 │ │ │ │ │ -Dune::RT1Cube3DLocalInterpolation::RT1Cube3DLocalInterpolation │ │ │ │ │ -RT1Cube3DLocalInterpolation(std::bitset< 6 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 64. │ │ │ │ │ -Definition raviartthomas1cube3dlocalinterpolation.hh:34 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Definition raviartthomas0pyramidlocalinterpolation.hh:24 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00296.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube3dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas12d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,36 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas1cube3dlocalbasis.hh File Reference
│ │ │ │ +
raviartthomas12d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include "../../common/localbasis.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::RT1Cube3DLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference hexahedron. More...
class  Dune::RT12DLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on triangles. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,26 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas1cube3d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas1cube3dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localbasis.hh" │ │ │ │ │ +raviartthomas12d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#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::RT1Cube3DLocalBasis<_D,_R_> │ │ │ │ │ -  First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ - More... │ │ │ │ │ +class  Dune::RT12DLocalFiniteElement<_D,_R_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on triangles. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00296_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube3dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas12d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,642 +70,124 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas1cube3dlocalbasis.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_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/fmatrix.hh>
│ │ │ │ -
12
│ │ │ │ -
13#include "../../common/localbasis.hh"
│ │ │ │ +
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:
│ │ │ │ -
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
│ │ │ │ +
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 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
│ │ │ │ -
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
│ │ │ │ +
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 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 {} │ │ │ │ │ @@ -8,759 +8,138 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas1cube3d │ │ │ │ │ -raviartthomas1cube3dlocalbasis.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_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include "../../common/localbasis.hh" │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ + 11#include "raviartthomas12d/raviartthomas12dlocalbasis.hh" │ │ │ │ │ + 12#include "raviartthomas12d/raviartthomas12dlocalcoefficients.hh" │ │ │ │ │ + 13#include "raviartthomas12d/raviartthomas12dlocalinterpolation.hh" │ │ │ │ │ 14 │ │ │ │ │ 15namespace Dune │ │ │ │ │ 16{ │ │ │ │ │ + 17 │ │ │ │ │ 26 template │ │ │ │ │ -27 class RT1Cube3DLocalBasis │ │ │ │ │ - 28 { │ │ │ │ │ - 29 │ │ │ │ │ - 30 public: │ │ │ │ │ - 31 typedef LocalBasisTraits,R,3,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -32 Dune::FieldMatrix > 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) │ │ │ │ │ +27 class │ │ │ │ │ + 28 RT12DLocalFiniteElement │ │ │ │ │ + 29 { │ │ │ │ │ + 30 │ │ │ │ │ + 31 public: │ │ │ │ │ + 32 typedef │ │ │ │ │ +LocalFiniteElementTraits,RT12DLocalCoefficients, │ │ │ │ │ +33 RT12DLocalInterpolation > > Traits; │ │ │ │ │ + 34 │ │ │ │ │ +36 RT12DLocalFiniteElement () │ │ │ │ │ + 37 {} │ │ │ │ │ + 38 │ │ │ │ │ +44 RT12DLocalFiniteElement (int s) : │ │ │ │ │ + 45 basis(s), │ │ │ │ │ + 46 interpolation(s) │ │ │ │ │ + 47 {} │ │ │ │ │ + 48 │ │ │ │ │ +49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 50 { │ │ │ │ │ + 51 return basis; │ │ │ │ │ + 52 } │ │ │ │ │ + 53 │ │ │ │ │ +54 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ 55 { │ │ │ │ │ - 56 sign3 = -1.0; │ │ │ │ │ + 56 return coefficients; │ │ │ │ │ 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& 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& 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& order, │ │ │ │ │ - 604 const typename Traits::DomainType& in, // position │ │ │ │ │ - 605 std::vector& 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 │ │ │ │ │ + 58 │ │ │ │ │ +59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 76 RT12DLocalBasis basis; │ │ │ │ │ + 77 RT12DLocalCoefficients coefficients; │ │ │ │ │ + 78 RT12DLocalInterpolation > interpolation; │ │ │ │ │ + 79 }; │ │ │ │ │ + 80} │ │ │ │ │ + 81 │ │ │ │ │ + 82#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH │ │ │ │ │ +raviartthomas12dlocalcoefficients.hh │ │ │ │ │ +raviartthomas12dlocalbasis.hh │ │ │ │ │ +raviartthomas12dlocalinterpolation.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::RT1Cube3DLocalBasis │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ -Definition raviartthomas1cube3dlocalbasis.hh:28 │ │ │ │ │ -Dune::RT1Cube3DLocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::RT1Cube3DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ -3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ -Definition raviartthomas1cube3dlocalbasis.hh:32 │ │ │ │ │ -Dune::RT1Cube3DLocalBasis::size │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::RT12DLocalFiniteElement │ │ │ │ │ +First order Raviart-Thomas shape functions on triangles. │ │ │ │ │ +Definition raviartthomas12d.hh:29 │ │ │ │ │ +Dune::RT12DLocalFiniteElement::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition raviartthomas1cube3dlocalbasis.hh:69 │ │ │ │ │ -Dune::RT1Cube3DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition raviartthomas1cube3dlocalbasis.hh:80 │ │ │ │ │ -Dune::RT1Cube3DLocalBasis::RT1Cube3DLocalBasis │ │ │ │ │ -RT1Cube3DLocalBasis(unsigned int s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 64. │ │ │ │ │ -Definition raviartthomas1cube3dlocalbasis.hh:39 │ │ │ │ │ -Dune::RT1Cube3DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition raviartthomas1cube3dlocalbasis.hh:236 │ │ │ │ │ -Dune::RT1Cube3DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition raviartthomas1cube3dlocalbasis.hh:616 │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition raviartthomas12d.hh:65 │ │ │ │ │ +Dune::RT12DLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< RT12DLocalBasis< D, R >, RT12DLocalCoefficients, │ │ │ │ │ +RT12DLocalInterpolation< RT12DLocalBasis< D, R > > > Traits │ │ │ │ │ +Definition raviartthomas12d.hh:33 │ │ │ │ │ +Dune::RT12DLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition raviartthomas12d.hh:49 │ │ │ │ │ +Dune::RT12DLocalFiniteElement::RT12DLocalFiniteElement │ │ │ │ │ +RT12DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +Definition raviartthomas12d.hh:44 │ │ │ │ │ +Dune::RT12DLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition raviartthomas12d.hh:54 │ │ │ │ │ +Dune::RT12DLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition raviartthomas12d.hh:70 │ │ │ │ │ +Dune::RT12DLocalFiniteElement::RT12DLocalFiniteElement │ │ │ │ │ +RT12DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas12d.hh:36 │ │ │ │ │ +Dune::RT12DLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition raviartthomas12d.hh:59 │ │ │ │ │ +Dune::RT12DLocalBasis │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +Definition raviartthomas12dlocalbasis.hh:28 │ │ │ │ │ +Dune::RT12DLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on the reference triangle. │ │ │ │ │ +Definition raviartthomas12dlocalcoefficients.hh:23 │ │ │ │ │ +Dune::RT12DLocalInterpolation │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas12dlocalinterpolation.hh:26 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00299.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube3dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas3cube2dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas1cube3dlocalcoefficients.hh File Reference
│ │ │ │ +
raviartthomas3cube2dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../../common/localkey.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::RT1Cube3DLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on quadrilaterals. More...
class  Dune::RT3Cube2DLocalInterpolation< LB >
 Second order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,24 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas1cube3d │ │ │ │ │ + * raviartthomas3cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas1cube3dlocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas3cube2dlocalinterpolation.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include "../../common/localkey.hh" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT1Cube3DLocalCoefficients │ │ │ │ │ -  Layout map for Raviart-Thomas-1 elements on quadrilaterals. More... │ │ │ │ │ +class  Dune::RT3Cube2DLocalInterpolation<_LB_> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00299_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube3dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas3cube2dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,85 +70,167 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas1cube3dlocalcoefficients.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#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include "../../common/localkey.hh"
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/quadraturerules.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 return li[i];
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
56 private:
│ │ │ │ -
57 std::vector<LocalKey> li;
│ │ │ │ -
58 };
│ │ │ │ -
│ │ │ │ -
59}
│ │ │ │ -
60#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,84 +8,176 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas1cube3d │ │ │ │ │ -raviartthomas1cube3dlocalcoefficients.hh │ │ │ │ │ + * raviartthomas3cube2d │ │ │ │ │ +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#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include "../../common/localkey.hh" │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ 13namespace Dune │ │ │ │ │ 14{ │ │ │ │ │ 15 │ │ │ │ │ -23 class RT1Cube3DLocalCoefficients │ │ │ │ │ - 24 { │ │ │ │ │ - 25 │ │ │ │ │ - 26 public: │ │ │ │ │ -28 RT1Cube3DLocalCoefficients () : li(36) │ │ │ │ │ - 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 return li[i]; │ │ │ │ │ - 54 } │ │ │ │ │ - 55 │ │ │ │ │ - 56 private: │ │ │ │ │ - 57 std::vector li; │ │ │ │ │ - 58 }; │ │ │ │ │ - 59} │ │ │ │ │ - 60#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 24 template │ │ │ │ │ +25 class RT3Cube2DLocalInterpolation │ │ │ │ │ + 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 │ │ │ │ │ +55 void interpolate (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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::RT1Cube3DLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ │ -Definition raviartthomas1cube3dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::RT1Cube3DLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition raviartthomas1cube3dlocalcoefficients.hh:45 │ │ │ │ │ -Dune::RT1Cube3DLocalCoefficients::RT1Cube3DLocalCoefficients │ │ │ │ │ -RT1Cube3DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas1cube3dlocalcoefficients.hh:28 │ │ │ │ │ -Dune::RT1Cube3DLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition raviartthomas1cube3dlocalcoefficients.hh:51 │ │ │ │ │ +Dune::RT3Cube2DLocalInterpolation │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas3cube2dlocalinterpolation.hh:26 │ │ │ │ │ +Dune::RT3Cube2DLocalInterpolation::RT3Cube2DLocalInterpolation │ │ │ │ │ +RT3Cube2DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition raviartthomas3cube2dlocalinterpolation.hh:35 │ │ │ │ │ +Dune::RT3Cube2DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +Definition raviartthomas3cube2dlocalinterpolation.hh:55 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00302.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube2d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas3cube2dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas1cube2d.hh File Reference
│ │ │ │ +
raviartthomas3cube2dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include "../common/localfiniteelementtraits.hh"
│ │ │ │ -#include "raviartthomas1cube2d/raviartthomas1cube2dlocalbasis.hh"
│ │ │ │ -#include "raviartthomas1cube2d/raviartthomas1cube2dlocalinterpolation.hh"
│ │ │ │ -#include "raviartthomas1cube2d/raviartthomas1cube2dlocalcoefficients.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::RT1Cube2DLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on quadrilaterals. More...
class  Dune::RT3Cube2DLocalBasis< D, R >
 Second order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,25 +7,27 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ + * raviartthomas3cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas1cube2d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "raviartthomas1cube2d/raviartthomas1cube2dlocalbasis.hh" │ │ │ │ │ -#include "raviartthomas1cube2d/raviartthomas1cube2dlocalinterpolation.hh" │ │ │ │ │ -#include "raviartthomas1cube2d/raviartthomas1cube2dlocalcoefficients.hh" │ │ │ │ │ +raviartthomas3cube2dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT1Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  First order Raviart-Thomas shape functions on quadrilaterals. More... │ │ │ │ │ +class  Dune::RT3Cube2DLocalBasis<_D,_R_> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00302_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas1cube2d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas3cube2dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,124 +70,659 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas1cube2d.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_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_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
│ │ │ │ -
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 }
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
59
│ │ │ │ +
53
│ │ │ │
│ │ │ │ - │ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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 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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,138 +8,672 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ -raviartthomas1cube2d.hh │ │ │ │ │ + * raviartthomas3cube2d │ │ │ │ │ +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_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "raviartthomas1cube2d/raviartthomas1cube2dlocalbasis.hh" │ │ │ │ │ - 12#include "raviartthomas1cube2d/raviartthomas1cube2dlocalinterpolation.hh" │ │ │ │ │ - 13#include "raviartthomas1cube2d/raviartthomas1cube2dlocalcoefficients.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 17 │ │ │ │ │ - 26 template │ │ │ │ │ -27 class RT1Cube2DLocalFiniteElement │ │ │ │ │ - 28 { │ │ │ │ │ - 29 │ │ │ │ │ - 30 public: │ │ │ │ │ - 31 typedef LocalFiniteElementTraits< │ │ │ │ │ - 32 RT1Cube2DLocalBasis, │ │ │ │ │ - 33 RT1Cube2DLocalCoefficients, │ │ │ │ │ -34 RT1Cube2DLocalInterpolation > > Traits; │ │ │ │ │ - 35 │ │ │ │ │ -37 RT1Cube2DLocalFiniteElement () │ │ │ │ │ - 38 {} │ │ │ │ │ - 39 │ │ │ │ │ -45 RT1Cube2DLocalFiniteElement (int s) : │ │ │ │ │ - 46 basis(s), │ │ │ │ │ - 47 interpolation(s) │ │ │ │ │ - 48 {} │ │ │ │ │ - 49 │ │ │ │ │ -50 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 51 { │ │ │ │ │ - 52 return basis; │ │ │ │ │ - 53 } │ │ │ │ │ - 54 │ │ │ │ │ -55 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 56 { │ │ │ │ │ - 57 return coefficients; │ │ │ │ │ - 58 } │ │ │ │ │ - 59 │ │ │ │ │ -60 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 77 RT1Cube2DLocalBasis basis; │ │ │ │ │ - 78 RT1Cube2DLocalCoefficients coefficients; │ │ │ │ │ - 79 RT1Cube2DLocalInterpolation > interpolation; │ │ │ │ │ - 80 }; │ │ │ │ │ - 81} │ │ │ │ │ - 82#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ -raviartthomas1cube2dlocalinterpolation.hh │ │ │ │ │ -raviartthomas1cube2dlocalcoefficients.hh │ │ │ │ │ -raviartthomas1cube2dlocalbasis.hh │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include "../../common/localbasis.hh" │ │ │ │ │ + 15 │ │ │ │ │ + 16namespace Dune │ │ │ │ │ + 17{ │ │ │ │ │ + 27 template │ │ │ │ │ +28 class RT3Cube2DLocalBasis │ │ │ │ │ + 29 { │ │ │ │ │ + 30 │ │ │ │ │ + 31 public: │ │ │ │ │ + 32 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +33 Dune::FieldMatrix > Traits; │ │ │ │ │ + 34 │ │ │ │ │ +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& out) const │ │ │ │ │ + 62 { │ │ │ │ │ + 63 out.resize(40); │ │ │ │ │ + 64 auto const& x = in[0], y = in[1]; │ │ │ │ │ + 65 │ │ │ │ │ + 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& 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& order, │ │ │ │ │ + 402 const typename Traits::DomainType& in, // position │ │ │ │ │ + 403 std::vector& 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::RT1Cube2DLocalFiniteElement │ │ │ │ │ -First order Raviart-Thomas shape functions on quadrilaterals. │ │ │ │ │ -Definition raviartthomas1cube2d.hh:28 │ │ │ │ │ -Dune::RT1Cube2DLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition raviartthomas1cube2d.hh:71 │ │ │ │ │ -Dune::RT1Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition raviartthomas1cube2d.hh:55 │ │ │ │ │ -Dune::RT1Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition raviartthomas1cube2d.hh:60 │ │ │ │ │ -Dune::RT1Cube2DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< RT1Cube2DLocalBasis< D, R >, │ │ │ │ │ -RT1Cube2DLocalCoefficients, RT1Cube2DLocalInterpolation< RT1Cube2DLocalBasis< │ │ │ │ │ -D, R > > > Traits │ │ │ │ │ -Definition raviartthomas1cube2d.hh:34 │ │ │ │ │ -Dune::RT1Cube2DLocalFiniteElement::size │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::RT3Cube2DLocalBasis │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas3cube2dlocalbasis.hh:29 │ │ │ │ │ +Dune::RT3Cube2DLocalBasis::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition raviartthomas1cube2d.hh:66 │ │ │ │ │ -Dune::RT1Cube2DLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition raviartthomas1cube2d.hh:50 │ │ │ │ │ -Dune::RT1Cube2DLocalFiniteElement::RT1Cube2DLocalFiniteElement │ │ │ │ │ -RT1Cube2DLocalFiniteElement(int s) │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition raviartthomas3cube2dlocalbasis.hh:49 │ │ │ │ │ +Dune::RT3Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition raviartthomas3cube2dlocalbasis.hh:179 │ │ │ │ │ +Dune::RT3Cube2DLocalBasis::RT3Cube2DLocalBasis │ │ │ │ │ +RT3Cube2DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition raviartthomas1cube2d.hh:45 │ │ │ │ │ -Dune::RT1Cube2DLocalFiniteElement::RT1Cube2DLocalFiniteElement │ │ │ │ │ -RT1Cube2DLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas1cube2d.hh:37 │ │ │ │ │ -Dune::RT1Cube2DLocalBasis │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas1cube2dlocalbasis.hh:28 │ │ │ │ │ -Dune::RT1Cube2DLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ │ -Definition raviartthomas1cube2dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::RT1Cube2DLocalInterpolation │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -Definition raviartthomas1cube2dlocalinterpolation.hh:27 │ │ │ │ │ +Definition raviartthomas3cube2dlocalbasis.hh:40 │ │ │ │ │ +Dune::RT3Cube2DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition raviartthomas3cube2dlocalbasis.hh:60 │ │ │ │ │ +Dune::RT3Cube2DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition raviartthomas3cube2dlocalbasis.hh:632 │ │ │ │ │ +Dune::RT3Cube2DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +Definition raviartthomas3cube2dlocalbasis.hh:33 │ │ │ │ │ +Dune::RT3Cube2DLocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00305.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0prismlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas3cube2dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0prismlocalbasis.hh File Reference
│ │ │ │ +
raviartthomas3cube2dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ +
#include <cstddef>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include "../../common/localbasis.hh"
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

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

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,26 +7,24 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0prism │ │ │ │ │ + * raviartthomas3cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas0prismlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas3cube2dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localbasis.hh" │ │ │ │ │ +#include "../../common/localkey.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT0PrismLocalBasis<_D,_R_> │ │ │ │ │ -  First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ - More... │ │ │ │ │ +class  Dune::RT3Cube2DLocalCoefficients │ │ │ │ │ +  Layout map for Raviart-Thomas-3 elements on quadrilaterals. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00305_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0prismlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas3cube2dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,146 +70,85 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas0prismlocalbasis.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_PRISM_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ +
8#include <cstddef>
│ │ │ │
9#include <vector>
│ │ │ │
10
│ │ │ │ -
11#include <dune/common/fmatrix.hh>
│ │ │ │ +
11#include "../../common/localkey.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
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ -
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
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
42
│ │ │ │ +
│ │ │ │ +
44 std::size_t size () const
│ │ │ │ +
45 {
│ │ │ │ +
46 return 40;
│ │ │ │ +
47 }
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,158 +8,84 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0prism │ │ │ │ │ -raviartthomas0prismlocalbasis.hh │ │ │ │ │ + * raviartthomas3cube2d │ │ │ │ │ +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_PRISM_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9#include │ │ │ │ │ 10 │ │ │ │ │ - 11#include │ │ │ │ │ + 11#include "../../common/localkey.hh" │ │ │ │ │ 12 │ │ │ │ │ - 13#include "../../common/localbasis.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 26 template │ │ │ │ │ -27 class RT0PrismLocalBasis │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ +22 class RT3Cube2DLocalCoefficients │ │ │ │ │ + 23 { │ │ │ │ │ + 24 │ │ │ │ │ + 25 public: │ │ │ │ │ +27 RT3Cube2DLocalCoefficients () : li(40) │ │ │ │ │ 28 { │ │ │ │ │ - 29 │ │ │ │ │ - 30 public: │ │ │ │ │ - 31 typedef LocalBasisTraits,R,3,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -32 Dune::FieldMatrix > Traits; │ │ │ │ │ - 33 │ │ │ │ │ -39 RT0PrismLocalBasis (std::bitset<5> s = 0) │ │ │ │ │ - 40 { │ │ │ │ │ - 41 for (size_t i=0; i& 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& order, │ │ │ │ │ - 108 const typename Traits::DomainType& in, // position │ │ │ │ │ - 109 std::vector& 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 sign; │ │ │ │ │ - 127 }; │ │ │ │ │ - 128} │ │ │ │ │ - 129#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH │ │ │ │ │ + 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 } │ │ │ │ │ + 42 │ │ │ │ │ +44 std::size_t size () const │ │ │ │ │ + 45 { │ │ │ │ │ + 46 return 40; │ │ │ │ │ + 47 } │ │ │ │ │ + 48 │ │ │ │ │ +50 const LocalKey& localKey (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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::RT0PrismLocalBasis │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ -Definition raviartthomas0prismlocalbasis.hh:28 │ │ │ │ │ -Dune::RT0PrismLocalBasis::RT0PrismLocalBasis │ │ │ │ │ -RT0PrismLocalBasis(std::bitset< 5 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 32. │ │ │ │ │ -Definition raviartthomas0prismlocalbasis.hh:39 │ │ │ │ │ -Dune::RT0PrismLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition raviartthomas0prismlocalbasis.hh:57 │ │ │ │ │ -Dune::RT0PrismLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition raviartthomas0prismlocalbasis.hh:46 │ │ │ │ │ -Dune::RT0PrismLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition raviartthomas0prismlocalbasis.hh:120 │ │ │ │ │ -Dune::RT0PrismLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition raviartthomas0prismlocalbasis.hh:83 │ │ │ │ │ -Dune::RT0PrismLocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::RT0PrismLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ -3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ -Definition raviartthomas0prismlocalbasis.hh:32 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::RT3Cube2DLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-3 elements on quadrilaterals. │ │ │ │ │ +Definition raviartthomas3cube2dlocalcoefficients.hh:23 │ │ │ │ │ +Dune::RT3Cube2DLocalCoefficients::RT3Cube2DLocalCoefficients │ │ │ │ │ +RT3Cube2DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas3cube2dlocalcoefficients.hh:27 │ │ │ │ │ +Dune::RT3Cube2DLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition raviartthomas3cube2dlocalcoefficients.hh:44 │ │ │ │ │ +Dune::RT3Cube2DLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition raviartthomas3cube2dlocalcoefficients.hh:50 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00308.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0prismlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas12dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0prismlocalcoefficients.hh File Reference
│ │ │ │ +
raviartthomas12dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <cstddef>
│ │ │ │ #include <vector>
│ │ │ │ -#include "../../common/localkey.hh"
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::RT0PrismLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on prisms. More...
class  Dune::RT12DLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on the reference triangle. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,24 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0prism │ │ │ │ │ + * raviartthomas12d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas0prismlocalcoefficients.hh File Reference │ │ │ │ │ +raviartthomas12dlocalcoefficients.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ #include "../../common/localkey.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT0PrismLocalCoefficients │ │ │ │ │ -  Layout map for Raviart-Thomas-1 elements on prisms. More... │ │ │ │ │ +class  Dune::RT12DLocalCoefficients │ │ │ │ │ +  Layout map for Raviart-Thomas-1 elements on the reference triangle. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00308_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0prismlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas12dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,75 +70,82 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas0prismlocalcoefficients.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_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │
8#include <cstddef>
│ │ │ │
9#include <vector>
│ │ │ │
10
│ │ │ │
11#include "../../common/localkey.hh"
│ │ │ │
12
│ │ │ │
13namespace Dune
│ │ │ │
14{
│ │ │ │
15
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25
│ │ │ │ -
26 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ -
30 for(int i=0; i< size(); i++)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 {
│ │ │ │ +
24
│ │ │ │ +
25 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29 for (std::size_t i = 0; i < 3; i++)
│ │ │ │ +
30 {
│ │ │ │
31 li[i] = LocalKey(i,1,0);
│ │ │ │ -
32 }
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ -
35 std::size_t size () const
│ │ │ │ -
36 {
│ │ │ │ -
37 return 5;
│ │ │ │ +
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 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
41 std::size_t size () const
│ │ │ │
42 {
│ │ │ │ -
43 return li[i];
│ │ │ │ +
43 return 8;
│ │ │ │
44 }
│ │ │ │
│ │ │ │
45
│ │ │ │ -
46 private:
│ │ │ │ -
47 std::vector<LocalKey> li;
│ │ │ │ -
48 };
│ │ │ │ +
│ │ │ │ +
47 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
48 {
│ │ │ │ +
49 return li[i];
│ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
52 private:
│ │ │ │ +
53 std::vector<LocalKey> li;
│ │ │ │ +
54 };
│ │ │ │
│ │ │ │ -
49}
│ │ │ │ -
50#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH
│ │ │ │ +
55}
│ │ │ │ +
56#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -8,74 +8,81 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0prism │ │ │ │ │ -raviartthomas0prismlocalcoefficients.hh │ │ │ │ │ + * raviartthomas12d │ │ │ │ │ +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_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9#include │ │ │ │ │ 10 │ │ │ │ │ 11#include "../../common/localkey.hh" │ │ │ │ │ 12 │ │ │ │ │ 13namespace Dune │ │ │ │ │ 14{ │ │ │ │ │ 15 │ │ │ │ │ -23 class RT0PrismLocalCoefficients │ │ │ │ │ - 24 { │ │ │ │ │ - 25 │ │ │ │ │ - 26 public: │ │ │ │ │ -28 RT0PrismLocalCoefficients () : li(size()) │ │ │ │ │ - 29 { │ │ │ │ │ - 30 for(int i=0; i< size(); i++) │ │ │ │ │ +22 class RT12DLocalCoefficients │ │ │ │ │ + 23 { │ │ │ │ │ + 24 │ │ │ │ │ + 25 public: │ │ │ │ │ +27 RT12DLocalCoefficients () : li(8) │ │ │ │ │ + 28 { │ │ │ │ │ + 29 for (std::size_t i = 0; i < 3; i++) │ │ │ │ │ + 30 { │ │ │ │ │ 31 li[i] = LocalKey(i,1,0); │ │ │ │ │ - 32 } │ │ │ │ │ - 33 │ │ │ │ │ -35 std::size_t size () const │ │ │ │ │ - 36 { │ │ │ │ │ - 37 return 5; │ │ │ │ │ + 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 const LocalKey& localKey (std::size_t i) const │ │ │ │ │ +41 std::size_t size () const │ │ │ │ │ 42 { │ │ │ │ │ - 43 return li[i]; │ │ │ │ │ + 43 return 8; │ │ │ │ │ 44 } │ │ │ │ │ 45 │ │ │ │ │ - 46 private: │ │ │ │ │ - 47 std::vector li; │ │ │ │ │ - 48 }; │ │ │ │ │ - 49} │ │ │ │ │ - 50#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH │ │ │ │ │ +47 const LocalKey& localKey (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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalKey │ │ │ │ │ Describe position of one degree of freedom. │ │ │ │ │ Definition localkey.hh:23 │ │ │ │ │ -Dune::RT0PrismLocalCoefficients │ │ │ │ │ -Layout map for Raviart-Thomas-1 elements on prisms. │ │ │ │ │ -Definition raviartthomas0prismlocalcoefficients.hh:24 │ │ │ │ │ -Dune::RT0PrismLocalCoefficients::localKey │ │ │ │ │ +Dune::RT12DLocalCoefficients │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on the reference triangle. │ │ │ │ │ +Definition raviartthomas12dlocalcoefficients.hh:23 │ │ │ │ │ +Dune::RT12DLocalCoefficients::RT12DLocalCoefficients │ │ │ │ │ +RT12DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas12dlocalcoefficients.hh:27 │ │ │ │ │ +Dune::RT12DLocalCoefficients::localKey │ │ │ │ │ const LocalKey & localKey(std::size_t i) const │ │ │ │ │ get i'th index │ │ │ │ │ -Definition raviartthomas0prismlocalcoefficients.hh:41 │ │ │ │ │ -Dune::RT0PrismLocalCoefficients::size │ │ │ │ │ +Definition raviartthomas12dlocalcoefficients.hh:47 │ │ │ │ │ +Dune::RT12DLocalCoefficients::size │ │ │ │ │ std::size_t size() const │ │ │ │ │ number of coefficients │ │ │ │ │ -Definition raviartthomas0prismlocalcoefficients.hh:35 │ │ │ │ │ -Dune::RT0PrismLocalCoefficients::RT0PrismLocalCoefficients │ │ │ │ │ -RT0PrismLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition raviartthomas0prismlocalcoefficients.hh:28 │ │ │ │ │ +Definition raviartthomas12dlocalcoefficients.hh:41 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00311.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0prismlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas12dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,35 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0prismlocalinterpolation.hh File Reference
│ │ │ │ +
raviartthomas12dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.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::RT0PrismLocalInterpolation< LB >
 First order Raviart-Thomas shape functions on the reference prism. More...
class  Dune::RT12DLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference triangle. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,23 +7,25 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0prism │ │ │ │ │ + * raviartthomas12d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -raviartthomas0prismlocalinterpolation.hh File Reference │ │ │ │ │ +raviartthomas12dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RT0PrismLocalInterpolation<_LB_> │ │ │ │ │ -  First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ +class  Dune::RT12DLocalBasis<_D,_R_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00311_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0prismlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas12dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,102 +70,215 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas0prismlocalinterpolation.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_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
22 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25
│ │ │ │ -
26 public:
│ │ │ │ -
27
│ │ │ │ -
│ │ │ │ -
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 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];
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
46 unsigned int size () const
│ │ │ │ +
47 {
│ │ │ │ +
48 return 8;
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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 };
│ │ │ │ +
│ │ │ │ +
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 };
│ │ │ │
│ │ │ │ -
90}
│ │ │ │ -
91#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH
│ │ │ │ +
197}
│ │ │ │ +
198#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -8,99 +8,230 @@ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * raviartthomas │ │ │ │ │ - * raviartthomas0prism │ │ │ │ │ -raviartthomas0prismlocalinterpolation.hh │ │ │ │ │ + * raviartthomas12d │ │ │ │ │ +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_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12namespace Dune │ │ │ │ │ - 13{ │ │ │ │ │ - 22 template │ │ │ │ │ -23 class RT0PrismLocalInterpolation │ │ │ │ │ - 24 { │ │ │ │ │ - 25 │ │ │ │ │ - 26 public: │ │ │ │ │ - 27 │ │ │ │ │ -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 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 │ │ │ │ │ -70 void interpolate (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]; │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include "../../common/localbasis.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 26 template │ │ │ │ │ +27 class RT12DLocalBasis │ │ │ │ │ + 28 { │ │ │ │ │ + 29 │ │ │ │ │ + 30 public: │ │ │ │ │ + 31 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +32 Dune::FieldMatrix > 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 │ │ │ │ │ +46 unsigned int size () const │ │ │ │ │ + 47 { │ │ │ │ │ + 48 return 8; │ │ │ │ │ + 49 } │ │ │ │ │ + 50 │ │ │ │ │ +57 inline void evaluateFunction (const typename Traits::DomainType& 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 │ │ │ │ │ - 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 │ │ │ │ │ +85 inline void evaluateJacobian (const typename Traits::DomainType& 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 │ │ │ │ │ +132 void partial (const std::array& order, │ │ │ │ │ + 133 const typename Traits::DomainType& in, // position │ │ │ │ │ + 134 std::vector& 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 sign_; │ │ │ │ │ + 196 }; │ │ │ │ │ + 197} │ │ │ │ │ + 198#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RT0PrismLocalInterpolation │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ -Definition raviartthomas0prismlocalinterpolation.hh:24 │ │ │ │ │ -Dune::RT0PrismLocalInterpolation::RT0PrismLocalInterpolation │ │ │ │ │ -RT0PrismLocalInterpolation(std::bitset< 5 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 32. │ │ │ │ │ -Definition raviartthomas0prismlocalinterpolation.hh:33 │ │ │ │ │ -Dune::RT0PrismLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Interpolate a given function with shape functions. │ │ │ │ │ -Definition raviartthomas0prismlocalinterpolation.hh:70 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::RT12DLocalBasis │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +Definition raviartthomas12dlocalbasis.hh:28 │ │ │ │ │ +Dune::RT12DLocalBasis::RT12DLocalBasis │ │ │ │ │ +RT12DLocalBasis(std::bitset< 3 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +Definition raviartthomas12dlocalbasis.hh:39 │ │ │ │ │ +Dune::RT12DLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition raviartthomas12dlocalbasis.hh:46 │ │ │ │ │ +Dune::RT12DLocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::RT12DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition raviartthomas12dlocalbasis.hh:85 │ │ │ │ │ +Dune::RT12DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition raviartthomas12dlocalbasis.hh:189 │ │ │ │ │ +Dune::RT12DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +Definition raviartthomas12dlocalbasis.hh:32 │ │ │ │ │ +Dune::RT12DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition raviartthomas12dlocalbasis.hh:57 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00314.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalprismp2localbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas12dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,46 +65,41 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchicalprismp2localbasis.hh File Reference
│ │ │ │ +
raviartthomas12dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

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

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Hierarchical prism p2 shape functions for the simplex.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,28 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ - * hierarchicalprismp2 │ │ │ │ │ + * raviartthomas │ │ │ │ │ + * raviartthomas12d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -hierarchicalprismp2localbasis.hh File Reference │ │ │ │ │ -Hierarchical prism p2 shape functions for the simplex. More... │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas12dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::HierarchicalPrismP2LocalBasis<_D,_R_> │ │ │ │ │ +class  Dune::RT12DLocalInterpolation<_LB_> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ -***** Detailed Description ***** │ │ │ │ │ -Hierarchical prism p2 shape functions for the simplex. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00314_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalprismp2localbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas12dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,271 +70,128 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalprismp2localbasis.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_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_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>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
23 {
│ │ │ │ -
24 public:
│ │ │ │ -
26 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,1,Dune::FieldVector<R,1>, Dune::FieldMatrix<R,1,3> > Traits;
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
24 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │
27
│ │ │ │ -
│ │ │ │ -
29 unsigned int size () const
│ │ │ │ -
30 {
│ │ │ │ -
31 return 18;
│ │ │ │ -
32 }
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ +
28 public:
│ │ │ │ +
29
│ │ │ │
│ │ │ │ -
35 void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
36 std::vector<typename Traits::RangeType> & out) const
│ │ │ │ -
37 {
│ │ │ │ -
38 out.resize(18);
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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];
│ │ │ │ +
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 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 //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]);
│ │ │ │ +
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 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 };
│ │ │ │ +
114 std::array<typename LB::Traits::RangeFieldType, 3> c_;
│ │ │ │ +
115 };
│ │ │ │
│ │ │ │ -
237}
│ │ │ │ -
238#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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -7,284 +7,131 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ - * hierarchicalprismp2 │ │ │ │ │ -hierarchicalprismp2localbasis.hh │ │ │ │ │ + * raviartthomas │ │ │ │ │ + * raviartthomas12d │ │ │ │ │ +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_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16 │ │ │ │ │ - 17#include │ │ │ │ │ - 18 │ │ │ │ │ - 19namespace Dune │ │ │ │ │ - 20{ │ │ │ │ │ - 21 template │ │ │ │ │ -22 class HierarchicalPrismP2LocalBasis │ │ │ │ │ - 23 { │ │ │ │ │ - 24 public: │ │ │ │ │ -26 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, Dune::FieldMatrix > Traits; │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ + 24 template │ │ │ │ │ +25 class RT12DLocalInterpolation │ │ │ │ │ + 26 { │ │ │ │ │ 27 │ │ │ │ │ -29 unsigned int size () const │ │ │ │ │ - 30 { │ │ │ │ │ - 31 return 18; │ │ │ │ │ - 32 } │ │ │ │ │ - 33 │ │ │ │ │ -35 void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ - 36 std::vector & out) const │ │ │ │ │ - 37 { │ │ │ │ │ - 38 out.resize(18); │ │ │ │ │ - 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 │ │ │ │ │ + 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 │ │ │ │ │ +59 void interpolate (const F& ff, std::vector& 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 │ │ │ │ │ -67 void evaluateJacobian (const typename Traits::DomainType& 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]; │ │ │ │ │ + 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 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 //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]); │ │ │ │ │ + 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 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& order, │ │ │ │ │ - 150 const typename Traits::DomainType& in, // position │ │ │ │ │ - 151 std::vector& 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 │ │ │ │ │ + 114 std::array c_; │ │ │ │ │ + 115 }; │ │ │ │ │ + 116} │ │ │ │ │ + 117#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalBasis │ │ │ │ │ -Definition hierarchicalprismp2localbasis.hh:23 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalBasis::Traits │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition hierarchicalprismp2localbasis.hh:29 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition hierarchicalprismp2localbasis.hh:231 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition hierarchicalprismp2localbasis.hh:35 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition hierarchicalprismp2localbasis.hh:67 │ │ │ │ │ -localbasis.hh │ │ │ │ │ +Dune::RT12DLocalInterpolation │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +Definition raviartthomas12dlocalinterpolation.hh:26 │ │ │ │ │ +Dune::RT12DLocalInterpolation::RT12DLocalInterpolation │ │ │ │ │ +RT12DLocalInterpolation(std::bitset< 3 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +Definition raviartthomas12dlocalinterpolation.hh:35 │ │ │ │ │ +Dune::RT12DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +Definition raviartthomas12dlocalinterpolation.hh:59 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00317.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalprismp2localinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas03d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,32 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchicalprismp2localinterpolation.hh File Reference
│ │ │ │ +
raviartthomas03d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.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::HierarchicalPrismP2LocalInterpolation< LB >
class  Dune::RT03DLocalFiniteElement< D, R >
 Zero order Raviart-Thomas shape functions on tetrahedra. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,23 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ - * hierarchicalprismp2 │ │ │ │ │ + * raviartthomas │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -hierarchicalprismp2localinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas03d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "raviartthomas03d/raviartthomas03dlocalbasis.hh" │ │ │ │ │ +#include "raviartthomas03d/raviartthomas03dlocalcoefficients.hh" │ │ │ │ │ +#include "raviartthomas03d/raviartthomas03dlocalinterpolation.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::HierarchicalPrismP2LocalInterpolation<_LB_> │ │ │ │ │ +class  Dune::RT03DLocalFiniteElement<_D,_R_> │ │ │ │ │ +  Zero order Raviart-Thomas shape functions on tetrahedra. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00317_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalprismp2localinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas03d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,108 +70,125 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalprismp2localinterpolation.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_HIERARCHICAL_PRISM_P2_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_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 //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);
│ │ │ │ +
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
│ │ │ │ -
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]);
│ │ │ │ +
│ │ │ │ +
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 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
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
59 {
│ │ │ │ +
60 return interpolation;
│ │ │ │ +
61 }
│ │ │ │ +
│ │ │ │ +
62
│ │ │ │ +
│ │ │ │ +
63 unsigned int size () const
│ │ │ │ +
64 {
│ │ │ │ +
65 return 4;
│ │ │ │ +
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
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ -
79 };
│ │ │ │ -
│ │ │ │ -
80}
│ │ │ │ -
81
│ │ │ │ -
82#endif
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
Definition hierarchicalprismp2localinterpolation.hh:18
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Definition hierarchicalprismp2localinterpolation.hh:22
│ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -7,102 +7,138 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ - * hierarchicalprismp2 │ │ │ │ │ -hierarchicalprismp2localinterpolation.hh │ │ │ │ │ + * raviartthomas │ │ │ │ │ +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_HIERARCHICAL_PRISM_P2_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11namespace Dune │ │ │ │ │ - 12{ │ │ │ │ │ - 16 template │ │ │ │ │ -17 class HierarchicalPrismP2LocalInterpolation │ │ │ │ │ - 18 { │ │ │ │ │ - 19 public: │ │ │ │ │ - 20 │ │ │ │ │ - 21 template │ │ │ │ │ -22 void interpolate (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); │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include "raviartthomas03d/raviartthomas03dlocalbasis.hh" │ │ │ │ │ + 12#include "raviartthomas03d/raviartthomas03dlocalcoefficients.hh" │ │ │ │ │ + 13#include "raviartthomas03d/raviartthomas03dlocalinterpolation.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 17 │ │ │ │ │ + 26 template │ │ │ │ │ +27 class │ │ │ │ │ + 28 RT03DLocalFiniteElement │ │ │ │ │ + 29 { │ │ │ │ │ + 30 public: │ │ │ │ │ + 31 typedef │ │ │ │ │ +LocalFiniteElementTraits,RT03DLocalCoefficients, │ │ │ │ │ +32 RT03DLocalInterpolation > > Traits; │ │ │ │ │ + 33 │ │ │ │ │ +35 RT03DLocalFiniteElement () │ │ │ │ │ + 36 {} │ │ │ │ │ 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]); │ │ │ │ │ +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 │ │ │ │ │ +53 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 54 { │ │ │ │ │ + 55 return coefficients; │ │ │ │ │ + 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 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 59 { │ │ │ │ │ + 60 return interpolation; │ │ │ │ │ + 61 } │ │ │ │ │ + 62 │ │ │ │ │ +63 unsigned int size () const │ │ │ │ │ + 64 { │ │ │ │ │ + 65 return 4; │ │ │ │ │ + 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 │ │ │ │ │ - 78 } │ │ │ │ │ - 79 }; │ │ │ │ │ - 80} │ │ │ │ │ - 81 │ │ │ │ │ - 82#endif │ │ │ │ │ +68 static constexpr GeometryType type () │ │ │ │ │ + 69 { │ │ │ │ │ + 70 return GeometryTypes::tetrahedron; │ │ │ │ │ + 71 } │ │ │ │ │ + 72 │ │ │ │ │ + 73 private: │ │ │ │ │ + 74 RT03DLocalBasis basis; │ │ │ │ │ + 75 RT03DLocalCoefficients coefficients; │ │ │ │ │ + 76 RT03DLocalInterpolation > interpolation; │ │ │ │ │ + 77 }; │ │ │ │ │ + 78 │ │ │ │ │ + 79} │ │ │ │ │ + 80 │ │ │ │ │ + 81#endif │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ +raviartthomas03dlocalbasis.hh │ │ │ │ │ +raviartthomas03dlocalcoefficients.hh │ │ │ │ │ +raviartthomas03dlocalinterpolation.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalInterpolation │ │ │ │ │ -Definition hierarchicalprismp2localinterpolation.hh:18 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Definition hierarchicalprismp2localinterpolation.hh:22 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::RT03DLocalFiniteElement │ │ │ │ │ +Zero order Raviart-Thomas shape functions on tetrahedra. │ │ │ │ │ +Definition raviartthomas03d.hh:29 │ │ │ │ │ +Dune::RT03DLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< RT03DLocalBasis< D, R >, RT03DLocalCoefficients, │ │ │ │ │ +RT03DLocalInterpolation< RT03DLocalBasis< D, R > > > Traits │ │ │ │ │ +Definition raviartthomas03d.hh:32 │ │ │ │ │ +Dune::RT03DLocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Definition raviartthomas03d.hh:63 │ │ │ │ │ +Dune::RT03DLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition raviartthomas03d.hh:68 │ │ │ │ │ +Dune::RT03DLocalFiniteElement::RT03DLocalFiniteElement │ │ │ │ │ +RT03DLocalFiniteElement(std::bitset< 4 > s) │ │ │ │ │ +Constructor with explicitly given face orientations. │ │ │ │ │ +Definition raviartthomas03d.hh:43 │ │ │ │ │ +Dune::RT03DLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition raviartthomas03d.hh:53 │ │ │ │ │ +Dune::RT03DLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition raviartthomas03d.hh:48 │ │ │ │ │ +Dune::RT03DLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition raviartthomas03d.hh:58 │ │ │ │ │ +Dune::RT03DLocalFiniteElement::RT03DLocalFiniteElement │ │ │ │ │ +RT03DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition raviartthomas03d.hh:35 │ │ │ │ │ +Dune::RT03DLocalBasis │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference tetrahedron. │ │ │ │ │ +Definition raviartthomas03dlocalbasis.hh:26 │ │ │ │ │ +Dune::RT03DLocalCoefficients │ │ │ │ │ +Layout map for RT0 elements. │ │ │ │ │ +Definition raviartthomas03dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::RT03DLocalInterpolation │ │ │ │ │ +Definition raviartthomas03dlocalinterpolation.hh:18 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00320.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalp2.hh File Reference │ │ │ │ +dune-localfunctions: orthonormalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchicalp2.hh File Reference
│ │ │ │ +
orthonormalbasis.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 <sstream>
│ │ │ │ +#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │ +#include <dune/localfunctions/orthonormal/orthonormalcompute.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::HierarchicalP2LocalFiniteElement< D, R, dim >
struct  Dune::OrthonormalBasisFactory< dim, SF, CF >
 
struct  Dune::OrthonormalBasisFactory< dim, SF, CF >::EvaluationBasisFactory< dd, FF >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,25 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ + * orthonormal │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -hierarchicalp2.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "hierarchicalp2/hierarchicalsimplexp2localbasis.hh" │ │ │ │ │ -#include "hierarchicalp2/hierarchicalsimplexp2localinterpolation.hh" │ │ │ │ │ +orthonormalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::HierarchicalP2LocalFiniteElement<_D,_R,_dim_> │ │ │ │ │ +struct  Dune::OrthonormalBasisFactory<_dim,_SF,_CF_> │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::OrthonormalBasisFactory<_dim,_SF,_CF_>::EvaluationBasisFactory< │ │ │ │ │ + dd,_FF_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00320_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalp2.hh Source File │ │ │ │ +dune-localfunctions: orthonormalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,124 +70,115 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalp2.hh
│ │ │ │ +
orthonormalbasis.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
│ │ │ │ +
5#ifndef DUNE_ORTHONORMALBASIS_HH
│ │ │ │ +
6#define DUNE_ORTHONORMALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ +
8#include <sstream>
│ │ │ │
9
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
12
│ │ │ │ - │ │ │ │ - │ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
18
│ │ │ │ -
21 template<class D, class R, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
23 {
│ │ │ │ +
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 static_assert(1 <= dim && dim <= 3,
│ │ │ │ -
26 "HierarchicalP2LocalFiniteElement only implemented for dim==1, 2, 3.");
│ │ │ │ -
27
│ │ │ │ -
28 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
35
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 {}
│ │ │ │ -
│ │ │ │ +
25 template <unsigned int dd, class FF>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
27 {
│ │ │ │ + │ │ │ │ +
29 };
│ │ │ │ +
│ │ │ │ +
30
│ │ │ │ + │ │ │ │ +
32 typedef typename MonomialBasisProviderType::Object MonomialBasisType;
│ │ │ │ +
33
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
37
│ │ │ │ +
38 typedef unsigned int Key;
│ │ │ │ +
39 typedef const Basis Object;
│ │ │ │
40
│ │ │ │ -
│ │ │ │ -
43 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
44 {
│ │ │ │ -
45 return basis;
│ │ │ │ -
46 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
51 {
│ │ │ │ -
52 return coefficients;
│ │ │ │ -
53 }
│ │ │ │ -
│ │ │ │ +
48 static CoefficientMatrix _coeffs;
│ │ │ │ +
49 if( _coeffs.size() <= monomialBasis.size() )
│ │ │ │ +
50 {
│ │ │ │ + │ │ │ │ +
52 _coeffs.fill( matrix );
│ │ │ │ +
53 }
│ │ │ │
54
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
58 {
│ │ │ │ -
59 return interpolation;
│ │ │ │ -
60 }
│ │ │ │ +
55 return new Basis( monomialBasis, _coeffs, monomialBasis.size() );
│ │ │ │ +
56 }
│ │ │ │ +
│ │ │ │ +
57 static void release( Object *object ) { delete object; }
│ │ │ │ +
58 };
│ │ │ │
│ │ │ │ +
59
│ │ │ │ +
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#endif // #ifndef DUNE_ORTHONORMALBASIS_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
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,139 +7,146 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ -hierarchicalp2.hh │ │ │ │ │ + * orthonormal │ │ │ │ │ +orthonormalbasis.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 │ │ │ │ │ + 5#ifndef DUNE_ORTHONORMALBASIS_HH │ │ │ │ │ + 6#define DUNE_ORTHONORMALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13#include "hierarchicalp2/hierarchicalsimplexp2localbasis.hh" │ │ │ │ │ - 14#include "hierarchicalp2/hierarchicalsimplexp2localinterpolation.hh" │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ 15 │ │ │ │ │ - 16namespace Dune │ │ │ │ │ - 17{ │ │ │ │ │ - 18 │ │ │ │ │ - 21 template │ │ │ │ │ -22 class HierarchicalP2LocalFiniteElement │ │ │ │ │ - 23 { │ │ │ │ │ + 16 // OrthonormalBasisFactory │ │ │ │ │ + 17 // ----------------------- │ │ │ │ │ + 18 template< int dim, class SF, class CF = typename ComputeField< SF, 512 >:: │ │ │ │ │ +Type > │ │ │ │ │ +19 struct OrthonormalBasisFactory │ │ │ │ │ + 20 { │ │ │ │ │ +21 static const unsigned int dimension = dim; │ │ │ │ │ +22 typedef SF StorageField; │ │ │ │ │ +23 typedef CF ComputeField; │ │ │ │ │ 24 │ │ │ │ │ - 25 static_assert(1 <= dim && dim <= 3, │ │ │ │ │ - 26 "HierarchicalP2LocalFiniteElement only implemented for dim==1, 2, 3."); │ │ │ │ │ - 27 │ │ │ │ │ - 28 public: │ │ │ │ │ - 31 typedef LocalFiniteElementTraits< │ │ │ │ │ - 32 HierarchicalSimplexP2LocalBasis, │ │ │ │ │ - 33 typename LagrangeSimplexLocalFiniteElement::Traits:: │ │ │ │ │ -LocalCoefficientsType, │ │ │ │ │ -34 │ │ │ │ │ -HierarchicalSimplexP2LocalInterpolation │ │ │ │ │ -> > Traits; │ │ │ │ │ - 35 │ │ │ │ │ -38 HierarchicalP2LocalFiniteElement () │ │ │ │ │ - 39 {} │ │ │ │ │ + 25 template │ │ │ │ │ +26 struct EvaluationBasisFactory │ │ │ │ │ + 27 { │ │ │ │ │ +28 typedef MonomialBasisProvider Type; │ │ │ │ │ + 29 }; │ │ │ │ │ + 30 │ │ │ │ │ +31 typedef typename EvaluationBasisFactory<_dimension,_StorageField_>::Type │ │ │ │ │ +MonomialBasisProviderType; │ │ │ │ │ +32 typedef typename MonomialBasisProviderType::Object MonomialBasisType; │ │ │ │ │ + 33 │ │ │ │ │ +34 typedef SparseCoeffMatrix<_StorageField,_1_> CoefficientMatrix; │ │ │ │ │ +35 typedef StandardEvaluator<_MonomialBasisType_> Evaluator; │ │ │ │ │ +36 typedef PolynomialBasis<_Evaluator,_CoefficientMatrix_> Basis; │ │ │ │ │ + 37 │ │ │ │ │ +38 typedef unsigned int Key; │ │ │ │ │ +39 typedef const Basis Object; │ │ │ │ │ 40 │ │ │ │ │ -43 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 44 { │ │ │ │ │ - 45 return basis; │ │ │ │ │ - 46 } │ │ │ │ │ +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 │ │ │ │ │ -50 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 51 { │ │ │ │ │ - 52 return coefficients; │ │ │ │ │ + 48 static CoefficientMatrix _coeffs; │ │ │ │ │ + 49 if( _coeffs.size() <= monomialBasis.size() ) │ │ │ │ │ + 50 { │ │ │ │ │ + 51 ONBCompute::ONBMatrix<_geometryId,_ComputeField_> matrix( order ); │ │ │ │ │ + 52 _coeffs.fill( matrix ); │ │ │ │ │ 53 } │ │ │ │ │ 54 │ │ │ │ │ -57 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 58 { │ │ │ │ │ - 59 return interpolation; │ │ │ │ │ - 60 } │ │ │ │ │ + 55 return new Basis( monomialBasis, _coeffs, monomialBasis.size() ); │ │ │ │ │ + 56 } │ │ │ │ │ +57 static void release( Object *object ) { delete object; } │ │ │ │ │ + 58 }; │ │ │ │ │ + 59 │ │ │ │ │ + 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: │ │ │ │ │ - 76 HierarchicalSimplexP2LocalBasis basis; │ │ │ │ │ - 77 │ │ │ │ │ - 78 typename Traits::LocalCoefficientsType coefficients; │ │ │ │ │ - 79 │ │ │ │ │ - 80 │ │ │ │ │ -HierarchicalSimplexP2LocalInterpolation │ │ │ │ │ -> interpolation; │ │ │ │ │ - 81 }; │ │ │ │ │ - 82 │ │ │ │ │ - 83} │ │ │ │ │ - 84 │ │ │ │ │ - 85#endif │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ -hierarchicalsimplexp2localbasis.hh │ │ │ │ │ -Hierarchical p2 shape functions for the simplex. │ │ │ │ │ -hierarchicalsimplexp2localinterpolation.hh │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ + 62#endif // #ifndef DUNE_ORTHONORMALBASIS_HH │ │ │ │ │ +orthonormalcompute.hh │ │ │ │ │ +polynomialbasis.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::HierarchicalP2LocalFiniteElement │ │ │ │ │ -Definition hierarchicalp2.hh:23 │ │ │ │ │ -Dune::HierarchicalP2LocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition hierarchicalp2.hh:43 │ │ │ │ │ -Dune::HierarchicalP2LocalFiniteElement::HierarchicalP2LocalFiniteElement │ │ │ │ │ -HierarchicalP2LocalFiniteElement() │ │ │ │ │ -Definition hierarchicalp2.hh:38 │ │ │ │ │ -Dune::HierarchicalP2LocalFiniteElement::size │ │ │ │ │ +Dune::OrthonormalBasisFactory │ │ │ │ │ +Definition orthonormalbasis.hh:20 │ │ │ │ │ +Dune::OrthonormalBasisFactory::CoefficientMatrix │ │ │ │ │ +SparseCoeffMatrix< StorageField, 1 > CoefficientMatrix │ │ │ │ │ +Definition orthonormalbasis.hh:34 │ │ │ │ │ +Dune::OrthonormalBasisFactory::create │ │ │ │ │ +static Object * create(const unsigned int order) │ │ │ │ │ +Definition orthonormalbasis.hh:44 │ │ │ │ │ +Dune::OrthonormalBasisFactory::Evaluator │ │ │ │ │ +StandardEvaluator< MonomialBasisType > Evaluator │ │ │ │ │ +Definition orthonormalbasis.hh:35 │ │ │ │ │ +Dune::OrthonormalBasisFactory::StorageField │ │ │ │ │ +SF StorageField │ │ │ │ │ +Definition orthonormalbasis.hh:22 │ │ │ │ │ +Dune::OrthonormalBasisFactory::SimplexGeometry │ │ │ │ │ +static constexpr GeometryType SimplexGeometry │ │ │ │ │ +Definition orthonormalbasis.hh:41 │ │ │ │ │ +Dune::OrthonormalBasisFactory::Basis │ │ │ │ │ +PolynomialBasis< Evaluator, CoefficientMatrix > Basis │ │ │ │ │ +Definition orthonormalbasis.hh:36 │ │ │ │ │ +Dune::OrthonormalBasisFactory::MonomialBasisProviderType │ │ │ │ │ +EvaluationBasisFactory< dimension, StorageField >::Type │ │ │ │ │ +MonomialBasisProviderType │ │ │ │ │ +Definition orthonormalbasis.hh:31 │ │ │ │ │ +Dune::OrthonormalBasisFactory::ComputeField │ │ │ │ │ +CF ComputeField │ │ │ │ │ +Definition orthonormalbasis.hh:23 │ │ │ │ │ +Dune::OrthonormalBasisFactory::Object │ │ │ │ │ +const Basis Object │ │ │ │ │ +Definition orthonormalbasis.hh:39 │ │ │ │ │ +Dune::OrthonormalBasisFactory::Key │ │ │ │ │ +unsigned int Key │ │ │ │ │ +Definition orthonormalbasis.hh:38 │ │ │ │ │ +Dune::OrthonormalBasisFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition orthonormalbasis.hh:57 │ │ │ │ │ +Dune::OrthonormalBasisFactory::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition orthonormalbasis.hh:21 │ │ │ │ │ +Dune::OrthonormalBasisFactory::MonomialBasisType │ │ │ │ │ +MonomialBasisProviderType::Object MonomialBasisType │ │ │ │ │ +Definition orthonormalbasis.hh:32 │ │ │ │ │ +Dune::OrthonormalBasisFactory::EvaluationBasisFactory │ │ │ │ │ +Definition orthonormalbasis.hh:27 │ │ │ │ │ +Dune::OrthonormalBasisFactory::EvaluationBasisFactory::Type │ │ │ │ │ +MonomialBasisProvider< dd, FF > Type │ │ │ │ │ +Definition orthonormalbasis.hh:28 │ │ │ │ │ +ONBCompute::ONBMatrix │ │ │ │ │ +Definition orthonormalcompute.hh:95 │ │ │ │ │ +Dune::StandardEvaluator │ │ │ │ │ +Definition basisevaluator.hh:131 │ │ │ │ │ +Dune::SparseCoeffMatrix │ │ │ │ │ +Definition coeffmatrix.hh:48 │ │ │ │ │ +Dune::SparseCoeffMatrix::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition hierarchicalp2.hh:63 │ │ │ │ │ -Dune::HierarchicalP2LocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition hierarchicalp2.hh:50 │ │ │ │ │ -Dune::HierarchicalP2LocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< HierarchicalSimplexP2LocalBasis< D, R, dim >, │ │ │ │ │ -typename LagrangeSimplexLocalFiniteElement< D, R, dim, 2 >::Traits:: │ │ │ │ │ -LocalCoefficientsType, HierarchicalSimplexP2LocalInterpolation< │ │ │ │ │ -HierarchicalSimplexP2LocalBasis< D, R, dim > > > Traits │ │ │ │ │ -Definition hierarchicalp2.hh:34 │ │ │ │ │ -Dune::HierarchicalP2LocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition hierarchicalp2.hh:57 │ │ │ │ │ -Dune::HierarchicalP2LocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition hierarchicalp2.hh:70 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:23 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalInterpolation │ │ │ │ │ -Definition hierarchicalsimplexp2localinterpolation.hh:18 │ │ │ │ │ +Definition coeffmatrix.hh:69 │ │ │ │ │ +Dune::SparseCoeffMatrix::fill │ │ │ │ │ +void fill(const RowMatrix &mat, bool verbose=false) │ │ │ │ │ +Definition coeffmatrix.hh:160 │ │ │ │ │ +Dune::MonomialBasisProvider │ │ │ │ │ +Definition monomialbasis.hh:780 │ │ │ │ │ +Dune::PolynomialBasis │ │ │ │ │ +Definition polynomialbasis.hh:65 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00323.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalprismp2.hh File Reference │ │ │ │ +dune-localfunctions: orthonormalcompute.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,57 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
hierarchicalprismp2.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
orthonormalcompute.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 <fstream>
│ │ │ │ +#include <iomanip>
│ │ │ │ +#include <utility>
│ │ │ │ +#include <map>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#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>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::HierarchicalPrismP2LocalFiniteElement< D, R >
struct  ONBCompute::Integral< geometryId >
 
class  ONBCompute::ONBMatrix< geometryId, scalar_t >
 
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

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

│ │ │ │ +Functions

template<class scalar_t >
scalar_t ONBCompute::factorial (int start, int end)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,25 +6,38 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -hierarchicalprismp2.hh File Reference │ │ │ │ │ + * orthonormal │ │ │ │ │ +Classes | Namespaces | Functions │ │ │ │ │ +orthonormalcompute.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "hierarchicalprismp2/hierarchicalprismp2localbasis.hh" │ │ │ │ │ -#include "hierarchicalprismp2/hierarchicalprismp2localinterpolation.hh" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::HierarchicalPrismP2LocalFiniteElement<_D,_R_> │ │ │ │ │ +struct  ONBCompute::Integral<_geometryId_> │ │ │ │ │ +  │ │ │ │ │ + class  ONBCompute::ONBMatrix<_geometryId,_scalar_t_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ -namespace  Dune │ │ │ │ │ +namespace  ONBCompute │ │ │ │ │ +  │ │ │ │ │ + Functions │ │ │ │ │ +template │ │ │ │ │ +scalar_t ONBCompute::factorial (int start, int end) │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00323_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalprismp2.hh Source File │ │ │ │ +dune-localfunctions: orthonormalcompute.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,122 +70,270 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalprismp2.hh
│ │ │ │ +
orthonormalcompute.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
│ │ │ │ +
5#ifndef DUNE_ORTHONORMALCOMPUTE_HH
│ │ │ │ +
6#define DUNE_ORTHONORMALCOMPUTE_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ -
12
│ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ +
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
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
19
│ │ │ │ -
22 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25
│ │ │ │ +
17#include <dune/geometry/type.hh>
│ │ │ │ +
18
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
23
│ │ │ │ +
│ │ │ │ +
24namespace ONBCompute
│ │ │ │ +
25{
│ │ │ │
26
│ │ │ │ -
27 public:
│ │ │ │ - │ │ │ │ -
31 Impl::LagrangePrismLocalCoefficients<2>,
│ │ │ │ - │ │ │ │ -
33
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 {}
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ -
41 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
42 {
│ │ │ │ -
43 return basis;
│ │ │ │ -
44 }
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ +
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 >
│ │ │ │
│ │ │ │ - │ │ │ │ -
49 {
│ │ │ │ -
50 return coefficients;
│ │ │ │ -
51 }
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
52
│ │ │ │ +
53
│ │ │ │ +
54 template< int dim, class scalar_t , int ...ints>
│ │ │ │
│ │ │ │ - │ │ │ │ -
56 {
│ │ │ │ -
57 return interpolation;
│ │ │ │ -
58 }
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
│ │ │ │ -
61 unsigned int size () const
│ │ │ │ -
62 {
│ │ │ │ -
63 return basis.size();
│ │ │ │ -
64 }
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
65
│ │ │ │ +
66
│ │ │ │ +
67 template< int step, int dim, class scalar_t >
│ │ │ │
│ │ │ │ -
68 static constexpr GeometryType type ()
│ │ │ │ -
69 {
│ │ │ │ -
70 return GeometryTypes::prism;
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ +
69 scalar_t &p, scalar_t &q, int& ord)
│ │ │ │ +
70 {
│ │ │ │ +
71 int i = alpha.z( step );
│ │ │ │
72
│ │ │ │ -
73 private:
│ │ │ │ - │ │ │ │ -
75
│ │ │ │ -
77 Impl::LagrangePrismLocalCoefficients<2> coefficients;
│ │ │ │ -
78
│ │ │ │ - │ │ │ │ -
80 };
│ │ │ │ -
│ │ │ │ -
81
│ │ │ │ -
82}
│ │ │ │ -
83
│ │ │ │ -
84#endif
│ │ │ │ - │ │ │ │ -
Hierarchical prism p2 shape functions for the simplex.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
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
│ │ │ │ +
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 };
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,134 +7,295 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ -hierarchicalprismp2.hh │ │ │ │ │ + * orthonormal │ │ │ │ │ +orthonormalcompute.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 │ │ │ │ │ + 5#ifndef DUNE_ORTHONORMALCOMPUTE_HH │ │ │ │ │ + 6#define DUNE_ORTHONORMALCOMPUTE_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include "hierarchicalprismp2/hierarchicalprismp2localbasis.hh" │ │ │ │ │ - 14#include "hierarchicalprismp2/hierarchicalprismp2localinterpolation.hh" │ │ │ │ │ - 15 │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15#include │ │ │ │ │ 16 │ │ │ │ │ - 17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ - 19 │ │ │ │ │ - 22 template │ │ │ │ │ -23 class HierarchicalPrismP2LocalFiniteElement │ │ │ │ │ - 24 { │ │ │ │ │ - 25 │ │ │ │ │ + 17#include │ │ │ │ │ + 18 │ │ │ │ │ + 19#include │ │ │ │ │ + 20#include │ │ │ │ │ + 21#include │ │ │ │ │ + 22#include │ │ │ │ │ + 23 │ │ │ │ │ +24namespace ONBCompute │ │ │ │ │ + 25{ │ │ │ │ │ 26 │ │ │ │ │ - 27 public: │ │ │ │ │ - 30 typedef LocalFiniteElementTraits, │ │ │ │ │ - 31 Impl::LagrangePrismLocalCoefficients<2>, │ │ │ │ │ -32 HierarchicalPrismP2LocalInterpolation > > │ │ │ │ │ -Traits; │ │ │ │ │ - 33 │ │ │ │ │ -36 HierarchicalPrismP2LocalFiniteElement () │ │ │ │ │ - 37 {} │ │ │ │ │ - 38 │ │ │ │ │ -41 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 42 { │ │ │ │ │ - 43 return basis; │ │ │ │ │ - 44 } │ │ │ │ │ - 45 │ │ │ │ │ -48 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 49 { │ │ │ │ │ - 50 return coefficients; │ │ │ │ │ - 51 } │ │ │ │ │ - 52 │ │ │ │ │ -55 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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 } │ │ │ │ │ + 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{}); │ │ │ │ │ + 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 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 } │ │ │ │ │ + 66 │ │ │ │ │ + 67 template< int step, int dim, class scalar_t > │ │ │ │ │ +68 static void computeIntegral ( const Dune::MultiIndex<_dim,_scalar_t_> │ │ │ │ │ +&alpha, │ │ │ │ │ + 69 scalar_t &p, scalar_t &q, int& ord) │ │ │ │ │ + 70 { │ │ │ │ │ + 71 int i = alpha.z( step ); │ │ │ │ │ 72 │ │ │ │ │ - 73 private: │ │ │ │ │ - 74 HierarchicalPrismP2LocalBasis basis; │ │ │ │ │ - 75 │ │ │ │ │ - 77 Impl::LagrangePrismLocalCoefficients<2> coefficients; │ │ │ │ │ - 78 │ │ │ │ │ - 79 HierarchicalPrismP2LocalInterpolation > │ │ │ │ │ -interpolation; │ │ │ │ │ - 80 }; │ │ │ │ │ - 81 │ │ │ │ │ - 82} │ │ │ │ │ - 83 │ │ │ │ │ - 84#endif │ │ │ │ │ -lagrangeprism.hh │ │ │ │ │ -hierarchicalprismp2localbasis.hh │ │ │ │ │ -Hierarchical prism p2 shape functions for the simplex. │ │ │ │ │ -hierarchicalprismp2localinterpolation.hh │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -Dune │ │ │ │ │ -Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalFiniteElement │ │ │ │ │ -Definition hierarchicalprismp2.hh:24 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition hierarchicalprismp2.hh:68 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalFiniteElement:: │ │ │ │ │ -HierarchicalPrismP2LocalFiniteElement │ │ │ │ │ -HierarchicalPrismP2LocalFiniteElement() │ │ │ │ │ -Definition hierarchicalprismp2.hh:36 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition hierarchicalprismp2.hh:55 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< HierarchicalPrismP2LocalBasis< D, R >, Impl:: │ │ │ │ │ -LagrangePrismLocalCoefficients< 2 >, HierarchicalPrismP2LocalInterpolation< │ │ │ │ │ -HierarchicalPrismP2LocalBasis< D, R > > > Traits │ │ │ │ │ -Definition hierarchicalprismp2.hh:32 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition hierarchicalprismp2.hh:41 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalFiniteElement::size │ │ │ │ │ + 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 }; │ │ │ │ │ + 87 │ │ │ │ │ + 88 │ │ │ │ │ + 89 // ONBMatrix │ │ │ │ │ + 90 // --------- │ │ │ │ │ + 91 │ │ │ │ │ + 92 template< Dune::GeometryType::Id geometryId, class scalar_t > │ │ │ │ │ +93 class ONBMatrix │ │ │ │ │ + 94 : public Dune::LFEMatrix< scalar_t > │ │ │ │ │ + 95 { │ │ │ │ │ + 96 typedef ONBMatrix<_geometryId,_scalar_t_> This; │ │ │ │ │ + 97 typedef Dune::LFEMatrix<_scalar_t_> Base; │ │ │ │ │ + 98 │ │ │ │ │ + 99 public: │ │ │ │ │ +100 typedef std::vector< scalar_t > vec_t; │ │ │ │ │ +101 typedef Dune::LFEMatrix<_scalar_t_> mat_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(); │ │ │ │ │ + 108 typedef Dune::MultiIndex<_dim,_scalar_t_> MI; │ │ │ │ │ + 109 Dune::StandardMonomialBasis<_dim,_MI_> basis( order ); │ │ │ │ │ + 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 } │ │ │ │ │ + 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 │ │ │ │ │ +multiindex.hh │ │ │ │ │ +field.hh │ │ │ │ │ +monomialbasis.hh │ │ │ │ │ +lfematrix.hh │ │ │ │ │ +Dune::field_cast │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +Definition field.hh:159 │ │ │ │ │ +ONBCompute │ │ │ │ │ +Definition orthonormalcompute.hh:25 │ │ │ │ │ +ONBCompute::factorial │ │ │ │ │ +scalar_t factorial(int start, int end) │ │ │ │ │ +Definition orthonormalcompute.hh:28 │ │ │ │ │ +ONBCompute::Integral │ │ │ │ │ +Definition orthonormalcompute.hh:43 │ │ │ │ │ +ONBCompute::Integral::compute │ │ │ │ │ +static int compute(const Dune::MultiIndex< dim, scalar_t > &alpha, scalar_t &p, │ │ │ │ │ +scalar_t &q) │ │ │ │ │ +Definition orthonormalcompute.hh:48 │ │ │ │ │ +ONBCompute::Integral::compute │ │ │ │ │ +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 │ │ │ │ │ +ONBCompute::Integral::computeIntegral │ │ │ │ │ +static void computeIntegral(const Dune::MultiIndex< dim, scalar_t > &alpha, │ │ │ │ │ +scalar_t &p, scalar_t &q, int &ord) │ │ │ │ │ +Definition orthonormalcompute.hh:68 │ │ │ │ │ +ONBCompute::Integral::dimension │ │ │ │ │ +static constexpr int dimension │ │ │ │ │ +Definition orthonormalcompute.hh:45 │ │ │ │ │ +ONBCompute::Integral::geometry │ │ │ │ │ +static constexpr Dune::GeometryType geometry │ │ │ │ │ +Definition orthonormalcompute.hh:44 │ │ │ │ │ +ONBCompute::ONBMatrix │ │ │ │ │ +Definition orthonormalcompute.hh:95 │ │ │ │ │ +ONBCompute::ONBMatrix::ONBMatrix │ │ │ │ │ +ONBMatrix(unsigned int order) │ │ │ │ │ +Definition orthonormalcompute.hh:103 │ │ │ │ │ +ONBCompute::ONBMatrix::vec_t │ │ │ │ │ +std::vector< scalar_t > vec_t │ │ │ │ │ +Definition orthonormalcompute.hh:100 │ │ │ │ │ +ONBCompute::ONBMatrix::row │ │ │ │ │ +void row(unsigned int row, Vector &vec) const │ │ │ │ │ +Definition orthonormalcompute.hh:139 │ │ │ │ │ +ONBCompute::ONBMatrix::mat_t │ │ │ │ │ +Dune::LFEMatrix< scalar_t > mat_t │ │ │ │ │ +Definition orthonormalcompute.hh:101 │ │ │ │ │ +Dune::LFEMatrix │ │ │ │ │ +Definition lfematrix.hh:18 │ │ │ │ │ +Dune::LFEMatrix<_scalar_t_>::cols │ │ │ │ │ +unsigned int cols() const │ │ │ │ │ +Definition lfematrix.hh:63 │ │ │ │ │ +Dune::LFEMatrix<_scalar_t_>::resize │ │ │ │ │ +void resize(const unsigned int rows, const unsigned int cols) │ │ │ │ │ +Definition lfematrix.hh:80 │ │ │ │ │ +Dune::LFEMatrix<_scalar_t_>::operator() │ │ │ │ │ +const Field & operator()(const unsigned int row, const unsigned int col) const │ │ │ │ │ +Definition lfematrix.hh:44 │ │ │ │ │ +Dune::LFEMatrix<_scalar_t_>::rows │ │ │ │ │ +unsigned int rows() const │ │ │ │ │ +Definition lfematrix.hh:58 │ │ │ │ │ +Dune::MonomialBasis::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition hierarchicalprismp2.hh:61 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition hierarchicalprismp2.hh:48 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalBasis │ │ │ │ │ -Definition hierarchicalprismp2localbasis.hh:23 │ │ │ │ │ -Dune::HierarchicalPrismP2LocalInterpolation │ │ │ │ │ -Definition hierarchicalprismp2localinterpolation.hh:18 │ │ │ │ │ +Definition monomialbasis.hh:476 │ │ │ │ │ +Dune::MonomialBasis::evaluate │ │ │ │ │ +void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ +values) const │ │ │ │ │ +Definition monomialbasis.hh:498 │ │ │ │ │ +Dune::StandardMonomialBasis │ │ │ │ │ +Definition monomialbasis.hh:571 │ │ │ │ │ +Dune::MultiIndex │ │ │ │ │ +Definition multiindex.hh:37 │ │ │ │ │ +Dune::MultiIndex::z │ │ │ │ │ +int z(int i) const │ │ │ │ │ +Definition multiindex.hh:91 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00326.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalp2withelementbubble.hh File Reference │ │ │ │ +dune-localfunctions: mimeticall.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchicalp2withelementbubble.hh File Reference
│ │ │ │ +
mimeticall.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>
│ │ │ │ +
#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"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::HierarchicalP2WithElementBubbleLocalFiniteElement< D, R, dim >
class  Dune::MimeticLocalBasis< D, R, dim >
 
class  Dune::MimeticLocalInterpolation< LB >
 
class  Dune::MimeticLocalCoefficients
 ! More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,24 +6,32 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ + * mimetic │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -hierarchicalp2withelementbubble.hh File Reference │ │ │ │ │ +mimeticall.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include "../common/localbasis.hh" │ │ │ │ │ +#include "../common/localkey.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::HierarchicalP2WithElementBubbleLocalFiniteElement<_D,_R,_dim_> │ │ │ │ │ +class  Dune::MimeticLocalBasis<_D,_R,_dim_> │ │ │ │ │ +  │ │ │ │ │ +class  Dune::MimeticLocalInterpolation<_LB_> │ │ │ │ │ +  │ │ │ │ │ +class  Dune::MimeticLocalCoefficients │ │ │ │ │ +  ! More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00326_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalp2withelementbubble.hh Source File │ │ │ │ +dune-localfunctions: mimeticall.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,119 +70,173 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalp2withelementbubble.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_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_MIMETIC_ALL_HH
│ │ │ │ +
6#define DUNE_MIMETIC_ALL_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ +
8#include <cstddef>
│ │ │ │
9
│ │ │ │ - │ │ │ │ - │ │ │ │ -
12
│ │ │ │ +
10#include <dune/common/exceptions.hh>
│ │ │ │ +
11#include <dune/common/fvector.hh>
│ │ │ │ +
12#include <dune/common/fmatrix.hh>
│ │ │ │
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 {}
│ │ │ │ +
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 {}
│ │ │ │
│ │ │ │ -
36
│ │ │ │ +
31
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
33 : variant(0)
│ │ │ │ +
34 {}
│ │ │ │ +
│ │ │ │ +
35
│ │ │ │ +
36 unsigned int size () const { return variant; }
│ │ │ │ +
37
│ │ │ │
│ │ │ │ -
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:
│ │ │ │ - │ │ │ │ -
73
│ │ │ │ - │ │ │ │ -
75
│ │ │ │ - │ │ │ │ -
77 };
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
79}
│ │ │ │ -
80
│ │ │ │ -
81#endif
│ │ │ │ -
Hierarchical p2 shape functions for the simplex.
│ │ │ │ - │ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │
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
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,140 +7,195 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ -hierarchicalp2withelementbubble.hh │ │ │ │ │ + * mimetic │ │ │ │ │ +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_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_MIMETIC_ALL_HH │ │ │ │ │ + 6#define DUNE_MIMETIC_ALL_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ 13 │ │ │ │ │ - 14namespace Dune │ │ │ │ │ - 15{ │ │ │ │ │ - 16 │ │ │ │ │ - 19 template │ │ │ │ │ -20 class HierarchicalP2WithElementBubbleLocalFiniteElement │ │ │ │ │ - 21 { │ │ │ │ │ - 22 │ │ │ │ │ - 23 static_assert(dim==2, "HierarchicalP2WithElementBubbleLocalFiniteElement │ │ │ │ │ -only implemented for dim==2."); │ │ │ │ │ - 24 │ │ │ │ │ - 25 public: │ │ │ │ │ - 28 typedef │ │ │ │ │ -LocalFiniteElementTraits, │ │ │ │ │ - 29 HierarchicalSimplexP2WithElementBubbleLocalCoefficients, │ │ │ │ │ -30 │ │ │ │ │ -HierarchicalSimplexP2WithElementBubbleLocalInterpolation │ │ │ │ │ -> > Traits; │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16#include "../common/localbasis.hh" │ │ │ │ │ + 17#include "../common/localkey.hh" │ │ │ │ │ + 18 │ │ │ │ │ + 19namespace Dune │ │ │ │ │ + 20{ │ │ │ │ │ + 21 template │ │ │ │ │ +22 class MimeticLocalBasis │ │ │ │ │ + 23 { │ │ │ │ │ + 24 public: │ │ │ │ │ + 25 typedef Dune::LocalBasisTraits, │ │ │ │ │ +26 R,1,Dune::FieldVector, Dune::FieldMatrix > Traits; │ │ │ │ │ + 27 │ │ │ │ │ +28 MimeticLocalBasis (unsigned int variant_) │ │ │ │ │ + 29 : variant(variant_) │ │ │ │ │ + 30 {} │ │ │ │ │ 31 │ │ │ │ │ -34 HierarchicalP2WithElementBubbleLocalFiniteElement () │ │ │ │ │ - 35 {} │ │ │ │ │ - 36 │ │ │ │ │ -39 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 40 { │ │ │ │ │ - 41 return basis_; │ │ │ │ │ - 42 } │ │ │ │ │ - 43 │ │ │ │ │ -46 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 47 { │ │ │ │ │ - 48 return coefficients_; │ │ │ │ │ - 49 } │ │ │ │ │ - 50 │ │ │ │ │ -53 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 72 HierarchicalSimplexP2WithElementBubbleLocalBasis basis_; │ │ │ │ │ - 73 │ │ │ │ │ - 74 HierarchicalSimplexP2WithElementBubbleLocalCoefficients coefficients_; │ │ │ │ │ - 75 │ │ │ │ │ +32 MimeticLocalBasis () │ │ │ │ │ + 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& 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& out) const │ │ │ │ │ + 50 { │ │ │ │ │ + 51 DUNE_THROW(Dune::Exception,"mimetic basis Jacobian evaluation not │ │ │ │ │ +available"); │ │ │ │ │ + 52 } │ │ │ │ │ + 53 │ │ │ │ │ +55 void partial (const std::array& /*order*/, │ │ │ │ │ + 56 const typename Traits::DomainType& /*in*/, // position │ │ │ │ │ + 57 std::vector& /*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 │ │ │ │ │ +73 class MimeticLocalInterpolation │ │ │ │ │ + 74 { │ │ │ │ │ + 75 public: │ │ │ │ │ 76 │ │ │ │ │ -HierarchicalSimplexP2WithElementBubbleLocalInterpolation │ │ │ │ │ -> interpolation_; │ │ │ │ │ - 77 }; │ │ │ │ │ - 78 │ │ │ │ │ - 79} │ │ │ │ │ - 80 │ │ │ │ │ - 81#endif │ │ │ │ │ -hierarchicalsimplexp2withelementbubble.hh │ │ │ │ │ -Hierarchical p2 shape functions for the simplex. │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ + 78 template │ │ │ │ │ +79 void interpolate (const F& f, std::vector& out) const { │ │ │ │ │ + 80 DUNE_THROW(Dune::Exception,"mimetic local interpolation not available"); │ │ │ │ │ + 81 } │ │ │ │ │ + 82 }; │ │ │ │ │ + 83 │ │ │ │ │ +87 class MimeticLocalCoefficients │ │ │ │ │ + 88 { │ │ │ │ │ + 89 public: │ │ │ │ │ +90 MimeticLocalCoefficients (unsigned int variant_) │ │ │ │ │ + 91 : variant(variant_), li(variant_) │ │ │ │ │ + 92 { │ │ │ │ │ + 93 for (unsigned int i=0; i li; │ │ │ │ │ + 112 }; │ │ │ │ │ + 113} │ │ │ │ │ + 114 │ │ │ │ │ + 115#endif │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::HierarchicalP2WithElementBubbleLocalFiniteElement │ │ │ │ │ -Definition hierarchicalp2withelementbubble.hh:21 │ │ │ │ │ -Dune::HierarchicalP2WithElementBubbleLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< HierarchicalSimplexP2WithElementBubbleLocalBasis< D, │ │ │ │ │ -R, dim >, HierarchicalSimplexP2WithElementBubbleLocalCoefficients< dim >, │ │ │ │ │ -HierarchicalSimplexP2WithElementBubbleLocalInterpolation< │ │ │ │ │ -HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, dim > > > Traits │ │ │ │ │ -Definition hierarchicalp2withelementbubble.hh:30 │ │ │ │ │ -Dune::HierarchicalP2WithElementBubbleLocalFiniteElement::size │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::LocalKey::intersectionCodim │ │ │ │ │ +@ intersectionCodim │ │ │ │ │ +Codimension returned by LocalKey::codim() for degrees of freedom attached to an │ │ │ │ │ +intersection. │ │ │ │ │ +Definition localkey.hh:36 │ │ │ │ │ +Dune::MimeticLocalBasis │ │ │ │ │ +Definition mimeticall.hh:23 │ │ │ │ │ +Dune::MimeticLocalBasis::MimeticLocalBasis │ │ │ │ │ +MimeticLocalBasis(unsigned int variant_) │ │ │ │ │ +Definition mimeticall.hh:28 │ │ │ │ │ +Dune::MimeticLocalBasis::Traits │ │ │ │ │ +Dune::LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune:: │ │ │ │ │ +FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits │ │ │ │ │ +Definition mimeticall.hh:26 │ │ │ │ │ +Dune::MimeticLocalBasis::MimeticLocalBasis │ │ │ │ │ +MimeticLocalBasis() │ │ │ │ │ +Definition mimeticall.hh:32 │ │ │ │ │ +Dune::MimeticLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition mimeticall.hh:47 │ │ │ │ │ +Dune::MimeticLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition mimeticall.hh:63 │ │ │ │ │ +Dune::MimeticLocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::MimeticLocalBasis::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition hierarchicalp2withelementbubble.hh:59 │ │ │ │ │ -Dune::HierarchicalP2WithElementBubbleLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition hierarchicalp2withelementbubble.hh:39 │ │ │ │ │ -Dune::HierarchicalP2WithElementBubbleLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition hierarchicalp2withelementbubble.hh:46 │ │ │ │ │ -Dune::HierarchicalP2WithElementBubbleLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition hierarchicalp2withelementbubble.hh:53 │ │ │ │ │ -Dune::HierarchicalP2WithElementBubbleLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition hierarchicalp2withelementbubble.hh:66 │ │ │ │ │ -Dune::HierarchicalP2WithElementBubbleLocalFiniteElement:: │ │ │ │ │ -HierarchicalP2WithElementBubbleLocalFiniteElement │ │ │ │ │ -HierarchicalP2WithElementBubbleLocalFiniteElement() │ │ │ │ │ -Definition hierarchicalp2withelementbubble.hh:34 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:26 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients │ │ │ │ │ -The local finite element needed for the Zou-Kornhuber estimator for Signorini │ │ │ │ │ -problems. │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:414 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalInterpolation │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:456 │ │ │ │ │ +Definition mimeticall.hh:36 │ │ │ │ │ +Dune::MimeticLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition mimeticall.hh:39 │ │ │ │ │ +Dune::MimeticLocalInterpolation │ │ │ │ │ +Definition mimeticall.hh:74 │ │ │ │ │ +Dune::MimeticLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &f, std::vector< C > &out) const │ │ │ │ │ +Local interpolation of a function. │ │ │ │ │ +Definition mimeticall.hh:79 │ │ │ │ │ +Dune::MimeticLocalCoefficients │ │ │ │ │ +! │ │ │ │ │ +Definition mimeticall.hh:88 │ │ │ │ │ +Dune::MimeticLocalCoefficients::localKey │ │ │ │ │ +const Dune::LocalKey & localKey(std::size_t i) const │ │ │ │ │ +map index i to local key │ │ │ │ │ +Definition mimeticall.hh:105 │ │ │ │ │ +Dune::MimeticLocalCoefficients::MimeticLocalCoefficients │ │ │ │ │ +MimeticLocalCoefficients(unsigned int variant_) │ │ │ │ │ +Definition mimeticall.hh:90 │ │ │ │ │ +Dune::MimeticLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition mimeticall.hh:102 │ │ │ │ │ +Dune::MimeticLocalCoefficients::MimeticLocalCoefficients │ │ │ │ │ +MimeticLocalCoefficients() │ │ │ │ │ +Definition mimeticall.hh:97 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00329.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalsimplexp2localbasis.hh File Reference │ │ │ │ +dune-localfunctions: refinedp0localcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,55 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchicalsimplexp2localbasis.hh File Reference
│ │ │ │ +
refinedp0localcoefficients.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 <cstddef>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::HierarchicalSimplexP2LocalBasis< D, R, dim >
 
class  Dune::HierarchicalSimplexP2LocalBasis< D, R, 1 >
 Hierarchical P2 basis in 1d. More...
 
class  Dune::HierarchicalSimplexP2LocalBasis< D, R, 2 >
 Hierarchical P2 basis in 2d. More...
 
class  Dune::HierarchicalSimplexP2LocalBasis< D, R, 3 >
 Hierarchical P2 basis in 3d. More...
class  Dune::RefinedP0LocalCoefficients< k >
 Layout map for RefinedP0 elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Hierarchical p2 shape functions for the simplex.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,37 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ - * hierarchicalp2 │ │ │ │ │ + * refined │ │ │ │ │ + * refinedp0 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -hierarchicalsimplexp2localbasis.hh File Reference │ │ │ │ │ -Hierarchical p2 shape functions for the simplex. More... │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +refinedp0localcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_dim_> │ │ │ │ │ -  │ │ │ │ │ -class  Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_1_> │ │ │ │ │ -  Hierarchical P2 basis in 1d. More... │ │ │ │ │ -  │ │ │ │ │ -class  Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_2_> │ │ │ │ │ -  Hierarchical P2 basis in 2d. More... │ │ │ │ │ -  │ │ │ │ │ -class  Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_> │ │ │ │ │ -  Hierarchical P2 basis in 3d. More... │ │ │ │ │ +class  Dune::RefinedP0LocalCoefficients<_k_> │ │ │ │ │ +  Layout map for RefinedP0 elements. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ -***** Detailed Description ***** │ │ │ │ │ -Hierarchical p2 shape functions for the simplex. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00329_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalsimplexp2localbasis.hh Source File │ │ │ │ +dune-localfunctions: refinedp0localcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,367 +70,85 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalsimplexp2localbasis.hh
│ │ │ │ +
refinedp0localcoefficients.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_REFINED_P0_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_REFINED_P0_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
12#include <numeric>
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <iostream>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │
13
│ │ │ │ -
14#include <dune/common/fvector.hh>
│ │ │ │ -
15#include <dune/common/fmatrix.hh>
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │
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;
│ │ │ │ +
23 template<unsigned int k>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
25 {
│ │ │ │ +
26 // 2 to the k-th power
│ │ │ │ +
27 constexpr static int N = 1<<k;
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ +
53 };
│ │ │ │
│ │ │ │ -
360
│ │ │ │ -
361 };
│ │ │ │ -
│ │ │ │ -
362}
│ │ │ │ -
363#endif
│ │ │ │ +
54
│ │ │ │ +
55}
│ │ │ │ +
56
│ │ │ │ +
57#endif
│ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,405 +7,84 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ - * hierarchicalp2 │ │ │ │ │ -hierarchicalsimplexp2localbasis.hh │ │ │ │ │ + * refined │ │ │ │ │ + * refinedp0 │ │ │ │ │ +refinedp0localcoefficients.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_REFINED_P0_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_REFINED_P0_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 12#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ + 14namespace Dune │ │ │ │ │ + 15{ │ │ │ │ │ 16 │ │ │ │ │ - 17#include │ │ │ │ │ - 18 │ │ │ │ │ - 19namespace Dune │ │ │ │ │ - 20{ │ │ │ │ │ - 21 template │ │ │ │ │ -22 class HierarchicalSimplexP2LocalBasis │ │ │ │ │ - 23 { │ │ │ │ │ - 24 public: │ │ │ │ │ -25 HierarchicalSimplexP2LocalBasis() │ │ │ │ │ - 26 { │ │ │ │ │ - 27 DUNE_THROW(Dune::NotImplemented,"HierarchicalSimplexP2LocalBasis not │ │ │ │ │ -implemented for dim > 3."); │ │ │ │ │ - 28 } │ │ │ │ │ - 29 }; │ │ │ │ │ - 30 │ │ │ │ │ - 45 template │ │ │ │ │ -46 class HierarchicalSimplexP2LocalBasis │ │ │ │ │ - 47 { │ │ │ │ │ - 48 public: │ │ │ │ │ - 50 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -51 Dune::FieldMatrix > Traits; │ │ │ │ │ + 23 template │ │ │ │ │ +24 class RefinedP0LocalCoefficients │ │ │ │ │ + 25 { │ │ │ │ │ + 26 // 2 to the k-th power │ │ │ │ │ + 27 constexpr static int N = 1< localKeys_; │ │ │ │ │ 52 │ │ │ │ │ -54 unsigned int size () const │ │ │ │ │ - 55 { │ │ │ │ │ - 56 return 3; │ │ │ │ │ - 57 } │ │ │ │ │ - 58 │ │ │ │ │ -60 inline void evaluateFunction (const typename Traits::DomainType& 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 │ │ │ │ │ -72 evaluateJacobian (const typename Traits::DomainType& 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 │ │ │ │ │ -83 void partial (const std::array& order, │ │ │ │ │ - 84 const typename Traits::DomainType& 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 │ │ │ │ │ -108 unsigned int order () const │ │ │ │ │ - 109 { │ │ │ │ │ - 110 return 2; │ │ │ │ │ - 111 } │ │ │ │ │ - 112 │ │ │ │ │ - 113 }; │ │ │ │ │ - 114 │ │ │ │ │ - 134 template │ │ │ │ │ -135 class HierarchicalSimplexP2LocalBasis │ │ │ │ │ - 136 { │ │ │ │ │ - 137 public: │ │ │ │ │ - 139 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -140 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ - 180 const typename Traits::DomainType& 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 │ │ │ │ │ -217 unsigned int order () const │ │ │ │ │ - 218 { │ │ │ │ │ - 219 return 2; │ │ │ │ │ - 220 } │ │ │ │ │ - 221 │ │ │ │ │ - 222 }; │ │ │ │ │ - 223 │ │ │ │ │ - 247 template │ │ │ │ │ -248 class HierarchicalSimplexP2LocalBasis │ │ │ │ │ - 249 { │ │ │ │ │ - 250 public: │ │ │ │ │ - 252 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -253 Dune::FieldMatrix > Traits; │ │ │ │ │ - 254 │ │ │ │ │ -256 unsigned int size () const │ │ │ │ │ - 257 { │ │ │ │ │ - 258 return 10; │ │ │ │ │ - 259 } │ │ │ │ │ - 260 │ │ │ │ │ -262 void evaluateFunction (const typename Traits::DomainType& 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 │ │ │ │ │ -280 void evaluateJacobian (const typename Traits::DomainType& 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 │ │ │ │ │ -298 void partial (const std::array& order, │ │ │ │ │ - 299 const typename Traits::DomainType& 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 │ │ │ │ │ -356 unsigned int order () const │ │ │ │ │ - 357 { │ │ │ │ │ - 358 return 2; │ │ │ │ │ - 359 } │ │ │ │ │ - 360 │ │ │ │ │ - 361 }; │ │ │ │ │ - 362} │ │ │ │ │ - 363#endif │ │ │ │ │ + 53 }; │ │ │ │ │ + 54 │ │ │ │ │ + 55} │ │ │ │ │ + 56 │ │ │ │ │ + 57#endif │ │ │ │ │ +localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:23 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis::HierarchicalSimplexP2LocalBasis │ │ │ │ │ -HierarchicalSimplexP2LocalBasis() │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:25 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_1_>::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions (2, in this case) │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:108 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_1_>::Traits │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_1_>::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_1_>::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:54 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_1_>::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:72 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_1_>::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:60 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_2_>::Traits │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_2_>::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_2_>::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:143 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_2_>::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions (2 in this case) │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:217 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_2_>::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:165 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_2_>::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:149 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_>::Traits │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_>::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:262 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_>::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:280 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_>::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:256 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_>::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalBasis<_D,_R,_3_>::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions (2 in this case) │ │ │ │ │ -Definition hierarchicalsimplexp2localbasis.hh:356 │ │ │ │ │ -localbasis.hh │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::RefinedP0LocalCoefficients │ │ │ │ │ +Layout map for RefinedP0 elements. │ │ │ │ │ +Definition refinedp0localcoefficients.hh:25 │ │ │ │ │ +Dune::RefinedP0LocalCoefficients::RefinedP0LocalCoefficients │ │ │ │ │ +RefinedP0LocalCoefficients() │ │ │ │ │ +Definition refinedp0localcoefficients.hh:30 │ │ │ │ │ +Dune::RefinedP0LocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition refinedp0localcoefficients.hh:39 │ │ │ │ │ +Dune::RefinedP0LocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition refinedp0localcoefficients.hh:45 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00332.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalsimplexp2localinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: refinedp0localbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,32 +65,36 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchicalsimplexp2localinterpolation.hh File Reference
│ │ │ │ +
refinedp0localbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +
#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::HierarchicalSimplexP2LocalInterpolation< LB >
class  Dune::RefinedP0LocalBasis< D, R, dim >
 Uniformly refined constant shape functions on a unit simplex in R^dim. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,23 +6,28 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ - * hierarchicalp2 │ │ │ │ │ + * refined │ │ │ │ │ + * refinedp0 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -hierarchicalsimplexp2localinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +refinedp0localbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::HierarchicalSimplexP2LocalInterpolation<_LB_> │ │ │ │ │ +class  Dune::RefinedP0LocalBasis<_D,_R,_dim_> │ │ │ │ │ +  Uniformly refined constant shape functions on a unit simplex in R^dim. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00332_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalsimplexp2localinterpolation.hh Source File │ │ │ │ +dune-localfunctions: refinedp0localbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,134 +70,119 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalsimplexp2localinterpolation.hh
│ │ │ │ +
refinedp0localbasis.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_REFINED_P0_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_REFINED_P0_LOCALBASIS_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
│ │ │ │ -
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]);
│ │ │ │ +
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
│ │ │ │ -
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]);
│ │ │ │ +
│ │ │ │ +
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 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 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 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
│ │ │ │ +
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.
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition hierarchicalsimplexp2localinterpolation.hh:18
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Definition hierarchicalsimplexp2localinterpolation.hh:22
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,128 +7,133 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ - * hierarchicalp2 │ │ │ │ │ -hierarchicalsimplexp2localinterpolation.hh │ │ │ │ │ + * refined │ │ │ │ │ + * refinedp0 │ │ │ │ │ +refinedp0localbasis.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_REFINED_P0_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_REFINED_P0_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11namespace Dune │ │ │ │ │ - 12{ │ │ │ │ │ - 16 template │ │ │ │ │ -17 class HierarchicalSimplexP2LocalInterpolation │ │ │ │ │ - 18 { │ │ │ │ │ - 19 public: │ │ │ │ │ - 20 │ │ │ │ │ - 21 template │ │ │ │ │ -22 void interpolate (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]); │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16namespace Dune │ │ │ │ │ + 17{ │ │ │ │ │ + 18 │ │ │ │ │ + 37 template │ │ │ │ │ +38 class RefinedP0LocalBasis │ │ │ │ │ + 39 : public RefinedSimplexLocalBasis │ │ │ │ │ + 40 { │ │ │ │ │ + 41 // 2 to the k-th power │ │ │ │ │ + 42 constexpr static int N = 1<,R,1,Dune:: │ │ │ │ │ +FieldVector, Dune::FieldMatrix > Traits; │ │ │ │ │ 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]); │ │ │ │ │ +48 unsigned int size () const │ │ │ │ │ + 49 { │ │ │ │ │ + 50 return N; │ │ │ │ │ + 51 } │ │ │ │ │ + 52 │ │ │ │ │ +54 inline void evaluateFunction (const typename Traits::DomainType& 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& order, │ │ │ │ │ + 74 const typename Traits::DomainType& in, // position │ │ │ │ │ + 75 std::vector& 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 │ │ │ │ │ +refinedsimplexlocalbasis.hh │ │ │ │ │ +Contains a base class for LocalBasis classes based on uniform refinement. │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalInterpolation │ │ │ │ │ -Definition hierarchicalsimplexp2localinterpolation.hh:18 │ │ │ │ │ -Dune::HierarchicalSimplexP2LocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Definition hierarchicalsimplexp2localinterpolation.hh:22 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::RefinedSimplexLocalBasis │ │ │ │ │ +Definition refinedsimplexlocalbasis.hh:20 │ │ │ │ │ +Dune::RefinedP0LocalBasis │ │ │ │ │ +Uniformly refined constant shape functions on a unit simplex in R^dim. │ │ │ │ │ +Definition refinedp0localbasis.hh:40 │ │ │ │ │ +Dune::RefinedP0LocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::RefinedP0LocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition refinedp0localbasis.hh:54 │ │ │ │ │ +Dune::RefinedP0LocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Definition refinedp0localbasis.hh:64 │ │ │ │ │ +Dune::RefinedP0LocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition refinedp0localbasis.hh:91 │ │ │ │ │ +Dune::RefinedP0LocalBasis::Traits │ │ │ │ │ +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 │ │ │ │ │ +Dune::RefinedP0LocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition refinedp0localbasis.hh:48 │ │ │ │ │ +localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00335.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalsimplexp2withelementbubble.hh File Reference │ │ │ │ +dune-localfunctions: refinedp0localinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,63 +65,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchicalsimplexp2withelementbubble.hh File Reference
│ │ │ │ +
refinedp0localinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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/common/localkey.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

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...
class  Dune::RefinedP0LocalInterpolation< LB >
 
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, 3 >
 Hierarchical P2 basis in 1d. More...
class  Dune::RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 1 > >
 
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients< dim >
 The local finite element needed for the Zou-Kornhuber estimator for Signorini problems. More...
class  Dune::RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 2 > >
 
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalInterpolation< LB >
class  Dune::RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 3 > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Hierarchical p2 shape functions for the simplex.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,46 +6,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ - * hierarchicalp2withelementbubble │ │ │ │ │ + * refined │ │ │ │ │ + * refinedp0 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -hierarchicalsimplexp2withelementbubble.hh File Reference │ │ │ │ │ -Hierarchical p2 shape functions for the simplex. More... │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +refinedp0localinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_dim_> │ │ │ │ │ +class  Dune::RefinedP0LocalInterpolation<_LB_> │ │ │ │ │   │ │ │ │ │ -class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_> │ │ │ │ │ -  Hierarchical P2 basis in 1d. More... │ │ │ │ │ +class  Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_1_>_> │ │ │ │ │   │ │ │ │ │ -class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_> │ │ │ │ │ -  Hierarchical P2 basis in 1d. More... │ │ │ │ │ +class  Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_2_>_> │ │ │ │ │   │ │ │ │ │ -class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_> │ │ │ │ │ -  Hierarchical P2 basis in 1d. More... │ │ │ │ │ -  │ │ │ │ │ -class  Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients<_dim_> │ │ │ │ │ -  The local finite element needed for the Zou-Kornhuber estimator for │ │ │ │ │ - Signorini problems. More... │ │ │ │ │ -  │ │ │ │ │ -class  Dune::HierarchicalSimplexP2WithElementBubbleLocalInterpolation<_LB_> │ │ │ │ │ +class  Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_3_>_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ -***** Detailed Description ***** │ │ │ │ │ -Hierarchical p2 shape functions for the simplex. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00335_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalsimplexp2withelementbubble.hh Source File │ │ │ │ +dune-localfunctions: refinedp0localinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,495 +70,204 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalsimplexp2withelementbubble.hh
│ │ │ │ +
refinedp0localinterpolation.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_REFINED_P0_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_REFINED_P0_LOCALINTERPOLATION_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.");
│ │ │ │ + │ │ │ │ + │ │ │ │ +
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 };
│ │ │ │ -
│ │ │ │ +
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;
│ │ │ │ +
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:
│ │ │ │
│ │ │ │ -
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);
│ │ │ │ + │ │ │ │ +
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[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
│ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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);
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,549 +7,201 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * hierarchical │ │ │ │ │ - * hierarchicalp2withelementbubble │ │ │ │ │ -hierarchicalsimplexp2withelementbubble.hh │ │ │ │ │ + * refined │ │ │ │ │ + * refinedp0 │ │ │ │ │ +refinedp0localinterpolation.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_REFINED_P0_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_REFINED_P0_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ - 17 │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include │ │ │ │ │ - 20#include │ │ │ │ │ - 21 │ │ │ │ │ - 22namespace Dune │ │ │ │ │ - 23{ │ │ │ │ │ - 24 template │ │ │ │ │ -25 class HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11namespace Dune │ │ │ │ │ + 12{ │ │ │ │ │ + 13 template │ │ │ │ │ +14 class RefinedP0LocalInterpolation │ │ │ │ │ + 15 {}; │ │ │ │ │ + 16 │ │ │ │ │ + 17 template │ │ │ │ │ +18 class RefinedP0LocalInterpolation > │ │ │ │ │ + 19 { │ │ │ │ │ + 20 typedef RefinedP0LocalBasis LB; │ │ │ │ │ + 21 typedef typename LB::Traits::DomainType DT; │ │ │ │ │ + 22 │ │ │ │ │ + 23 public: │ │ │ │ │ +24 RefinedP0LocalInterpolation() : │ │ │ │ │ + 25 interpolationPoints_(2) │ │ │ │ │ 26 { │ │ │ │ │ - 27 public: │ │ │ │ │ -28 HierarchicalSimplexP2WithElementBubbleLocalBasis() │ │ │ │ │ - 29 { │ │ │ │ │ - 30 DUNE_THROW(Dune::NotImplemented,"HierarchicalSimplexP2LocalBasis not │ │ │ │ │ -implemented for dim > 3."); │ │ │ │ │ + 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 }; │ │ │ │ │ + 32 │ │ │ │ │ 33 │ │ │ │ │ - 48 template │ │ │ │ │ -49 class HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ - 50 { │ │ │ │ │ - 51 public: │ │ │ │ │ - 53 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -54 Dune::FieldMatrix > Traits; │ │ │ │ │ + 34 template │ │ │ │ │ +35 void interpolate (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 │ │ │ │ │ +51 class RefinedP0LocalInterpolation > │ │ │ │ │ + 52 { │ │ │ │ │ + 53 typedef RefinedP0LocalBasis LB; │ │ │ │ │ + 54 typedef typename LB::Traits::DomainType DT; │ │ │ │ │ 55 │ │ │ │ │ -57 unsigned int size () const │ │ │ │ │ - 58 { │ │ │ │ │ - 59 return 3; │ │ │ │ │ - 60 } │ │ │ │ │ - 61 │ │ │ │ │ -63 inline void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ - 64 std::vector& 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& out) const // return value │ │ │ │ │ + 56 public: │ │ │ │ │ +57 RefinedP0LocalInterpolation() : │ │ │ │ │ + 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 │ │ │ │ │ +76 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ 77 { │ │ │ │ │ - 78 out.resize(3); │ │ │ │ │ + 78 auto&& f = Impl::makeFunctionWithCallOperator
(ff); │ │ │ │ │ 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& order, │ │ │ │ │ - 87 const typename Traits::DomainType& 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 } │ │ │ │ │ - 108 │ │ │ │ │ -111 unsigned int order () const │ │ │ │ │ - 112 { │ │ │ │ │ - 113 return 2; │ │ │ │ │ - 114 } │ │ │ │ │ - 115 │ │ │ │ │ - 116 }; │ │ │ │ │ + 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 │ │ │ │ │ +92 class RefinedP0LocalInterpolation > │ │ │ │ │ + 93 { │ │ │ │ │ + 94 typedef RefinedP0LocalBasis LB; │ │ │ │ │ + 95 typedef typename LB::Traits::DomainType DT; │ │ │ │ │ + 96 │ │ │ │ │ + 97 public: │ │ │ │ │ +98 RefinedP0LocalInterpolation() : │ │ │ │ │ + 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 │ │ │ │ │ - 138 template │ │ │ │ │ -139 class HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ - 140 { │ │ │ │ │ - 141 public: │ │ │ │ │ - 143 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -144 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ - 190 const typename Traits::DomainType& 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 │ │ │ │ │ -229 unsigned int order () const │ │ │ │ │ - 230 { │ │ │ │ │ - 231 return 3; │ │ │ │ │ - 232 } │ │ │ │ │ - 233 │ │ │ │ │ - 234 }; │ │ │ │ │ - 235 │ │ │ │ │ - 260 template │ │ │ │ │ -261 class HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ - 262 { │ │ │ │ │ - 263 public: │ │ │ │ │ - 265 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -266 Dune::FieldMatrix > Traits; │ │ │ │ │ - 267 │ │ │ │ │ -269 unsigned int size () const │ │ │ │ │ - 270 { │ │ │ │ │ - 271 return 11; │ │ │ │ │ - 272 } │ │ │ │ │ - 273 │ │ │ │ │ -275 void evaluateFunction (const typename Traits::DomainType& 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 │ │ │ │ │ -296 void evaluateJacobian (const typename Traits::DomainType& 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 │ │ │ │ │ -318 void partial (const std::array& order, │ │ │ │ │ - 319 const typename Traits::DomainType& 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 │ │ │ │ │ -379 unsigned int order () const │ │ │ │ │ - 380 { │ │ │ │ │ - 381 return 4; │ │ │ │ │ - 382 } │ │ │ │ │ - 383 │ │ │ │ │ - 384 }; │ │ │ │ │ - 385 │ │ │ │ │ - 386 │ │ │ │ │ - 412 template │ │ │ │ │ -413 class HierarchicalSimplexP2WithElementBubbleLocalCoefficients │ │ │ │ │ - 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: │ │ │ │ │ -423 HierarchicalSimplexP2WithElementBubbleLocalCoefficients () │ │ │ │ │ - 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 li; │ │ │ │ │ - 452 }; │ │ │ │ │ - 453 │ │ │ │ │ - 454 template │ │ │ │ │ -455 class HierarchicalSimplexP2WithElementBubbleLocalInterpolation │ │ │ │ │ - 456 { │ │ │ │ │ - 457 public: │ │ │ │ │ - 458 │ │ │ │ │ - 460 template │ │ │ │ │ -461 void interpolate (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 HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ -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 │ │ │ │ │ -localkey.hh │ │ │ │ │ + 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 │ │ │ │ │ +137 void interpolate (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 │ │ │ │ │ +refinedp0localbasis.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:26 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis:: │ │ │ │ │ -HierarchicalSimplexP2WithElementBubbleLocalBasis │ │ │ │ │ -HierarchicalSimplexP2WithElementBubbleLocalBasis() │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:28 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_>:: │ │ │ │ │ -evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:75 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_>::Traits │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_>:: │ │ │ │ │ -evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:63 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_>::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions (2, in this case) │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:111 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_>::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:57 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_1_>::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_>::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:147 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_>::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions (3 in this case) │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:229 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_>:: │ │ │ │ │ -evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:153 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_>:: │ │ │ │ │ -evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:170 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_>::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_2_>::Traits │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_>::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:269 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_>:: │ │ │ │ │ -evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:275 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_>::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions (4 in this case) │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:379 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_>:: │ │ │ │ │ -evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:296 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_>::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis<_D,_R,_3_>::Traits │ │ │ │ │ -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 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients │ │ │ │ │ -The local finite element needed for the Zou-Kornhuber estimator for Signorini │ │ │ │ │ -problems. │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:414 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients::size │ │ │ │ │ -size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:439 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients::localKey │ │ │ │ │ -const Dune::LocalKey & localKey(size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:445 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients:: │ │ │ │ │ -HierarchicalSimplexP2WithElementBubbleLocalCoefficients │ │ │ │ │ -HierarchicalSimplexP2WithElementBubbleLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:423 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalInterpolation │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:456 │ │ │ │ │ -Dune::HierarchicalSimplexP2WithElementBubbleLocalInterpolation::interpolate │ │ │ │ │ +Dune::RefinedP0LocalBasis │ │ │ │ │ +Uniformly refined constant shape functions on a unit simplex in R^dim. │ │ │ │ │ +Definition refinedp0localbasis.hh:40 │ │ │ │ │ +Dune::RefinedP0LocalInterpolation │ │ │ │ │ +Definition refinedp0localinterpolation.hh:15 │ │ │ │ │ +Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_1_>_>:: │ │ │ │ │ +RefinedP0LocalInterpolation │ │ │ │ │ +RefinedP0LocalInterpolation() │ │ │ │ │ +Definition refinedp0localinterpolation.hh:24 │ │ │ │ │ +Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_1_>_>:: │ │ │ │ │ +interpolate │ │ │ │ │ void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Local interpolation of a function. │ │ │ │ │ -Definition hierarchicalsimplexp2withelementbubble.hh:461 │ │ │ │ │ -localbasis.hh │ │ │ │ │ +Definition refinedp0localinterpolation.hh:35 │ │ │ │ │ +Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_2_>_>:: │ │ │ │ │ +RefinedP0LocalInterpolation │ │ │ │ │ +RefinedP0LocalInterpolation() │ │ │ │ │ +Definition refinedp0localinterpolation.hh:57 │ │ │ │ │ +Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_2_>_>:: │ │ │ │ │ +interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Definition refinedp0localinterpolation.hh:76 │ │ │ │ │ +Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_3_>_>:: │ │ │ │ │ +interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Definition refinedp0localinterpolation.hh:137 │ │ │ │ │ +Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_3_>_>:: │ │ │ │ │ +RefinedP0LocalInterpolation │ │ │ │ │ +RefinedP0LocalInterpolation() │ │ │ │ │ +Definition refinedp0localinterpolation.hh:98 │ │ │ │ │ localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00338.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualmortarbasis.hh File Reference │ │ │ │ +dune-localfunctions: refinedsimplexlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,25 +65,54 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualmortarbasis.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
refinedsimplexlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/localfunctions/dualmortarbasis/dualp1.hh>
│ │ │ │ -#include <dune/localfunctions/dualmortarbasis/dualq1.hh>
│ │ │ │ + │ │ │ │ +

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

│ │ │ │ +
#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/localfunctions/common/localbasis.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...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 
│ │ │ │ +

Detailed Description

│ │ │ │ +

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

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,14 +6,40 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -dualmortarbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * refined │ │ │ │ │ + * common │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +refinedsimplexlocalbasis.hh File Reference │ │ │ │ │ +Contains a base class for LocalBasis classes based on uniform refinement. │ │ │ │ │ +More... │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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... │ │ │ │ │ +  │ │ │ │ │ + Namespaces │ │ │ │ │ +namespace  Dune │ │ │ │ │ +  │ │ │ │ │ +***** Detailed Description ***** │ │ │ │ │ +Contains a base class for LocalBasis classes based on uniform refinement. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00338_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualmortarbasis.hh Source File │ │ │ │ +dune-localfunctions: refinedsimplexlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,34 +70,291 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualmortarbasis.hh
│ │ │ │ +
refinedsimplexlocalbasis.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
│ │ │ │ +
5#ifndef DUNE_REFINED_SIMPLEX_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_REFINED_SIMPLEX_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11#endif // #ifndef DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_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 };
│ │ │ │ +
│ │ │ │ +
27
│ │ │ │ +
35 template<class D>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 {
│ │ │ │ +
38 protected:
│ │ │ │ +
39
│ │ │ │ + │ │ │ │ +
42
│ │ │ │ +
│ │ │ │ +
53 static int getSubElement(const FieldVector<D,1>& global)
│ │ │ │ +
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)
│ │ │ │ +
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
│ │ │ │ +
164
│ │ │ │ +
165 };
│ │ │ │ +
│ │ │ │ +
166
│ │ │ │ +
177 template<class D>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
179 {
│ │ │ │ +
180 protected:
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,26 +7,306 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -dualmortarbasis.hh │ │ │ │ │ + * refined │ │ │ │ │ + * common │ │ │ │ │ +refinedsimplexlocalbasis.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 │ │ │ │ │ + 5#ifndef DUNE_REFINED_SIMPLEX_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_REFINED_SIMPLEX_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#endif // #ifndef DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_HH │ │ │ │ │ -dualp1.hh │ │ │ │ │ -dualq1.hh │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16namespace Dune │ │ │ │ │ + 17{ │ │ │ │ │ + 18 template │ │ │ │ │ +19 class RefinedSimplexLocalBasis │ │ │ │ │ + 20 { │ │ │ │ │ + 21 protected: │ │ │ │ │ +22 RefinedSimplexLocalBasis() │ │ │ │ │ + 23 { │ │ │ │ │ + 24 DUNE_THROW(Dune::NotImplemented,"RefinedSimplexLocalBasis not implemented │ │ │ │ │ +for dim > 3."); │ │ │ │ │ + 25 } │ │ │ │ │ + 26 }; │ │ │ │ │ + 27 │ │ │ │ │ + 35 template │ │ │ │ │ +36 class RefinedSimplexLocalBasis │ │ │ │ │ + 37 { │ │ │ │ │ + 38 protected: │ │ │ │ │ + 39 │ │ │ │ │ +41 RefinedSimplexLocalBasis() {} │ │ │ │ │ + 42 │ │ │ │ │ +53 static int getSubElement(const FieldVector& global) │ │ │ │ │ + 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& 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 │ │ │ │ │ +97 class RefinedSimplexLocalBasis │ │ │ │ │ + 98 { │ │ │ │ │ + 99 protected: │ │ │ │ │ + 100 │ │ │ │ │ +102 RefinedSimplexLocalBasis() {} │ │ │ │ │ + 103 │ │ │ │ │ +119 static int getSubElement(const FieldVector& global) │ │ │ │ │ + 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& global, │ │ │ │ │ + 138 int& subElement, │ │ │ │ │ + 139 FieldVector& 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 │ │ │ │ │ + 164 │ │ │ │ │ + 165 }; │ │ │ │ │ + 166 │ │ │ │ │ + 177 template │ │ │ │ │ +178 class RefinedSimplexLocalBasis │ │ │ │ │ + 179 { │ │ │ │ │ + 180 protected: │ │ │ │ │ + 181 │ │ │ │ │ +183 RefinedSimplexLocalBasis() {} │ │ │ │ │ + 184 │ │ │ │ │ +215 static int getSubElement(const FieldVector& 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& 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 │ │ │ │ │ +Dune │ │ │ │ │ +Definition bdfmcube.hh:18 │ │ │ │ │ +Dune::RefinedSimplexLocalBasis │ │ │ │ │ +Definition refinedsimplexlocalbasis.hh:20 │ │ │ │ │ +Dune::RefinedSimplexLocalBasis::RefinedSimplexLocalBasis │ │ │ │ │ +RefinedSimplexLocalBasis() │ │ │ │ │ +Definition refinedsimplexlocalbasis.hh:22 │ │ │ │ │ +Dune::RefinedSimplexLocalBasis<_D,_1_>::RefinedSimplexLocalBasis │ │ │ │ │ +RefinedSimplexLocalBasis() │ │ │ │ │ +Protected default constructor so this class can only be instantiated as a base │ │ │ │ │ +class. │ │ │ │ │ +Definition refinedsimplexlocalbasis.hh:41 │ │ │ │ │ +Dune::RefinedSimplexLocalBasis<_D,_1_>::getSubElement │ │ │ │ │ +static void getSubElement(const FieldVector< D, 1 > &global, int &subElement, │ │ │ │ │ +FieldVector< D, 1 > &local) │ │ │ │ │ +Get local coordinates in the subelement. │ │ │ │ │ +Definition refinedsimplexlocalbasis.hh:69 │ │ │ │ │ +Dune::RefinedSimplexLocalBasis<_D,_1_>::getSubElement │ │ │ │ │ +static int getSubElement(const FieldVector< D, 1 > &global) │ │ │ │ │ +Get the number of the subelement containing a given point. │ │ │ │ │ +Definition refinedsimplexlocalbasis.hh:53 │ │ │ │ │ +Dune::RefinedSimplexLocalBasis<_D,_2_>::RefinedSimplexLocalBasis │ │ │ │ │ +RefinedSimplexLocalBasis() │ │ │ │ │ +Protected default constructor so this class can only be instantiated as a base │ │ │ │ │ +class. │ │ │ │ │ +Definition refinedsimplexlocalbasis.hh:102 │ │ │ │ │ +Dune::RefinedSimplexLocalBasis<_D,_2_>::getSubElement │ │ │ │ │ +static int getSubElement(const FieldVector< D, 2 > &global) │ │ │ │ │ +Get the number of the subtriangle containing a given point. │ │ │ │ │ +Definition refinedsimplexlocalbasis.hh:119 │ │ │ │ │ +Dune::RefinedSimplexLocalBasis<_D,_2_>::getSubElement │ │ │ │ │ +static void getSubElement(const FieldVector< D, 2 > &global, int &subElement, │ │ │ │ │ +FieldVector< D, 2 > &local) │ │ │ │ │ +Get local coordinates in the subtriangle. │ │ │ │ │ +Definition refinedsimplexlocalbasis.hh:137 │ │ │ │ │ +Dune::RefinedSimplexLocalBasis<_D,_3_>::getSubElement │ │ │ │ │ +static void getSubElement(const FieldVector< D, 3 > &global, int &subElement, │ │ │ │ │ +FieldVector< D, 3 > &local) │ │ │ │ │ +Get local coordinates in the subsimplex. │ │ │ │ │ +Definition refinedsimplexlocalbasis.hh:243 │ │ │ │ │ +Dune::RefinedSimplexLocalBasis<_D,_3_>::RefinedSimplexLocalBasis │ │ │ │ │ +RefinedSimplexLocalBasis() │ │ │ │ │ +Protected default constructor so this class can only be instantiated as a base │ │ │ │ │ +class. │ │ │ │ │ +Definition refinedsimplexlocalbasis.hh:183 │ │ │ │ │ +Dune::RefinedSimplexLocalBasis<_D,_3_>::getSubElement │ │ │ │ │ +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 │ │ │ │ │ +localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00341.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2cube2d.hh File Reference │ │ │ │ +dune-localfunctions: refinedp1.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
brezzidouglasmarini2cube2d.hh File Reference
│ │ │ │ +
refinedp1.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::BDM2Cube2DLocalFiniteElement< D, R >
 Second order Brezzi-Douglas-Marini shape functions on quadrilaterals. More...
class  Dune::RefinedP1LocalFiniteElement< D, R, dim >
 Piecewise linear continuous Lagrange functions on a uniformly refined simplex element. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,29 +6,27 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ + * refined │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini2cube2d.hh File Reference │ │ │ │ │ +refinedp1.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "brezzidouglasmarini2cube2d/brezzidouglasmarini2cube2dlocalbasis.hh" │ │ │ │ │ -#include "brezzidouglasmarini2cube2d/ │ │ │ │ │ -brezzidouglasmarini2cube2dlocalcoefficients.hh" │ │ │ │ │ -#include "brezzidouglasmarini2cube2d/ │ │ │ │ │ -brezzidouglasmarini2cube2dlocalinterpolation.hh" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM2Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  Second order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ - More... │ │ │ │ │ +class  Dune::RefinedP1LocalFiniteElement<_D,_R,_dim_> │ │ │ │ │ +  Piecewise linear continuous Lagrange functions on a uniformly refined │ │ │ │ │ + simplex element. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00341_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2cube2d.hh Source File │ │ │ │ +dune-localfunctions: refinedp1.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,123 +70,120 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini2cube2d.hh
│ │ │ │ +
refinedp1.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_BREZZIDOUGLASMARINI2_QUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_QUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH
│ │ │ │
7
│ │ │ │
8#include <dune/geometry/type.hh>
│ │ │ │
9
│ │ │ │ -
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
25 template<class D, class R>
│ │ │ │ + │ │ │ │ + │ │ │ │ +
12
│ │ │ │ + │ │ │ │ + │ │ │ │ +
15
│ │ │ │ +
16namespace Dune
│ │ │ │ +
17{
│ │ │ │ +
18
│ │ │ │ +
25 template<class D, class R, int dim>
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
27 {
│ │ │ │ -
28
│ │ │ │ -
29 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
28 public:
│ │ │ │ + │ │ │ │ +
32 Impl::LagrangeSimplexLocalCoefficients<dim,2>,
│ │ │ │ +
33 Impl::LagrangeSimplexLocalInterpolation<Impl::LagrangeSimplexLocalBasis<D,R,dim,2> > > Traits;
│ │ │ │
34
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 {}
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
45 basis(s),
│ │ │ │ -
46 interpolation(s)
│ │ │ │ -
47 {}
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 {}
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ +
42 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
43 {
│ │ │ │ +
44 return basis_;
│ │ │ │ +
45 }
│ │ │ │
│ │ │ │ -
48
│ │ │ │ +
46
│ │ │ │
│ │ │ │ -
49 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ + │ │ │ │
50 {
│ │ │ │ -
51 return basis;
│ │ │ │ +
51 return coefficients_;
│ │ │ │
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 BDM2Cube2DLocalCoefficients coefficients;
│ │ │ │ - │ │ │ │ -
79 };
│ │ │ │ -
│ │ │ │ -
80}
│ │ │ │ -
81#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_QUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
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.
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Second order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2cube2d.hh:27
│ │ │ │ -
BDM2Cube2DLocalFiniteElement()
Standard constructor.
Definition brezzidouglasmarini2cube2d.hh:36
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition brezzidouglasmarini2cube2d.hh:65
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition brezzidouglasmarini2cube2d.hh:49
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition brezzidouglasmarini2cube2d.hh:59
│ │ │ │ -
static constexpr GeometryType type()
Definition brezzidouglasmarini2cube2d.hh:70
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition brezzidouglasmarini2cube2d.hh:54
│ │ │ │ -
BDM2Cube2DLocalFiniteElement(int s)
Make set number s, where 0 <= s < ??
Definition brezzidouglasmarini2cube2d.hh:44
│ │ │ │ -
LocalFiniteElementTraits< BDM2Cube2DLocalBasis< D, R >, BDM2Cube2DLocalCoefficients, BDM2Cube2DLocalInterpolation< BDM2Cube2DLocalBasis< D, R > > > Traits
Definition brezzidouglasmarini2cube2d.hh:33
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:30
│ │ │ │ -
Layout map for Brezzi-Douglas-Marini-2 elements on quadrilaterals.
Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:24
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:26
│ │ │ │
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,142 +7,142 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ -brezzidouglasmarini2cube2d.hh │ │ │ │ │ + * refined │ │ │ │ │ +refinedp1.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_BREZZIDOUGLASMARINI2_QUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_QUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "brezzidouglasmarini2cube2d/ │ │ │ │ │ -brezzidouglasmarini2cube2dlocalbasis.hh" │ │ │ │ │ - 12#include "brezzidouglasmarini2cube2d/ │ │ │ │ │ -brezzidouglasmarini2cube2dlocalcoefficients.hh" │ │ │ │ │ - 13#include "brezzidouglasmarini2cube2d/ │ │ │ │ │ -brezzidouglasmarini2cube2dlocalinterpolation.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 25 template │ │ │ │ │ -26 class BDM2Cube2DLocalFiniteElement │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16namespace Dune │ │ │ │ │ + 17{ │ │ │ │ │ + 18 │ │ │ │ │ + 25 template │ │ │ │ │ +26 class RefinedP1LocalFiniteElement │ │ │ │ │ 27 { │ │ │ │ │ - 28 │ │ │ │ │ - 29 public: │ │ │ │ │ - 30 typedef LocalFiniteElementTraits< │ │ │ │ │ - 31 BDM2Cube2DLocalBasis, │ │ │ │ │ - 32 BDM2Cube2DLocalCoefficients, │ │ │ │ │ -33 BDM2Cube2DLocalInterpolation > > Traits; │ │ │ │ │ + 28 public: │ │ │ │ │ + 31 typedef LocalFiniteElementTraits, │ │ │ │ │ + 32 Impl::LagrangeSimplexLocalCoefficients, │ │ │ │ │ +33 Impl::LagrangeSimplexLocalInterpolation > > Traits; │ │ │ │ │ 34 │ │ │ │ │ -36 BDM2Cube2DLocalFiniteElement () │ │ │ │ │ - 37 {} │ │ │ │ │ - 38 │ │ │ │ │ -44 BDM2Cube2DLocalFiniteElement (int s) : │ │ │ │ │ - 45 basis(s), │ │ │ │ │ - 46 interpolation(s) │ │ │ │ │ - 47 {} │ │ │ │ │ - 48 │ │ │ │ │ -49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ +37 RefinedP1LocalFiniteElement () │ │ │ │ │ + 38 {} │ │ │ │ │ + 39 │ │ │ │ │ +42 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 43 { │ │ │ │ │ + 44 return basis_; │ │ │ │ │ + 45 } │ │ │ │ │ + 46 │ │ │ │ │ +49 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ 50 { │ │ │ │ │ - 51 return basis; │ │ │ │ │ + 51 return coefficients_; │ │ │ │ │ 52 } │ │ │ │ │ 53 │ │ │ │ │ -54 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 55 { │ │ │ │ │ - 56 return coefficients; │ │ │ │ │ - 57 } │ │ │ │ │ - 58 │ │ │ │ │ -59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 76 BDM2Cube2DLocalBasis basis; │ │ │ │ │ - 77 BDM2Cube2DLocalCoefficients coefficients; │ │ │ │ │ - 78 BDM2Cube2DLocalInterpolation > interpolation; │ │ │ │ │ - 79 }; │ │ │ │ │ - 80} │ │ │ │ │ - 81#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_QUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ -brezzidouglasmarini2cube2dlocalcoefficients.hh │ │ │ │ │ -brezzidouglasmarini2cube2dlocalbasis.hh │ │ │ │ │ -brezzidouglasmarini2cube2dlocalinterpolation.hh │ │ │ │ │ +56 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 75 RefinedP1LocalBasis 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 │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ +refinedp1localbasis.hh │ │ │ │ │ +Linear Lagrange shape functions on a uniformly refined reference element. │ │ │ │ │ +p0.hh │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM2Cube2DLocalFiniteElement │ │ │ │ │ -Second order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini2cube2d.hh:27 │ │ │ │ │ -Dune::BDM2Cube2DLocalFiniteElement::BDM2Cube2DLocalFiniteElement │ │ │ │ │ -BDM2Cube2DLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini2cube2d.hh:36 │ │ │ │ │ -Dune::BDM2Cube2DLocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition brezzidouglasmarini2cube2d.hh:65 │ │ │ │ │ -Dune::BDM2Cube2DLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition brezzidouglasmarini2cube2d.hh:49 │ │ │ │ │ -Dune::BDM2Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition brezzidouglasmarini2cube2d.hh:59 │ │ │ │ │ -Dune::BDM2Cube2DLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition brezzidouglasmarini2cube2d.hh:70 │ │ │ │ │ -Dune::BDM2Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition brezzidouglasmarini2cube2d.hh:54 │ │ │ │ │ -Dune::BDM2Cube2DLocalFiniteElement::BDM2Cube2DLocalFiniteElement │ │ │ │ │ -BDM2Cube2DLocalFiniteElement(int s) │ │ │ │ │ -Make set number s, where 0 <= s < ?? │ │ │ │ │ -Definition brezzidouglasmarini2cube2d.hh:44 │ │ │ │ │ -Dune::BDM2Cube2DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< BDM2Cube2DLocalBasis< D, R >, │ │ │ │ │ -BDM2Cube2DLocalCoefficients, BDM2Cube2DLocalInterpolation< │ │ │ │ │ -BDM2Cube2DLocalBasis< D, R > > > Traits │ │ │ │ │ -Definition brezzidouglasmarini2cube2d.hh:33 │ │ │ │ │ -Dune::BDM2Cube2DLocalBasis │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalbasis.hh:30 │ │ │ │ │ -Dune::BDM2Cube2DLocalCoefficients │ │ │ │ │ -Layout map for Brezzi-Douglas-Marini-2 elements on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::BDM2Cube2DLocalInterpolation │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:26 │ │ │ │ │ Dune::LocalFiniteElementTraits │ │ │ │ │ traits helper struct │ │ │ │ │ Definition localfiniteelementtraits.hh:13 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ LB LocalBasisType │ │ │ │ │ Definition localfiniteelementtraits.hh:16 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ LC LocalCoefficientsType │ │ │ │ │ Definition localfiniteelementtraits.hh:20 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ LI LocalInterpolationType │ │ │ │ │ Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::RefinedP1LocalFiniteElement │ │ │ │ │ +Piecewise linear continuous Lagrange functions on a uniformly refined simplex │ │ │ │ │ +element. │ │ │ │ │ +Definition refinedp1.hh:27 │ │ │ │ │ +Dune::RefinedP1LocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +The element type that this finite element is defined on. │ │ │ │ │ +Definition refinedp1.hh:69 │ │ │ │ │ +Dune::RefinedP1LocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions of this finite element. │ │ │ │ │ +Definition refinedp1.hh:62 │ │ │ │ │ +Dune::RefinedP1LocalFiniteElement::RefinedP1LocalFiniteElement │ │ │ │ │ +RefinedP1LocalFiniteElement() │ │ │ │ │ +Default constructor. │ │ │ │ │ +Definition refinedp1.hh:37 │ │ │ │ │ +Dune::RefinedP1LocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Evaluates all degrees of freedom for a given function. │ │ │ │ │ +Definition refinedp1.hh:56 │ │ │ │ │ +Dune::RefinedP1LocalFiniteElement::Traits │ │ │ │ │ +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 │ │ │ │ │ +Dune::RefinedP1LocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Produces the assignments of the degrees of freedom to the element subentities. │ │ │ │ │ +Definition refinedp1.hh:49 │ │ │ │ │ +Dune::RefinedP1LocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +The set of shape functions. │ │ │ │ │ +Definition refinedp1.hh:42 │ │ │ │ │ +Dune::RefinedP1LocalBasis │ │ │ │ │ +Definition refinedp1localbasis.hh:23 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00344.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube2d.hh File Reference │ │ │ │ +dune-localfunctions: refinedp1localbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,54 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
brezzidouglasmarini1cube2d.hh File Reference
│ │ │ │ +
refinedp1localbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include "../common/localfiniteelementtraits.hh"
│ │ │ │ -#include "brezzidouglasmarini1cube2d/brezzidouglasmarini1cube2dlocalbasis.hh"
│ │ │ │ -#include "brezzidouglasmarini1cube2d/brezzidouglasmarini1cube2dlocalcoefficients.hh"
│ │ │ │ -#include "brezzidouglasmarini1cube2d/brezzidouglasmarini1cube2dlocalinterpolation.hh"
│ │ │ │ + │ │ │ │ +

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::BDM1Cube2DLocalFiniteElement< D, R >
 First order Brezzi-Douglas-Marini shape functions on quadrilaterals. More...
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
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Linear Lagrange shape functions on a uniformly refined reference element.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,29 +6,39 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ + * refined │ │ │ │ │ + * refinedp1 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini1cube2d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "brezzidouglasmarini1cube2d/brezzidouglasmarini1cube2dlocalbasis.hh" │ │ │ │ │ -#include "brezzidouglasmarini1cube2d/ │ │ │ │ │ -brezzidouglasmarini1cube2dlocalcoefficients.hh" │ │ │ │ │ -#include "brezzidouglasmarini1cube2d/ │ │ │ │ │ -brezzidouglasmarini1cube2dlocalinterpolation.hh" │ │ │ │ │ +refinedp1localbasis.hh File Reference │ │ │ │ │ +Linear Lagrange shape functions on a uniformly refined reference element. │ │ │ │ │ +More... │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM1Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ +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 │ │ │ │ │   │ │ │ │ │ +***** Detailed Description ***** │ │ │ │ │ +Linear Lagrange shape functions on a uniformly refined reference element. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00344_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube2d.hh Source File │ │ │ │ +dune-localfunctions: refinedp1localbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,123 +70,831 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini1cube2d.hh
│ │ │ │ +
refinedp1localbasis.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_BREZZIDOUGLASMARINI1_QUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_REFINED_P1_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_REFINED_P1_LOCALBASIS_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 {}
│ │ │ │ -
│ │ │ │ -
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 BDM1Cube2DLocalCoefficients coefficients;
│ │ │ │ - │ │ │ │ -
79 };
│ │ │ │ -
│ │ │ │ -
80}
│ │ │ │ -
81#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
12#include <numeric>
│ │ │ │ +
13
│ │ │ │ +
14#include <dune/common/fmatrix.hh>
│ │ │ │ +
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.
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini1cube2d.hh:27
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition brezzidouglasmarini1cube2d.hh:49
│ │ │ │ -
LocalFiniteElementTraits< BDM1Cube2DLocalBasis< D, R >, BDM1Cube2DLocalCoefficients, BDM1Cube2DLocalInterpolation< BDM1Cube2DLocalBasis< D, R > > > Traits
Definition brezzidouglasmarini1cube2d.hh:33
│ │ │ │ -
static constexpr GeometryType type()
Definition brezzidouglasmarini1cube2d.hh:70
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition brezzidouglasmarini1cube2d.hh:54
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition brezzidouglasmarini1cube2d.hh:65
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition brezzidouglasmarini1cube2d.hh:59
│ │ │ │ -
BDM1Cube2DLocalFiniteElement()
Standard constructor.
Definition brezzidouglasmarini1cube2d.hh:36
│ │ │ │ -
BDM1Cube2DLocalFiniteElement(int s)
Make set number s, where 0 <= s < 16.
Definition brezzidouglasmarini1cube2d.hh:44
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:30
│ │ │ │ -
Layout map for Brezzi-Douglas-Marini-1 elements on quadrilaterals.
Definition brezzidouglasmarini1cube2dlocalcoefficients.hh:24
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral.
Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:26
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,144 +7,871 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ -brezzidouglasmarini1cube2d.hh │ │ │ │ │ + * refined │ │ │ │ │ + * refinedp1 │ │ │ │ │ +refinedp1localbasis.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_BREZZIDOUGLASMARINI1_QUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_REFINED_P1_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_REFINED_P1_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "brezzidouglasmarini1cube2d/ │ │ │ │ │ -brezzidouglasmarini1cube2dlocalbasis.hh" │ │ │ │ │ - 12#include "brezzidouglasmarini1cube2d/ │ │ │ │ │ -brezzidouglasmarini1cube2dlocalcoefficients.hh" │ │ │ │ │ - 13#include "brezzidouglasmarini1cube2d/ │ │ │ │ │ -brezzidouglasmarini1cube2dlocalinterpolation.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 25 template │ │ │ │ │ -26 class BDM1Cube2DLocalFiniteElement │ │ │ │ │ - 27 { │ │ │ │ │ - 28 │ │ │ │ │ - 29 public: │ │ │ │ │ - 30 typedef LocalFiniteElementTraits< │ │ │ │ │ - 31 BDM1Cube2DLocalBasis, │ │ │ │ │ - 32 BDM1Cube2DLocalCoefficients, │ │ │ │ │ -33 BDM1Cube2DLocalInterpolation > > Traits; │ │ │ │ │ - 34 │ │ │ │ │ -36 BDM1Cube2DLocalFiniteElement () │ │ │ │ │ - 37 {} │ │ │ │ │ - 38 │ │ │ │ │ -44 BDM1Cube2DLocalFiniteElement (int s) : │ │ │ │ │ - 45 basis(s), │ │ │ │ │ - 46 interpolation(s) │ │ │ │ │ - 47 {} │ │ │ │ │ - 48 │ │ │ │ │ -49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 50 { │ │ │ │ │ - 51 return basis; │ │ │ │ │ - 52 } │ │ │ │ │ - 53 │ │ │ │ │ -54 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16#include │ │ │ │ │ + 17 │ │ │ │ │ + 18namespace Dune │ │ │ │ │ + 19{ │ │ │ │ │ + 20 template │ │ │ │ │ +21 class RefinedP1LocalBasis │ │ │ │ │ + 22 : public RefinedSimplexLocalBasis │ │ │ │ │ + 23 { │ │ │ │ │ + 24 public: │ │ │ │ │ +25 RefinedP1LocalBasis() │ │ │ │ │ + 26 { │ │ │ │ │ + 27 DUNE_THROW(Dune::NotImplemented,"RefinedP1LocalBasis not implemented for │ │ │ │ │ +dim > 3."); │ │ │ │ │ + 28 } │ │ │ │ │ + 29 }; │ │ │ │ │ + 30 │ │ │ │ │ + 52 template │ │ │ │ │ +53 class RefinedP1LocalBasis │ │ │ │ │ + 54 : public RefinedSimplexLocalBasis │ │ │ │ │ 55 { │ │ │ │ │ - 56 return coefficients; │ │ │ │ │ - 57 } │ │ │ │ │ - 58 │ │ │ │ │ -59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 76 BDM1Cube2DLocalBasis basis; │ │ │ │ │ - 77 BDM1Cube2DLocalCoefficients coefficients; │ │ │ │ │ - 78 BDM1Cube2DLocalInterpolation > interpolation; │ │ │ │ │ - 79 }; │ │ │ │ │ - 80} │ │ │ │ │ - 81#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ -brezzidouglasmarini1cube2dlocalcoefficients.hh │ │ │ │ │ -brezzidouglasmarini1cube2dlocalbasis.hh │ │ │ │ │ -brezzidouglasmarini1cube2dlocalinterpolation.hh │ │ │ │ │ + 56 public: │ │ │ │ │ + 58 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +59 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ + 127 const typename Traits::DomainType& 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 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 │ │ │ │ │ +194 class RefinedP1LocalBasis │ │ │ │ │ + 195 : public RefinedSimplexLocalBasis │ │ │ │ │ + 196 { │ │ │ │ │ + 197 public: │ │ │ │ │ + 199 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +200 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ + 314 const typename Traits::DomainType& 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 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 │ │ │ │ │ +423 class RefinedP1LocalBasis │ │ │ │ │ + 424 : public RefinedSimplexLocalBasis │ │ │ │ │ + 425 { │ │ │ │ │ + 426 public: │ │ │ │ │ + 428 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +429 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ + 691 const typename Traits::DomainType& 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 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 │ │ │ │ │ +refinedsimplexlocalbasis.hh │ │ │ │ │ +Contains a base class for LocalBasis classes based on uniform refinement. │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Cube2DLocalFiniteElement │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini1cube2d.hh:27 │ │ │ │ │ -Dune::BDM1Cube2DLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition brezzidouglasmarini1cube2d.hh:49 │ │ │ │ │ -Dune::BDM1Cube2DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< BDM1Cube2DLocalBasis< D, R >, │ │ │ │ │ -BDM1Cube2DLocalCoefficients, BDM1Cube2DLocalInterpolation< │ │ │ │ │ -BDM1Cube2DLocalBasis< D, R > > > Traits │ │ │ │ │ -Definition brezzidouglasmarini1cube2d.hh:33 │ │ │ │ │ -Dune::BDM1Cube2DLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition brezzidouglasmarini1cube2d.hh:70 │ │ │ │ │ -Dune::BDM1Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition brezzidouglasmarini1cube2d.hh:54 │ │ │ │ │ -Dune::BDM1Cube2DLocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition brezzidouglasmarini1cube2d.hh:65 │ │ │ │ │ -Dune::BDM1Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition brezzidouglasmarini1cube2d.hh:59 │ │ │ │ │ -Dune::BDM1Cube2DLocalFiniteElement::BDM1Cube2DLocalFiniteElement │ │ │ │ │ -BDM1Cube2DLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini1cube2d.hh:36 │ │ │ │ │ -Dune::BDM1Cube2DLocalFiniteElement::BDM1Cube2DLocalFiniteElement │ │ │ │ │ -BDM1Cube2DLocalFiniteElement(int s) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition brezzidouglasmarini1cube2d.hh:44 │ │ │ │ │ -Dune::BDM1Cube2DLocalBasis │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ -quadrilateral. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalbasis.hh:30 │ │ │ │ │ -Dune::BDM1Cube2DLocalCoefficients │ │ │ │ │ -Layout map for Brezzi-Douglas-Marini-1 elements on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::BDM1Cube2DLocalInterpolation │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ -quadrilateral. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:26 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::RefinedSimplexLocalBasis │ │ │ │ │ +Definition refinedsimplexlocalbasis.hh:20 │ │ │ │ │ +Dune::RefinedP1LocalBasis │ │ │ │ │ +Definition refinedp1localbasis.hh:23 │ │ │ │ │ +Dune::RefinedP1LocalBasis::RefinedP1LocalBasis │ │ │ │ │ +RefinedP1LocalBasis() │ │ │ │ │ +Definition refinedp1localbasis.hh:25 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_1_>::Traits │ │ │ │ │ +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 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_1_>::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition refinedp1localbasis.hh:98 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_1_>::order │ │ │ │ │ +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 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_1_>::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition refinedp1localbasis.hh:68 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_1_>::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_1_>::size │ │ │ │ │ +static constexpr unsigned int size() │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition refinedp1localbasis.hh:62 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_2_>::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition refinedp1localbasis.hh:262 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_2_>::Traits │ │ │ │ │ +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 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_2_>::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition refinedp1localbasis.hh:209 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_2_>::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_2_>::order │ │ │ │ │ +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 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_2_>::size │ │ │ │ │ +static constexpr unsigned int size() │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition refinedp1localbasis.hh:203 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_3_>::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_3_>::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition refinedp1localbasis.hh:438 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_3_>::Traits │ │ │ │ │ +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 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_3_>::size │ │ │ │ │ +static constexpr unsigned int size() │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition refinedp1localbasis.hh:432 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_3_>::order │ │ │ │ │ +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 │ │ │ │ │ +Dune::RefinedP1LocalBasis<_D,_R,_3_>::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition refinedp1localbasis.hh:565 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00347.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarinicube.hh File Reference │ │ │ │ +dune-localfunctions: refinedp0.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,47 +65,58 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
brezzidouglasmarinicube.hh File Reference
│ │ │ │ +
refinedp0.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2d.hh>
│ │ │ │ -#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3d.hh>
│ │ │ │ -#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2d.hh>
│ │ │ │ + │ │ │ │ +

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"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::BrezziDouglasMariniCubeLocalFiniteElement< D, R, 2, 1 >
 Brezzi-Douglas-Marini local finite elements for cubes with dimension 2 and order 1. More...
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::BrezziDouglasMariniCubeLocalFiniteElement< D, R, 2, 2 >
 Brezzi-Douglas-Marini local finite elements for cubes with dimension 2 and order 2. More...
class  Dune::RefinedP0LocalFiniteElement< D, R, 2 >
 Local finite element that is piecewise P0 on a once uniformly refined reference geometry. More...
 
class  Dune::BrezziDouglasMariniCubeLocalFiniteElement< D, R, 3, 1 >
 Brezzi-Douglas-Marini local finite elements for cubes with dimension 3 and order 1. More...
class  Dune::RefinedP0LocalFiniteElement< D, R, 3 >
 Local finite element that is piecewise P0 on a once uniformly refined reference geometry. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

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

Detailed Description

│ │ │ │ +

Piecewise P0 finite element.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,36 +6,43 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ + * refined │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -brezzidouglasmarinicube.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +refinedp0.hh File Reference │ │ │ │ │ +Piecewise P0 finite element. More... │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "refinedp0/refinedp0localbasis.hh" │ │ │ │ │ +#include "refinedp0/refinedp0localcoefficients.hh" │ │ │ │ │ +#include "refinedp0/refinedp0localinterpolation.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_2,_1_> │ │ │ │ │ -  Brezzi-Douglas-Marini local finite elements for cubes with dimension 2 │ │ │ │ │ - and order 1. More... │ │ │ │ │ +class  Dune::RefinedP0LocalFiniteElement<_D,_R,_dim_> │ │ │ │ │ +  Local finite element that is piecewise P0 on a once uniformly refined │ │ │ │ │ + reference geometry. More... │ │ │ │ │   │ │ │ │ │ -class  Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_2,_2_> │ │ │ │ │ -  Brezzi-Douglas-Marini local finite elements for cubes with dimension 2 │ │ │ │ │ - and order 2. More... │ │ │ │ │ +class  Dune::RefinedP0LocalFiniteElement<_D,_R,_1_> │ │ │ │ │ +  Local finite element that is piecewise P0 on a once uniformly refined │ │ │ │ │ + reference geometry. More... │ │ │ │ │   │ │ │ │ │ -class  Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_3,_1_> │ │ │ │ │ -  Brezzi-Douglas-Marini local finite elements for cubes with dimension 3 │ │ │ │ │ - and order 1. 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... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ +***** Detailed Description ***** │ │ │ │ │ +Piecewise P0 finite element. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00347_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarinicube.hh Source File │ │ │ │ +dune-localfunctions: refinedp0.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,112 +70,264 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarinicube.hh
│ │ │ │ +
refinedp0.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_BREZZIDOUGLASMARINICUBE_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINICUBE_HH
│ │ │ │ +
5#ifndef DUNE_REFINED_P0_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_REFINED_P0_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
11
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
23 template<class D, class R, unsigned int dim, unsigned int order>
│ │ │ │ - │ │ │ │ -
25
│ │ │ │ -
29 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
31 : public BDM1Cube2DLocalFiniteElement<D, R>
│ │ │ │ -
32 {
│ │ │ │ -
33 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
36 {}
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
45 {}
│ │ │ │ -
│ │ │ │ -
46 };
│ │ │ │ -
│ │ │ │ -
47
│ │ │ │ -
51 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
53 : public BDM2Cube2DLocalFiniteElement<D, R>
│ │ │ │ -
54 {
│ │ │ │ -
55 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
58 {}
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
67 {}
│ │ │ │ -
│ │ │ │ -
68 };
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
73 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
75 : public BDM1Cube3DLocalFiniteElement<D, R>
│ │ │ │ -
76 {
│ │ │ │ -
77 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
80 {}
│ │ │ │ -
│ │ │ │ -
81
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
89 {}
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
│ │ │ │ +
83 static constexpr GeometryType type ()
│ │ │ │ +
84 {
│ │ │ │ +
85 return GeometryTypes::line;
│ │ │ │ +
86 }
│ │ │ │ +
│ │ │ │ +
87
│ │ │ │ +
88 private:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
92 };
│ │ │ │
│ │ │ │ -
90 };
│ │ │ │ -
│ │ │ │ -
91
│ │ │ │ -
92} // namespace Dune
│ │ │ │
93
│ │ │ │ -
94#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINICUBE_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini1cube2d.hh:27
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on hexahedron.
Definition brezzidouglasmarini1cube3d.hh:27
│ │ │ │ -
Second order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2cube2d.hh:27
│ │ │ │ -
Brezzi-Douglas-Marini local finite element for cubes.
Definition brezzidouglasmarinicube.hh:24
│ │ │ │ -
BrezziDouglasMariniCubeLocalFiniteElement(int s)
Constructor with a set of edge orientations.
Definition brezzidouglasmarinicube.hh:43
│ │ │ │ -
BrezziDouglasMariniCubeLocalFiniteElement()
Default constructor.
Definition brezzidouglasmarinicube.hh:35
│ │ │ │ -
BrezziDouglasMariniCubeLocalFiniteElement()
Default constructor.
Definition brezzidouglasmarinicube.hh:57
│ │ │ │ -
BrezziDouglasMariniCubeLocalFiniteElement(int s)
Constructor with a set of edge orientations.
Definition brezzidouglasmarinicube.hh:65
│ │ │ │ -
BrezziDouglasMariniCubeLocalFiniteElement()
Default constructor.
Definition brezzidouglasmarinicube.hh:79
│ │ │ │ -
BrezziDouglasMariniCubeLocalFiniteElement(int s)
Constructor with a set of edge orientations.
Definition brezzidouglasmarinicube.hh:87
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,124 +7,283 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ -brezzidouglasmarinicube.hh │ │ │ │ │ + * refined │ │ │ │ │ +refinedp0.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_BREZZIDOUGLASMARINICUBE_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINICUBE_HH │ │ │ │ │ + 5#ifndef DUNE_REFINED_P0_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_REFINED_P0_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 23 template │ │ │ │ │ -24 class BrezziDouglasMariniCubeLocalFiniteElement; │ │ │ │ │ - 25 │ │ │ │ │ - 29 template │ │ │ │ │ -30 class BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ - 31 : public BDM1Cube2DLocalFiniteElement │ │ │ │ │ - 32 { │ │ │ │ │ - 33 public: │ │ │ │ │ -35 BrezziDouglasMariniCubeLocalFiniteElement() │ │ │ │ │ - 36 {} │ │ │ │ │ - 37 │ │ │ │ │ -43 BrezziDouglasMariniCubeLocalFiniteElement(int s) │ │ │ │ │ - 44 : BDM1Cube2DLocalFiniteElement::BDM1Cube2DLocalFiniteElement(s) │ │ │ │ │ - 45 {} │ │ │ │ │ - 46 }; │ │ │ │ │ - 47 │ │ │ │ │ - 51 template │ │ │ │ │ -52 class BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ - 53 : public BDM2Cube2DLocalFiniteElement │ │ │ │ │ - 54 { │ │ │ │ │ - 55 public: │ │ │ │ │ -57 BrezziDouglasMariniCubeLocalFiniteElement() │ │ │ │ │ - 58 {} │ │ │ │ │ - 59 │ │ │ │ │ -65 BrezziDouglasMariniCubeLocalFiniteElement(int s) │ │ │ │ │ - 66 : BDM2Cube2DLocalFiniteElement::BDM2Cube2DLocalFiniteElement(s) │ │ │ │ │ - 67 {} │ │ │ │ │ - 68 }; │ │ │ │ │ - 69 │ │ │ │ │ - 73 template │ │ │ │ │ -74 class BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ - 75 : public BDM1Cube3DLocalFiniteElement │ │ │ │ │ - 76 { │ │ │ │ │ - 77 public: │ │ │ │ │ -79 BrezziDouglasMariniCubeLocalFiniteElement() │ │ │ │ │ - 80 {} │ │ │ │ │ - 81 │ │ │ │ │ -87 BrezziDouglasMariniCubeLocalFiniteElement(int s) │ │ │ │ │ - 88 : BDM1Cube3DLocalFiniteElement::BDM1Cube3DLocalFiniteElement(s) │ │ │ │ │ - 89 {} │ │ │ │ │ - 90 }; │ │ │ │ │ - 91 │ │ │ │ │ - 92} // namespace Dune │ │ │ │ │ + 13#include "refinedp0/refinedp0localbasis.hh" │ │ │ │ │ + 14#include "refinedp0/refinedp0localcoefficients.hh" │ │ │ │ │ + 15#include "refinedp0/refinedp0localinterpolation.hh" │ │ │ │ │ + 16 │ │ │ │ │ + 20namespace Dune │ │ │ │ │ + 21{ │ │ │ │ │ + 22 │ │ │ │ │ + 25 template │ │ │ │ │ +26 class RefinedP0LocalFiniteElement │ │ │ │ │ + 27 { │ │ │ │ │ + 28 RefinedP0LocalFiniteElement() {} │ │ │ │ │ + 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. │ │ │ │ │ +33 typedef typename P0LocalFiniteElement::Traits Traits; │ │ │ │ │ + 34 }; │ │ │ │ │ + 35 │ │ │ │ │ + 38 template │ │ │ │ │ +39 class RefinedP0LocalFiniteElement │ │ │ │ │ + 40 { │ │ │ │ │ + 41 public: │ │ │ │ │ + 44 typedef LocalFiniteElementTraits< │ │ │ │ │ + 45 RefinedP0LocalBasis, │ │ │ │ │ + 46 RefinedP0LocalCoefficients<1>, │ │ │ │ │ +47 RefinedP0LocalInterpolation > > Traits; │ │ │ │ │ + 48 │ │ │ │ │ +51 RefinedP0LocalFiniteElement () │ │ │ │ │ + 52 {} │ │ │ │ │ + 53 │ │ │ │ │ +56 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 57 { │ │ │ │ │ + 58 return basis_; │ │ │ │ │ + 59 } │ │ │ │ │ + 60 │ │ │ │ │ +63 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 64 { │ │ │ │ │ + 65 return coefficients_; │ │ │ │ │ + 66 } │ │ │ │ │ + 67 │ │ │ │ │ +70 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 71 { │ │ │ │ │ + 72 return interpolation_; │ │ │ │ │ + 73 } │ │ │ │ │ + 74 │ │ │ │ │ +76 unsigned int size () const │ │ │ │ │ + 77 { │ │ │ │ │ + 78 return basis_.size(); │ │ │ │ │ + 79 } │ │ │ │ │ + 80 │ │ │ │ │ +83 static constexpr GeometryType type () │ │ │ │ │ + 84 { │ │ │ │ │ + 85 return GeometryTypes::line; │ │ │ │ │ + 86 } │ │ │ │ │ + 87 │ │ │ │ │ + 88 private: │ │ │ │ │ + 89 RefinedP0LocalBasis basis_; │ │ │ │ │ + 90 RefinedP0LocalCoefficients<1> coefficients_; │ │ │ │ │ + 91 RefinedP0LocalInterpolation > interpolation_; │ │ │ │ │ + 92 }; │ │ │ │ │ 93 │ │ │ │ │ - 94#endif // #ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINICUBE_HH │ │ │ │ │ -brezzidouglasmarini2cube2d.hh │ │ │ │ │ -brezzidouglasmarini1cube2d.hh │ │ │ │ │ -brezzidouglasmarini1cube3d.hh │ │ │ │ │ + 96 template │ │ │ │ │ +97 class RefinedP0LocalFiniteElement │ │ │ │ │ + 98 { │ │ │ │ │ + 99 public: │ │ │ │ │ + 102 typedef LocalFiniteElementTraits< │ │ │ │ │ + 103 RefinedP0LocalBasis, │ │ │ │ │ + 104 RefinedP0LocalCoefficients<2>, │ │ │ │ │ +105 RefinedP0LocalInterpolation > > Traits; │ │ │ │ │ + 106 │ │ │ │ │ +109 RefinedP0LocalFiniteElement () │ │ │ │ │ + 110 {} │ │ │ │ │ + 111 │ │ │ │ │ +114 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 115 { │ │ │ │ │ + 116 return basis_; │ │ │ │ │ + 117 } │ │ │ │ │ + 118 │ │ │ │ │ +121 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 122 { │ │ │ │ │ + 123 return coefficients_; │ │ │ │ │ + 124 } │ │ │ │ │ + 125 │ │ │ │ │ +128 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 147 RefinedP0LocalBasis basis_; │ │ │ │ │ + 148 RefinedP0LocalCoefficients<2> coefficients_; │ │ │ │ │ + 149 RefinedP0LocalInterpolation > interpolation_; │ │ │ │ │ + 150 }; │ │ │ │ │ + 151 │ │ │ │ │ + 154 template │ │ │ │ │ +155 class RefinedP0LocalFiniteElement │ │ │ │ │ + 156 { │ │ │ │ │ + 157 public: │ │ │ │ │ + 160 typedef LocalFiniteElementTraits< │ │ │ │ │ + 161 RefinedP0LocalBasis, │ │ │ │ │ + 162 RefinedP0LocalCoefficients<3>, │ │ │ │ │ +163 RefinedP0LocalInterpolation > > Traits; │ │ │ │ │ + 164 │ │ │ │ │ +167 RefinedP0LocalFiniteElement () │ │ │ │ │ + 168 {} │ │ │ │ │ + 169 │ │ │ │ │ +172 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 173 { │ │ │ │ │ + 174 return basis_; │ │ │ │ │ + 175 } │ │ │ │ │ + 176 │ │ │ │ │ +179 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 180 { │ │ │ │ │ + 181 return coefficients_; │ │ │ │ │ + 182 } │ │ │ │ │ + 183 │ │ │ │ │ +186 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 205 RefinedP0LocalBasis basis_; │ │ │ │ │ + 206 RefinedP0LocalCoefficients<3> coefficients_; │ │ │ │ │ + 207 RefinedP0LocalInterpolation > interpolation_; │ │ │ │ │ + 208 }; │ │ │ │ │ + 209 │ │ │ │ │ + 210 │ │ │ │ │ + 211} │ │ │ │ │ + 212 │ │ │ │ │ + 213#endif │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ +refinedp0localcoefficients.hh │ │ │ │ │ +refinedp0localbasis.hh │ │ │ │ │ +refinedp0localinterpolation.hh │ │ │ │ │ +p0.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Cube2DLocalFiniteElement │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini1cube2d.hh:27 │ │ │ │ │ -Dune::BDM1Cube3DLocalFiniteElement │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on hexahedron. │ │ │ │ │ -Definition brezzidouglasmarini1cube3d.hh:27 │ │ │ │ │ -Dune::BDM2Cube2DLocalFiniteElement │ │ │ │ │ -Second order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini2cube2d.hh:27 │ │ │ │ │ -Dune::BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ -Brezzi-Douglas-Marini local finite element for cubes. │ │ │ │ │ -Definition brezzidouglasmarinicube.hh:24 │ │ │ │ │ -Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_2,_1_>:: │ │ │ │ │ -BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ -BrezziDouglasMariniCubeLocalFiniteElement(int s) │ │ │ │ │ -Constructor with a set of edge orientations. │ │ │ │ │ -Definition brezzidouglasmarinicube.hh:43 │ │ │ │ │ -Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_2,_1_>:: │ │ │ │ │ -BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ -BrezziDouglasMariniCubeLocalFiniteElement() │ │ │ │ │ -Default constructor. │ │ │ │ │ -Definition brezzidouglasmarinicube.hh:35 │ │ │ │ │ -Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_2,_2_>:: │ │ │ │ │ -BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ -BrezziDouglasMariniCubeLocalFiniteElement() │ │ │ │ │ -Default constructor. │ │ │ │ │ -Definition brezzidouglasmarinicube.hh:57 │ │ │ │ │ -Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_2,_2_>:: │ │ │ │ │ -BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ -BrezziDouglasMariniCubeLocalFiniteElement(int s) │ │ │ │ │ -Constructor with a set of edge orientations. │ │ │ │ │ -Definition brezzidouglasmarinicube.hh:65 │ │ │ │ │ -Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_3,_1_>:: │ │ │ │ │ -BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ -BrezziDouglasMariniCubeLocalFiniteElement() │ │ │ │ │ -Default constructor. │ │ │ │ │ -Definition brezzidouglasmarinicube.hh:79 │ │ │ │ │ -Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_3,_1_>:: │ │ │ │ │ -BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ -BrezziDouglasMariniCubeLocalFiniteElement(int s) │ │ │ │ │ -Constructor with a set of edge orientations. │ │ │ │ │ -Definition brezzidouglasmarinicube.hh:87 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement │ │ │ │ │ +Local finite element that is piecewise P0 on a once uniformly refined reference │ │ │ │ │ +geometry. │ │ │ │ │ +Definition refinedp0.hh:27 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement::Traits │ │ │ │ │ +P0LocalFiniteElement< D, R, dim >::Traits Traits │ │ │ │ │ +Definition refinedp0.hh:33 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition refinedp0.hh:56 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition refinedp0.hh:83 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::RefinedP0LocalFiniteElement │ │ │ │ │ +RefinedP0LocalFiniteElement() │ │ │ │ │ +Definition refinedp0.hh:51 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition refinedp0.hh:70 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition refinedp0.hh:63 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::Traits │ │ │ │ │ +LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 1 >, │ │ │ │ │ +RefinedP0LocalCoefficients< 1 >, RefinedP0LocalInterpolation< │ │ │ │ │ +RefinedP0LocalBasis< D, R, 1 > > > Traits │ │ │ │ │ +Definition refinedp0.hh:47 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition refinedp0.hh:76 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition refinedp0.hh:134 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::RefinedP0LocalFiniteElement │ │ │ │ │ +RefinedP0LocalFiniteElement() │ │ │ │ │ +Definition refinedp0.hh:109 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition refinedp0.hh:141 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::Traits │ │ │ │ │ +LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 2 >, │ │ │ │ │ +RefinedP0LocalCoefficients< 2 >, RefinedP0LocalInterpolation< │ │ │ │ │ +RefinedP0LocalBasis< D, R, 2 > > > Traits │ │ │ │ │ +Definition refinedp0.hh:105 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition refinedp0.hh:121 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition refinedp0.hh:128 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition refinedp0.hh:114 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::RefinedP0LocalFiniteElement │ │ │ │ │ +RefinedP0LocalFiniteElement() │ │ │ │ │ +Definition refinedp0.hh:167 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition refinedp0.hh:172 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition refinedp0.hh:186 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition refinedp0.hh:199 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition refinedp0.hh:192 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition refinedp0.hh:179 │ │ │ │ │ +Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::Traits │ │ │ │ │ +LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 3 >, │ │ │ │ │ +RefinedP0LocalCoefficients< 3 >, RefinedP0LocalInterpolation< │ │ │ │ │ +RefinedP0LocalBasis< D, R, 3 > > > Traits │ │ │ │ │ +Definition refinedp0.hh:163 │ │ │ │ │ +Dune::RefinedP0LocalBasis │ │ │ │ │ +Uniformly refined constant shape functions on a unit simplex in R^dim. │ │ │ │ │ +Definition refinedp0localbasis.hh:40 │ │ │ │ │ +Dune::RefinedP0LocalCoefficients │ │ │ │ │ +Layout map for RefinedP0 elements. │ │ │ │ │ +Definition refinedp0localcoefficients.hh:25 │ │ │ │ │ +Dune::RefinedP0LocalInterpolation │ │ │ │ │ +Definition refinedp0localinterpolation.hh:15 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00350.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2simplex2d.hh File Reference │ │ │ │ +dune-localfunctions: mimetic.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,33 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
brezzidouglasmarini2simplex2d.hh File Reference
│ │ │ │ +
mimetic.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <dune/geometry/type.hh>
│ │ │ │ -#include "../common/localfiniteelementtraits.hh"
│ │ │ │ -#include "brezzidouglasmarini2simplex2d/brezzidouglasmarini2simplex2dlocalbasis.hh"
│ │ │ │ -#include "brezzidouglasmarini2simplex2d/brezzidouglasmarini2simplex2dlocalcoefficients.hh"
│ │ │ │ -#include "brezzidouglasmarini2simplex2d/brezzidouglasmarini2simplex2dlocalinterpolation.hh"
│ │ │ │ +#include "common/localfiniteelementtraits.hh"
│ │ │ │ +#include "mimetic/mimeticall.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::BDM2Simplex2DLocalFiniteElement< D, R >
 Second order Brezzi-Douglas-Marini shape functions on triangles. More...
class  Dune::MimeticLocalFiniteElement< D, R, dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,30 +6,22 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini2simplex2d.hh File Reference │ │ │ │ │ +mimetic.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "brezzidouglasmarini2simplex2d/ │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalbasis.hh" │ │ │ │ │ -#include "brezzidouglasmarini2simplex2d/ │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalcoefficients.hh" │ │ │ │ │ -#include "brezzidouglasmarini2simplex2d/ │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalinterpolation.hh" │ │ │ │ │ +#include "common/localfiniteelementtraits.hh" │ │ │ │ │ +#include "mimetic/mimeticall.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM2Simplex2DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  Second order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ - More... │ │ │ │ │ +class  Dune::MimeticLocalFiniteElement<_D,_R,_dim_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00350_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2simplex2d.hh Source File │ │ │ │ +dune-localfunctions: mimetic.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,123 +70,112 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini2simplex2d.hh
│ │ │ │ +
mimetic.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_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_MIMETICLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_MIMETICLOCALFINITEELEMENT_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:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ +
11#include "mimetic/mimeticall.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
22 template<class D, class R, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25 Dune::GeometryType gt;
│ │ │ │ + │ │ │ │ +
27 MimeticLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
29
│ │ │ │ +
30 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::triangle;
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
75 private:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
79 };
│ │ │ │ -
│ │ │ │ -
80}
│ │ │ │ -
81#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALFINITEELEMENT_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 {}
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ +
38 MimeticLocalFiniteElement (Dune::GeometryType::BasicType basicType)
│ │ │ │ +
39 : gt(basicType,dim)
│ │ │ │ +
40 {}
│ │ │ │ +
│ │ │ │ +
41
│ │ │ │ +
│ │ │ │ +
42 MimeticLocalFiniteElement (Dune::GeometryType::BasicType basicType, unsigned int variant)
│ │ │ │ +
43 : gt(basicType,dim), basis(variant), coefficients(variant)
│ │ │ │ +
44 {}
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
│ │ │ │ +
46 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
47 {
│ │ │ │ +
48 return basis;
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
52 {
│ │ │ │ +
53 return coefficients;
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
57 {
│ │ │ │ +
58 return interpolation;
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
61 Dune::GeometryType type () const { return gt; }
│ │ │ │ +
62 };
│ │ │ │ +
│ │ │ │ +
63}
│ │ │ │ +
64
│ │ │ │ +
65#endif
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Second order Brezzi-Douglas-Marini shape functions on triangles.
Definition brezzidouglasmarini2simplex2d.hh:27
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition brezzidouglasmarini2simplex2d.hh:54
│ │ │ │ -
LocalFiniteElementTraits< BDM2Simplex2DLocalBasis< D, R >, BDM2Simplex2DLocalCoefficients, BDM2Simplex2DLocalInterpolation< BDM2Simplex2DLocalBasis< D, R > > > Traits
Definition brezzidouglasmarini2simplex2d.hh:33
│ │ │ │ -
BDM2Simplex2DLocalFiniteElement()
Standard constructor.
Definition brezzidouglasmarini2simplex2d.hh:36
│ │ │ │ -
static constexpr GeometryType type()
Definition brezzidouglasmarini2simplex2d.hh:70
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition brezzidouglasmarini2simplex2d.hh:49
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition brezzidouglasmarini2simplex2d.hh:59
│ │ │ │ -
BDM2Simplex2DLocalFiniteElement(int s)
Make set number s, where 0 <= s < 8.
Definition brezzidouglasmarini2simplex2d.hh:44
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition brezzidouglasmarini2simplex2d.hh:65
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:30
│ │ │ │ -
Layout map for Brezzi-Douglas-Marini-2 elements on triangles.
Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:24
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on triangles.
Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:26
│ │ │ │
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 mimetic.hh:24
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition mimetic.hh:56
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition mimetic.hh:46
│ │ │ │ +
MimeticLocalFiniteElement(Dune::GeometryType::BasicType basicType, unsigned int variant)
Definition mimetic.hh:42
│ │ │ │ +
MimeticLocalFiniteElement()
Definition mimetic.hh:35
│ │ │ │ +
MimeticLocalFiniteElement(Dune::GeometryType::BasicType basicType)
Definition mimetic.hh:38
│ │ │ │ +
Dune::GeometryType type() const
Definition mimetic.hh:61
│ │ │ │ +
Dune::LocalFiniteElementTraits< MimeticLocalBasis< D, R, dim >, MimeticLocalCoefficients, MimeticLocalInterpolation< MimeticLocalBasis< D, R, dim > > > Traits
Definition mimetic.hh:33
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition mimetic.hh:51
│ │ │ │ +
Definition mimeticall.hh:23
│ │ │ │ +
Definition mimeticall.hh:74
│ │ │ │ +
!
Definition mimeticall.hh:88
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,145 +7,124 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ -brezzidouglasmarini2simplex2d.hh │ │ │ │ │ +mimetic.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_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_MIMETICLOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_MIMETICLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "brezzidouglasmarini2simplex2d/ │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalbasis.hh" │ │ │ │ │ - 12#include "brezzidouglasmarini2simplex2d/ │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalcoefficients.hh" │ │ │ │ │ - 13#include "brezzidouglasmarini2simplex2d/ │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalinterpolation.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 25 template │ │ │ │ │ -26 class BDM2Simplex2DLocalFiniteElement │ │ │ │ │ - 27 { │ │ │ │ │ - 28 │ │ │ │ │ - 29 public: │ │ │ │ │ - 30 typedef LocalFiniteElementTraits< │ │ │ │ │ - 31 BDM2Simplex2DLocalBasis, │ │ │ │ │ - 32 BDM2Simplex2DLocalCoefficients, │ │ │ │ │ -33 BDM2Simplex2DLocalInterpolation > > Traits; │ │ │ │ │ + 10#include "common/localfiniteelementtraits.hh" │ │ │ │ │ + 11#include "mimetic/mimeticall.hh" │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 22 template │ │ │ │ │ +23 class MimeticLocalFiniteElement │ │ │ │ │ + 24 { │ │ │ │ │ + 25 Dune::GeometryType gt; │ │ │ │ │ + 26 MimeticLocalBasis basis; │ │ │ │ │ + 27 MimeticLocalCoefficients coefficients; │ │ │ │ │ + 28 MimeticLocalInterpolation > interpolation; │ │ │ │ │ + 29 │ │ │ │ │ + 30 public: │ │ │ │ │ + 31 typedef Dune::LocalFiniteElementTraits, │ │ │ │ │ + 32 MimeticLocalCoefficients, │ │ │ │ │ +33 MimeticLocalInterpolation > > Traits; │ │ │ │ │ 34 │ │ │ │ │ -36 BDM2Simplex2DLocalFiniteElement () │ │ │ │ │ - 37 {} │ │ │ │ │ - 38 │ │ │ │ │ -44 BDM2Simplex2DLocalFiniteElement (int s) : │ │ │ │ │ - 45 basis(s), │ │ │ │ │ - 46 interpolation(s) │ │ │ │ │ - 47 {} │ │ │ │ │ - 48 │ │ │ │ │ -49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 50 { │ │ │ │ │ - 51 return basis; │ │ │ │ │ - 52 } │ │ │ │ │ - 53 │ │ │ │ │ -54 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 55 { │ │ │ │ │ - 56 return coefficients; │ │ │ │ │ - 57 } │ │ │ │ │ - 58 │ │ │ │ │ -59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 76 BDM2Simplex2DLocalBasis basis; │ │ │ │ │ - 77 BDM2Simplex2DLocalCoefficients coefficients; │ │ │ │ │ - 78 BDM2Simplex2DLocalInterpolation > │ │ │ │ │ -interpolation; │ │ │ │ │ - 79 }; │ │ │ │ │ - 80} │ │ │ │ │ - 81#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALFINITEELEMENT_HH │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalbasis.hh │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalcoefficients.hh │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalinterpolation.hh │ │ │ │ │ +35 MimeticLocalFiniteElement () │ │ │ │ │ + 36 {} │ │ │ │ │ + 37 │ │ │ │ │ +38 MimeticLocalFiniteElement (Dune::GeometryType::BasicType basicType) │ │ │ │ │ + 39 : gt(basicType,dim) │ │ │ │ │ + 40 {} │ │ │ │ │ + 41 │ │ │ │ │ +42 MimeticLocalFiniteElement (Dune::GeometryType::BasicType basicType, unsigned │ │ │ │ │ +int variant) │ │ │ │ │ + 43 : gt(basicType,dim), basis(variant), coefficients(variant) │ │ │ │ │ + 44 {} │ │ │ │ │ + 45 │ │ │ │ │ +46 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 47 { │ │ │ │ │ + 48 return basis; │ │ │ │ │ + 49 } │ │ │ │ │ + 50 │ │ │ │ │ +51 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 52 { │ │ │ │ │ + 53 return coefficients; │ │ │ │ │ + 54 } │ │ │ │ │ + 55 │ │ │ │ │ +56 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 57 { │ │ │ │ │ + 58 return interpolation; │ │ │ │ │ + 59 } │ │ │ │ │ + 60 │ │ │ │ │ +61 Dune::GeometryType type () const { return gt; } │ │ │ │ │ + 62 }; │ │ │ │ │ + 63} │ │ │ │ │ + 64 │ │ │ │ │ + 65#endif │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ +mimeticall.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM2Simplex2DLocalFiniteElement │ │ │ │ │ -Second order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2d.hh:27 │ │ │ │ │ -Dune::BDM2Simplex2DLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition brezzidouglasmarini2simplex2d.hh:54 │ │ │ │ │ -Dune::BDM2Simplex2DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< BDM2Simplex2DLocalBasis< D, R >, │ │ │ │ │ -BDM2Simplex2DLocalCoefficients, BDM2Simplex2DLocalInterpolation< │ │ │ │ │ -BDM2Simplex2DLocalBasis< D, R > > > Traits │ │ │ │ │ -Definition brezzidouglasmarini2simplex2d.hh:33 │ │ │ │ │ -Dune::BDM2Simplex2DLocalFiniteElement::BDM2Simplex2DLocalFiniteElement │ │ │ │ │ -BDM2Simplex2DLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2d.hh:36 │ │ │ │ │ -Dune::BDM2Simplex2DLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition brezzidouglasmarini2simplex2d.hh:70 │ │ │ │ │ -Dune::BDM2Simplex2DLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition brezzidouglasmarini2simplex2d.hh:49 │ │ │ │ │ -Dune::BDM2Simplex2DLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition brezzidouglasmarini2simplex2d.hh:59 │ │ │ │ │ -Dune::BDM2Simplex2DLocalFiniteElement::BDM2Simplex2DLocalFiniteElement │ │ │ │ │ -BDM2Simplex2DLocalFiniteElement(int s) │ │ │ │ │ -Make set number s, where 0 <= s < 8. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2d.hh:44 │ │ │ │ │ -Dune::BDM2Simplex2DLocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2d.hh:65 │ │ │ │ │ -Dune::BDM2Simplex2DLocalBasis │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalbasis.hh:30 │ │ │ │ │ -Dune::BDM2Simplex2DLocalCoefficients │ │ │ │ │ -Layout map for Brezzi-Douglas-Marini-2 elements on triangles. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::BDM2Simplex2DLocalInterpolation │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:26 │ │ │ │ │ Dune::LocalFiniteElementTraits │ │ │ │ │ traits helper struct │ │ │ │ │ Definition localfiniteelementtraits.hh:13 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ LB LocalBasisType │ │ │ │ │ Definition localfiniteelementtraits.hh:16 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ LC LocalCoefficientsType │ │ │ │ │ Definition localfiniteelementtraits.hh:20 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ LI LocalInterpolationType │ │ │ │ │ Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::MimeticLocalFiniteElement │ │ │ │ │ +Definition mimetic.hh:24 │ │ │ │ │ +Dune::MimeticLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition mimetic.hh:56 │ │ │ │ │ +Dune::MimeticLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition mimetic.hh:46 │ │ │ │ │ +Dune::MimeticLocalFiniteElement::MimeticLocalFiniteElement │ │ │ │ │ +MimeticLocalFiniteElement(Dune::GeometryType::BasicType basicType, unsigned int │ │ │ │ │ +variant) │ │ │ │ │ +Definition mimetic.hh:42 │ │ │ │ │ +Dune::MimeticLocalFiniteElement::MimeticLocalFiniteElement │ │ │ │ │ +MimeticLocalFiniteElement() │ │ │ │ │ +Definition mimetic.hh:35 │ │ │ │ │ +Dune::MimeticLocalFiniteElement::MimeticLocalFiniteElement │ │ │ │ │ +MimeticLocalFiniteElement(Dune::GeometryType::BasicType basicType) │ │ │ │ │ +Definition mimetic.hh:38 │ │ │ │ │ +Dune::MimeticLocalFiniteElement::type │ │ │ │ │ +Dune::GeometryType type() const │ │ │ │ │ +Definition mimetic.hh:61 │ │ │ │ │ +Dune::MimeticLocalFiniteElement::Traits │ │ │ │ │ +Dune::LocalFiniteElementTraits< MimeticLocalBasis< D, R, dim >, │ │ │ │ │ +MimeticLocalCoefficients, MimeticLocalInterpolation< MimeticLocalBasis< D, R, │ │ │ │ │ +dim > > > Traits │ │ │ │ │ +Definition mimetic.hh:33 │ │ │ │ │ +Dune::MimeticLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition mimetic.hh:51 │ │ │ │ │ +Dune::MimeticLocalBasis │ │ │ │ │ +Definition mimeticall.hh:23 │ │ │ │ │ +Dune::MimeticLocalInterpolation │ │ │ │ │ +Definition mimeticall.hh:74 │ │ │ │ │ +Dune::MimeticLocalCoefficients │ │ │ │ │ +! │ │ │ │ │ +Definition mimeticall.hh:88 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00353.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1simplex2dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: equidistantpoints.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,57 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
brezzidouglasmarini1simplex2dlocalbasis.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
equidistantpoints.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <bitset>
│ │ │ │ -#include <numeric>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <algorithm>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include "../../common/localbasis.hh"
│ │ │ │ +#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::BDM1Simplex2DLocalBasis< D, R >
 First order Brezzi-Douglas-Marini shape functions on the reference triangle. 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 {} │ │ │ │ │ @@ -6,29 +6,44 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1simplex2d │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * lagrange │ │ │ │ │ +Classes | Namespaces | Functions │ │ │ │ │ +equidistantpoints.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localbasis.hh" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM1Simplex2DLocalBasis<_D,_R_> │ │ │ │ │ -  First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ - triangle. More... │ │ │ │ │ +class  Dune::EquidistantPointSet<_F,_dim_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Functions │ │ │ │ │ + std::size_t Dune::numLagrangePoints (const GeometryType >, std:: │ │ │ │ │ + size_t order) │ │ │ │ │ +  │ │ │ │ │ + std::size_t Dune::numLagrangePoints (unsigned int topologyId, unsigned │ │ │ │ │ + int dim, std::size_t order) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +static unsigned int Dune::equidistantLagrangePoints (const GeometryType >, │ │ │ │ │ + unsigned int codim, std::size_t order, unsigned int │ │ │ │ │ + *count, LagrangePoint< ct, cdim > *points) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +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) │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00353_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1simplex2dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: equidistantpoints.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,215 +70,276 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini1simplex2dlocalbasis.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_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALBASIS_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 <array>
│ │ │ │ -
9#include <bitset>
│ │ │ │ -
10#include <numeric>
│ │ │ │ -
11#include <vector>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/common/fmatrix.hh>
│ │ │ │ -
14
│ │ │ │ -
15#include "../../common/localbasis.hh"
│ │ │ │ +
8#include <algorithm>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
12#include <dune/geometry/type.hh>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │
16
│ │ │ │
17namespace Dune
│ │ │ │
18{
│ │ │ │ -
28 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
30 {
│ │ │ │ -
31
│ │ │ │ -
32 public:
│ │ │ │ -
33 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,2,Dune::FieldVector<R,2>,
│ │ │ │ -
34 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ -
35
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 {
│ │ │ │ -
39 for (size_t i=0; i<3; i++)
│ │ │ │ -
40 sign_[i] = 1.0;
│ │ │ │ -
41 }
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
48 BDM1Simplex2DLocalBasis (std::bitset<3> s)
│ │ │ │ -
49 {
│ │ │ │ -
50 for (size_t i=0; i<3; i++)
│ │ │ │ -
51 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ +
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 unsigned int size () const
│ │ │ │ -
56 {
│ │ │ │ -
57 return 6;
│ │ │ │ -
58 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
66 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
67 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
68 {
│ │ │ │ -
69 out.resize(6);
│ │ │ │ -
70
│ │ │ │ -
71 out[0][0] = sign_[0]*in[0];
│ │ │ │ -
72 out[0][1] = sign_[0]*(in[1] - 1.0);
│ │ │ │ -
73 out[1][0] = sign_[1]*(in[0] - 1.0);
│ │ │ │ -
74 out[1][1] = sign_[1]*in[1];
│ │ │ │ -
75 out[2][0] = sign_[2]*in[0];
│ │ │ │ -
76 out[2][1] = sign_[2]*in[1];
│ │ │ │ -
77 out[3][0] = 3.0*in[0];
│ │ │ │ -
78 out[3][1] = 3.0 - 6.0*in[0] - 3.0*in[1];
│ │ │ │ -
79 out[4][0] = -3.0 + 3.0*in[0] + 6.0*in[1];
│ │ │ │ -
80 out[4][1] = -3.0*in[1];
│ │ │ │ -
81 out[5][0] = -3.0*in[0];
│ │ │ │ -
82 out[5][1] = 3.0*in[1];
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
91 inline void evaluateJacobian (const typename Traits::DomainType& in,
│ │ │ │ -
92 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
93 {
│ │ │ │ -
94 out.resize(6);
│ │ │ │ -
95
│ │ │ │ -
96 out[0][0][0] = sign_[0];
│ │ │ │ -
97 out[0][0][1] = 0.0;
│ │ │ │ -
98 out[0][1][0] = 0.0;
│ │ │ │ -
99 out[0][1][1] = sign_[0];
│ │ │ │ +
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 out[1][0][0] = sign_[1];
│ │ │ │ -
102 out[1][0][1] = 0.0;
│ │ │ │ -
103 out[1][1][0] = 0.0;
│ │ │ │ -
104 out[1][1][1] = sign_[1];
│ │ │ │ -
105
│ │ │ │ -
106 out[2][0][0] = sign_[2];
│ │ │ │ -
107 out[2][0][1] = 0.0;
│ │ │ │ -
108 out[2][1][0] = 0.0;
│ │ │ │ -
109 out[2][1][1] = sign_[2];
│ │ │ │ -
110
│ │ │ │ -
111 out[3][0][0] = 3.0;
│ │ │ │ -
112 out[3][0][1] = 0.0;
│ │ │ │ -
113 out[3][1][0] = -6.0;
│ │ │ │ -
114 out[3][1][1] = -3.0;
│ │ │ │ -
115
│ │ │ │ -
116 out[4][0][0] = 3.0;
│ │ │ │ -
117 out[4][0][1] = 6.0;
│ │ │ │ -
118 out[4][1][0] = 0.0;
│ │ │ │ -
119 out[4][1][1] = -3.0;
│ │ │ │ -
120
│ │ │ │ -
121 out[5][0][0] = -3.0;
│ │ │ │ -
122 out[5][0][1] = 0.0;
│ │ │ │ -
123 out[5][1][0] = 0.0;
│ │ │ │ -
124 out[5][1][1] = 3.0;
│ │ │ │ -
125 }
│ │ │ │ -
│ │ │ │ -
126
│ │ │ │ -
│ │ │ │ -
128 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ -
129 const typename Traits::DomainType& in, // position
│ │ │ │ -
130 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
131 {
│ │ │ │ -
132 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
133 if (totalOrder == 0) {
│ │ │ │ -
134 evaluateFunction(in, out);
│ │ │ │ -
135 } else if (totalOrder == 1) {
│ │ │ │ -
136 out.resize(size());
│ │ │ │ -
137 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
138
│ │ │ │ -
139 switch (direction) {
│ │ │ │ -
140 case 0:
│ │ │ │ -
141 out[0][0] = sign_[0];
│ │ │ │ -
142 out[0][1] = 0.0;
│ │ │ │ -
143
│ │ │ │ -
144 out[1][0] = sign_[1];
│ │ │ │ -
145 out[1][1] = 0.0;
│ │ │ │ -
146
│ │ │ │ -
147 out[2][0] = sign_[2];
│ │ │ │ -
148 out[2][1] = 0.0;
│ │ │ │ -
149
│ │ │ │ -
150 out[3][0] = 3.0;
│ │ │ │ -
151 out[3][1] = -6.0;
│ │ │ │ +
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 out[4][0] = 3.0;
│ │ │ │ -
154 out[4][1] = 0.0;
│ │ │ │ -
155
│ │ │ │ -
156 out[5][0] = -3.0;
│ │ │ │ -
157 out[5][1] = 0.0;
│ │ │ │ -
158 break;
│ │ │ │ -
159 case 1:
│ │ │ │ -
160 out[0][0] = 0.0;
│ │ │ │ -
161 out[0][1] = sign_[0];
│ │ │ │ +
153
│ │ │ │ +
154 // EquidistantPointSet
│ │ │ │ +
155 // -------------------
│ │ │ │ +
156
│ │ │ │ +
157 template< class F, unsigned int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
159 : public EmptyPointSet< F, dim >
│ │ │ │ +
160 {
│ │ │ │ + │ │ │ │
162
│ │ │ │ -
163 out[1][0] = 0.0;
│ │ │ │ -
164 out[1][1] = sign_[1];
│ │ │ │ +
163 public:
│ │ │ │ +
164 static const unsigned int dimension = dim;
│ │ │ │
165
│ │ │ │ -
166 out[2][0] = 0.0;
│ │ │ │ -
167 out[2][1] = sign_[2];
│ │ │ │ -
168
│ │ │ │ -
169 out[3][0] = 0.0;
│ │ │ │ -
170 out[3][1] = -3.0;
│ │ │ │ -
171
│ │ │ │ -
172 out[4][0] = 6.0;
│ │ │ │ -
173 out[4][1] = -3.0;
│ │ │ │ +
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 out[5][0] = 0.0;
│ │ │ │ -
176 out[5][1] = 3.0;
│ │ │ │ -
177 break;
│ │ │ │ -
178 default:
│ │ │ │ -
179 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
180 }
│ │ │ │ -
181 } else {
│ │ │ │ -
182 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
183 }
│ │ │ │ -
184 }
│ │ │ │ -
│ │ │ │ -
185
│ │ │ │ -
│ │ │ │ -
187 unsigned int order () const
│ │ │ │ -
188 {
│ │ │ │ -
189 return 1;
│ │ │ │ -
190 }
│ │ │ │ -
│ │ │ │ -
191
│ │ │ │ -
192 private:
│ │ │ │ -
193 std::array<R,3> sign_;
│ │ │ │ -
194 };
│ │ │ │ -
│ │ │ │ -
195}
│ │ │ │ -
196#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALBASIS_HH
│ │ │ │ +
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
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on the reference triangle.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:30
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:91
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:55
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:66
│ │ │ │ -
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:34
│ │ │ │ -
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 brezzidouglasmarini1simplex2dlocalbasis.hh:128
│ │ │ │ -
BDM1Simplex2DLocalBasis()
Standard constructor.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:37
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:187
│ │ │ │ -
BDM1Simplex2DLocalBasis(std::bitset< 3 > s)
Make set number s, where 0 <= s < 8.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:48
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,230 +7,315 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1simplex2d │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalbasis.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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 │ │ │ │ │ + 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_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALBASIS_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#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include "../../common/localbasis.hh" │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ 16 │ │ │ │ │ 17namespace Dune │ │ │ │ │ 18{ │ │ │ │ │ - 28 template │ │ │ │ │ -29 class BDM1Simplex2DLocalBasis │ │ │ │ │ + 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 │ │ │ │ │ - 32 public: │ │ │ │ │ - 33 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -34 Dune::FieldMatrix > Traits; │ │ │ │ │ - 35 │ │ │ │ │ -37 BDM1Simplex2DLocalBasis () │ │ │ │ │ - 38 { │ │ │ │ │ - 39 for (size_t i=0; i<3; i++) │ │ │ │ │ - 40 sign_[i] = 1.0; │ │ │ │ │ + 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 │ │ │ │ │ -48 BDM1Simplex2DLocalBasis (std::bitset<3> s) │ │ │ │ │ - 49 { │ │ │ │ │ - 50 for (size_t i=0; i<3; i++) │ │ │ │ │ - 51 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ - 52 } │ │ │ │ │ + 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 │ │ │ │ │ -55 unsigned int size () const │ │ │ │ │ + 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 return 6; │ │ │ │ │ - 58 } │ │ │ │ │ + 57 const unsigned int dim = gt.dim(); │ │ │ │ │ + 58 assert( (0 <= codim) && (codim <= dim) && (dim <= cdim) ); │ │ │ │ │ 59 │ │ │ │ │ -66 inline void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ - 67 std::vector& out) const │ │ │ │ │ - 68 { │ │ │ │ │ - 69 out.resize(6); │ │ │ │ │ - 70 │ │ │ │ │ - 71 out[0][0] = sign_[0]*in[0]; │ │ │ │ │ - 72 out[0][1] = sign_[0]*(in[1] - 1.0); │ │ │ │ │ - 73 out[1][0] = sign_[1]*(in[0] - 1.0); │ │ │ │ │ - 74 out[1][1] = sign_[1]*in[1]; │ │ │ │ │ - 75 out[2][0] = sign_[2]*in[0]; │ │ │ │ │ - 76 out[2][1] = sign_[2]*in[1]; │ │ │ │ │ - 77 out[3][0] = 3.0*in[0]; │ │ │ │ │ - 78 out[3][1] = 3.0 - 6.0*in[0] - 3.0*in[1]; │ │ │ │ │ - 79 out[4][0] = -3.0 + 3.0*in[0] + 6.0*in[1]; │ │ │ │ │ - 80 out[4][1] = -3.0*in[1]; │ │ │ │ │ - 81 out[5][0] = -3.0*in[0]; │ │ │ │ │ - 82 out[5][1] = 3.0*in[1]; │ │ │ │ │ + 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 │ │ │ │ │ -91 inline void evaluateJacobian (const typename Traits::DomainType& in, │ │ │ │ │ - 92 std::vector& out) const │ │ │ │ │ - 93 { │ │ │ │ │ - 94 out.resize(6); │ │ │ │ │ - 95 │ │ │ │ │ - 96 out[0][0][0] = sign_[0]; │ │ │ │ │ - 97 out[0][0][1] = 0.0; │ │ │ │ │ - 98 out[0][1][0] = 0.0; │ │ │ │ │ - 99 out[0][1][1] = sign_[0]; │ │ │ │ │ + 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 out[1][0][0] = sign_[1]; │ │ │ │ │ - 102 out[1][0][1] = 0.0; │ │ │ │ │ - 103 out[1][1][0] = 0.0; │ │ │ │ │ - 104 out[1][1][1] = sign_[1]; │ │ │ │ │ - 105 │ │ │ │ │ - 106 out[2][0][0] = sign_[2]; │ │ │ │ │ - 107 out[2][0][1] = 0.0; │ │ │ │ │ - 108 out[2][1][0] = 0.0; │ │ │ │ │ - 109 out[2][1][1] = sign_[2]; │ │ │ │ │ - 110 │ │ │ │ │ - 111 out[3][0][0] = 3.0; │ │ │ │ │ - 112 out[3][0][1] = 0.0; │ │ │ │ │ - 113 out[3][1][0] = -6.0; │ │ │ │ │ - 114 out[3][1][1] = -3.0; │ │ │ │ │ - 115 │ │ │ │ │ - 116 out[4][0][0] = 3.0; │ │ │ │ │ - 117 out[4][0][1] = 6.0; │ │ │ │ │ - 118 out[4][1][0] = 0.0; │ │ │ │ │ - 119 out[4][1][1] = -3.0; │ │ │ │ │ - 120 │ │ │ │ │ - 121 out[5][0][0] = -3.0; │ │ │ │ │ - 122 out[5][0][1] = 0.0; │ │ │ │ │ - 123 out[5][1][0] = 0.0; │ │ │ │ │ - 124 out[5][1][1] = 3.0; │ │ │ │ │ + 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 │ │ │ │ │ -128 void partial (const std::array& order, │ │ │ │ │ - 129 const typename Traits::DomainType& in, // position │ │ │ │ │ - 130 std::vector& out) const // return value │ │ │ │ │ - 131 { │ │ │ │ │ - 132 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ - 133 if (totalOrder == 0) { │ │ │ │ │ - 134 evaluateFunction(in, out); │ │ │ │ │ - 135 } else if (totalOrder == 1) { │ │ │ │ │ - 136 out.resize(size()); │ │ │ │ │ - 137 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ - 138 │ │ │ │ │ - 139 switch (direction) { │ │ │ │ │ - 140 case 0: │ │ │ │ │ - 141 out[0][0] = sign_[0]; │ │ │ │ │ - 142 out[0][1] = 0.0; │ │ │ │ │ - 143 │ │ │ │ │ - 144 out[1][0] = sign_[1]; │ │ │ │ │ - 145 out[1][1] = 0.0; │ │ │ │ │ - 146 │ │ │ │ │ - 147 out[2][0] = sign_[2]; │ │ │ │ │ - 148 out[2][1] = 0.0; │ │ │ │ │ - 149 │ │ │ │ │ - 150 out[3][0] = 3.0; │ │ │ │ │ - 151 out[3][1] = -6.0; │ │ │ │ │ + 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 out[4][0] = 3.0; │ │ │ │ │ - 154 out[4][1] = 0.0; │ │ │ │ │ - 155 │ │ │ │ │ - 156 out[5][0] = -3.0; │ │ │ │ │ - 157 out[5][1] = 0.0; │ │ │ │ │ - 158 break; │ │ │ │ │ - 159 case 1: │ │ │ │ │ - 160 out[0][0] = 0.0; │ │ │ │ │ - 161 out[0][1] = sign_[0]; │ │ │ │ │ + 153 │ │ │ │ │ + 154 // EquidistantPointSet │ │ │ │ │ + 155 // ------------------- │ │ │ │ │ + 156 │ │ │ │ │ + 157 template< class F, unsigned int dim > │ │ │ │ │ +158 class EquidistantPointSet │ │ │ │ │ + 159 : public EmptyPointSet< F, dim > │ │ │ │ │ + 160 { │ │ │ │ │ + 161 typedef EmptyPointSet<_F,_dim_> Base; │ │ │ │ │ 162 │ │ │ │ │ - 163 out[1][0] = 0.0; │ │ │ │ │ - 164 out[1][1] = sign_[1]; │ │ │ │ │ + 163 public: │ │ │ │ │ +164 static const unsigned int dimension = dim; │ │ │ │ │ 165 │ │ │ │ │ - 166 out[2][0] = 0.0; │ │ │ │ │ - 167 out[2][1] = sign_[2]; │ │ │ │ │ - 168 │ │ │ │ │ - 169 out[3][0] = 0.0; │ │ │ │ │ - 170 out[3][1] = -3.0; │ │ │ │ │ - 171 │ │ │ │ │ - 172 out[4][0] = 6.0; │ │ │ │ │ - 173 out[4][1] = -3.0; │ │ │ │ │ + 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 out[5][0] = 0.0; │ │ │ │ │ - 176 out[5][1] = 3.0; │ │ │ │ │ - 177 break; │ │ │ │ │ - 178 default: │ │ │ │ │ - 179 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ - 180 } │ │ │ │ │ - 181 } else { │ │ │ │ │ - 182 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ - 183 } │ │ │ │ │ - 184 } │ │ │ │ │ - 185 │ │ │ │ │ -187 unsigned int order () const │ │ │ │ │ - 188 { │ │ │ │ │ - 189 return 1; │ │ │ │ │ - 190 } │ │ │ │ │ - 191 │ │ │ │ │ - 192 private: │ │ │ │ │ - 193 std::array sign_; │ │ │ │ │ - 194 }; │ │ │ │ │ - 195} │ │ │ │ │ - 196#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALBASIS_HH │ │ │ │ │ + 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(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 │ │ │ │ │ +emptypoints.hh │ │ │ │ │ +field.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Simplex2DLocalBasis │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on the reference triangle. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalbasis.hh:30 │ │ │ │ │ -Dune::BDM1Simplex2DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalbasis.hh:91 │ │ │ │ │ -Dune::BDM1Simplex2DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalbasis.hh:55 │ │ │ │ │ -Dune::BDM1Simplex2DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalbasis.hh:66 │ │ │ │ │ -Dune::BDM1Simplex2DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ -2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalbasis.hh:34 │ │ │ │ │ -Dune::BDM1Simplex2DLocalBasis::partial │ │ │ │ │ -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 brezzidouglasmarini1simplex2dlocalbasis.hh:128 │ │ │ │ │ -Dune::BDM1Simplex2DLocalBasis::BDM1Simplex2DLocalBasis │ │ │ │ │ -BDM1Simplex2DLocalBasis() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalbasis.hh:37 │ │ │ │ │ -Dune::BDM1Simplex2DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalbasis.hh:187 │ │ │ │ │ -Dune::BDM1Simplex2DLocalBasis::BDM1Simplex2DLocalBasis │ │ │ │ │ -BDM1Simplex2DLocalBasis(std::bitset< 3 > s) │ │ │ │ │ -Make set number s, where 0 <= s < 8. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalbasis.hh:48 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::numLagrangePoints │ │ │ │ │ +std::size_t numLagrangePoints(const GeometryType >, std::size_t order) │ │ │ │ │ +Definition equidistantpoints.hh:23 │ │ │ │ │ +Dune::equidistantLagrangePoints │ │ │ │ │ +static unsigned int equidistantLagrangePoints(const GeometryType >, unsigned │ │ │ │ │ +int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > │ │ │ │ │ +*points) │ │ │ │ │ +Definition equidistantpoints.hh:55 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::LocalKey::index │ │ │ │ │ +unsigned int index() const │ │ │ │ │ +Return offset within subentity. │ │ │ │ │ +Definition localkey.hh:68 │ │ │ │ │ +Dune::LocalKey::subEntity │ │ │ │ │ +unsigned int subEntity() const │ │ │ │ │ +Return number of associated subentity. │ │ │ │ │ +Definition localkey.hh:56 │ │ │ │ │ +Dune::LagrangePoint │ │ │ │ │ +Definition emptypoints.hh:18 │ │ │ │ │ +Dune::LagrangePoint::weight_ │ │ │ │ │ +Field weight_ │ │ │ │ │ +Definition emptypoints.hh:48 │ │ │ │ │ +Dune::LagrangePoint::point_ │ │ │ │ │ +Vector point_ │ │ │ │ │ +Definition emptypoints.hh:46 │ │ │ │ │ +Dune::LagrangePoint::localKey_ │ │ │ │ │ +LocalKey localKey_ │ │ │ │ │ +Definition emptypoints.hh:47 │ │ │ │ │ +Dune::EmptyPointSet │ │ │ │ │ +Definition emptypoints.hh:56 │ │ │ │ │ +Dune::EmptyPointSet::order │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +Definition emptypoints.hh:95 │ │ │ │ │ +Dune::EmptyPointSet::points_ │ │ │ │ │ +std::vector< LagrangePoint > points_ │ │ │ │ │ +Definition emptypoints.hh:107 │ │ │ │ │ +Dune::EquidistantPointSet │ │ │ │ │ +Definition equidistantpoints.hh:160 │ │ │ │ │ +Dune::EquidistantPointSet::order │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +Definition emptypoints.hh:95 │ │ │ │ │ +Dune::EquidistantPointSet::build │ │ │ │ │ +bool build() │ │ │ │ │ +Definition equidistantpoints.hh:190 │ │ │ │ │ +Dune::EquidistantPointSet::supports │ │ │ │ │ +static bool supports(std::size_t order) │ │ │ │ │ +Definition equidistantpoints.hh:203 │ │ │ │ │ +Dune::EquidistantPointSet::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition equidistantpoints.hh:164 │ │ │ │ │ +Dune::EquidistantPointSet::supports │ │ │ │ │ +static bool supports(GeometryType, std::size_t) │ │ │ │ │ +Definition equidistantpoints.hh:201 │ │ │ │ │ +Dune::EquidistantPointSet::build │ │ │ │ │ +void build(GeometryType gt) │ │ │ │ │ +Definition equidistantpoints.hh:170 │ │ │ │ │ +Dune::EquidistantPointSet::buildCube │ │ │ │ │ +bool buildCube() │ │ │ │ │ +Definition equidistantpoints.hh:196 │ │ │ │ │ +Dune::EquidistantPointSet::EquidistantPointSet │ │ │ │ │ +EquidistantPointSet(std::size_t order) │ │ │ │ │ +Definition equidistantpoints.hh:168 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00356.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1simplex2dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: p0.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,36 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
brezzidouglasmarini1simplex2dlocalinterpolation.hh File Reference
│ │ │ │ +
p0.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +
#include <dune/geometry/type.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::BDM1Simplex2DLocalInterpolation< LB >
 First order Brezzi-Douglas-Marini shape functions on the reference triangle. More...
class  Dune::P0LocalFiniteElement< D, R, d >
 The local p0 finite element on all types of reference elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1simplex2d │ │ │ │ │ + * lagrange │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +p0.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "p0/p0localbasis.hh" │ │ │ │ │ +#include "p0/p0localcoefficients.hh" │ │ │ │ │ +#include "p0/p0localinterpolation.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM1Simplex2DLocalInterpolation<_LB_> │ │ │ │ │ -  First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ - triangle. More... │ │ │ │ │ +class  Dune::P0LocalFiniteElement<_D,_R,_d_> │ │ │ │ │ +  The local p0 finite element on all types of reference elements. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00356_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1simplex2dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: p0.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,134 +70,118 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini1simplex2dlocalinterpolation.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_P0LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_P0LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │
9
│ │ │ │ -
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
23 template<class LB>
│ │ │ │ + │ │ │ │ +
11#include "p0/p0localbasis.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17
│ │ │ │ +
23 template<class D, class R, int d>
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
25 {
│ │ │ │ -
26
│ │ │ │ -
27 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
30 {
│ │ │ │ -
31 sign0 = sign1 = sign2 = 1.0;
│ │ │ │ -
32 }
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
40 {
│ │ │ │ -
41 using std::sqrt;
│ │ │ │ -
42 sign0 = sign1 = sign2 = 1.0;
│ │ │ │ -
43 if (s & 1)
│ │ │ │ -
44 {
│ │ │ │ -
45 sign0 = -1.0;
│ │ │ │ -
46 }
│ │ │ │ -
47 if (s & 2)
│ │ │ │ -
48 {
│ │ │ │ -
49 sign1 = -1.0;
│ │ │ │ -
50 }
│ │ │ │ -
51 if (s & 4)
│ │ │ │ -
52 {
│ │ │ │ -
53 sign2 = -1.0;
│ │ │ │ -
54 }
│ │ │ │ -
55
│ │ │ │ -
56 n0[0] = 0.0;
│ │ │ │ -
57 n0[1] = -1.0;
│ │ │ │ -
58 n1[0] = -1.0;
│ │ │ │ -
59 n1[1] = 0.0;
│ │ │ │ -
60 n2[0] = 1.0/sqrt(2.0);
│ │ │ │ -
61 n2[1] = 1.0/sqrt(2.0);
│ │ │ │ -
62 c0 = 0.5*n0[0] - 1.0*n0[1];
│ │ │ │ -
63 c1 = -1.0*n1[0] + 0.5*n1[1];
│ │ │ │ -
64 c2 = 0.5*n2[0] + 0.5*n2[1];
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
75 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
76 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
77 {
│ │ │ │ -
78 // f gives v*outer normal at a point on the edge!
│ │ │ │ -
79 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
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
│ │ │ │ -
81 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ -
82
│ │ │ │ -
83 out.resize(6);
│ │ │ │ -
84 fill(out.begin(), out.end(), 0.0);
│ │ │ │ -
85
│ │ │ │ -
86 const int qOrder = 4;
│ │ │ │ -
87 const Dune::QuadratureRule<Scalar,1>& rule = Dune::QuadratureRules<Scalar,1>::rule(Dune::GeometryTypes::simplex(1), qOrder);
│ │ │ │ -
88
│ │ │ │ -
89 for (typename Dune::QuadratureRule<Scalar,1>::const_iterator it=rule.begin(); it!=rule.end(); ++it)
│ │ │ │ -
90 {
│ │ │ │ -
91 Scalar qPos = it->position();
│ │ │ │ -
92 typename LB::Traits::DomainType localPos;
│ │ │ │ -
93
│ │ │ │ -
94 localPos[0] = qPos;
│ │ │ │ -
95 localPos[1] = 0.0;
│ │ │ │ -
96 auto y = f(localPos);
│ │ │ │ -
97 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0/c0;
│ │ │ │ -
98 out[3] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight()/c0;
│ │ │ │ -
99
│ │ │ │ -
100 localPos[0] = 0.0;
│ │ │ │ -
101 localPos[1] = qPos;
│ │ │ │ -
102 y = f(localPos);
│ │ │ │ -
103 out[1] += (y[0]*n1[0] + y[1]*n1[1])*it->weight()*sign1/c1;
│ │ │ │ -
104 out[4] += (y[0]*n1[0] + y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight()/c1;
│ │ │ │ -
105
│ │ │ │ -
106 localPos[0] = 1.0 - qPos;
│ │ │ │ -
107 localPos[1] = qPos;
│ │ │ │ -
108 y = f(localPos);
│ │ │ │ -
109 out[2] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2/c2;
│ │ │ │ -
110 out[5] += (y[0]*n2[0] + y[1]*n2[1])*(2.0*qPos - 1.0)*it->weight()/c2;
│ │ │ │ -
111 }
│ │ │ │ -
112 }
│ │ │ │ -
│ │ │ │ -
113
│ │ │ │ -
114 private:
│ │ │ │ -
115 typename LB::Traits::RangeFieldType sign0,sign1,sign2;
│ │ │ │ -
116 typename LB::Traits::DomainType n0,n1,n2;
│ │ │ │ -
117 typename LB::Traits::RangeFieldType c0,c1,c2;
│ │ │ │ -
118 };
│ │ │ │ -
│ │ │ │ -
119}
│ │ │ │ -
120
│ │ │ │ -
121#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALINTERPOLATION_HH
│ │ │ │ +
81#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on the reference triangle.
Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:25
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:76
│ │ │ │ -
BDM1Simplex2DLocalInterpolation(unsigned int s)
Make set number s, where 0 <= s < 8.
Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:39
│ │ │ │ -
BDM1Simplex2DLocalInterpolation()
Standard constructor.
Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:29
│ │ │ │ - │ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,138 +7,129 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1simplex2d │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalinterpolation.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_P0LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_P0LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 23 template │ │ │ │ │ -24 class BDM1Simplex2DLocalInterpolation │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include "p0/p0localbasis.hh" │ │ │ │ │ + 12#include "p0/p0localcoefficients.hh" │ │ │ │ │ + 13#include "p0/p0localinterpolation.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 17 │ │ │ │ │ + 23 template │ │ │ │ │ +24 class P0LocalFiniteElement │ │ │ │ │ 25 { │ │ │ │ │ - 26 │ │ │ │ │ - 27 public: │ │ │ │ │ -29 BDM1Simplex2DLocalInterpolation () │ │ │ │ │ - 30 { │ │ │ │ │ - 31 sign0 = sign1 = sign2 = 1.0; │ │ │ │ │ - 32 } │ │ │ │ │ - 33 │ │ │ │ │ -39 BDM1Simplex2DLocalInterpolation (unsigned int s) │ │ │ │ │ - 40 { │ │ │ │ │ - 41 using std::sqrt; │ │ │ │ │ - 42 sign0 = sign1 = sign2 = 1.0; │ │ │ │ │ - 43 if (s & 1) │ │ │ │ │ - 44 { │ │ │ │ │ - 45 sign0 = -1.0; │ │ │ │ │ - 46 } │ │ │ │ │ - 47 if (s & 2) │ │ │ │ │ + 26 public: │ │ │ │ │ + 29 typedef LocalFiniteElementTraits, P0LocalCoefficients, │ │ │ │ │ +30 P0LocalInterpolation > > Traits; │ │ │ │ │ + 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 │ │ │ │ │ +47 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ 48 { │ │ │ │ │ - 49 sign1 = -1.0; │ │ │ │ │ + 49 return coefficients; │ │ │ │ │ 50 } │ │ │ │ │ - 51 if (s & 4) │ │ │ │ │ - 52 { │ │ │ │ │ - 53 sign2 = -1.0; │ │ │ │ │ - 54 } │ │ │ │ │ - 55 │ │ │ │ │ - 56 n0[0] = 0.0; │ │ │ │ │ - 57 n0[1] = -1.0; │ │ │ │ │ - 58 n1[0] = -1.0; │ │ │ │ │ - 59 n1[1] = 0.0; │ │ │ │ │ - 60 n2[0] = 1.0/sqrt(2.0); │ │ │ │ │ - 61 n2[1] = 1.0/sqrt(2.0); │ │ │ │ │ - 62 c0 = 0.5*n0[0] - 1.0*n0[1]; │ │ │ │ │ - 63 c1 = -1.0*n1[0] + 0.5*n1[1]; │ │ │ │ │ - 64 c2 = 0.5*n2[0] + 0.5*n2[1]; │ │ │ │ │ - 65 } │ │ │ │ │ - 66 │ │ │ │ │ - 75 template │ │ │ │ │ -76 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ - 77 { │ │ │ │ │ - 78 // f gives v*outer normal at a point on the edge! │ │ │ │ │ - 79 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ + 51 │ │ │ │ │ +54 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 73 P0LocalBasis basis; │ │ │ │ │ + 74 P0LocalCoefficients coefficients; │ │ │ │ │ + 75 P0LocalInterpolation > interpolation; │ │ │ │ │ + 76 GeometryType gt; │ │ │ │ │ + 77 }; │ │ │ │ │ + 78 │ │ │ │ │ + 79} │ │ │ │ │ 80 │ │ │ │ │ - 81 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ - 82 │ │ │ │ │ - 83 out.resize(6); │ │ │ │ │ - 84 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ - 85 │ │ │ │ │ - 86 const int qOrder = 4; │ │ │ │ │ - 87 const Dune::QuadratureRule& rule = Dune:: │ │ │ │ │ -QuadratureRules::rule(Dune::GeometryTypes::simplex(1), qOrder); │ │ │ │ │ - 88 │ │ │ │ │ - 89 for (typename Dune::QuadratureRule::const_iterator it=rule.begin │ │ │ │ │ -(); it!=rule.end(); ++it) │ │ │ │ │ - 90 { │ │ │ │ │ - 91 Scalar qPos = it->position(); │ │ │ │ │ - 92 typename LB::Traits::DomainType localPos; │ │ │ │ │ - 93 │ │ │ │ │ - 94 localPos[0] = qPos; │ │ │ │ │ - 95 localPos[1] = 0.0; │ │ │ │ │ - 96 auto y = f(localPos); │ │ │ │ │ - 97 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0/c0; │ │ │ │ │ - 98 out[3] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight()/c0; │ │ │ │ │ - 99 │ │ │ │ │ - 100 localPos[0] = 0.0; │ │ │ │ │ - 101 localPos[1] = qPos; │ │ │ │ │ - 102 y = f(localPos); │ │ │ │ │ - 103 out[1] += (y[0]*n1[0] + y[1]*n1[1])*it->weight()*sign1/c1; │ │ │ │ │ - 104 out[4] += (y[0]*n1[0] + y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight()/c1; │ │ │ │ │ - 105 │ │ │ │ │ - 106 localPos[0] = 1.0 - qPos; │ │ │ │ │ - 107 localPos[1] = qPos; │ │ │ │ │ - 108 y = f(localPos); │ │ │ │ │ - 109 out[2] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2/c2; │ │ │ │ │ - 110 out[5] += (y[0]*n2[0] + y[1]*n2[1])*(2.0*qPos - 1.0)*it->weight()/c2; │ │ │ │ │ - 111 } │ │ │ │ │ - 112 } │ │ │ │ │ - 113 │ │ │ │ │ - 114 private: │ │ │ │ │ - 115 typename LB::Traits::RangeFieldType sign0,sign1,sign2; │ │ │ │ │ - 116 typename LB::Traits::DomainType n0,n1,n2; │ │ │ │ │ - 117 typename LB::Traits::RangeFieldType c0,c1,c2; │ │ │ │ │ - 118 }; │ │ │ │ │ - 119} │ │ │ │ │ - 120 │ │ │ │ │ - 121#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 81#endif │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ +p0localinterpolation.hh │ │ │ │ │ +p0localbasis.hh │ │ │ │ │ +p0localcoefficients.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Simplex2DLocalInterpolation │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on the reference triangle. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:25 │ │ │ │ │ -Dune::BDM1Simplex2DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Interpolate a given function with shape functions. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:76 │ │ │ │ │ -Dune::BDM1Simplex2DLocalInterpolation::BDM1Simplex2DLocalInterpolation │ │ │ │ │ -BDM1Simplex2DLocalInterpolation(unsigned int s) │ │ │ │ │ -Make set number s, where 0 <= s < 8. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:39 │ │ │ │ │ -Dune::BDM1Simplex2DLocalInterpolation::BDM1Simplex2DLocalInterpolation │ │ │ │ │ -BDM1Simplex2DLocalInterpolation() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:29 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::P0LocalFiniteElement │ │ │ │ │ +The local p0 finite element on all types of reference elements. │ │ │ │ │ +Definition p0.hh:25 │ │ │ │ │ +Dune::P0LocalFiniteElement::P0LocalFiniteElement │ │ │ │ │ +P0LocalFiniteElement(const GeometryType &type) │ │ │ │ │ +Definition p0.hh:34 │ │ │ │ │ +Dune::P0LocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +The number of shape functions – here: 1. │ │ │ │ │ +Definition p0.hh:60 │ │ │ │ │ +Dune::P0LocalFiniteElement::type │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +Definition p0.hh:67 │ │ │ │ │ +Dune::P0LocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition p0.hh:40 │ │ │ │ │ +Dune::P0LocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< P0LocalBasis< D, R, d >, P0LocalCoefficients, │ │ │ │ │ +P0LocalInterpolation< P0LocalBasis< D, R, d > > > Traits │ │ │ │ │ +Definition p0.hh:30 │ │ │ │ │ +Dune::P0LocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition p0.hh:47 │ │ │ │ │ +Dune::P0LocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition p0.hh:54 │ │ │ │ │ +Dune::P0LocalBasis │ │ │ │ │ +Constant shape function. │ │ │ │ │ +Definition p0localbasis.hh:30 │ │ │ │ │ +Dune::P0LocalCoefficients │ │ │ │ │ +Layout map for P0 elements. │ │ │ │ │ +Definition p0localcoefficients.hh:24 │ │ │ │ │ +Dune::P0LocalInterpolation │ │ │ │ │ +Definition p0localinterpolation.hh:18 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00359.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1simplex2dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: q2.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
brezzidouglasmarini1simplex2dlocalcoefficients.hh File Reference
│ │ │ │ +
q2.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../../common/localkey.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::BDM1Simplex2DLocalCoefficients
 Layout map for Brezzi-Douglas-Marini-1 elements on triangles. More...
class  Dune::Q2FiniteElementFactory< Geometry, RF >
 Factory for global-valued Q23D elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,25 +6,27 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1simplex2d │ │ │ │ │ + * lagrange │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localkey.hh" │ │ │ │ │ +q2.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM1Simplex2DLocalCoefficients │ │ │ │ │ -  Layout map for Brezzi-Douglas-Marini-1 elements on triangles. More... │ │ │ │ │ +class  Dune::Q2FiniteElementFactory<_Geometry,_RF_> │ │ │ │ │ +  Factory for global-valued Q23D elements. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00359_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1simplex2dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: q2.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,78 +70,77 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini1simplex2dlocalcoefficients.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_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_Q2_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_Q2_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <vector>
│ │ │ │ +
8#include <dune/common/typetraits.hh>
│ │ │ │ +
9#include <dune/geometry/type.hh>
│ │ │ │
10
│ │ │ │ -
11#include "../../common/localkey.hh"
│ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25
│ │ │ │ -
26 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ -
30 for (std::size_t i=0; i<3; i++)
│ │ │ │ -
31 {
│ │ │ │ -
32 li[i] = LocalKey(i,1,0);
│ │ │ │ -
33 li[3 + i] = LocalKey(i,1,1);
│ │ │ │ -
34 }
│ │ │ │ -
35 }
│ │ │ │ -
│ │ │ │ -
36
│ │ │ │ -
│ │ │ │ -
38 std::size_t size () const
│ │ │ │ -
39 {
│ │ │ │ -
40 return 6;
│ │ │ │ -
41 }
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
│ │ │ │ -
44 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
45 {
│ │ │ │ -
46 return li[i];
│ │ │ │ -
47 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
49 private:
│ │ │ │ -
50 std::vector<LocalKey> li;
│ │ │ │ -
51 };
│ │ │ │ -
│ │ │ │ -
52}
│ │ │ │ -
53#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALCOEFFICIENTS_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
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;
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Layout map for Brezzi-Douglas-Marini-1 elements on triangles.
Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:24
│ │ │ │ -
BDM1Simplex2DLocalCoefficients()
Standard constructor.
Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:28
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:44
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:38
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.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 {} │ │ │ │ │ @@ -7,81 +7,84 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1simplex2d │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalcoefficients.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_Q2_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_Q2_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ 10 │ │ │ │ │ - 11#include "../../common/localkey.hh" │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ -23 class BDM1Simplex2DLocalCoefficients │ │ │ │ │ - 24 { │ │ │ │ │ - 25 │ │ │ │ │ - 26 public: │ │ │ │ │ -28 BDM1Simplex2DLocalCoefficients () : li(6) │ │ │ │ │ - 29 { │ │ │ │ │ - 30 for (std::size_t i=0; i<3; i++) │ │ │ │ │ - 31 { │ │ │ │ │ - 32 li[i] = LocalKey(i,1,0); │ │ │ │ │ - 33 li[3 + i] = LocalKey(i,1,1); │ │ │ │ │ - 34 } │ │ │ │ │ - 35 } │ │ │ │ │ - 36 │ │ │ │ │ -38 std::size_t size () const │ │ │ │ │ - 39 { │ │ │ │ │ - 40 return 6; │ │ │ │ │ - 41 } │ │ │ │ │ - 42 │ │ │ │ │ -44 const LocalKey& localKey (std::size_t i) const │ │ │ │ │ - 45 { │ │ │ │ │ - 46 return li[i]; │ │ │ │ │ - 47 } │ │ │ │ │ - 48 │ │ │ │ │ - 49 private: │ │ │ │ │ - 50 std::vector li; │ │ │ │ │ - 51 }; │ │ │ │ │ - 52} │ │ │ │ │ - 53#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16 │ │ │ │ │ + 17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ + 20 │ │ │ │ │ + 25 template │ │ │ │ │ +26 class Q2FiniteElementFactory : │ │ │ │ │ + 27 public ScalarLocalToGlobalFiniteElementAdaptorFactory< │ │ │ │ │ + 28 typename std::conditional, │ │ │ │ │ + 30 LagrangeCubeLocalFiniteElement >::type, │ │ │ │ │ + 31 Geometry> │ │ │ │ │ + 32 { │ │ │ │ │ + 33 typedef typename std::conditional, │ │ │ │ │ + 35 LagrangeCubeLocalFiniteElement >::type LFE; │ │ │ │ │ + 36 typedef ScalarLocalToGlobalFiniteElementAdaptorFactory Base; │ │ │ │ │ + 37 │ │ │ │ │ + 38 static const LFE lfe; │ │ │ │ │ + 39 │ │ │ │ │ + 40 public: │ │ │ │ │ +42 Q2FiniteElementFactory() : Base(lfe) {} │ │ │ │ │ + 43 }; │ │ │ │ │ + 44 │ │ │ │ │ + 45 template │ │ │ │ │ + 46 const typename Q2FiniteElementFactory::LFE │ │ │ │ │ + 47 Q2FiniteElementFactory::lfe; │ │ │ │ │ + 48} │ │ │ │ │ + 49 │ │ │ │ │ + 50#endif │ │ │ │ │ +localtoglobaladaptors.hh │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ +lagrangecube.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Simplex2DLocalCoefficients │ │ │ │ │ -Layout map for Brezzi-Douglas-Marini-1 elements on triangles. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::BDM1Simplex2DLocalCoefficients::BDM1Simplex2DLocalCoefficients │ │ │ │ │ -BDM1Simplex2DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:28 │ │ │ │ │ -Dune::BDM1Simplex2DLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:44 │ │ │ │ │ -Dune::BDM1Simplex2DLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:38 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory │ │ │ │ │ +Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. │ │ │ │ │ +Definition localtoglobaladaptors.hh:244 │ │ │ │ │ +Dune::LagrangeCubeLocalFiniteElement │ │ │ │ │ +Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangecube.hh:711 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangesimplex.hh:838 │ │ │ │ │ +Dune::Q2FiniteElementFactory │ │ │ │ │ +Factory for global-valued Q23D elements. │ │ │ │ │ +Definition q2.hh:32 │ │ │ │ │ +Dune::Q2FiniteElementFactory::Q2FiniteElementFactory │ │ │ │ │ +Q2FiniteElementFactory() │ │ │ │ │ +default constructor │ │ │ │ │ +Definition q2.hh:42 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00362.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2cube2dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: p0localinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
brezzidouglasmarini2cube2dlocalcoefficients.hh File Reference
│ │ │ │ +
p0localinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../../common/localkey.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::BDM2Cube2DLocalCoefficients
 Layout map for Brezzi-Douglas-Marini-2 elements on quadrilaterals. More...
class  Dune::P0LocalInterpolation< LB >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini2cube2d │ │ │ │ │ + * lagrange │ │ │ │ │ + * p0 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini2cube2dlocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +p0localinterpolation.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include "../../common/localkey.hh" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM2Cube2DLocalCoefficients │ │ │ │ │ -  Layout map for Brezzi-Douglas-Marini-2 elements on quadrilaterals. │ │ │ │ │ - More... │ │ │ │ │ +class  Dune::P0LocalInterpolation<_LB_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00362_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2cube2dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: p0localinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,81 +70,76 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini2cube2dlocalcoefficients.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_P0LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_P0LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include "../../common/localkey.hh"
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9#include <dune/geometry/referenceelements.hh>
│ │ │ │ + │ │ │ │ +
11
│ │ │ │
12
│ │ │ │
13namespace Dune
│ │ │ │
14{
│ │ │ │
15
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25
│ │ │ │ -
26 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ -
30 for (std::size_t i = 0; i < 4; ++i)
│ │ │ │ -
31 {
│ │ │ │ -
32 li[3 * i] = LocalKey(i,1,0);
│ │ │ │ -
33 li[3 * i + 1] = LocalKey(i,1,1);
│ │ │ │ -
34 li[3 * i + 2] = LocalKey(i,1,2);
│ │ │ │ -
35 }
│ │ │ │ -
36 li[12] = LocalKey(0,0,0);
│ │ │ │ -
37 li[13] = LocalKey(0,0,1);
│ │ │ │ -
38 }
│ │ │ │ -
│ │ │ │ -
39
│ │ │ │ -
│ │ │ │ -
41 std::size_t size() const
│ │ │ │ -
42 {
│ │ │ │ -
43 return 14;
│ │ │ │ -
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} // end namespace Dune
│ │ │ │ -
56#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
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
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Layout map for Brezzi-Douglas-Marini-2 elements on quadrilaterals.
Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:24
│ │ │ │ -
BDM2Cube2DLocalCoefficients()
Standard constructor.
Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:28
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:47
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:41
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,82 +7,72 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini2cube2d │ │ │ │ │ -brezzidouglasmarini2cube2dlocalcoefficients.hh │ │ │ │ │ + * lagrange │ │ │ │ │ + * p0 │ │ │ │ │ +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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_P0LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_P0LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include "../../common/localkey.hh" │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ 12 │ │ │ │ │ 13namespace Dune │ │ │ │ │ 14{ │ │ │ │ │ 15 │ │ │ │ │ -23 class BDM2Cube2DLocalCoefficients │ │ │ │ │ - 24 { │ │ │ │ │ - 25 │ │ │ │ │ - 26 public: │ │ │ │ │ -28 BDM2Cube2DLocalCoefficients() : li(14) │ │ │ │ │ - 29 { │ │ │ │ │ - 30 for (std::size_t i = 0; i < 4; ++i) │ │ │ │ │ - 31 { │ │ │ │ │ - 32 li[3 * i] = LocalKey(i,1,0); │ │ │ │ │ - 33 li[3 * i + 1] = LocalKey(i,1,1); │ │ │ │ │ - 34 li[3 * i + 2] = LocalKey(i,1,2); │ │ │ │ │ - 35 } │ │ │ │ │ - 36 li[12] = LocalKey(0,0,0); │ │ │ │ │ - 37 li[13] = LocalKey(0,0,1); │ │ │ │ │ - 38 } │ │ │ │ │ - 39 │ │ │ │ │ -41 std::size_t size() const │ │ │ │ │ - 42 { │ │ │ │ │ - 43 return 14; │ │ │ │ │ - 44 } │ │ │ │ │ - 45 │ │ │ │ │ -47 const LocalKey& localKey(std::size_t i) const │ │ │ │ │ - 48 { │ │ │ │ │ - 49 return li[i]; │ │ │ │ │ - 50 } │ │ │ │ │ - 51 │ │ │ │ │ - 52 private: │ │ │ │ │ - 53 std::vector li; │ │ │ │ │ - 54 }; │ │ │ │ │ - 55} // end namespace Dune │ │ │ │ │ - 56#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 16 template │ │ │ │ │ +17 class P0LocalInterpolation │ │ │ │ │ + 18 { │ │ │ │ │ + 19 public: │ │ │ │ │ +20 P0LocalInterpolation (const GeometryType& gt) : gt_(gt) │ │ │ │ │ + 21 {} │ │ │ │ │ + 22 │ │ │ │ │ + 24 template │ │ │ │ │ +25 void interpolate (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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM2Cube2DLocalCoefficients │ │ │ │ │ -Layout map for Brezzi-Douglas-Marini-2 elements on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::BDM2Cube2DLocalCoefficients::BDM2Cube2DLocalCoefficients │ │ │ │ │ -BDM2Cube2DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:28 │ │ │ │ │ -Dune::BDM2Cube2DLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:47 │ │ │ │ │ -Dune::BDM2Cube2DLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:41 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ +Dune::P0LocalInterpolation │ │ │ │ │ +Definition p0localinterpolation.hh:18 │ │ │ │ │ +Dune::P0LocalInterpolation::P0LocalInterpolation │ │ │ │ │ +P0LocalInterpolation(const GeometryType >) │ │ │ │ │ +Definition p0localinterpolation.hh:20 │ │ │ │ │ +Dune::P0LocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +determine coefficients interpolating a given function │ │ │ │ │ +Definition p0localinterpolation.hh:25 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00365.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2cube2dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: p0localbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,37 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
brezzidouglasmarini2cube2dlocalbasis.hh File Reference
│ │ │ │ +
p0localbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <bitset>
│ │ │ │ -#include <numeric>
│ │ │ │ -#include <vector>
│ │ │ │ +
#include <numeric>
│ │ │ │ #include <dune/common/fmatrix.hh>
│ │ │ │ -#include "../../common/localbasis.hh"
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::BDM2Cube2DLocalBasis< D, R >
 First order Brezzi-Douglas-Marini shape functions on quadrilaterals. More...
class  Dune::P0LocalBasis< D, R, d >
 Constant shape function. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,29 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini2cube2d │ │ │ │ │ + * lagrange │ │ │ │ │ + * p0 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini2cube2dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +p0localbasis.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ -#include "../../common/localbasis.hh" │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM2Cube2DLocalBasis<_D,_R_> │ │ │ │ │ -  First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ - More... │ │ │ │ │ +class  Dune::P0LocalBasis<_D,_R,_d_> │ │ │ │ │ +  Constant shape function. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00365_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2cube2dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: p0localbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,320 +70,109 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini2cube2dlocalbasis.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_P0LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_P0LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <bitset>
│ │ │ │ -
10#include <numeric>
│ │ │ │ -
11#include <vector>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/common/fmatrix.hh>
│ │ │ │ -
14
│ │ │ │ -
15#include "../../common/localbasis.hh"
│ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
28 template<class D, class R>
│ │ │ │ +
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
│ │ │ │ -
32 public:
│ │ │ │ - │ │ │ │ -
34 R,2,Dune::FieldVector<R,2>,
│ │ │ │ -
35 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ -
36
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 {
│ │ │ │ -
40 for (size_t i=0; i<4; i++)
│ │ │ │ -
41 sign_[i] = 1.0;
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ -
49 BDM2Cube2DLocalBasis(std::bitset<4> s)
│ │ │ │ -
50 {
│ │ │ │ -
51 for (size_t i=0; i<4; i++)
│ │ │ │ -
52 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ -
53 }
│ │ │ │ -
│ │ │ │ -
54
│ │ │ │ -
│ │ │ │ -
56 unsigned int size() const
│ │ │ │ -
57 {
│ │ │ │ -
58 return 14;
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ -
67 inline void evaluateFunction(const typename Traits::DomainType& in,
│ │ │ │ -
68 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
69 {
│ │ │ │ -
70 out.resize(size());
│ │ │ │ -
71
│ │ │ │ -
72 out[0][0] = sign_[0]*(-2.25 + 5.25*in[0] + 7.5*in[1] - 7.5*in[0]*in[1] - 3.0*in[0]*in[0] - 7.5*in[1]*in[1] + 7.5*in[0]*in[1]*in[1]);
│ │ │ │ -
73 out[0][1] = sign_[0]*(-1.25*in[1] + 3.75*in[1]*in[1] - 2.5*in[1]*in[1]*in[1]);
│ │ │ │ -
74 out[1][0] = 3.0 - 3.0*in[0]-6.0*in[1] + 6.0*in[0]*in[1];
│ │ │ │ -
75 out[1][1] = 0.0;
│ │ │ │ -
76 out[2][0] = sign_[0]*(-3.75 + 3.75*in[0] + 22.5*in[1] - 22.5*in[0]*in[1] - 22.5*in[1]*in[1] + 22.5*in[0]*in[1]*in[1]);
│ │ │ │ -
77 out[2][1] = sign_[0]*(-3.75*in[1] + 11.25*in[1]*in[1] - 7.5*in[1]*in[1]*in[1]);
│ │ │ │ -
78 out[3][0] = sign_[1]*(-0.75*in[0] - 7.5*in[0]*in[1] + 3.0*in[0]*in[0] + 7.5*in[0]*in[1]*in[1]);
│ │ │ │ -
79 out[3][1] = sign_[1]*(-1.25*in[1] + 3.75*in[1]*in[1] - 2.5*in[1]*in[1]*in[1]);
│ │ │ │ -
80 out[4][0] = 3.0*in[0] - 6.0*in[0]*in[1];
│ │ │ │ -
81 out[4][1] = 0.0;
│ │ │ │ -
82 out[5][0] = sign_[1]*(+3.75*in[0] - 22.5*in[0]*in[1] + 22.5*in[0]*in[1]*in[1]);
│ │ │ │ -
83 out[5][1] = sign_[1]*(-3.75*in[1] + 11.25*in[1]*in[1] - 7.5*in[1]*in[1]*in[1]);
│ │ │ │ -
84 out[6][0] = sign_[2]*(-1.25*in[0] + 3.75*in[0]*in[0] - 2.5*in[0]*in[0]*in[0]);
│ │ │ │ -
85 out[6][1] = sign_[2]*(-2.25 + 7.5*in[0] + 5.25*in[1] - 7.5*in[0]*in[1] - 7.5*in[0]*in[0] - 3.0*in[1]*in[1] + 7.5*in[0]*in[0]*in[1]);
│ │ │ │ -
86 out[7][0] = 0.0;
│ │ │ │ -
87 out[7][1] = -3.0 + 6.0*in[0] + 3.0*in[1] - 6.0*in[0]*in[1];
│ │ │ │ -
88 out[8][0] = sign_[2]*(-3.75*in[0] + 11.25*in[0]*in[0] - 7.5*in[0]*in[0]*in[0]);
│ │ │ │ -
89 out[8][1] = sign_[2]*(-3.75 + 22.5*in[0] + 3.75*in[1] - 22.5*in[0]*in[1] - 22.5*in[0]*in[0] + 22.5*in[0]*in[0]*in[1]);
│ │ │ │ -
90 out[9][0] = sign_[3]*(-1.25*in[0] + 3.75*in[0]*in[0] - 2.5*in[0]*in[0]*in[0]);
│ │ │ │ -
91 out[9][1] = sign_[3]*(-0.75*in[1] - 7.5*in[0]*in[1] + 3.0*in[1]*in[1] + 7.5*in[0]*in[0]*in[1]);
│ │ │ │ -
92 out[10][0] = 0.0;
│ │ │ │ -
93 out[10][1] = -3.0*in[1] + 6.0*in[0]*in[1];
│ │ │ │ -
94 out[11][0] = sign_[3]*(-3.75*in[0] + 11.25*in[0]*in[0] - 7.5*in[0]*in[0]*in[0]);
│ │ │ │ -
95 out[11][1] = sign_[3]*(3.75*in[1] - 22.5*in[0]*in[1] + 22.5*in[0]*in[0]*in[1]);
│ │ │ │ -
96 out[12][0] = 6.0*in[0] - 6.0*in[0]*in[0];
│ │ │ │ -
97 out[12][1] = 0.0;
│ │ │ │ -
98 out[13][0] = 0.0;
│ │ │ │ -
99 out[13][1] = 6.0*in[1] - 6.0*in[1]*in[1];
│ │ │ │ -
100 }
│ │ │ │ -
│ │ │ │ -
101
│ │ │ │ -
│ │ │ │ -
108 inline void evaluateJacobian(const typename Traits::DomainType& in,
│ │ │ │ -
109 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
110 {
│ │ │ │ -
111 out.resize(size());
│ │ │ │ -
112
│ │ │ │ -
113 out[0][0][0] = sign_[0]*(5.25 - 7.5*in[1] - 6.0*in[0] + 7.5*in[1]*in[1]);
│ │ │ │ -
114 out[0][0][1] = sign_[0]*(7.5 - 7.5*in[0] - 15.0*in[1] + 15.0*in[0]*in[1]);
│ │ │ │ -
115 out[0][1][0] = 0.0;
│ │ │ │ -
116 out[0][1][1] = sign_[0]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]);
│ │ │ │ -
117
│ │ │ │ -
118 out[1][0][0] = -3.0 + 6.0*in[1];
│ │ │ │ -
119 out[1][0][1] = -6.0 + 6.0*in[0];
│ │ │ │ -
120 out[1][1][0] = 0.0;
│ │ │ │ -
121 out[1][1][1] = 0.0;
│ │ │ │ -
122
│ │ │ │ -
123 out[2][0][0] = sign_[0]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]);
│ │ │ │ -
124 out[2][0][1] = sign_[0]*(22.5 - 22.5*in[0] - 45.0*in[1] + 45.0*in[0]*in[1]);
│ │ │ │ -
125 out[2][1][0] = 0.0;
│ │ │ │ -
126 out[2][1][1] = sign_[0]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]);
│ │ │ │ -
127
│ │ │ │ -
128 out[3][0][0] = sign_[1]*(-0.75 - 7.5*in[1] + 6.0*in[0] + 7.5*in[1]*in[1]);
│ │ │ │ -
129 out[3][0][1] = sign_[1]*(-7.5*in[0] + 15.0*in[0]*in[1]);
│ │ │ │ -
130 out[3][1][0] = 0.0;
│ │ │ │ -
131 out[3][1][1] = sign_[1]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]);
│ │ │ │ -
132
│ │ │ │ -
133 out[4][0][0] = 3.0 - 6.0*in[1];
│ │ │ │ -
134 out[4][0][1] = -6.0*in[0];
│ │ │ │ -
135 out[4][1][0] = 0.0;
│ │ │ │ -
136 out[4][1][1] = 0.0;
│ │ │ │ -
137
│ │ │ │ -
138 out[5][0][0] = sign_[1]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]);
│ │ │ │ -
139 out[5][0][1] = sign_[1]*(-22.5*in[0] + 45.0*in[0]*in[1]);
│ │ │ │ -
140 out[5][1][0] = 0.0;
│ │ │ │ -
141 out[5][1][1] = sign_[1]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]);
│ │ │ │ -
142
│ │ │ │ -
143 out[6][0][0] = sign_[2]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]);
│ │ │ │ -
144 out[6][0][1] = 0.0;
│ │ │ │ -
145 out[6][1][0] = sign_[2]*(7.5 - 7.5*in[1] - 15.0*in[0] + 15.0*in[0]*in[1]);
│ │ │ │ -
146 out[6][1][1] = sign_[2]*(5.25 - 7.5*in[0]- 6.0*in[1] + 7.5*in[0]*in[0]);
│ │ │ │ -
147
│ │ │ │ -
148 out[7][0][0] = 0.0;
│ │ │ │ -
149 out[7][0][1] = 0.0;
│ │ │ │ -
150 out[7][1][0] = 6.0 - 6.0*in[1];
│ │ │ │ -
151 out[7][1][1] = 3.0 - 6.0*in[0];
│ │ │ │ -
152
│ │ │ │ -
153 out[8][0][0] = sign_[2]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]);
│ │ │ │ -
154 out[8][0][1] = 0.0;
│ │ │ │ -
155 out[8][1][0] = sign_[2]*(22.5 - 22.5*in[1] - 45.0*in[0] + 45.0*in[0]*in[1]);
│ │ │ │ -
156 out[8][1][1] = sign_[2]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]);
│ │ │ │ -
157
│ │ │ │ -
158 out[9][0][0] = sign_[3]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]);
│ │ │ │ -
159 out[9][0][1] = 0.0;
│ │ │ │ -
160 out[9][1][0] = sign_[3]*(-7.5*in[1] + 15.0*in[0]*in[1]);
│ │ │ │ -
161 out[9][1][1] = sign_[3]*(-0.75 - 7.5*in[0] + 6.0*in[1] + 7.5*in[0]*in[0]);
│ │ │ │ -
162
│ │ │ │ -
163 out[10][0][0] = 0.0;
│ │ │ │ -
164 out[10][0][1] = 0.0;
│ │ │ │ -
165 out[10][1][0] = 6.0*in[1];
│ │ │ │ -
166 out[10][1][1] = -3.0 + 6.0*in[0];
│ │ │ │ -
167
│ │ │ │ -
168 out[11][0][0] = sign_[3]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]);
│ │ │ │ -
169 out[11][0][1] = 0.0;
│ │ │ │ -
170 out[11][1][0] = sign_[3]*(-22.5*in[1] + 45*in[0]*in[1]);
│ │ │ │ -
171 out[11][1][1] = sign_[3]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]);
│ │ │ │ -
172
│ │ │ │ -
173 out[12][0][0] = 6.0 - 12.0*in[0];
│ │ │ │ -
174 out[12][0][1] = 0.0;
│ │ │ │ -
175 out[12][1][0] = 0.0;
│ │ │ │ -
176 out[12][1][1] = 0.0;
│ │ │ │ -
177
│ │ │ │ -
178 out[13][0][0] = 0.0;
│ │ │ │ -
179 out[13][0][1] = 0.0;
│ │ │ │ -
180 out[13][1][0] = 0.0;
│ │ │ │ -
181 out[13][1][1] = 6.0 - 12.0*in[1];
│ │ │ │ -
182 }
│ │ │ │ -
│ │ │ │ -
183
│ │ │ │ -
│ │ │ │ -
185 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ -
186 const typename Traits::DomainType& in, // position
│ │ │ │ -
187 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
188 {
│ │ │ │ -
189 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
190 if (totalOrder == 0) {
│ │ │ │ -
191 evaluateFunction(in, out);
│ │ │ │ -
192 } else if (totalOrder == 1) {
│ │ │ │ -
193 out.resize(size());
│ │ │ │ -
194 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
195
│ │ │ │ -
196 switch (direction) {
│ │ │ │ -
197 case 0:
│ │ │ │ -
198 out[0][0] = sign_[0]*(5.25 - 7.5*in[1] - 6.0*in[0] + 7.5*in[1]*in[1]);
│ │ │ │ -
199 out[0][1] = 0.0;
│ │ │ │ -
200
│ │ │ │ -
201 out[1][0] = -3.0 + 6.0*in[1];
│ │ │ │ -
202 out[1][1] = 0.0;
│ │ │ │ -
203
│ │ │ │ -
204 out[2][0] = sign_[0]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]);
│ │ │ │ -
205 out[2][1] = 0.0;
│ │ │ │ -
206
│ │ │ │ -
207 out[3][0] = sign_[1]*(-0.75 - 7.5*in[1] + 6.0*in[0] + 7.5*in[1]*in[1]);
│ │ │ │ -
208 out[3][1] = 0.0;
│ │ │ │ -
209
│ │ │ │ -
210 out[4][0] = 3.0 - 6.0*in[1];
│ │ │ │ -
211 out[4][1] = 0.0;
│ │ │ │ -
212
│ │ │ │ -
213 out[5][0] = sign_[1]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]);
│ │ │ │ -
214 out[5][1] = 0.0;
│ │ │ │ -
215
│ │ │ │ -
216 out[6][0] = sign_[2]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]);
│ │ │ │ -
217 out[6][1] = sign_[2]*(7.5 - 7.5*in[1] - 15.0*in[0] + 15.0*in[0]*in[1]);
│ │ │ │ -
218
│ │ │ │ -
219 out[7][0] = 0.0;
│ │ │ │ -
220 out[7][1] = 6.0 - 6.0*in[1];
│ │ │ │ -
221
│ │ │ │ -
222 out[8][0] = sign_[2]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]);
│ │ │ │ -
223 out[8][1] = sign_[2]*(22.5 - 22.5*in[1] - 45.0*in[0] + 45.0*in[0]*in[1]);
│ │ │ │ -
224
│ │ │ │ -
225 out[9][0] = sign_[3]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]);
│ │ │ │ -
226 out[9][1] = sign_[3]*(-7.5*in[1] + 15.0*in[0]*in[1]);
│ │ │ │ -
227
│ │ │ │ -
228 out[10][0] = 0.0;
│ │ │ │ -
229 out[10][1] = 6.0*in[1];
│ │ │ │ -
230
│ │ │ │ -
231 out[11][0] = sign_[3]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]);
│ │ │ │ -
232 out[11][1] = sign_[3]*(-22.5*in[1] + 45*in[0]*in[1]);
│ │ │ │ -
233
│ │ │ │ -
234 out[12][0] = 6.0 - 12.0*in[0];
│ │ │ │ -
235 out[12][1] = 0.0;
│ │ │ │ -
236
│ │ │ │ -
237 out[13][0] = 0.0;
│ │ │ │ -
238 out[13][1] = 0.0;
│ │ │ │ -
239 break;
│ │ │ │ -
240 case 1:
│ │ │ │ -
241 out[0][0] = sign_[0]*(7.5 - 7.5*in[0] - 15.0*in[1] + 15.0*in[0]*in[1]);
│ │ │ │ -
242 out[0][1] = sign_[0]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]);
│ │ │ │ -
243
│ │ │ │ -
244 out[1][0] = -6.0 + 6.0*in[0];
│ │ │ │ -
245 out[1][1] = 0.0;
│ │ │ │ -
246
│ │ │ │ -
247 out[2][0] = sign_[0]*(22.5 - 22.5*in[0] - 45.0*in[1] + 45.0*in[0]*in[1]);
│ │ │ │ -
248 out[2][1] = sign_[0]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]);
│ │ │ │ -
249
│ │ │ │ -
250 out[3][0] = sign_[1]*(-7.5*in[0] + 15.0*in[0]*in[1]);
│ │ │ │ -
251 out[3][1] = sign_[1]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]);
│ │ │ │ -
252
│ │ │ │ -
253 out[4][0] = -6.0*in[0];
│ │ │ │ -
254 out[4][1] = 0.0;
│ │ │ │ -
255
│ │ │ │ -
256 out[5][0] = sign_[1]*(-22.5*in[0] + 45.0*in[0]*in[1]);
│ │ │ │ -
257 out[5][1] = sign_[1]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]);
│ │ │ │ -
258
│ │ │ │ -
259 out[6][0] = 0.0;
│ │ │ │ -
260 out[6][1] = sign_[2]*(5.25 - 7.5*in[0]- 6.0*in[1] + 7.5*in[0]*in[0]);
│ │ │ │ -
261
│ │ │ │ -
262 out[7][0] = 0.0;
│ │ │ │ -
263 out[7][1] = 3.0 - 6.0*in[0];
│ │ │ │ -
264
│ │ │ │ -
265 out[8][0] = 0.0;
│ │ │ │ -
266 out[8][1] = sign_[2]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]);
│ │ │ │ -
267
│ │ │ │ -
268 out[9][0] = 0.0;
│ │ │ │ -
269 out[9][1] = sign_[3]*(-0.75 - 7.5*in[0] + 6.0*in[1] + 7.5*in[0]*in[0]);
│ │ │ │ -
270
│ │ │ │ -
271 out[10][0] = 0.0;
│ │ │ │ -
272 out[10][1] = -3.0 + 6.0*in[0];
│ │ │ │ -
273
│ │ │ │ -
274 out[11][0] = 0.0;
│ │ │ │ -
275 out[11][1] = sign_[3]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]);
│ │ │ │ -
276
│ │ │ │ -
277 out[12][0] = 0.0;
│ │ │ │ -
278 out[12][1] = 0.0;
│ │ │ │ -
279
│ │ │ │ -
280 out[13][0] = 0.0;
│ │ │ │ -
281 out[13][1] = 6.0 - 12.0*in[1];
│ │ │ │ -
282 break;
│ │ │ │ -
283 default:
│ │ │ │ -
284 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
285 }
│ │ │ │ -
286 } else {
│ │ │ │ -
287 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
288 }
│ │ │ │ -
289 }
│ │ │ │ -
│ │ │ │ -
290
│ │ │ │ -
│ │ │ │ -
292 unsigned int order() const
│ │ │ │ -
293 {
│ │ │ │ -
294 return 3;
│ │ │ │ -
295 }
│ │ │ │ -
│ │ │ │ -
296
│ │ │ │ -
297 private:
│ │ │ │ -
298 std::array<R,4> sign_;
│ │ │ │ -
299 };
│ │ │ │ -
│ │ │ │ -
300} // end namespace Dune
│ │ │ │ -
301#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
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
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:30
│ │ │ │ -
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 brezzidouglasmarini2cube2dlocalbasis.hh:185
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:292
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:67
│ │ │ │ -
BDM2Cube2DLocalBasis()
Standard constructor.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:38
│ │ │ │ -
BDM2Cube2DLocalBasis(std::bitset< 4 > s)
Make set number s, where 0 <= s < 16.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:49
│ │ │ │ -
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition brezzidouglasmarini2cube2dlocalbasis.hh:35
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition brezzidouglasmarini2cube2dlocalbasis.hh:56
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:108
│ │ │ │
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 {} │ │ │ │ │ @@ -7,352 +7,122 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini2cube2d │ │ │ │ │ -brezzidouglasmarini2cube2dlocalbasis.hh │ │ │ │ │ + * lagrange │ │ │ │ │ + * p0 │ │ │ │ │ +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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_P0LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_P0LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include "../../common/localbasis.hh" │ │ │ │ │ - 16 │ │ │ │ │ - 17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ - 28 template │ │ │ │ │ -29 class BDM2Cube2DLocalBasis │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14namespace Dune │ │ │ │ │ + 15{ │ │ │ │ │ + 28 template │ │ │ │ │ +29 class P0LocalBasis │ │ │ │ │ 30 { │ │ │ │ │ - 31 │ │ │ │ │ - 32 public: │ │ │ │ │ - 33 typedef LocalBasisTraits, │ │ │ │ │ - 34 R,2,Dune::FieldVector, │ │ │ │ │ -35 Dune::FieldMatrix > Traits; │ │ │ │ │ - 36 │ │ │ │ │ -38 BDM2Cube2DLocalBasis() │ │ │ │ │ - 39 { │ │ │ │ │ - 40 for (size_t i=0; i<4; i++) │ │ │ │ │ - 41 sign_[i] = 1.0; │ │ │ │ │ - 42 } │ │ │ │ │ - 43 │ │ │ │ │ -49 BDM2Cube2DLocalBasis(std::bitset<4> s) │ │ │ │ │ - 50 { │ │ │ │ │ - 51 for (size_t i=0; i<4; i++) │ │ │ │ │ - 52 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ - 53 } │ │ │ │ │ - 54 │ │ │ │ │ -56 unsigned int size() const │ │ │ │ │ - 57 { │ │ │ │ │ - 58 return 14; │ │ │ │ │ - 59 } │ │ │ │ │ - 60 │ │ │ │ │ -67 inline void evaluateFunction(const typename Traits::DomainType& in, │ │ │ │ │ - 68 std::vector& out) const │ │ │ │ │ - 69 { │ │ │ │ │ - 70 out.resize(size()); │ │ │ │ │ - 71 │ │ │ │ │ - 72 out[0][0] = sign_[0]*(-2.25 + 5.25*in[0] + 7.5*in[1] - 7.5*in[0]*in[1] - │ │ │ │ │ -3.0*in[0]*in[0] - 7.5*in[1]*in[1] + 7.5*in[0]*in[1]*in[1]); │ │ │ │ │ - 73 out[0][1] = sign_[0]*(-1.25*in[1] + 3.75*in[1]*in[1] - 2.5*in[1]*in[1]*in │ │ │ │ │ -[1]); │ │ │ │ │ - 74 out[1][0] = 3.0 - 3.0*in[0]-6.0*in[1] + 6.0*in[0]*in[1]; │ │ │ │ │ - 75 out[1][1] = 0.0; │ │ │ │ │ - 76 out[2][0] = sign_[0]*(-3.75 + 3.75*in[0] + 22.5*in[1] - 22.5*in[0]*in[1] - │ │ │ │ │ -22.5*in[1]*in[1] + 22.5*in[0]*in[1]*in[1]); │ │ │ │ │ - 77 out[2][1] = sign_[0]*(-3.75*in[1] + 11.25*in[1]*in[1] - 7.5*in[1]*in[1]*in │ │ │ │ │ -[1]); │ │ │ │ │ - 78 out[3][0] = sign_[1]*(-0.75*in[0] - 7.5*in[0]*in[1] + 3.0*in[0]*in[0] + │ │ │ │ │ -7.5*in[0]*in[1]*in[1]); │ │ │ │ │ - 79 out[3][1] = sign_[1]*(-1.25*in[1] + 3.75*in[1]*in[1] - 2.5*in[1]*in[1]*in │ │ │ │ │ -[1]); │ │ │ │ │ - 80 out[4][0] = 3.0*in[0] - 6.0*in[0]*in[1]; │ │ │ │ │ - 81 out[4][1] = 0.0; │ │ │ │ │ - 82 out[5][0] = sign_[1]*(+3.75*in[0] - 22.5*in[0]*in[1] + 22.5*in[0]*in[1]*in │ │ │ │ │ -[1]); │ │ │ │ │ - 83 out[5][1] = sign_[1]*(-3.75*in[1] + 11.25*in[1]*in[1] - 7.5*in[1]*in[1]*in │ │ │ │ │ -[1]); │ │ │ │ │ - 84 out[6][0] = sign_[2]*(-1.25*in[0] + 3.75*in[0]*in[0] - 2.5*in[0]*in[0]*in │ │ │ │ │ -[0]); │ │ │ │ │ - 85 out[6][1] = sign_[2]*(-2.25 + 7.5*in[0] + 5.25*in[1] - 7.5*in[0]*in[1] - │ │ │ │ │ -7.5*in[0]*in[0] - 3.0*in[1]*in[1] + 7.5*in[0]*in[0]*in[1]); │ │ │ │ │ - 86 out[7][0] = 0.0; │ │ │ │ │ - 87 out[7][1] = -3.0 + 6.0*in[0] + 3.0*in[1] - 6.0*in[0]*in[1]; │ │ │ │ │ - 88 out[8][0] = sign_[2]*(-3.75*in[0] + 11.25*in[0]*in[0] - 7.5*in[0]*in[0]*in │ │ │ │ │ -[0]); │ │ │ │ │ - 89 out[8][1] = sign_[2]*(-3.75 + 22.5*in[0] + 3.75*in[1] - 22.5*in[0]*in[1] - │ │ │ │ │ -22.5*in[0]*in[0] + 22.5*in[0]*in[0]*in[1]); │ │ │ │ │ - 90 out[9][0] = sign_[3]*(-1.25*in[0] + 3.75*in[0]*in[0] - 2.5*in[0]*in[0]*in │ │ │ │ │ -[0]); │ │ │ │ │ - 91 out[9][1] = sign_[3]*(-0.75*in[1] - 7.5*in[0]*in[1] + 3.0*in[1]*in[1] + │ │ │ │ │ -7.5*in[0]*in[0]*in[1]); │ │ │ │ │ - 92 out[10][0] = 0.0; │ │ │ │ │ - 93 out[10][1] = -3.0*in[1] + 6.0*in[0]*in[1]; │ │ │ │ │ - 94 out[11][0] = sign_[3]*(-3.75*in[0] + 11.25*in[0]*in[0] - 7.5*in[0]*in[0]*in │ │ │ │ │ -[0]); │ │ │ │ │ - 95 out[11][1] = sign_[3]*(3.75*in[1] - 22.5*in[0]*in[1] + 22.5*in[0]*in[0]*in │ │ │ │ │ -[1]); │ │ │ │ │ - 96 out[12][0] = 6.0*in[0] - 6.0*in[0]*in[0]; │ │ │ │ │ - 97 out[12][1] = 0.0; │ │ │ │ │ - 98 out[13][0] = 0.0; │ │ │ │ │ - 99 out[13][1] = 6.0*in[1] - 6.0*in[1]*in[1]; │ │ │ │ │ - 100 } │ │ │ │ │ - 101 │ │ │ │ │ -108 inline void evaluateJacobian(const typename Traits::DomainType& in, │ │ │ │ │ - 109 std::vector& out) const │ │ │ │ │ - 110 { │ │ │ │ │ - 111 out.resize(size()); │ │ │ │ │ - 112 │ │ │ │ │ - 113 out[0][0][0] = sign_[0]*(5.25 - 7.5*in[1] - 6.0*in[0] + 7.5*in[1]*in[1]); │ │ │ │ │ - 114 out[0][0][1] = sign_[0]*(7.5 - 7.5*in[0] - 15.0*in[1] + 15.0*in[0]*in[1]); │ │ │ │ │ - 115 out[0][1][0] = 0.0; │ │ │ │ │ - 116 out[0][1][1] = sign_[0]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]); │ │ │ │ │ - 117 │ │ │ │ │ - 118 out[1][0][0] = -3.0 + 6.0*in[1]; │ │ │ │ │ - 119 out[1][0][1] = -6.0 + 6.0*in[0]; │ │ │ │ │ - 120 out[1][1][0] = 0.0; │ │ │ │ │ - 121 out[1][1][1] = 0.0; │ │ │ │ │ - 122 │ │ │ │ │ - 123 out[2][0][0] = sign_[0]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]); │ │ │ │ │ - 124 out[2][0][1] = sign_[0]*(22.5 - 22.5*in[0] - 45.0*in[1] + 45.0*in[0]*in │ │ │ │ │ -[1]); │ │ │ │ │ - 125 out[2][1][0] = 0.0; │ │ │ │ │ - 126 out[2][1][1] = sign_[0]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]); │ │ │ │ │ - 127 │ │ │ │ │ - 128 out[3][0][0] = sign_[1]*(-0.75 - 7.5*in[1] + 6.0*in[0] + 7.5*in[1]*in[1]); │ │ │ │ │ - 129 out[3][0][1] = sign_[1]*(-7.5*in[0] + 15.0*in[0]*in[1]); │ │ │ │ │ - 130 out[3][1][0] = 0.0; │ │ │ │ │ - 131 out[3][1][1] = sign_[1]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]); │ │ │ │ │ - 132 │ │ │ │ │ - 133 out[4][0][0] = 3.0 - 6.0*in[1]; │ │ │ │ │ - 134 out[4][0][1] = -6.0*in[0]; │ │ │ │ │ - 135 out[4][1][0] = 0.0; │ │ │ │ │ - 136 out[4][1][1] = 0.0; │ │ │ │ │ - 137 │ │ │ │ │ - 138 out[5][0][0] = sign_[1]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]); │ │ │ │ │ - 139 out[5][0][1] = sign_[1]*(-22.5*in[0] + 45.0*in[0]*in[1]); │ │ │ │ │ - 140 out[5][1][0] = 0.0; │ │ │ │ │ - 141 out[5][1][1] = sign_[1]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]); │ │ │ │ │ - 142 │ │ │ │ │ - 143 out[6][0][0] = sign_[2]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]); │ │ │ │ │ - 144 out[6][0][1] = 0.0; │ │ │ │ │ - 145 out[6][1][0] = sign_[2]*(7.5 - 7.5*in[1] - 15.0*in[0] + 15.0*in[0]*in[1]); │ │ │ │ │ - 146 out[6][1][1] = sign_[2]*(5.25 - 7.5*in[0]- 6.0*in[1] + 7.5*in[0]*in[0]); │ │ │ │ │ - 147 │ │ │ │ │ - 148 out[7][0][0] = 0.0; │ │ │ │ │ - 149 out[7][0][1] = 0.0; │ │ │ │ │ - 150 out[7][1][0] = 6.0 - 6.0*in[1]; │ │ │ │ │ - 151 out[7][1][1] = 3.0 - 6.0*in[0]; │ │ │ │ │ - 152 │ │ │ │ │ - 153 out[8][0][0] = sign_[2]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]); │ │ │ │ │ - 154 out[8][0][1] = 0.0; │ │ │ │ │ - 155 out[8][1][0] = sign_[2]*(22.5 - 22.5*in[1] - 45.0*in[0] + 45.0*in[0]*in │ │ │ │ │ -[1]); │ │ │ │ │ - 156 out[8][1][1] = sign_[2]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]); │ │ │ │ │ - 157 │ │ │ │ │ - 158 out[9][0][0] = sign_[3]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]); │ │ │ │ │ - 159 out[9][0][1] = 0.0; │ │ │ │ │ - 160 out[9][1][0] = sign_[3]*(-7.5*in[1] + 15.0*in[0]*in[1]); │ │ │ │ │ - 161 out[9][1][1] = sign_[3]*(-0.75 - 7.5*in[0] + 6.0*in[1] + 7.5*in[0]*in[0]); │ │ │ │ │ - 162 │ │ │ │ │ - 163 out[10][0][0] = 0.0; │ │ │ │ │ - 164 out[10][0][1] = 0.0; │ │ │ │ │ - 165 out[10][1][0] = 6.0*in[1]; │ │ │ │ │ - 166 out[10][1][1] = -3.0 + 6.0*in[0]; │ │ │ │ │ - 167 │ │ │ │ │ - 168 out[11][0][0] = sign_[3]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]); │ │ │ │ │ - 169 out[11][0][1] = 0.0; │ │ │ │ │ - 170 out[11][1][0] = sign_[3]*(-22.5*in[1] + 45*in[0]*in[1]); │ │ │ │ │ - 171 out[11][1][1] = sign_[3]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]); │ │ │ │ │ - 172 │ │ │ │ │ - 173 out[12][0][0] = 6.0 - 12.0*in[0]; │ │ │ │ │ - 174 out[12][0][1] = 0.0; │ │ │ │ │ - 175 out[12][1][0] = 0.0; │ │ │ │ │ - 176 out[12][1][1] = 0.0; │ │ │ │ │ - 177 │ │ │ │ │ - 178 out[13][0][0] = 0.0; │ │ │ │ │ - 179 out[13][0][1] = 0.0; │ │ │ │ │ - 180 out[13][1][0] = 0.0; │ │ │ │ │ - 181 out[13][1][1] = 6.0 - 12.0*in[1]; │ │ │ │ │ - 182 } │ │ │ │ │ - 183 │ │ │ │ │ -185 void partial (const std::array& order, │ │ │ │ │ - 186 const typename Traits::DomainType& in, // position │ │ │ │ │ - 187 std::vector& out) const // return value │ │ │ │ │ - 188 { │ │ │ │ │ - 189 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ - 190 if (totalOrder == 0) { │ │ │ │ │ - 191 evaluateFunction(in, out); │ │ │ │ │ - 192 } else if (totalOrder == 1) { │ │ │ │ │ - 193 out.resize(size()); │ │ │ │ │ - 194 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ - 195 │ │ │ │ │ - 196 switch (direction) { │ │ │ │ │ - 197 case 0: │ │ │ │ │ - 198 out[0][0] = sign_[0]*(5.25 - 7.5*in[1] - 6.0*in[0] + 7.5*in[1]*in[1]); │ │ │ │ │ - 199 out[0][1] = 0.0; │ │ │ │ │ - 200 │ │ │ │ │ - 201 out[1][0] = -3.0 + 6.0*in[1]; │ │ │ │ │ - 202 out[1][1] = 0.0; │ │ │ │ │ - 203 │ │ │ │ │ - 204 out[2][0] = sign_[0]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]); │ │ │ │ │ - 205 out[2][1] = 0.0; │ │ │ │ │ - 206 │ │ │ │ │ - 207 out[3][0] = sign_[1]*(-0.75 - 7.5*in[1] + 6.0*in[0] + 7.5*in[1]*in[1]); │ │ │ │ │ - 208 out[3][1] = 0.0; │ │ │ │ │ - 209 │ │ │ │ │ - 210 out[4][0] = 3.0 - 6.0*in[1]; │ │ │ │ │ - 211 out[4][1] = 0.0; │ │ │ │ │ - 212 │ │ │ │ │ - 213 out[5][0] = sign_[1]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]); │ │ │ │ │ - 214 out[5][1] = 0.0; │ │ │ │ │ - 215 │ │ │ │ │ - 216 out[6][0] = sign_[2]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]); │ │ │ │ │ - 217 out[6][1] = sign_[2]*(7.5 - 7.5*in[1] - 15.0*in[0] + 15.0*in[0]*in[1]); │ │ │ │ │ - 218 │ │ │ │ │ - 219 out[7][0] = 0.0; │ │ │ │ │ - 220 out[7][1] = 6.0 - 6.0*in[1]; │ │ │ │ │ - 221 │ │ │ │ │ - 222 out[8][0] = sign_[2]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]); │ │ │ │ │ - 223 out[8][1] = sign_[2]*(22.5 - 22.5*in[1] - 45.0*in[0] + 45.0*in[0]*in[1]); │ │ │ │ │ - 224 │ │ │ │ │ - 225 out[9][0] = sign_[3]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]); │ │ │ │ │ - 226 out[9][1] = sign_[3]*(-7.5*in[1] + 15.0*in[0]*in[1]); │ │ │ │ │ - 227 │ │ │ │ │ - 228 out[10][0] = 0.0; │ │ │ │ │ - 229 out[10][1] = 6.0*in[1]; │ │ │ │ │ - 230 │ │ │ │ │ - 231 out[11][0] = sign_[3]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]); │ │ │ │ │ - 232 out[11][1] = sign_[3]*(-22.5*in[1] + 45*in[0]*in[1]); │ │ │ │ │ - 233 │ │ │ │ │ - 234 out[12][0] = 6.0 - 12.0*in[0]; │ │ │ │ │ - 235 out[12][1] = 0.0; │ │ │ │ │ - 236 │ │ │ │ │ - 237 out[13][0] = 0.0; │ │ │ │ │ - 238 out[13][1] = 0.0; │ │ │ │ │ - 239 break; │ │ │ │ │ - 240 case 1: │ │ │ │ │ - 241 out[0][0] = sign_[0]*(7.5 - 7.5*in[0] - 15.0*in[1] + 15.0*in[0]*in[1]); │ │ │ │ │ - 242 out[0][1] = sign_[0]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]); │ │ │ │ │ - 243 │ │ │ │ │ - 244 out[1][0] = -6.0 + 6.0*in[0]; │ │ │ │ │ - 245 out[1][1] = 0.0; │ │ │ │ │ - 246 │ │ │ │ │ - 247 out[2][0] = sign_[0]*(22.5 - 22.5*in[0] - 45.0*in[1] + 45.0*in[0]*in[1]); │ │ │ │ │ - 248 out[2][1] = sign_[0]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]); │ │ │ │ │ - 249 │ │ │ │ │ - 250 out[3][0] = sign_[1]*(-7.5*in[0] + 15.0*in[0]*in[1]); │ │ │ │ │ - 251 out[3][1] = sign_[1]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]); │ │ │ │ │ - 252 │ │ │ │ │ - 253 out[4][0] = -6.0*in[0]; │ │ │ │ │ - 254 out[4][1] = 0.0; │ │ │ │ │ - 255 │ │ │ │ │ - 256 out[5][0] = sign_[1]*(-22.5*in[0] + 45.0*in[0]*in[1]); │ │ │ │ │ - 257 out[5][1] = sign_[1]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]); │ │ │ │ │ - 258 │ │ │ │ │ - 259 out[6][0] = 0.0; │ │ │ │ │ - 260 out[6][1] = sign_[2]*(5.25 - 7.5*in[0]- 6.0*in[1] + 7.5*in[0]*in[0]); │ │ │ │ │ - 261 │ │ │ │ │ - 262 out[7][0] = 0.0; │ │ │ │ │ - 263 out[7][1] = 3.0 - 6.0*in[0]; │ │ │ │ │ - 264 │ │ │ │ │ - 265 out[8][0] = 0.0; │ │ │ │ │ - 266 out[8][1] = sign_[2]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]); │ │ │ │ │ - 267 │ │ │ │ │ - 268 out[9][0] = 0.0; │ │ │ │ │ - 269 out[9][1] = sign_[3]*(-0.75 - 7.5*in[0] + 6.0*in[1] + 7.5*in[0]*in[0]); │ │ │ │ │ - 270 │ │ │ │ │ - 271 out[10][0] = 0.0; │ │ │ │ │ - 272 out[10][1] = -3.0 + 6.0*in[0]; │ │ │ │ │ - 273 │ │ │ │ │ - 274 out[11][0] = 0.0; │ │ │ │ │ - 275 out[11][1] = sign_[3]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]); │ │ │ │ │ - 276 │ │ │ │ │ - 277 out[12][0] = 0.0; │ │ │ │ │ - 278 out[12][1] = 0.0; │ │ │ │ │ - 279 │ │ │ │ │ - 280 out[13][0] = 0.0; │ │ │ │ │ - 281 out[13][1] = 6.0 - 12.0*in[1]; │ │ │ │ │ - 282 break; │ │ │ │ │ - 283 default: │ │ │ │ │ - 284 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ - 285 } │ │ │ │ │ - 286 } else { │ │ │ │ │ - 287 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ - 288 } │ │ │ │ │ - 289 } │ │ │ │ │ - 290 │ │ │ │ │ -292 unsigned int order() const │ │ │ │ │ - 293 { │ │ │ │ │ - 294 return 3; │ │ │ │ │ - 295 } │ │ │ │ │ - 296 │ │ │ │ │ - 297 private: │ │ │ │ │ - 298 std::array sign_; │ │ │ │ │ - 299 }; │ │ │ │ │ - 300} // end namespace Dune │ │ │ │ │ - 301#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 31 public: │ │ │ │ │ + 33 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +34 Dune::FieldMatrix > Traits; │ │ │ │ │ + 35 │ │ │ │ │ +37 unsigned int size () const │ │ │ │ │ + 38 { │ │ │ │ │ + 39 return 1; │ │ │ │ │ + 40 } │ │ │ │ │ + 41 │ │ │ │ │ +43 inline void evaluateFunction (const typename Traits::DomainType&, │ │ │ │ │ + 44 std::vector& 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& out) const // return value │ │ │ │ │ + 54 { │ │ │ │ │ + 55 out.resize(1); │ │ │ │ │ + 56 for (int i=0; i& order, │ │ │ │ │ + 66 const typename Traits::DomainType& in, │ │ │ │ │ + 67 std::vector& 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 │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM2Cube2DLocalBasis │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalbasis.hh:30 │ │ │ │ │ -Dune::BDM2Cube2DLocalBasis::partial │ │ │ │ │ -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 brezzidouglasmarini2cube2dlocalbasis.hh:185 │ │ │ │ │ -Dune::BDM2Cube2DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalbasis.hh:292 │ │ │ │ │ -Dune::BDM2Cube2DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalbasis.hh:67 │ │ │ │ │ -Dune::BDM2Cube2DLocalBasis::BDM2Cube2DLocalBasis │ │ │ │ │ -BDM2Cube2DLocalBasis() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalbasis.hh:38 │ │ │ │ │ -Dune::BDM2Cube2DLocalBasis::BDM2Cube2DLocalBasis │ │ │ │ │ -BDM2Cube2DLocalBasis(std::bitset< 4 > s) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalbasis.hh:49 │ │ │ │ │ -Dune::BDM2Cube2DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ -2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalbasis.hh:35 │ │ │ │ │ -Dune::BDM2Cube2DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalbasis.hh:56 │ │ │ │ │ -Dune::BDM2Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalbasis.hh:108 │ │ │ │ │ Dune::LocalBasisTraits │ │ │ │ │ Type traits for LocalBasisVirtualInterface. │ │ │ │ │ Definition common/localbasis.hh:34 │ │ │ │ │ Dune::LocalBasisTraits::DomainType │ │ │ │ │ D DomainType │ │ │ │ │ domain type │ │ │ │ │ Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::P0LocalBasis │ │ │ │ │ +Constant shape function. │ │ │ │ │ +Definition p0localbasis.hh:30 │ │ │ │ │ +Dune::P0LocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition p0localbasis.hh:79 │ │ │ │ │ +Dune::P0LocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition p0localbasis.hh:52 │ │ │ │ │ +Dune::P0LocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition p0localbasis.hh:43 │ │ │ │ │ +Dune::P0LocalBasis::partial │ │ │ │ │ +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 │ │ │ │ │ +Dune::P0LocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition p0localbasis.hh:37 │ │ │ │ │ +Dune::P0LocalBasis::Traits │ │ │ │ │ +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 │ │ │ │ │ +localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00368.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2cube2dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: p0localcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
brezzidouglasmarini2cube2dlocalinterpolation.hh File Reference
│ │ │ │ +
p0localcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::BDM2Cube2DLocalInterpolation< LB >
 First order Brezzi-Douglas-Marini shape functions on quadrilaterals. More...
class  Dune::P0LocalCoefficients
 Layout map for P0 elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini2cube2d │ │ │ │ │ + * lagrange │ │ │ │ │ + * p0 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini2cube2dlocalinterpolation.hh File Reference │ │ │ │ │ +p0localcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM2Cube2DLocalInterpolation<_LB_> │ │ │ │ │ -  First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ - More... │ │ │ │ │ +class  Dune::P0LocalCoefficients │ │ │ │ │ +  Layout map for P0 elements. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00368_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2cube2dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: p0localcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,157 +70,74 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini2cube2dlocalinterpolation.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_P0LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_P0LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
24 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ -
27
│ │ │ │ -
28 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
31 {
│ │ │ │ -
32 sign0 = sign1 = sign2 = sign3 = 1.0;
│ │ │ │ -
33 }
│ │ │ │ -
│ │ │ │ -
34
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41 {
│ │ │ │ -
42 sign0 = sign1 = sign2 = sign3 = 1.0;
│ │ │ │ -
43 if (s & 1)
│ │ │ │ -
44 {
│ │ │ │ -
45 sign0 = -1.0;
│ │ │ │ -
46 }
│ │ │ │ -
47 if (s & 2)
│ │ │ │ -
48 {
│ │ │ │ -
49 sign1 = -1.0;
│ │ │ │ -
50 }
│ │ │ │ -
51 if (s & 4)
│ │ │ │ -
52 {
│ │ │ │ -
53 sign2 = -1.0;
│ │ │ │ -
54 }
│ │ │ │ -
55 if (s & 8)
│ │ │ │ -
56 {
│ │ │ │ -
57 sign3 = -1.0;
│ │ │ │ -
58 }
│ │ │ │ -
59
│ │ │ │ -
60 n0[0] = -1.0;
│ │ │ │ -
61 n0[1] = 0.0;
│ │ │ │ -
62 n1[0] = 1.0;
│ │ │ │ -
63 n1[1] = 0.0;
│ │ │ │ -
64 n2[0] = 0.0;
│ │ │ │ -
65 n2[1] = -1.0;
│ │ │ │ -
66 n3[0] = 0.0;
│ │ │ │ -
67 n3[1] = 1.0;
│ │ │ │ -
68 }
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
78 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
79 void interpolate(const F& ff, std::vector<C>& out) const
│ │ │ │ -
80 {
│ │ │ │ -
81 // f gives v*outer normal at a point on the edge!
│ │ │ │ -
82 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ -
83 typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │ -
84
│ │ │ │ -
85 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ -
86
│ │ │ │ -
87 out.resize(14);
│ │ │ │ -
88 fill(out.begin(), out.end(), 0.0);
│ │ │ │ -
89
│ │ │ │ -
90 const int qOrder = 4;
│ │ │ │ -
91 const QuadratureRule<Scalar,1>& rule = QuadratureRules<Scalar,1>::rule(GeometryTypes::cube(1), qOrder);
│ │ │ │ -
92
│ │ │ │ -
93 for (typename QuadratureRule<Scalar,1>::const_iterator it = rule.begin();
│ │ │ │ -
94 it != rule.end(); ++it)
│ │ │ │ -
95 {
│ │ │ │ -
96 Scalar qPos = it->position();
│ │ │ │ -
97
│ │ │ │ -
98 typename LB::Traits::DomainType localPos;
│ │ │ │ -
99
│ │ │ │ -
100 localPos[0] = 0.0;
│ │ │ │ -
101 localPos[1] = qPos;
│ │ │ │ -
102 auto y = f(localPos);
│ │ │ │ -
103 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0;
│ │ │ │ -
104 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight();
│ │ │ │ -
105 out[2] += (y[0]*n0[0] + y[1]*n0[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it->weight()*sign0;
│ │ │ │ -
106
│ │ │ │ -
107 localPos[0] = 1.0;
│ │ │ │ -
108 localPos[1] = qPos;
│ │ │ │ -
109 y = f(localPos);
│ │ │ │ -
110 out[3] += (y[0]*n1[0]+y[1]*n1[1])*it->weight()*sign1;
│ │ │ │ -
111 out[4] += (y[0]*n1[0]+y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight();
│ │ │ │ -
112 out[5] += (y[0]*n1[0]+y[1]*n1[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it->weight()*sign1;
│ │ │ │ -
113
│ │ │ │ -
114 localPos[0] = qPos;
│ │ │ │ -
115 localPos[1] = 0.0;
│ │ │ │ -
116 y = f(localPos);
│ │ │ │ -
117 out[6] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2;
│ │ │ │ -
118 out[7] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight();
│ │ │ │ -
119 out[8] += (y[0]*n2[0] + y[1]*n2[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it->weight()*sign2;
│ │ │ │ -
120
│ │ │ │ -
121 localPos[0] = qPos;
│ │ │ │ -
122 localPos[1] = 1.0;
│ │ │ │ -
123 y = f(localPos);
│ │ │ │ -
124 out[9] += (y[0]*n3[0] + y[1]*n3[1])*it->weight()*sign3;
│ │ │ │ -
125 out[10] += (y[0]*n3[0] + y[1]*n3[1])*(2.0*qPos - 1.0)*it->weight();
│ │ │ │ -
126 out[11] += (y[0]*n3[0] + y[1]*n3[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it->weight()*sign3;
│ │ │ │ -
127 }
│ │ │ │ -
128
│ │ │ │ -
129 const QuadratureRule<Vector,2>& rule2 = QuadratureRules<Vector,2>::rule(GeometryTypes::cube(2), qOrder);
│ │ │ │ -
130
│ │ │ │ -
131 for (typename QuadratureRule<Vector,2>::const_iterator it=rule2.begin(); it!=rule2.end(); ++it)
│ │ │ │ -
132 {
│ │ │ │ -
133 auto y = f(it->position());
│ │ │ │ -
134 out[12] += y[0]*it->weight();
│ │ │ │ -
135 out[13] += y[1]*it->weight();
│ │ │ │ -
136 }
│ │ │ │ -
137 }
│ │ │ │ -
│ │ │ │ -
138
│ │ │ │ -
139 private:
│ │ │ │ -
140 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3;
│ │ │ │ -
141 typename LB::Traits::DomainType n0, n1, n2, n3;
│ │ │ │ -
142 };
│ │ │ │ -
│ │ │ │ -
143} // end namespace Dune
│ │ │ │ -
144#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:26
│ │ │ │ -
BDM2Cube2DLocalInterpolation(unsigned int s)
Make set number s, where 0 <= s < 16.
Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:40
│ │ │ │ -
BDM2Cube2DLocalInterpolation()
Standard constructor.
Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:30
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:79
│ │ │ │ - │ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,164 +7,74 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini2cube2d │ │ │ │ │ -brezzidouglasmarini2cube2dlocalinterpolation.hh │ │ │ │ │ + * lagrange │ │ │ │ │ + * p0 │ │ │ │ │ +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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_P0LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_P0LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 24 template │ │ │ │ │ -25 class BDM2Cube2DLocalInterpolation │ │ │ │ │ - 26 { │ │ │ │ │ - 27 │ │ │ │ │ - 28 public: │ │ │ │ │ -30 BDM2Cube2DLocalInterpolation() │ │ │ │ │ - 31 { │ │ │ │ │ - 32 sign0 = sign1 = sign2 = sign3 = 1.0; │ │ │ │ │ - 33 } │ │ │ │ │ - 34 │ │ │ │ │ -40 BDM2Cube2DLocalInterpolation(unsigned int s) │ │ │ │ │ - 41 { │ │ │ │ │ - 42 sign0 = sign1 = sign2 = sign3 = 1.0; │ │ │ │ │ - 43 if (s & 1) │ │ │ │ │ - 44 { │ │ │ │ │ - 45 sign0 = -1.0; │ │ │ │ │ - 46 } │ │ │ │ │ - 47 if (s & 2) │ │ │ │ │ - 48 { │ │ │ │ │ - 49 sign1 = -1.0; │ │ │ │ │ - 50 } │ │ │ │ │ - 51 if (s & 4) │ │ │ │ │ - 52 { │ │ │ │ │ - 53 sign2 = -1.0; │ │ │ │ │ - 54 } │ │ │ │ │ - 55 if (s & 8) │ │ │ │ │ - 56 { │ │ │ │ │ - 57 sign3 = -1.0; │ │ │ │ │ - 58 } │ │ │ │ │ - 59 │ │ │ │ │ - 60 n0[0] = -1.0; │ │ │ │ │ - 61 n0[1] = 0.0; │ │ │ │ │ - 62 n1[0] = 1.0; │ │ │ │ │ - 63 n1[1] = 0.0; │ │ │ │ │ - 64 n2[0] = 0.0; │ │ │ │ │ - 65 n2[1] = -1.0; │ │ │ │ │ - 66 n3[0] = 0.0; │ │ │ │ │ - 67 n3[1] = 1.0; │ │ │ │ │ - 68 } │ │ │ │ │ - 69 │ │ │ │ │ - 78 template │ │ │ │ │ -79 void interpolate(const F& ff, std::vector& out) const │ │ │ │ │ - 80 { │ │ │ │ │ - 81 // f gives v*outer normal at a point on the edge! │ │ │ │ │ - 82 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ - 83 typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ - 84 │ │ │ │ │ - 85 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ - 86 │ │ │ │ │ - 87 out.resize(14); │ │ │ │ │ - 88 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ - 89 │ │ │ │ │ - 90 const int qOrder = 4; │ │ │ │ │ - 91 const QuadratureRule& rule = QuadratureRules::rule │ │ │ │ │ -(GeometryTypes::cube(1), qOrder); │ │ │ │ │ - 92 │ │ │ │ │ - 93 for (typename QuadratureRule::const_iterator it = rule.begin(); │ │ │ │ │ - 94 it != rule.end(); ++it) │ │ │ │ │ - 95 { │ │ │ │ │ - 96 Scalar qPos = it->position(); │ │ │ │ │ - 97 │ │ │ │ │ - 98 typename LB::Traits::DomainType localPos; │ │ │ │ │ - 99 │ │ │ │ │ - 100 localPos[0] = 0.0; │ │ │ │ │ - 101 localPos[1] = qPos; │ │ │ │ │ - 102 auto y = f(localPos); │ │ │ │ │ - 103 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0; │ │ │ │ │ - 104 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight(); │ │ │ │ │ - 105 out[2] += (y[0]*n0[0] + y[1]*n0[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it- │ │ │ │ │ ->weight()*sign0; │ │ │ │ │ - 106 │ │ │ │ │ - 107 localPos[0] = 1.0; │ │ │ │ │ - 108 localPos[1] = qPos; │ │ │ │ │ - 109 y = f(localPos); │ │ │ │ │ - 110 out[3] += (y[0]*n1[0]+y[1]*n1[1])*it->weight()*sign1; │ │ │ │ │ - 111 out[4] += (y[0]*n1[0]+y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight(); │ │ │ │ │ - 112 out[5] += (y[0]*n1[0]+y[1]*n1[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it- │ │ │ │ │ ->weight()*sign1; │ │ │ │ │ - 113 │ │ │ │ │ - 114 localPos[0] = qPos; │ │ │ │ │ - 115 localPos[1] = 0.0; │ │ │ │ │ - 116 y = f(localPos); │ │ │ │ │ - 117 out[6] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2; │ │ │ │ │ - 118 out[7] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight(); │ │ │ │ │ - 119 out[8] += (y[0]*n2[0] + y[1]*n2[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it- │ │ │ │ │ ->weight()*sign2; │ │ │ │ │ - 120 │ │ │ │ │ - 121 localPos[0] = qPos; │ │ │ │ │ - 122 localPos[1] = 1.0; │ │ │ │ │ - 123 y = f(localPos); │ │ │ │ │ - 124 out[9] += (y[0]*n3[0] + y[1]*n3[1])*it->weight()*sign3; │ │ │ │ │ - 125 out[10] += (y[0]*n3[0] + y[1]*n3[1])*(2.0*qPos - 1.0)*it->weight(); │ │ │ │ │ - 126 out[11] += (y[0]*n3[0] + y[1]*n3[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it- │ │ │ │ │ ->weight()*sign3; │ │ │ │ │ - 127 } │ │ │ │ │ - 128 │ │ │ │ │ - 129 const QuadratureRule& rule2 = QuadratureRules::rule │ │ │ │ │ -(GeometryTypes::cube(2), qOrder); │ │ │ │ │ - 130 │ │ │ │ │ - 131 for (typename QuadratureRule::const_iterator it=rule2.begin(); │ │ │ │ │ -it!=rule2.end(); ++it) │ │ │ │ │ - 132 { │ │ │ │ │ - 133 auto y = f(it->position()); │ │ │ │ │ - 134 out[12] += y[0]*it->weight(); │ │ │ │ │ - 135 out[13] += y[1]*it->weight(); │ │ │ │ │ - 136 } │ │ │ │ │ - 137 } │ │ │ │ │ - 138 │ │ │ │ │ - 139 private: │ │ │ │ │ - 140 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3; │ │ │ │ │ - 141 typename LB::Traits::DomainType n0, n1, n2, n3; │ │ │ │ │ - 142 }; │ │ │ │ │ - 143} // end namespace Dune │ │ │ │ │ - 144#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14namespace Dune │ │ │ │ │ + 15{ │ │ │ │ │ + 16 │ │ │ │ │ +23 class P0LocalCoefficients │ │ │ │ │ + 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 │ │ │ │ │ +localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM2Cube2DLocalInterpolation │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:26 │ │ │ │ │ -Dune::BDM2Cube2DLocalInterpolation::BDM2Cube2DLocalInterpolation │ │ │ │ │ -BDM2Cube2DLocalInterpolation(unsigned int s) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:40 │ │ │ │ │ -Dune::BDM2Cube2DLocalInterpolation::BDM2Cube2DLocalInterpolation │ │ │ │ │ -BDM2Cube2DLocalInterpolation() │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::P0LocalCoefficients │ │ │ │ │ +Layout map for P0 elements. │ │ │ │ │ +Definition p0localcoefficients.hh:24 │ │ │ │ │ +Dune::P0LocalCoefficients::P0LocalCoefficients │ │ │ │ │ +P0LocalCoefficients() │ │ │ │ │ Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:30 │ │ │ │ │ -Dune::BDM2Cube2DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Interpolate a given function with shape functions. │ │ │ │ │ -Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:79 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Definition p0localcoefficients.hh:27 │ │ │ │ │ +Dune::P0LocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition p0localcoefficients.hh:37 │ │ │ │ │ +Dune::P0LocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition p0localcoefficients.hh:31 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00371.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube3d.hh File Reference │ │ │ │ +dune-localfunctions: lagrangelfecache.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
brezzidouglasmarini1cube3d.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
lagrangelfecache.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include "../common/localfiniteelementtraits.hh"
│ │ │ │ -#include "brezzidouglasmarini1cube3d/brezzidouglasmarini1cube3dlocalbasis.hh"
│ │ │ │ -#include "brezzidouglasmarini1cube3d/brezzidouglasmarini1cube3dlocalcoefficients.hh"
│ │ │ │ -#include "brezzidouglasmarini1cube3d/brezzidouglasmarini1cube3dlocalinterpolation.hh"
│ │ │ │ +
#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>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::BDM1Cube3DLocalFiniteElement< D, R >
 First order Brezzi-Douglas-Marini shape functions on hexahedron. 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 {} │ │ │ │ │ @@ -6,29 +6,34 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini1cube3d.hh File Reference │ │ │ │ │ + * lagrange │ │ │ │ │ +Namespaces | Typedefs │ │ │ │ │ +lagrangelfecache.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "brezzidouglasmarini1cube3d/brezzidouglasmarini1cube3dlocalbasis.hh" │ │ │ │ │ -#include "brezzidouglasmarini1cube3d/ │ │ │ │ │ -brezzidouglasmarini1cube3dlocalcoefficients.hh" │ │ │ │ │ -#include "brezzidouglasmarini1cube3d/ │ │ │ │ │ -brezzidouglasmarini1cube3dlocalinterpolation.hh" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -class  Dune::BDM1Cube3DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  First order Brezzi-Douglas-Marini shape functions on hexahedron. │ │ │ │ │ - More... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +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. │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00371_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube3d.hh Source File │ │ │ │ +dune-localfunctions: lagrangelfecache.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,123 +70,145 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini1cube3d.hh
│ │ │ │ +
lagrangelfecache.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_BREZZIDOUGLASMARINI1_QUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_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 {}
│ │ │ │ -
│ │ │ │ -
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::hexahedron;
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
75 private:
│ │ │ │ - │ │ │ │ -
77 BDM1Cube3DLocalCoefficients coefficients;
│ │ │ │ - │ │ │ │ -
79 };
│ │ │ │ -
│ │ │ │ -
80} // end namespace Dune
│ │ │ │ -
81#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <tuple>
│ │ │ │ +
9#include <utility>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/geometry/type.hh>
│ │ │ │ +
12#include <dune/geometry/typeindex.hh>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
20
│ │ │ │ +
21
│ │ │ │ +
22namespace Dune {
│ │ │ │ +
23
│ │ │ │ +
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 );
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on hexahedron.
Definition brezzidouglasmarini1cube3d.hh:27
│ │ │ │ -
BDM1Cube3DLocalFiniteElement()
Standard constructor.
Definition brezzidouglasmarini1cube3d.hh:36
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition brezzidouglasmarini1cube3d.hh:65
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition brezzidouglasmarini1cube3d.hh:54
│ │ │ │ -
static constexpr GeometryType type()
Definition brezzidouglasmarini1cube3d.hh:70
│ │ │ │ -
LocalFiniteElementTraits< BDM1Cube3DLocalBasis< D, R >, BDM1Cube3DLocalCoefficients, BDM1Cube3DLocalInterpolation< BDM1Cube3DLocalBasis< D, R > > > Traits
Definition brezzidouglasmarini1cube3d.hh:33
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition brezzidouglasmarini1cube3d.hh:59
│ │ │ │ -
BDM1Cube3DLocalFiniteElement(int s)
Make set number s, where 0 <= s < 64.
Definition brezzidouglasmarini1cube3d.hh:44
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition brezzidouglasmarini1cube3d.hh:49
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on the reference hexahedron.
Definition brezzidouglasmarini1cube3dlocalbasis.hh:31
│ │ │ │ -
Layout map for Brezzi-Douglas-Marini-1 elements on hexahedra.
Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:24
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on the reference hexahedron.
Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:26
│ │ │ │ -
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
│ │ │ │ +
A cache storing a compile time selection of local finite element implementations.
Definition localfiniteelementvariantcache.hh:68
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,142 +7,166 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ -brezzidouglasmarini1cube3d.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +lagrangelfecache.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_BREZZIDOUGLASMARINI1_QUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "brezzidouglasmarini1cube3d/ │ │ │ │ │ -brezzidouglasmarini1cube3dlocalbasis.hh" │ │ │ │ │ - 12#include "brezzidouglasmarini1cube3d/ │ │ │ │ │ -brezzidouglasmarini1cube3dlocalcoefficients.hh" │ │ │ │ │ - 13#include "brezzidouglasmarini1cube3d/ │ │ │ │ │ -brezzidouglasmarini1cube3dlocalinterpolation.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 25 template │ │ │ │ │ -26 class BDM1Cube3DLocalFiniteElement │ │ │ │ │ - 27 { │ │ │ │ │ - 28 │ │ │ │ │ - 29 public: │ │ │ │ │ - 30 typedef LocalFiniteElementTraits< │ │ │ │ │ - 31 BDM1Cube3DLocalBasis, │ │ │ │ │ - 32 BDM1Cube3DLocalCoefficients, │ │ │ │ │ -33 BDM1Cube3DLocalInterpolation > > Traits; │ │ │ │ │ - 34 │ │ │ │ │ -36 BDM1Cube3DLocalFiniteElement() │ │ │ │ │ - 37 {} │ │ │ │ │ - 38 │ │ │ │ │ -44 BDM1Cube3DLocalFiniteElement(int s) │ │ │ │ │ - 45 : basis(s) │ │ │ │ │ - 46 , interpolation(s) │ │ │ │ │ - 47 {} │ │ │ │ │ - 48 │ │ │ │ │ -49 const typename Traits::LocalBasisType& localBasis() const │ │ │ │ │ - 50 { │ │ │ │ │ - 51 return basis; │ │ │ │ │ - 52 } │ │ │ │ │ - 53 │ │ │ │ │ -54 const typename Traits::LocalCoefficientsType& localCoefficients() const │ │ │ │ │ - 55 { │ │ │ │ │ - 56 return coefficients; │ │ │ │ │ - 57 } │ │ │ │ │ - 58 │ │ │ │ │ -59 const typename Traits::LocalInterpolationType& localInterpolation() const │ │ │ │ │ - 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: │ │ │ │ │ - 76 BDM1Cube3DLocalBasis basis; │ │ │ │ │ - 77 BDM1Cube3DLocalCoefficients coefficients; │ │ │ │ │ - 78 BDM1Cube3DLocalInterpolation > interpolation; │ │ │ │ │ - 79 }; │ │ │ │ │ - 80} // end namespace Dune │ │ │ │ │ - 81#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ -brezzidouglasmarini1cube3dlocalcoefficients.hh │ │ │ │ │ -brezzidouglasmarini1cube3dlocalinterpolation.hh │ │ │ │ │ -brezzidouglasmarini1cube3dlocalbasis.hh │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ + 17#include │ │ │ │ │ + 18#include │ │ │ │ │ + 19#include │ │ │ │ │ + 20 │ │ │ │ │ + 21 │ │ │ │ │ + 22namespace Dune { │ │ │ │ │ + 23 │ │ │ │ │ + 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 ); │ │ │ │ │ + 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 │ │ │ │ │ +118using LagrangeLocalFiniteElementCache = │ │ │ │ │ +LocalFiniteElementVariantCache>; │ │ │ │ │ + 119 │ │ │ │ │ + 120 │ │ │ │ │ + 121 │ │ │ │ │ + 122} // namespace Dune │ │ │ │ │ + 123 │ │ │ │ │ + 124 │ │ │ │ │ + 125 │ │ │ │ │ + 126 │ │ │ │ │ + 127#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH │ │ │ │ │ +localfiniteelementvariantcache.hh │ │ │ │ │ +p0.hh │ │ │ │ │ +lagrangepyramid.hh │ │ │ │ │ +lagrangeprism.hh │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ +lagrangecube.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Cube3DLocalFiniteElement │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on hexahedron. │ │ │ │ │ -Definition brezzidouglasmarini1cube3d.hh:27 │ │ │ │ │ -Dune::BDM1Cube3DLocalFiniteElement::BDM1Cube3DLocalFiniteElement │ │ │ │ │ -BDM1Cube3DLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini1cube3d.hh:36 │ │ │ │ │ -Dune::BDM1Cube3DLocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition brezzidouglasmarini1cube3d.hh:65 │ │ │ │ │ -Dune::BDM1Cube3DLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition brezzidouglasmarini1cube3d.hh:54 │ │ │ │ │ -Dune::BDM1Cube3DLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition brezzidouglasmarini1cube3d.hh:70 │ │ │ │ │ -Dune::BDM1Cube3DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< BDM1Cube3DLocalBasis< D, R >, │ │ │ │ │ -BDM1Cube3DLocalCoefficients, BDM1Cube3DLocalInterpolation< │ │ │ │ │ -BDM1Cube3DLocalBasis< D, R > > > Traits │ │ │ │ │ -Definition brezzidouglasmarini1cube3d.hh:33 │ │ │ │ │ -Dune::BDM1Cube3DLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition brezzidouglasmarini1cube3d.hh:59 │ │ │ │ │ -Dune::BDM1Cube3DLocalFiniteElement::BDM1Cube3DLocalFiniteElement │ │ │ │ │ -BDM1Cube3DLocalFiniteElement(int s) │ │ │ │ │ -Make set number s, where 0 <= s < 64. │ │ │ │ │ -Definition brezzidouglasmarini1cube3d.hh:44 │ │ │ │ │ -Dune::BDM1Cube3DLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition brezzidouglasmarini1cube3d.hh:49 │ │ │ │ │ -Dune::BDM1Cube3DLocalBasis │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on the reference hexahedron. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalbasis.hh:31 │ │ │ │ │ -Dune::BDM1Cube3DLocalCoefficients │ │ │ │ │ -Layout map for Brezzi-Douglas-Marini-1 elements on hexahedra. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::BDM1Cube3DLocalInterpolation │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on the reference hexahedron. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:26 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::LocalFiniteElementVariantCache │ │ │ │ │ +A cache storing a compile time selection of local finite element │ │ │ │ │ +implementations. │ │ │ │ │ +Definition localfiniteelementvariantcache.hh:68 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00374.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2simplex2dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: pqkfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,37 +65,49 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
brezzidouglasmarini2simplex2dlocalbasis.hh File Reference
│ │ │ │ +
pqkfactory.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <bitset>
│ │ │ │ -#include <numeric>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include "../../common/localbasis.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

class  Dune::BDM2Simplex2DLocalBasis< D, R >
 First order Brezzi-Douglas-Marini shape functions on quadrilaterals. 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 {} │ │ │ │ │ @@ -6,29 +6,43 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini2simplex2d │ │ │ │ │ + * lagrange │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localbasis.hh" │ │ │ │ │ +pqkfactory.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM2Simplex2DLocalBasis<_D,_R_> │ │ │ │ │ -  First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ - 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 │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00374_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2simplex2dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: pqkfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,334 +70,215 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini2simplex2dlocalbasis.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_PQKFACTORY_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_PQKFACTORY_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <bitset>
│ │ │ │ -
10#include <numeric>
│ │ │ │ -
11#include <vector>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/common/fmatrix.hh>
│ │ │ │ +
8#include <map>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/type.hh>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │ -
15#include "../../common/localbasis.hh"
│ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
28 template<class D, class R>
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
20
│ │ │ │ +
21namespace Dune
│ │ │ │ +
22{
│ │ │ │ +
23
│ │ │ │ +
28 template<class D, class R, int d, int k>
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
30 {
│ │ │ │ -
31
│ │ │ │ -
32 public:
│ │ │ │ - │ │ │ │ -
34 R,2,Dune::FieldVector<R,2>,
│ │ │ │ -
35 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ -
36
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 {
│ │ │ │ -
40 for (size_t i=0; i<3; i++)
│ │ │ │ -
41 sign_[i] = 1.0;
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ -
49 BDM2Simplex2DLocalBasis(std::bitset<3> s)
│ │ │ │ -
50 {
│ │ │ │ -
51 for (size_t i=0; i<3; i++)
│ │ │ │ -
52 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ -
53 }
│ │ │ │ -
│ │ │ │ -
54
│ │ │ │ -
│ │ │ │ -
56 unsigned int size() const
│ │ │ │ -
57 {
│ │ │ │ -
58 return 12;
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ -
67 inline void evaluateFunction(const typename Traits::DomainType& in,
│ │ │ │ -
68 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
69 {
│ │ │ │ -
70 out.resize(size());
│ │ │ │ -
71
│ │ │ │ -
72 out[0][0] = sign_[0]*(-2*in[0]*in[1] + in[0]*in[0]);
│ │ │ │ -
73 out[0][1] = sign_[0]*(-1 + 6*in[1] -2*in[0]*in[1] - 5*in[1]*in[1]);
│ │ │ │ -
74
│ │ │ │ -
75 out[1][0] = 1.5*in[0] + 3*in[0]*in[1] - 4.5*in[0]*in[0];
│ │ │ │ -
76 out[1][1] = -3 + 6*in[0] + 10.5*in[1] - 15*in[0]*in[1] - 7.5*in[1]*in[1];
│ │ │ │ -
77
│ │ │ │ -
78 out[2][0] = sign_[0]*(-7.5*in[0] + 5*in[0]*in[1] + 12.5*in[0]*in[0]);
│ │ │ │ -
79 out[2][1] = sign_[0]*(-5 + 30*in[0] + 7.5*in[1] - 25*in[0]*in[1] - 30*in[0]*in[0] - 2.5*in[1]*in[1]);
│ │ │ │ + │ │ │ │ +
32
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
82
│ │ │ │ -
83 out[3][0] = sign_[1]*(-1 + 6*in[0] - 2*in[0]*in[1] - 5*in[0]*in[0]);
│ │ │ │ -
84 out[3][1] = sign_[1]*(-2*in[0]*in[1] + in[1]*in[1]);
│ │ │ │ -
85
│ │ │ │ -
86 out[4][0] = 3 - 10.5*in[0] - 6*in[1] + 15*in[0]*in[1] + 7.5*in[0]*in[0];
│ │ │ │ -
87 out[4][1] = -1.5*in[1] - 3*in[0]*in[1] + 4.5*in[1]*in[1];
│ │ │ │ -
88
│ │ │ │ -
89 out[5][0] = sign_[1]*(-5 + 7.5*in[0] + 30*in[1] - 25*in[0]*in[1] - 2.5*in[0]*in[0] - 30*in[1]*in[1]);
│ │ │ │ -
90 out[5][1] = sign_[1]*(-7.5*in[1] + 5*in[0]*in[1] + 12.5*in[1]*in[1]);
│ │ │ │ -
91
│ │ │ │ -
92
│ │ │ │ +
│ │ │ │ +
83 static FiniteElementType* create(const GeometryType& gt)
│ │ │ │ +
84 {
│ │ │ │ +
85 if (k==0)
│ │ │ │ + │ │ │ │ +
87
│ │ │ │ +
88 if (gt.isSimplex())
│ │ │ │ + │ │ │ │ +
90
│ │ │ │ +
91 if (gt.isCube())
│ │ │ │ + │ │ │ │
93
│ │ │ │ -
94 out[6][0] = sign_[2]*(-3*in[0] + 4*in[0]*in[1] + 4*in[0]*in[0]);
│ │ │ │ -
95 out[6][1] = sign_[2]*(-3*in[1] + 4*in[0]*in[1] + 4*in[1]*in[1]);
│ │ │ │ -
96
│ │ │ │ -
97 out[7][0] = -3*in[0] + 6*in[0]*in[0];
│ │ │ │ -
98 out[7][1] = 3*in[1] - 6*in[1]*in[1];
│ │ │ │ + │ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
96 };
│ │ │ │ +
│ │ │ │ +
97
│ │ │ │ +
98
│ │ │ │
99
│ │ │ │ -
100 out[8][0] = sign_[2]*(-10*in[0]*in[1] + 5*in[0]*in[0]);
│ │ │ │ -
101 out[8][1] = sign_[2]*(-10*in[0]*in[1] + 5*in[1]*in[1]);
│ │ │ │ -
102
│ │ │ │ -
103
│ │ │ │ -
104
│ │ │ │ -
105 out[9][0] = 18*in[0] - 12*in[0]*in[1] - 18*in[0]*in[0];
│ │ │ │ -
106 out[9][1] = 6*in[1] - 12*in[0]*in[1] - 6*in[1]*in[1];
│ │ │ │ -
107
│ │ │ │ -
108 out[10][0] = 6*in[0] - 12*in[0]*in[1] - 6*in[0]*in[0];
│ │ │ │ -
109 out[10][1] = 18*in[1] - 12*in[0]*in[1] - 18*in[1]*in[1];
│ │ │ │ -
110
│ │ │ │ -
111 out[11][0] = 90*in[0] - 180*in[0]*in[1] - 90*in[0]*in[0];
│ │ │ │ -
112 out[11][1] = -90*in[1] + 180*in[0]*in[1] + 90*in[1]*in[1];
│ │ │ │ -
113 }
│ │ │ │ -
│ │ │ │ -
114
│ │ │ │ -
│ │ │ │ -
121 inline void evaluateJacobian(const typename Traits::DomainType& in,
│ │ │ │ -
122 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
123 {
│ │ │ │ -
124 out.resize(size());
│ │ │ │ -
125
│ │ │ │ -
126 out[0][0][0] = sign_[0]*(-2*in[1] + 2*in[0]);
│ │ │ │ -
127 out[0][0][1] = sign_[0]*(-2*in[0]);
│ │ │ │ -
128
│ │ │ │ -
129 out[0][1][0] = sign_[0]*(-2*in[1]);
│ │ │ │ -
130 out[0][1][1] = sign_[0]*(6 -2*in[0] - 10*in[1]);
│ │ │ │ -
131
│ │ │ │ -
132
│ │ │ │ -
133 out[1][0][0] = 1.5 + 3*in[1] - 9*in[0];
│ │ │ │ -
134 out[1][0][1] = 3*in[0];
│ │ │ │ -
135
│ │ │ │ -
136 out[1][1][0] = 6 - 15*in[1];
│ │ │ │ -
137 out[1][1][1] = 10.5 - 15*in[0] - 15*in[1];
│ │ │ │ -
138
│ │ │ │ -
139
│ │ │ │ -
140 out[2][0][0] = sign_[0]*(-7.5 + 5*in[1] + 25*in[0]);
│ │ │ │ -
141 out[2][0][1] = sign_[0]*(5*in[0]);
│ │ │ │ -
142
│ │ │ │ -
143 out[2][1][0] = sign_[0]*(30 - 25*in[1] - 60*in[0]);
│ │ │ │ -
144 out[2][1][1] = sign_[0]*(7.5 - 25*in[0] - 5*in[1]);
│ │ │ │ -
145
│ │ │ │ -
146
│ │ │ │ -
147
│ │ │ │ -
148 out[3][0][0] = sign_[1]*(6 - 2*in[1] - 10*in[0]);
│ │ │ │ -
149 out[3][0][1] = sign_[1]*(-2*in[0]);
│ │ │ │ -
150
│ │ │ │ -
151 out[3][1][0] = sign_[1]*(-2*in[1]);
│ │ │ │ -
152 out[3][1][1] = sign_[1]*(-2*in[0] + 2*in[1]);
│ │ │ │ -
153
│ │ │ │ -
154
│ │ │ │ -
155 out[4][0][0] = -10.5 + 15*in[1] + 15*in[0];
│ │ │ │ -
156 out[4][0][1] = -6 + 15*in[0];
│ │ │ │ +
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 out[4][1][0] = -3*in[1];
│ │ │ │ -
159 out[4][1][1] = -1.5 - 3*in[0] + 9*in[1];
│ │ │ │ +
158 protected:
│ │ │ │ +
159 mutable FEMap cache_;
│ │ │ │
160
│ │ │ │ -
161
│ │ │ │ -
162 out[5][0][0] = sign_[1]*(7.5 - 25*in[1] - 5*in[0]);
│ │ │ │ -
163 out[5][0][1] = sign_[1]*(30 - 25*in[0] - 60*in[1]);
│ │ │ │ -
164
│ │ │ │ -
165 out[5][1][0] = sign_[1]*(5*in[1]);
│ │ │ │ -
166 out[5][1][1] = sign_[1]*(-7.5 + 5*in[0] + 25*in[1]);
│ │ │ │ -
167
│ │ │ │ -
168
│ │ │ │ -
169
│ │ │ │ -
170 out[6][0][0] = sign_[2]*(-3 + 4*in[1] + 8*in[0]);
│ │ │ │ -
171 out[6][0][1] = sign_[2]*(4*in[0]);
│ │ │ │ -
172
│ │ │ │ -
173 out[6][1][0] = sign_[2]*(4*in[1]);
│ │ │ │ -
174 out[6][1][1] = sign_[2]*(-3 + 4*in[0] + 8*in[1]);
│ │ │ │ -
175
│ │ │ │ -
176
│ │ │ │ -
177 out[7][0][0] = -3 + 12*in[0];
│ │ │ │ -
178 out[7][0][1] = 0;
│ │ │ │ -
179
│ │ │ │ -
180 out[7][1][0] = 0;
│ │ │ │ -
181 out[7][1][1] = 3 - 12*in[1];
│ │ │ │ -
182
│ │ │ │ -
183
│ │ │ │ -
184 out[8][0][0] = sign_[2]*(-10*in[1] + 10*in[0]);
│ │ │ │ -
185 out[8][0][1] = sign_[2]*(-10*in[0]);
│ │ │ │ -
186
│ │ │ │ -
187 out[8][1][0] = sign_[2]*(-10*in[1]);
│ │ │ │ -
188 out[8][1][1] = sign_[2]*(-10*in[0] + 10*in[1]);
│ │ │ │ -
189
│ │ │ │ -
190
│ │ │ │ -
191 out[9][0][0] = 18 - 12*in[1] - 36*in[0];
│ │ │ │ -
192 out[9][0][1] = -12*in[0];
│ │ │ │ -
193
│ │ │ │ -
194 out[9][1][0] = -12*in[1];
│ │ │ │ -
195 out[9][1][1] = 6 - 12*in[0] - 12*in[1];
│ │ │ │ -
196
│ │ │ │ -
197 out[10][0][0] = 6 - 12*in[1] - 12*in[0];
│ │ │ │ -
198 out[10][0][1] = -12*in[0];
│ │ │ │ -
199
│ │ │ │ -
200 out[10][1][0] = -12*in[1];
│ │ │ │ -
201 out[10][1][1] = 18 - 12*in[0] - 36*in[1];
│ │ │ │ -
202
│ │ │ │ -
203 out[11][0][0] = 90 - 180*in[1] - 180*in[0];
│ │ │ │ -
204 out[11][0][1] = -180*in[0];
│ │ │ │ -
205
│ │ │ │ -
206 out[11][1][0] = 180*in[1];
│ │ │ │ -
207 out[11][1][1] = -90 + 180*in[0] + 180*in[1];
│ │ │ │ -
208 }
│ │ │ │ -
│ │ │ │ -
209
│ │ │ │ -
│ │ │ │ -
211 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ -
212 const typename Traits::DomainType& in, // position
│ │ │ │ -
213 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
214 {
│ │ │ │ -
215 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
216 if (totalOrder == 0) {
│ │ │ │ -
217 evaluateFunction(in, out);
│ │ │ │ -
218 } else if (totalOrder == 1) {
│ │ │ │ -
219 out.resize(size());
│ │ │ │ -
220 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
221
│ │ │ │ -
222 switch (direction) {
│ │ │ │ -
223 case 0:
│ │ │ │ -
224 out[0][0] = sign_[0]*(-2*in[1] + 2*in[0]);
│ │ │ │ -
225 out[0][1] = sign_[0]*(-2*in[1]);
│ │ │ │ -
226
│ │ │ │ -
227 out[1][0] = 1.5 + 3*in[1] - 9*in[0];
│ │ │ │ -
228 out[1][1] = 6 - 15*in[1];
│ │ │ │ -
229
│ │ │ │ -
230 out[2][0] = sign_[0]*(-7.5 + 5*in[1] + 25*in[0]);
│ │ │ │ -
231 out[2][1] = sign_[0]*(30 - 25*in[1] - 60*in[0]);
│ │ │ │ -
232
│ │ │ │ -
233 out[3][0] = sign_[1]*(6 - 2*in[1] - 10*in[0]);
│ │ │ │ -
234 out[3][1] = sign_[1]*(-2*in[1]);
│ │ │ │ -
235
│ │ │ │ -
236 out[4][0] = -10.5 + 15*in[1] + 15*in[0];
│ │ │ │ -
237 out[4][1] = -3*in[1];
│ │ │ │ -
238
│ │ │ │ -
239 out[5][0] = sign_[1]*(7.5 - 25*in[1] - 5*in[0]);
│ │ │ │ -
240 out[5][1] = sign_[1]*(5*in[1]);
│ │ │ │ -
241
│ │ │ │ -
242 out[6][0] = sign_[2]*(-3 + 4*in[1] + 8*in[0]);
│ │ │ │ -
243 out[6][1] = sign_[2]*(4*in[1]);
│ │ │ │ -
244
│ │ │ │ -
245 out[7][0] = -3 + 12*in[0];
│ │ │ │ -
246 out[7][1] = 0;
│ │ │ │ -
247
│ │ │ │ -
248 out[8][0] = sign_[2]*(-10*in[1] + 10*in[0]);
│ │ │ │ -
249 out[8][1] = sign_[2]*(-10*in[1]);
│ │ │ │ -
250
│ │ │ │ -
251 out[9][0] = 18 - 12*in[1] - 36*in[0];
│ │ │ │ -
252 out[9][1] = -12*in[1];
│ │ │ │ -
253
│ │ │ │ -
254 out[10][0] = 6 - 12*in[1] - 12*in[0];
│ │ │ │ -
255 out[10][1] = -12*in[1];
│ │ │ │ -
256
│ │ │ │ -
257 out[11][0] = 90 - 180*in[1] - 180*in[0];
│ │ │ │ -
258 out[11][1] = 180*in[1];
│ │ │ │ -
259 break;
│ │ │ │ -
260 case 1:
│ │ │ │ -
261 out[0][0] = sign_[0]*(-2*in[0]);
│ │ │ │ -
262 out[0][1] = sign_[0]*(6 -2*in[0] - 10*in[1]);
│ │ │ │ -
263
│ │ │ │ -
264 out[1][0] = 3*in[0];
│ │ │ │ -
265 out[1][1] = 10.5 - 15*in[0] - 15*in[1];
│ │ │ │ -
266
│ │ │ │ -
267 out[2][0] = sign_[0]*(5*in[0]);
│ │ │ │ -
268 out[2][1] = sign_[0]*(7.5 - 25*in[0] - 5*in[1]);
│ │ │ │ -
269
│ │ │ │ -
270 out[3][0] = sign_[1]*(-2*in[0]);
│ │ │ │ -
271 out[3][1] = sign_[1]*(-2*in[0] + 2*in[1]);
│ │ │ │ -
272
│ │ │ │ -
273 out[4][0] = -6 + 15*in[0];
│ │ │ │ -
274 out[4][1] = -1.5 - 3*in[0] + 9*in[1];
│ │ │ │ -
275
│ │ │ │ -
276 out[5][0] = sign_[1]*(30 - 25*in[0] - 60*in[1]);
│ │ │ │ -
277 out[5][1] = sign_[1]*(-7.5 + 5*in[0] + 25*in[1]);
│ │ │ │ -
278
│ │ │ │ -
279 out[6][0] = sign_[2]*(4*in[0]);
│ │ │ │ -
280 out[6][1] = sign_[2]*(-3 + 4*in[0] + 8*in[1]);
│ │ │ │ -
281
│ │ │ │ -
282 out[7][0] = 0;
│ │ │ │ -
283 out[7][1] = 3 - 12*in[1];
│ │ │ │ -
284
│ │ │ │ -
285 out[8][0] = sign_[2]*(-10*in[0]);
│ │ │ │ -
286 out[8][1] = sign_[2]*(-10*in[0] + 10*in[1]);
│ │ │ │ -
287
│ │ │ │ -
288 out[9][0] = -12*in[0];
│ │ │ │ -
289 out[9][1] = 6 - 12*in[0] - 12*in[1];
│ │ │ │ -
290
│ │ │ │ -
291 out[10][0] = -12*in[0];
│ │ │ │ -
292 out[10][1] = 18 - 12*in[0] - 36*in[1];
│ │ │ │ -
293
│ │ │ │ -
294 out[11][0] = -180*in[0];
│ │ │ │ -
295 out[11][1] = -90 + 180*in[0] + 180*in[1];
│ │ │ │ -
296 break;
│ │ │ │ -
297 default:
│ │ │ │ -
298 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
299 }
│ │ │ │ -
300 } else {
│ │ │ │ -
301 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
302 }
│ │ │ │ -
303 }
│ │ │ │ -
│ │ │ │ -
304
│ │ │ │ -
│ │ │ │ -
306 unsigned int order() const
│ │ │ │ -
307 {
│ │ │ │ -
308 return 2; // TODO: check whether this is not order 3
│ │ │ │ -
309 }
│ │ │ │ -
│ │ │ │ -
310
│ │ │ │ -
311 private:
│ │ │ │ -
312 std::array<R,3> sign_;
│ │ │ │ -
313 };
│ │ │ │ +
161 };
│ │ │ │
│ │ │ │ -
314} // end namespace Dune
│ │ │ │ -
315#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALBASIS_HH
│ │ │ │ +
162
│ │ │ │ +
163}
│ │ │ │ +
164
│ │ │ │ +
165#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:30
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:121
│ │ │ │ -
BDM2Simplex2DLocalBasis(std::bitset< 3 > s)
Make set number s, where 0 <= s < 8.
Definition brezzidouglasmarini2simplex2dlocalbasis.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 brezzidouglasmarini2simplex2dlocalbasis.hh:211
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:56
│ │ │ │ -
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:35
│ │ │ │ -
BDM2Simplex2DLocalBasis()
Standard constructor.
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:38
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:67
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:306
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,350 +7,265 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini2simplex2d │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalbasis.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALBASIS_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 │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ 14 │ │ │ │ │ - 15#include "../../common/localbasis.hh" │ │ │ │ │ - 16 │ │ │ │ │ - 17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ - 28 template │ │ │ │ │ -29 class BDM2Simplex2DLocalBasis │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ + 17#include │ │ │ │ │ + 18#include │ │ │ │ │ + 19#include │ │ │ │ │ + 20 │ │ │ │ │ + 21namespace Dune │ │ │ │ │ + 22{ │ │ │ │ │ + 23 │ │ │ │ │ + 28 template │ │ │ │ │ +29 struct DimSpecificPQkLocalFiniteElementFactory │ │ │ │ │ 30 { │ │ │ │ │ - 31 │ │ │ │ │ - 32 public: │ │ │ │ │ - 33 typedef LocalBasisTraits, │ │ │ │ │ - 34 R,2,Dune::FieldVector, │ │ │ │ │ -35 Dune::FieldMatrix > Traits; │ │ │ │ │ - 36 │ │ │ │ │ -38 BDM2Simplex2DLocalBasis() │ │ │ │ │ - 39 { │ │ │ │ │ - 40 for (size_t i=0; i<3; i++) │ │ │ │ │ - 41 sign_[i] = 1.0; │ │ │ │ │ - 42 } │ │ │ │ │ - 43 │ │ │ │ │ -49 BDM2Simplex2DLocalBasis(std::bitset<3> s) │ │ │ │ │ - 50 { │ │ │ │ │ - 51 for (size_t i=0; i<3; i++) │ │ │ │ │ - 52 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ - 53 } │ │ │ │ │ - 54 │ │ │ │ │ -56 unsigned int size() const │ │ │ │ │ - 57 { │ │ │ │ │ - 58 return 12; │ │ │ │ │ - 59 } │ │ │ │ │ - 60 │ │ │ │ │ -67 inline void evaluateFunction(const typename Traits::DomainType& in, │ │ │ │ │ - 68 std::vector& out) const │ │ │ │ │ - 69 { │ │ │ │ │ - 70 out.resize(size()); │ │ │ │ │ - 71 │ │ │ │ │ - 72 out[0][0] = sign_[0]*(-2*in[0]*in[1] + in[0]*in[0]); │ │ │ │ │ - 73 out[0][1] = sign_[0]*(-1 + 6*in[1] -2*in[0]*in[1] - 5*in[1]*in[1]); │ │ │ │ │ - 74 │ │ │ │ │ - 75 out[1][0] = 1.5*in[0] + 3*in[0]*in[1] - 4.5*in[0]*in[0]; │ │ │ │ │ - 76 out[1][1] = -3 + 6*in[0] + 10.5*in[1] - 15*in[0]*in[1] - 7.5*in[1]*in[1]; │ │ │ │ │ - 77 │ │ │ │ │ - 78 out[2][0] = sign_[0]*(-7.5*in[0] + 5*in[0]*in[1] + 12.5*in[0]*in[0]); │ │ │ │ │ - 79 out[2][1] = sign_[0]*(-5 + 30*in[0] + 7.5*in[1] - 25*in[0]*in[1] - 30*in │ │ │ │ │ -[0]*in[0] - 2.5*in[1]*in[1]); │ │ │ │ │ +31 typedef typename P0LocalFiniteElement::Traits::LocalBasisType::Traits │ │ │ │ │ +T; │ │ │ │ │ + 32 │ │ │ │ │ +34 static LocalFiniteElementVirtualInterface* create(const GeometryType&) │ │ │ │ │ + 35 { │ │ │ │ │ + 36 return nullptr; │ │ │ │ │ + 37 } │ │ │ │ │ + 38 }; │ │ │ │ │ + 39 │ │ │ │ │ + 44 template │ │ │ │ │ +45 struct DimSpecificPQkLocalFiniteElementFactory │ │ │ │ │ + 46 { │ │ │ │ │ +47 typedef typename P0LocalFiniteElement::Traits::LocalBasisType::Traits │ │ │ │ │ +T; │ │ │ │ │ +48 using PrismP1 = LagrangePrismLocalFiniteElement; │ │ │ │ │ +49 using PrismP2 = LagrangePrismLocalFiniteElement; │ │ │ │ │ +50 using PyramidP1 = LagrangePyramidLocalFiniteElement; │ │ │ │ │ +51 using PyramidP2 = LagrangePyramidLocalFiniteElement; │ │ │ │ │ + 52 │ │ │ │ │ +54 static LocalFiniteElementVirtualInterface* create(const GeometryType& gt) │ │ │ │ │ + 55 { │ │ │ │ │ + 56 if ((gt.isPrism())and (k==1)) │ │ │ │ │ + 57 return new LocalFiniteElementVirtualImp(PrismP1()); │ │ │ │ │ + 58 if ((gt.isPrism())and (k==2)) │ │ │ │ │ + 59 return new LocalFiniteElementVirtualImp(PrismP2()); │ │ │ │ │ + 60 if ((gt.isPyramid())and (k==1)) │ │ │ │ │ + 61 return new LocalFiniteElementVirtualImp(PyramidP1()); │ │ │ │ │ + 62 if ((gt.isPyramid())and (k==2)) │ │ │ │ │ + 63 return new LocalFiniteElementVirtualImp(PyramidP2()); │ │ │ │ │ + 64 return nullptr; │ │ │ │ │ + 65 } │ │ │ │ │ + 66 }; │ │ │ │ │ + 67 │ │ │ │ │ + 68 │ │ │ │ │ + 72 template │ │ │ │ │ +73 struct PQkLocalFiniteElementFactory │ │ │ │ │ + 74 { │ │ │ │ │ +75 typedef typename P0LocalFiniteElement::Traits::LocalBasisType:: │ │ │ │ │ +Traits T; │ │ │ │ │ +76 typedef LocalFiniteElementVirtualInterface FiniteElementType; │ │ │ │ │ +77 using P0 = P0LocalFiniteElement; │ │ │ │ │ +78 using Pk = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ +79 using Qk = LagrangeCubeLocalFiniteElement; │ │ │ │ │ 80 │ │ │ │ │ 81 │ │ │ │ │ - 82 │ │ │ │ │ - 83 out[3][0] = sign_[1]*(-1 + 6*in[0] - 2*in[0]*in[1] - 5*in[0]*in[0]); │ │ │ │ │ - 84 out[3][1] = sign_[1]*(-2*in[0]*in[1] + in[1]*in[1]); │ │ │ │ │ - 85 │ │ │ │ │ - 86 out[4][0] = 3 - 10.5*in[0] - 6*in[1] + 15*in[0]*in[1] + 7.5*in[0]*in[0]; │ │ │ │ │ - 87 out[4][1] = -1.5*in[1] - 3*in[0]*in[1] + 4.5*in[1]*in[1]; │ │ │ │ │ - 88 │ │ │ │ │ - 89 out[5][0] = sign_[1]*(-5 + 7.5*in[0] + 30*in[1] - 25*in[0]*in[1] - 2.5*in │ │ │ │ │ -[0]*in[0] - 30*in[1]*in[1]); │ │ │ │ │ - 90 out[5][1] = sign_[1]*(-7.5*in[1] + 5*in[0]*in[1] + 12.5*in[1]*in[1]); │ │ │ │ │ - 91 │ │ │ │ │ - 92 │ │ │ │ │ +83 static FiniteElementType* create(const GeometryType& gt) │ │ │ │ │ + 84 { │ │ │ │ │ + 85 if (k==0) │ │ │ │ │ + 86 return new LocalFiniteElementVirtualImp(P0(gt)); │ │ │ │ │ + 87 │ │ │ │ │ + 88 if (gt.isSimplex()) │ │ │ │ │ + 89 return new LocalFiniteElementVirtualImp(Pk()); │ │ │ │ │ + 90 │ │ │ │ │ + 91 if (gt.isCube()) │ │ │ │ │ + 92 return new LocalFiniteElementVirtualImp(Qk()); │ │ │ │ │ 93 │ │ │ │ │ - 94 out[6][0] = sign_[2]*(-3*in[0] + 4*in[0]*in[1] + 4*in[0]*in[0]); │ │ │ │ │ - 95 out[6][1] = sign_[2]*(-3*in[1] + 4*in[0]*in[1] + 4*in[1]*in[1]); │ │ │ │ │ - 96 │ │ │ │ │ - 97 out[7][0] = -3*in[0] + 6*in[0]*in[0]; │ │ │ │ │ - 98 out[7][1] = 3*in[1] - 6*in[1]*in[1]; │ │ │ │ │ + 94 return DimSpecificPQkLocalFiniteElementFactory::create(gt); │ │ │ │ │ + 95 } │ │ │ │ │ + 96 }; │ │ │ │ │ + 97 │ │ │ │ │ + 98 │ │ │ │ │ 99 │ │ │ │ │ - 100 out[8][0] = sign_[2]*(-10*in[0]*in[1] + 5*in[0]*in[0]); │ │ │ │ │ - 101 out[8][1] = sign_[2]*(-10*in[0]*in[1] + 5*in[1]*in[1]); │ │ │ │ │ - 102 │ │ │ │ │ - 103 │ │ │ │ │ - 104 │ │ │ │ │ - 105 out[9][0] = 18*in[0] - 12*in[0]*in[1] - 18*in[0]*in[0]; │ │ │ │ │ - 106 out[9][1] = 6*in[1] - 12*in[0]*in[1] - 6*in[1]*in[1]; │ │ │ │ │ - 107 │ │ │ │ │ - 108 out[10][0] = 6*in[0] - 12*in[0]*in[1] - 6*in[0]*in[0]; │ │ │ │ │ - 109 out[10][1] = 18*in[1] - 12*in[0]*in[1] - 18*in[1]*in[1]; │ │ │ │ │ - 110 │ │ │ │ │ - 111 out[11][0] = 90*in[0] - 180*in[0]*in[1] - 90*in[0]*in[0]; │ │ │ │ │ - 112 out[11][1] = -90*in[1] + 180*in[0]*in[1] + 90*in[1]*in[1]; │ │ │ │ │ - 113 } │ │ │ │ │ - 114 │ │ │ │ │ -121 inline void evaluateJacobian(const typename Traits::DomainType& in, │ │ │ │ │ - 122 std::vector& out) const │ │ │ │ │ - 123 { │ │ │ │ │ - 124 out.resize(size()); │ │ │ │ │ - 125 │ │ │ │ │ - 126 out[0][0][0] = sign_[0]*(-2*in[1] + 2*in[0]); │ │ │ │ │ - 127 out[0][0][1] = sign_[0]*(-2*in[0]); │ │ │ │ │ - 128 │ │ │ │ │ - 129 out[0][1][0] = sign_[0]*(-2*in[1]); │ │ │ │ │ - 130 out[0][1][1] = sign_[0]*(6 -2*in[0] - 10*in[1]); │ │ │ │ │ - 131 │ │ │ │ │ - 132 │ │ │ │ │ - 133 out[1][0][0] = 1.5 + 3*in[1] - 9*in[0]; │ │ │ │ │ - 134 out[1][0][1] = 3*in[0]; │ │ │ │ │ - 135 │ │ │ │ │ - 136 out[1][1][0] = 6 - 15*in[1]; │ │ │ │ │ - 137 out[1][1][1] = 10.5 - 15*in[0] - 15*in[1]; │ │ │ │ │ - 138 │ │ │ │ │ - 139 │ │ │ │ │ - 140 out[2][0][0] = sign_[0]*(-7.5 + 5*in[1] + 25*in[0]); │ │ │ │ │ - 141 out[2][0][1] = sign_[0]*(5*in[0]); │ │ │ │ │ - 142 │ │ │ │ │ - 143 out[2][1][0] = sign_[0]*(30 - 25*in[1] - 60*in[0]); │ │ │ │ │ - 144 out[2][1][1] = sign_[0]*(7.5 - 25*in[0] - 5*in[1]); │ │ │ │ │ - 145 │ │ │ │ │ - 146 │ │ │ │ │ - 147 │ │ │ │ │ - 148 out[3][0][0] = sign_[1]*(6 - 2*in[1] - 10*in[0]); │ │ │ │ │ - 149 out[3][0][1] = sign_[1]*(-2*in[0]); │ │ │ │ │ - 150 │ │ │ │ │ - 151 out[3][1][0] = sign_[1]*(-2*in[1]); │ │ │ │ │ - 152 out[3][1][1] = sign_[1]*(-2*in[0] + 2*in[1]); │ │ │ │ │ - 153 │ │ │ │ │ - 154 │ │ │ │ │ - 155 out[4][0][0] = -10.5 + 15*in[1] + 15*in[0]; │ │ │ │ │ - 156 out[4][0][1] = -6 + 15*in[0]; │ │ │ │ │ + 110 template │ │ │ │ │ +111 class PQkLocalFiniteElementCache │ │ │ │ │ + 112 { │ │ │ │ │ + 113 protected: │ │ │ │ │ +114 typedef typename P0LocalFiniteElement::Traits::LocalBasisType:: │ │ │ │ │ +Traits T; │ │ │ │ │ +115 typedef LocalFiniteElementVirtualInterface FE; │ │ │ │ │ +116 typedef typename std::map FEMap; │ │ │ │ │ + 117 │ │ │ │ │ + 118 public: │ │ │ │ │ +120 typedef FE FiniteElementType; │ │ │ │ │ + 121 │ │ │ │ │ +123 PQkLocalFiniteElementCache() {} │ │ │ │ │ + 124 │ │ │ │ │ +126 PQkLocalFiniteElementCache(const PQkLocalFiniteElementCache& other) │ │ │ │ │ + 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 │ │ │ │ │ +134 ~PQkLocalFiniteElementCache() │ │ │ │ │ + 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 { │ │ │ │ │ + 148 FiniteElementType* fe = PQkLocalFiniteElementFactory::create │ │ │ │ │ +(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 cache_[gt] = fe; │ │ │ │ │ + 153 return *fe; │ │ │ │ │ + 154 } │ │ │ │ │ + 155 return *(it->second); │ │ │ │ │ + 156 } │ │ │ │ │ 157 │ │ │ │ │ - 158 out[4][1][0] = -3*in[1]; │ │ │ │ │ - 159 out[4][1][1] = -1.5 - 3*in[0] + 9*in[1]; │ │ │ │ │ + 158 protected: │ │ │ │ │ +159 mutable FEMap cache_; │ │ │ │ │ 160 │ │ │ │ │ - 161 │ │ │ │ │ - 162 out[5][0][0] = sign_[1]*(7.5 - 25*in[1] - 5*in[0]); │ │ │ │ │ - 163 out[5][0][1] = sign_[1]*(30 - 25*in[0] - 60*in[1]); │ │ │ │ │ + 161 }; │ │ │ │ │ + 162 │ │ │ │ │ + 163} │ │ │ │ │ 164 │ │ │ │ │ - 165 out[5][1][0] = sign_[1]*(5*in[1]); │ │ │ │ │ - 166 out[5][1][1] = sign_[1]*(-7.5 + 5*in[0] + 25*in[1]); │ │ │ │ │ - 167 │ │ │ │ │ - 168 │ │ │ │ │ - 169 │ │ │ │ │ - 170 out[6][0][0] = sign_[2]*(-3 + 4*in[1] + 8*in[0]); │ │ │ │ │ - 171 out[6][0][1] = sign_[2]*(4*in[0]); │ │ │ │ │ - 172 │ │ │ │ │ - 173 out[6][1][0] = sign_[2]*(4*in[1]); │ │ │ │ │ - 174 out[6][1][1] = sign_[2]*(-3 + 4*in[0] + 8*in[1]); │ │ │ │ │ - 175 │ │ │ │ │ - 176 │ │ │ │ │ - 177 out[7][0][0] = -3 + 12*in[0]; │ │ │ │ │ - 178 out[7][0][1] = 0; │ │ │ │ │ - 179 │ │ │ │ │ - 180 out[7][1][0] = 0; │ │ │ │ │ - 181 out[7][1][1] = 3 - 12*in[1]; │ │ │ │ │ - 182 │ │ │ │ │ - 183 │ │ │ │ │ - 184 out[8][0][0] = sign_[2]*(-10*in[1] + 10*in[0]); │ │ │ │ │ - 185 out[8][0][1] = sign_[2]*(-10*in[0]); │ │ │ │ │ - 186 │ │ │ │ │ - 187 out[8][1][0] = sign_[2]*(-10*in[1]); │ │ │ │ │ - 188 out[8][1][1] = sign_[2]*(-10*in[0] + 10*in[1]); │ │ │ │ │ - 189 │ │ │ │ │ - 190 │ │ │ │ │ - 191 out[9][0][0] = 18 - 12*in[1] - 36*in[0]; │ │ │ │ │ - 192 out[9][0][1] = -12*in[0]; │ │ │ │ │ - 193 │ │ │ │ │ - 194 out[9][1][0] = -12*in[1]; │ │ │ │ │ - 195 out[9][1][1] = 6 - 12*in[0] - 12*in[1]; │ │ │ │ │ - 196 │ │ │ │ │ - 197 out[10][0][0] = 6 - 12*in[1] - 12*in[0]; │ │ │ │ │ - 198 out[10][0][1] = -12*in[0]; │ │ │ │ │ - 199 │ │ │ │ │ - 200 out[10][1][0] = -12*in[1]; │ │ │ │ │ - 201 out[10][1][1] = 18 - 12*in[0] - 36*in[1]; │ │ │ │ │ - 202 │ │ │ │ │ - 203 out[11][0][0] = 90 - 180*in[1] - 180*in[0]; │ │ │ │ │ - 204 out[11][0][1] = -180*in[0]; │ │ │ │ │ - 205 │ │ │ │ │ - 206 out[11][1][0] = 180*in[1]; │ │ │ │ │ - 207 out[11][1][1] = -90 + 180*in[0] + 180*in[1]; │ │ │ │ │ - 208 } │ │ │ │ │ - 209 │ │ │ │ │ -211 void partial (const std::array& order, │ │ │ │ │ - 212 const typename Traits::DomainType& in, // position │ │ │ │ │ - 213 std::vector& out) const // return value │ │ │ │ │ - 214 { │ │ │ │ │ - 215 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ - 216 if (totalOrder == 0) { │ │ │ │ │ - 217 evaluateFunction(in, out); │ │ │ │ │ - 218 } else if (totalOrder == 1) { │ │ │ │ │ - 219 out.resize(size()); │ │ │ │ │ - 220 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ - 221 │ │ │ │ │ - 222 switch (direction) { │ │ │ │ │ - 223 case 0: │ │ │ │ │ - 224 out[0][0] = sign_[0]*(-2*in[1] + 2*in[0]); │ │ │ │ │ - 225 out[0][1] = sign_[0]*(-2*in[1]); │ │ │ │ │ - 226 │ │ │ │ │ - 227 out[1][0] = 1.5 + 3*in[1] - 9*in[0]; │ │ │ │ │ - 228 out[1][1] = 6 - 15*in[1]; │ │ │ │ │ - 229 │ │ │ │ │ - 230 out[2][0] = sign_[0]*(-7.5 + 5*in[1] + 25*in[0]); │ │ │ │ │ - 231 out[2][1] = sign_[0]*(30 - 25*in[1] - 60*in[0]); │ │ │ │ │ - 232 │ │ │ │ │ - 233 out[3][0] = sign_[1]*(6 - 2*in[1] - 10*in[0]); │ │ │ │ │ - 234 out[3][1] = sign_[1]*(-2*in[1]); │ │ │ │ │ - 235 │ │ │ │ │ - 236 out[4][0] = -10.5 + 15*in[1] + 15*in[0]; │ │ │ │ │ - 237 out[4][1] = -3*in[1]; │ │ │ │ │ - 238 │ │ │ │ │ - 239 out[5][0] = sign_[1]*(7.5 - 25*in[1] - 5*in[0]); │ │ │ │ │ - 240 out[5][1] = sign_[1]*(5*in[1]); │ │ │ │ │ - 241 │ │ │ │ │ - 242 out[6][0] = sign_[2]*(-3 + 4*in[1] + 8*in[0]); │ │ │ │ │ - 243 out[6][1] = sign_[2]*(4*in[1]); │ │ │ │ │ - 244 │ │ │ │ │ - 245 out[7][0] = -3 + 12*in[0]; │ │ │ │ │ - 246 out[7][1] = 0; │ │ │ │ │ - 247 │ │ │ │ │ - 248 out[8][0] = sign_[2]*(-10*in[1] + 10*in[0]); │ │ │ │ │ - 249 out[8][1] = sign_[2]*(-10*in[1]); │ │ │ │ │ - 250 │ │ │ │ │ - 251 out[9][0] = 18 - 12*in[1] - 36*in[0]; │ │ │ │ │ - 252 out[9][1] = -12*in[1]; │ │ │ │ │ - 253 │ │ │ │ │ - 254 out[10][0] = 6 - 12*in[1] - 12*in[0]; │ │ │ │ │ - 255 out[10][1] = -12*in[1]; │ │ │ │ │ - 256 │ │ │ │ │ - 257 out[11][0] = 90 - 180*in[1] - 180*in[0]; │ │ │ │ │ - 258 out[11][1] = 180*in[1]; │ │ │ │ │ - 259 break; │ │ │ │ │ - 260 case 1: │ │ │ │ │ - 261 out[0][0] = sign_[0]*(-2*in[0]); │ │ │ │ │ - 262 out[0][1] = sign_[0]*(6 -2*in[0] - 10*in[1]); │ │ │ │ │ - 263 │ │ │ │ │ - 264 out[1][0] = 3*in[0]; │ │ │ │ │ - 265 out[1][1] = 10.5 - 15*in[0] - 15*in[1]; │ │ │ │ │ - 266 │ │ │ │ │ - 267 out[2][0] = sign_[0]*(5*in[0]); │ │ │ │ │ - 268 out[2][1] = sign_[0]*(7.5 - 25*in[0] - 5*in[1]); │ │ │ │ │ - 269 │ │ │ │ │ - 270 out[3][0] = sign_[1]*(-2*in[0]); │ │ │ │ │ - 271 out[3][1] = sign_[1]*(-2*in[0] + 2*in[1]); │ │ │ │ │ - 272 │ │ │ │ │ - 273 out[4][0] = -6 + 15*in[0]; │ │ │ │ │ - 274 out[4][1] = -1.5 - 3*in[0] + 9*in[1]; │ │ │ │ │ - 275 │ │ │ │ │ - 276 out[5][0] = sign_[1]*(30 - 25*in[0] - 60*in[1]); │ │ │ │ │ - 277 out[5][1] = sign_[1]*(-7.5 + 5*in[0] + 25*in[1]); │ │ │ │ │ - 278 │ │ │ │ │ - 279 out[6][0] = sign_[2]*(4*in[0]); │ │ │ │ │ - 280 out[6][1] = sign_[2]*(-3 + 4*in[0] + 8*in[1]); │ │ │ │ │ - 281 │ │ │ │ │ - 282 out[7][0] = 0; │ │ │ │ │ - 283 out[7][1] = 3 - 12*in[1]; │ │ │ │ │ - 284 │ │ │ │ │ - 285 out[8][0] = sign_[2]*(-10*in[0]); │ │ │ │ │ - 286 out[8][1] = sign_[2]*(-10*in[0] + 10*in[1]); │ │ │ │ │ - 287 │ │ │ │ │ - 288 out[9][0] = -12*in[0]; │ │ │ │ │ - 289 out[9][1] = 6 - 12*in[0] - 12*in[1]; │ │ │ │ │ - 290 │ │ │ │ │ - 291 out[10][0] = -12*in[0]; │ │ │ │ │ - 292 out[10][1] = 18 - 12*in[0] - 36*in[1]; │ │ │ │ │ - 293 │ │ │ │ │ - 294 out[11][0] = -180*in[0]; │ │ │ │ │ - 295 out[11][1] = -90 + 180*in[0] + 180*in[1]; │ │ │ │ │ - 296 break; │ │ │ │ │ - 297 default: │ │ │ │ │ - 298 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ - 299 } │ │ │ │ │ - 300 } else { │ │ │ │ │ - 301 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ - 302 } │ │ │ │ │ - 303 } │ │ │ │ │ - 304 │ │ │ │ │ -306 unsigned int order() const │ │ │ │ │ - 307 { │ │ │ │ │ - 308 return 2; // TODO: check whether this is not order 3 │ │ │ │ │ - 309 } │ │ │ │ │ - 310 │ │ │ │ │ - 311 private: │ │ │ │ │ - 312 std::array sign_; │ │ │ │ │ - 313 }; │ │ │ │ │ - 314} // end namespace Dune │ │ │ │ │ - 315#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALBASIS_HH │ │ │ │ │ + 165#endif │ │ │ │ │ +virtualinterface.hh │ │ │ │ │ +virtualwrappers.hh │ │ │ │ │ +p0.hh │ │ │ │ │ +lagrangepyramid.hh │ │ │ │ │ +lagrangeprism.hh │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ +lagrangecube.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM2Simplex2DLocalBasis │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalbasis.hh:30 │ │ │ │ │ -Dune::BDM2Simplex2DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalbasis.hh:121 │ │ │ │ │ -Dune::BDM2Simplex2DLocalBasis::BDM2Simplex2DLocalBasis │ │ │ │ │ -BDM2Simplex2DLocalBasis(std::bitset< 3 > s) │ │ │ │ │ -Make set number s, where 0 <= s < 8. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalbasis.hh:49 │ │ │ │ │ -Dune::BDM2Simplex2DLocalBasis::partial │ │ │ │ │ -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 brezzidouglasmarini2simplex2dlocalbasis.hh:211 │ │ │ │ │ -Dune::BDM2Simplex2DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalbasis.hh:56 │ │ │ │ │ -Dune::BDM2Simplex2DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ -2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalbasis.hh:35 │ │ │ │ │ -Dune::BDM2Simplex2DLocalBasis::BDM2Simplex2DLocalBasis │ │ │ │ │ -BDM2Simplex2DLocalBasis() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalbasis.hh:38 │ │ │ │ │ -Dune::BDM2Simplex2DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalbasis.hh:67 │ │ │ │ │ -Dune::BDM2Simplex2DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalbasis.hh:306 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LocalFiniteElementVirtualInterface │ │ │ │ │ +virtual base class for local finite elements with functions │ │ │ │ │ +Definition virtualinterface.hh:286 │ │ │ │ │ +Dune::LocalFiniteElementVirtualImp │ │ │ │ │ +class for wrapping a finite element using the virtual interface │ │ │ │ │ +Definition virtualwrappers.hh:240 │ │ │ │ │ +Dune::LagrangeCubeLocalFiniteElement │ │ │ │ │ +Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangecube.hh:711 │ │ │ │ │ +Dune::LagrangePrismLocalFiniteElement │ │ │ │ │ +Lagrange finite element for 3d prisms with arbitrary compile-time polynomial │ │ │ │ │ +order. │ │ │ │ │ +Definition lagrangeprism.hh:652 │ │ │ │ │ +Dune::LagrangePyramidLocalFiniteElement │ │ │ │ │ +Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ +Definition lagrangepyramid.hh:812 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangesimplex.hh:838 │ │ │ │ │ +Dune::P0LocalFiniteElement │ │ │ │ │ +The local p0 finite element on all types of reference elements. │ │ │ │ │ +Definition p0.hh:25 │ │ │ │ │ +Dune::DimSpecificPQkLocalFiniteElementFactory │ │ │ │ │ +Factory that only creates dimension specific local finite elements. │ │ │ │ │ +Definition pqkfactory.hh:30 │ │ │ │ │ +Dune::DimSpecificPQkLocalFiniteElementFactory::T │ │ │ │ │ +P0LocalFiniteElement< D, R, d >::Traits::LocalBasisType::Traits T │ │ │ │ │ +Definition pqkfactory.hh:31 │ │ │ │ │ +Dune::DimSpecificPQkLocalFiniteElementFactory::create │ │ │ │ │ +static LocalFiniteElementVirtualInterface< T > * create(const GeometryType &) │ │ │ │ │ +create finite element for given GeometryType │ │ │ │ │ +Definition pqkfactory.hh:34 │ │ │ │ │ +Dune::DimSpecificPQkLocalFiniteElementFactory<_D,_R,_3,_k_>::create │ │ │ │ │ +static LocalFiniteElementVirtualInterface< T > * create(const GeometryType >) │ │ │ │ │ +create finite element for given GeometryType │ │ │ │ │ +Definition pqkfactory.hh:54 │ │ │ │ │ +Dune::DimSpecificPQkLocalFiniteElementFactory<_D,_R,_3,_k_>::T │ │ │ │ │ +P0LocalFiniteElement< D, R, 3 >::Traits::LocalBasisType::Traits T │ │ │ │ │ +Definition pqkfactory.hh:47 │ │ │ │ │ +Dune::PQkLocalFiniteElementFactory │ │ │ │ │ +Factory to create any kind of Pk/Qk like element wrapped for the virtual │ │ │ │ │ +interface. │ │ │ │ │ +Definition pqkfactory.hh:74 │ │ │ │ │ +Dune::PQkLocalFiniteElementFactory::Qk │ │ │ │ │ +LagrangeCubeLocalFiniteElement< D, R, dim, k > Qk │ │ │ │ │ +Definition pqkfactory.hh:79 │ │ │ │ │ +Dune::PQkLocalFiniteElementFactory::Pk │ │ │ │ │ +LagrangeSimplexLocalFiniteElement< D, R, dim, k > Pk │ │ │ │ │ +Definition pqkfactory.hh:78 │ │ │ │ │ +Dune::PQkLocalFiniteElementFactory::FiniteElementType │ │ │ │ │ +LocalFiniteElementVirtualInterface< T > FiniteElementType │ │ │ │ │ +Definition pqkfactory.hh:76 │ │ │ │ │ +Dune::PQkLocalFiniteElementFactory::create │ │ │ │ │ +static FiniteElementType * create(const GeometryType >) │ │ │ │ │ +create finite element for given GeometryType │ │ │ │ │ +Definition pqkfactory.hh:83 │ │ │ │ │ +Dune::PQkLocalFiniteElementFactory::T │ │ │ │ │ +P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T │ │ │ │ │ +Definition pqkfactory.hh:75 │ │ │ │ │ +Dune::PQkLocalFiniteElementFactory::P0 │ │ │ │ │ +P0LocalFiniteElement< D, R, dim > P0 │ │ │ │ │ +Definition pqkfactory.hh:77 │ │ │ │ │ +Dune::PQkLocalFiniteElementCache │ │ │ │ │ +A cache that stores all available Pk/Qk like local finite elements for the │ │ │ │ │ +given dimension and order. │ │ │ │ │ +Definition pqkfactory.hh:112 │ │ │ │ │ +Dune::PQkLocalFiniteElementCache::T │ │ │ │ │ +P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T │ │ │ │ │ +Definition pqkfactory.hh:114 │ │ │ │ │ +Dune::PQkLocalFiniteElementCache::FE │ │ │ │ │ +LocalFiniteElementVirtualInterface< T > FE │ │ │ │ │ +Definition pqkfactory.hh:115 │ │ │ │ │ +Dune::PQkLocalFiniteElementCache::PQkLocalFiniteElementCache │ │ │ │ │ +PQkLocalFiniteElementCache() │ │ │ │ │ +Default constructor. │ │ │ │ │ +Definition pqkfactory.hh:123 │ │ │ │ │ +Dune::PQkLocalFiniteElementCache::FiniteElementType │ │ │ │ │ +FE FiniteElementType │ │ │ │ │ +Type of the finite elements stored in this cache. │ │ │ │ │ +Definition pqkfactory.hh:120 │ │ │ │ │ +Dune::PQkLocalFiniteElementCache::FEMap │ │ │ │ │ +std::map< GeometryType, FE * > FEMap │ │ │ │ │ +Definition pqkfactory.hh:116 │ │ │ │ │ +Dune::PQkLocalFiniteElementCache::get │ │ │ │ │ +const FiniteElementType & get(const GeometryType >) const │ │ │ │ │ +Get local finite element for given GeometryType. │ │ │ │ │ +Definition pqkfactory.hh:143 │ │ │ │ │ +Dune::PQkLocalFiniteElementCache::cache_ │ │ │ │ │ +FEMap cache_ │ │ │ │ │ +Definition pqkfactory.hh:159 │ │ │ │ │ +Dune::PQkLocalFiniteElementCache::~PQkLocalFiniteElementCache │ │ │ │ │ +~PQkLocalFiniteElementCache() │ │ │ │ │ +Definition pqkfactory.hh:134 │ │ │ │ │ +Dune::PQkLocalFiniteElementCache::PQkLocalFiniteElementCache │ │ │ │ │ +PQkLocalFiniteElementCache(const PQkLocalFiniteElementCache &other) │ │ │ │ │ +Copy constructor. │ │ │ │ │ +Definition pqkfactory.hh:126 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00377.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2simplex2dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: pk2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,54 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
brezzidouglasmarini2simplex2dlocalcoefficients.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
pk2d.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../../common/localkey.hh"
│ │ │ │ +#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

class  Dune::BDM2Simplex2DLocalCoefficients
 Layout map for Brezzi-Douglas-Marini-2 elements on triangles. More...
class  Dune::Pk2DFiniteElement< Geometry, RF, k >
 Langrange finite element of arbitrary order on triangles. More...
 
struct  Dune::Pk2DFiniteElement< Geometry, RF, k >::Traits
 
struct  Dune::Pk2DFiniteElementFactory< Geometry, RF, k >
 Factory for Pk2DFiniteElement objects. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

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

│ │ │ │ +Typedefs

template<class D , class R , unsigned int k>
using Dune::Pk2DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, 2, k >
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,25 +6,36 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini2simplex2d │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalcoefficients.hh File Reference │ │ │ │ │ + * lagrange │ │ │ │ │ +Classes | Namespaces | Typedefs │ │ │ │ │ +pk2d.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localkey.hh" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM2Simplex2DLocalCoefficients │ │ │ │ │ -  Layout map for Brezzi-Douglas-Marini-2 elements on triangles. More... │ │ │ │ │ + class  Dune::Pk2DFiniteElement<_Geometry,_RF,_k_> │ │ │ │ │ +  Langrange finite element of arbitrary order on triangles. More... │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::Pk2DFiniteElement<_Geometry,_RF,_k_>::Traits │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::Pk2DFiniteElementFactory<_Geometry,_RF,_k_> │ │ │ │ │ +  Factory for Pk2DFiniteElement objects. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +using Dune::Pk2DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, │ │ │ │ │ + 2, k > │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00377_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2simplex2dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: pk2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,84 +70,152 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini2simplex2dlocalcoefficients.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_PK2DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_PK2DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │
8#include <cstddef>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include "../../common/localkey.hh"
│ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/type.hh>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
15
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25
│ │ │ │ -
26 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ -
30 for (std::size_t i = 0; i < 3; ++i)
│ │ │ │ -
31 {
│ │ │ │ -
32 li[3 * i] = LocalKey(i,1,0);
│ │ │ │ -
33 li[3 * i + 1] = LocalKey(i,1,1);
│ │ │ │ -
34 li[3 * i + 2] = LocalKey(i,1,2);
│ │ │ │ -
35 }
│ │ │ │ -
36
│ │ │ │ -
37 // last DOFs are associated with the cell (codim=0)
│ │ │ │ -
38 li[9] = LocalKey(0,0,0);
│ │ │ │ -
39 li[10] = LocalKey(0,0,1);
│ │ │ │ -
40 li[11] = LocalKey(0,0,2);
│ │ │ │ -
41 }
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
│ │ │ │ -
44 std::size_t size() const
│ │ │ │ -
45 {
│ │ │ │ -
46 return 12;
│ │ │ │ -
47 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
│ │ │ │ -
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} // end namespace Dune
│ │ │ │ -
59#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
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();
│ │ │ │ +
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#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Layout map for Brezzi-Douglas-Marini-2 elements on triangles.
Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:24
│ │ │ │ -
BDM2Simplex2DLocalCoefficients()
Standard constructor.
Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:28
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:50
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:44
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,87 +7,171 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini2simplex2d │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalcoefficients.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_PK2DLOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_PK2DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include "../../common/localkey.hh" │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ 15 │ │ │ │ │ -23 class BDM2Simplex2DLocalCoefficients │ │ │ │ │ - 24 { │ │ │ │ │ - 25 │ │ │ │ │ - 26 public: │ │ │ │ │ -28 BDM2Simplex2DLocalCoefficients() : li(12) │ │ │ │ │ - 29 { │ │ │ │ │ - 30 for (std::size_t i = 0; i < 3; ++i) │ │ │ │ │ - 31 { │ │ │ │ │ - 32 li[3 * i] = LocalKey(i,1,0); │ │ │ │ │ - 33 li[3 * i + 1] = LocalKey(i,1,1); │ │ │ │ │ - 34 li[3 * i + 2] = LocalKey(i,1,2); │ │ │ │ │ - 35 } │ │ │ │ │ - 36 │ │ │ │ │ - 37 // last DOFs are associated with the cell (codim=0) │ │ │ │ │ - 38 li[9] = LocalKey(0,0,0); │ │ │ │ │ - 39 li[10] = LocalKey(0,0,1); │ │ │ │ │ - 40 li[11] = LocalKey(0,0,2); │ │ │ │ │ - 41 } │ │ │ │ │ - 42 │ │ │ │ │ -44 std::size_t size() const │ │ │ │ │ - 45 { │ │ │ │ │ - 46 return 12; │ │ │ │ │ - 47 } │ │ │ │ │ - 48 │ │ │ │ │ -50 const LocalKey& localKey(std::size_t i) const │ │ │ │ │ - 51 { │ │ │ │ │ - 52 return li[i]; │ │ │ │ │ - 53 } │ │ │ │ │ - 54 │ │ │ │ │ - 55 private: │ │ │ │ │ - 56 std::vector li; │ │ │ │ │ - 57 }; │ │ │ │ │ - 58} // end namespace Dune │ │ │ │ │ - 59#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 16#warning This header is deprecated │ │ │ │ │ + 17 │ │ │ │ │ + 18namespace Dune │ │ │ │ │ + 19{ │ │ │ │ │ + 20 │ │ │ │ │ + 25 template │ │ │ │ │ +26 using Pk2DLocalFiniteElement │ │ │ │ │ + 27 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ + 28 = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ + 29 │ │ │ │ │ + 30 │ │ │ │ │ + 32 │ │ │ │ │ + 39 template │ │ │ │ │ +40 class Pk2DFiniteElement { │ │ │ │ │ + 41 typedef typename Geometry::ctype DF; │ │ │ │ │ + 42 typedef Impl::LagrangeSimplexLocalBasis LocalBasis; │ │ │ │ │ + 43 typedef Impl::LagrangeSimplexLocalInterpolation │ │ │ │ │ +LocalInterpolation; │ │ │ │ │ + 44 │ │ │ │ │ + 45 public: │ │ │ │ │ +49 struct Traits { │ │ │ │ │ +50 typedef ScalarLocalToGlobalBasisAdaptor Basis; │ │ │ │ │ + 51 typedef LocalToGlobalInterpolationAdaptor< │ │ │ │ │ + 52 LocalInterpolation, │ │ │ │ │ + 53 typename Basis::Traits │ │ │ │ │ +54 > Interpolation; │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ + 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 │ │ │ │ │ +122 struct Pk2DFiniteElementFactory { │ │ │ │ │ +123 typedef Pk2DFiniteElement FiniteElement; │ │ │ │ │ + 124 │ │ │ │ │ + 126 │ │ │ │ │ + 140 template │ │ │ │ │ +141 const FiniteElement make(const Geometry& geometry, │ │ │ │ │ + 142 const VertexOrder& vertexOrder) │ │ │ │ │ + 143 { return FiniteElement(geometry, vertexOrder); } │ │ │ │ │ + 144 }; │ │ │ │ │ + 145} │ │ │ │ │ + 146 │ │ │ │ │ + 147#endif │ │ │ │ │ +localtoglobaladaptors.hh │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM2Simplex2DLocalCoefficients │ │ │ │ │ -Layout map for Brezzi-Douglas-Marini-2 elements on triangles. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::BDM2Simplex2DLocalCoefficients::BDM2Simplex2DLocalCoefficients │ │ │ │ │ -BDM2Simplex2DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:28 │ │ │ │ │ -Dune::BDM2Simplex2DLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:50 │ │ │ │ │ -Dune::BDM2Simplex2DLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:44 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ +Dune::LocalToGlobalBasisAdaptorTraits │ │ │ │ │ +Traits class for local-to-global basis adaptors. │ │ │ │ │ +Definition localtoglobaladaptors.hh:30 │ │ │ │ │ +Dune::ScalarLocalToGlobalBasisAdaptor │ │ │ │ │ +Convert a simple scalar local basis into a global basis. │ │ │ │ │ +Definition localtoglobaladaptors.hh:65 │ │ │ │ │ +Dune::LocalToGlobalInterpolationAdaptor │ │ │ │ │ +Convert a local interpolation into a global interpolation. │ │ │ │ │ +Definition localtoglobaladaptors.hh:149 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangesimplex.hh:838 │ │ │ │ │ +Dune::Pk2DFiniteElement │ │ │ │ │ +Langrange finite element of arbitrary order on triangles. │ │ │ │ │ +Definition pk2d.hh:40 │ │ │ │ │ +Dune::Pk2DFiniteElement::Pk2DFiniteElement │ │ │ │ │ +Pk2DFiniteElement(const Geometry &geometry, const VertexOrder &vertexOrder) │ │ │ │ │ +construct a Pk2DFiniteElement │ │ │ │ │ +Definition pk2d.hh:83 │ │ │ │ │ +Dune::Pk2DFiniteElement::interpolation │ │ │ │ │ +const Traits::Interpolation & interpolation() const │ │ │ │ │ +Definition pk2d.hh:90 │ │ │ │ │ +Dune::Pk2DFiniteElement::basis │ │ │ │ │ +const Traits::Basis & basis() const │ │ │ │ │ +Definition pk2d.hh:89 │ │ │ │ │ +Dune::Pk2DFiniteElement::coefficients │ │ │ │ │ +const Traits::Coefficients & coefficients() const │ │ │ │ │ +Definition pk2d.hh:92 │ │ │ │ │ +Dune::Pk2DFiniteElement::type │ │ │ │ │ +const GeometryType & type() const │ │ │ │ │ +Definition pk2d.hh:94 │ │ │ │ │ +Dune::Pk2DFiniteElement::Traits │ │ │ │ │ +Definition pk2d.hh:49 │ │ │ │ │ +Dune::Pk2DFiniteElement::Traits::Basis │ │ │ │ │ +ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry > Basis │ │ │ │ │ +Definition pk2d.hh:50 │ │ │ │ │ +Dune::Pk2DFiniteElement::Traits::Coefficients │ │ │ │ │ +Impl::LagrangeSimplexLocalCoefficients< 2, k > Coefficients │ │ │ │ │ +Definition pk2d.hh:55 │ │ │ │ │ +Dune::Pk2DFiniteElement::Traits::Interpolation │ │ │ │ │ +LocalToGlobalInterpolationAdaptor< LocalInterpolation, typename Basis::Traits > │ │ │ │ │ +Interpolation │ │ │ │ │ +Definition pk2d.hh:54 │ │ │ │ │ +Dune::Pk2DFiniteElementFactory │ │ │ │ │ +Factory for Pk2DFiniteElement objects. │ │ │ │ │ +Definition pk2d.hh:122 │ │ │ │ │ +Dune::Pk2DFiniteElementFactory::FiniteElement │ │ │ │ │ +Pk2DFiniteElement< Geometry, RF, k > FiniteElement │ │ │ │ │ +Definition pk2d.hh:123 │ │ │ │ │ +Dune::Pk2DFiniteElementFactory::make │ │ │ │ │ +const FiniteElement make(const Geometry &geometry, const VertexOrder │ │ │ │ │ +&vertexOrder) │ │ │ │ │ +construct Pk2DFiniteElementFactory │ │ │ │ │ +Definition pk2d.hh:141 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00380.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2simplex2dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: p1.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
brezzidouglasmarini2simplex2dlocalinterpolation.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
p1.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::BDM2Simplex2DLocalInterpolation< LB >
 First order Brezzi-Douglas-Marini shape functions on triangles. 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 {} │ │ │ │ │ @@ -6,25 +6,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini2simplex2d │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * lagrange │ │ │ │ │ +Namespaces | Typedefs │ │ │ │ │ +p1.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -class  Dune::BDM2Simplex2DLocalInterpolation<_LB_> │ │ │ │ │ -  First order Brezzi-Douglas-Marini shape functions on triangles. More... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +using Dune::P1LocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, │ │ │ │ │ + dim, 1 > │ │ │ │ │ +  The local p1 finite element on simplices. │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00380_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini2simplex2dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: p1.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,159 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini2simplex2dlocalinterpolation.hh
│ │ │ │ +
p1.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_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_P1LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_P1LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ + │ │ │ │
9
│ │ │ │ -
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
24 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ -
27
│ │ │ │ -
28 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
31 {
│ │ │ │ -
32 sign0 = sign1 = sign2 = 1.0;
│ │ │ │ -
33 }
│ │ │ │ -
│ │ │ │ -
34
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41 {
│ │ │ │ -
42 sign0 = sign1 = sign2 = 1.0;
│ │ │ │ -
43 if (s & 1)
│ │ │ │ -
44 {
│ │ │ │ -
45 sign0 = -1.0;
│ │ │ │ -
46 }
│ │ │ │ -
47 if (s & 2)
│ │ │ │ -
48 {
│ │ │ │ -
49 sign1 = -1.0;
│ │ │ │ -
50 }
│ │ │ │ -
51 if (s & 4)
│ │ │ │ -
52 {
│ │ │ │ -
53 sign2 = -1.0;
│ │ │ │ -
54 }
│ │ │ │ -
55
│ │ │ │ -
56 m0[0] = 0.5;
│ │ │ │ -
57 m0[1] = 0.0;
│ │ │ │ -
58 m1[0] = 0.0;
│ │ │ │ -
59 m1[1] = 0.5;
│ │ │ │ -
60 m2[0] = 0.5;
│ │ │ │ -
61 m2[1] = 0.5;
│ │ │ │ -
62 n0[0] = 0.0;
│ │ │ │ -
63 n0[1] = -1.0;
│ │ │ │ -
64 n1[0] = -1.0;
│ │ │ │ -
65 n1[1] = 0.0;
│ │ │ │ -
66 n2[0] = 1.0/sqrt(2.0);
│ │ │ │ -
67 n2[1] = 1.0/sqrt(2.0);
│ │ │ │ -
68 c0 = 0.5*n0[0] - 1.0*n0[1];
│ │ │ │ -
69 c1 = -1.0*n1[0] + 0.5*n1[1];
│ │ │ │ -
70 c2 = 0.5*n2[0] + 0.5*n2[1];
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
81 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
82 void interpolate(const F& ff, std::vector<C>& out) const
│ │ │ │ -
83 {
│ │ │ │ -
84 // f gives v*outer normal at a point on the edge!
│ │ │ │ -
85 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ -
86 typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │ -
87
│ │ │ │ -
88 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ -
89
│ │ │ │ -
90 out.resize(12);
│ │ │ │ -
91 fill(out.begin(), out.end(), 0.0);
│ │ │ │ -
92
│ │ │ │ -
93 const int qOrder = 4;
│ │ │ │ -
94 const Dune::QuadratureRule<Scalar,1>& rule = Dune::QuadratureRules<Scalar,1>::rule(Dune::GeometryTypes::simplex(1), qOrder);
│ │ │ │ -
95
│ │ │ │ -
96 for (typename Dune::QuadratureRule<Scalar,1>::const_iterator it=rule.begin(); it!=rule.end(); ++it)
│ │ │ │ -
97 {
│ │ │ │ -
98 Scalar qPos = it->position();
│ │ │ │ -
99
│ │ │ │ -
100 typename LB::Traits::DomainType localPos;
│ │ │ │ -
101
│ │ │ │ -
102 localPos[0] = qPos;
│ │ │ │ -
103 localPos[1] = 0.0;
│ │ │ │ -
104 auto y = f(localPos);
│ │ │ │ -
105 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0/c0;
│ │ │ │ -
106 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(1.0 - 2.0*qPos)*it->weight()/c0;
│ │ │ │ -
107 out[2] += (y[0]*n0[0] + y[1]*n0[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it->weight()*sign0/c0;
│ │ │ │ -
108
│ │ │ │ -
109 localPos[0] = 0.0;
│ │ │ │ -
110 localPos[1] = qPos;
│ │ │ │ -
111 y = f(localPos);
│ │ │ │ -
112 out[3] += (y[0]*n1[0]+y[1]*n1[1])*it->weight()*sign1/c1;
│ │ │ │ -
113 out[4] += (y[0]*n1[0]+y[1]*n1[1])*(2.0*qPos-1.0)*it->weight()/c1;
│ │ │ │ -
114 out[5] += (y[0]*n1[0]+y[1]*n1[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it->weight()*sign1/c1;
│ │ │ │ -
115
│ │ │ │ -
116 localPos[0] = 1.0 - qPos;
│ │ │ │ -
117 localPos[1] = qPos;
│ │ │ │ -
118 y = f(localPos);
│ │ │ │ -
119 out[6] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2/c2;
│ │ │ │ -
120 out[7] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight()/c2;
│ │ │ │ -
121 out[8] += (y[0]*n2[0] + y[1]*n2[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it->weight()*sign2/c2;
│ │ │ │ -
122 }
│ │ │ │ -
123
│ │ │ │ -
124 // a volume part is needed here for dofs: 9 10 11
│ │ │ │ -
125 const QuadratureRule<Vector,2>& rule2 = QuadratureRules<Vector,2>::rule(GeometryTypes::simplex(2), qOrder);
│ │ │ │ -
126
│ │ │ │ -
127 for (typename QuadratureRule<Vector,2>::const_iterator it=rule2.begin(); it!=rule2.end(); ++it)
│ │ │ │ -
128 {
│ │ │ │ -
129 typename LB::Traits::DomainType localPos = it->position();
│ │ │ │ -
130 auto y = f(localPos);
│ │ │ │ -
131
│ │ │ │ -
132 out[9] += y[0]*it->weight();
│ │ │ │ -
133 out[10] += y[1]*it->weight();
│ │ │ │ -
134 out[11] += (y[0]*(localPos[0]-2.0*localPos[0]*localPos[1]-localPos[0]*localPos[0])
│ │ │ │ -
135 +y[1]*(-localPos[1]+2.0*localPos[0]*localPos[1]+localPos[1]*localPos[1]))*it->weight();
│ │ │ │ -
136 }
│ │ │ │ -
137 }
│ │ │ │ -
│ │ │ │ -
138
│ │ │ │ -
139 private:
│ │ │ │ -
140 typename LB::Traits::RangeFieldType sign0, sign1, sign2;
│ │ │ │ -
141 typename LB::Traits::DomainType m0, m1, m2;
│ │ │ │ -
142 typename LB::Traits::DomainType n0, n1, n2;
│ │ │ │ -
143 typename LB::Traits::RangeFieldType c0, c1, c2;
│ │ │ │ -
144 };
│ │ │ │ -
│ │ │ │ -
145} // end namespace Dune
│ │ │ │ -
146#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALINTERPOLATION_HH
│ │ │ │ +
10#warning This header is deprecated
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
22 template<class D, class R, int dim>
│ │ │ │ + │ │ │ │ +
24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
26
│ │ │ │ +
27}
│ │ │ │ +
28
│ │ │ │ +
29#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on triangles.
Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:26
│ │ │ │ -
BDM2Simplex2DLocalInterpolation()
Standard constructor.
Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:30
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:82
│ │ │ │ -
BDM2Simplex2DLocalInterpolation(unsigned int s)
Make set number s, where 0 <= s < 8.
Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:40
│ │ │ │ - │ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,170 +7,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini2simplex2d │ │ │ │ │ -brezzidouglasmarini2simplex2dlocalinterpolation.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +p1.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_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_P1LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_P1LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 24 template │ │ │ │ │ -25 class BDM2Simplex2DLocalInterpolation │ │ │ │ │ - 26 { │ │ │ │ │ - 27 │ │ │ │ │ - 28 public: │ │ │ │ │ -30 BDM2Simplex2DLocalInterpolation() │ │ │ │ │ - 31 { │ │ │ │ │ - 32 sign0 = sign1 = sign2 = 1.0; │ │ │ │ │ - 33 } │ │ │ │ │ - 34 │ │ │ │ │ -40 BDM2Simplex2DLocalInterpolation(unsigned int s) │ │ │ │ │ - 41 { │ │ │ │ │ - 42 sign0 = sign1 = sign2 = 1.0; │ │ │ │ │ - 43 if (s & 1) │ │ │ │ │ - 44 { │ │ │ │ │ - 45 sign0 = -1.0; │ │ │ │ │ - 46 } │ │ │ │ │ - 47 if (s & 2) │ │ │ │ │ - 48 { │ │ │ │ │ - 49 sign1 = -1.0; │ │ │ │ │ - 50 } │ │ │ │ │ - 51 if (s & 4) │ │ │ │ │ - 52 { │ │ │ │ │ - 53 sign2 = -1.0; │ │ │ │ │ - 54 } │ │ │ │ │ - 55 │ │ │ │ │ - 56 m0[0] = 0.5; │ │ │ │ │ - 57 m0[1] = 0.0; │ │ │ │ │ - 58 m1[0] = 0.0; │ │ │ │ │ - 59 m1[1] = 0.5; │ │ │ │ │ - 60 m2[0] = 0.5; │ │ │ │ │ - 61 m2[1] = 0.5; │ │ │ │ │ - 62 n0[0] = 0.0; │ │ │ │ │ - 63 n0[1] = -1.0; │ │ │ │ │ - 64 n1[0] = -1.0; │ │ │ │ │ - 65 n1[1] = 0.0; │ │ │ │ │ - 66 n2[0] = 1.0/sqrt(2.0); │ │ │ │ │ - 67 n2[1] = 1.0/sqrt(2.0); │ │ │ │ │ - 68 c0 = 0.5*n0[0] - 1.0*n0[1]; │ │ │ │ │ - 69 c1 = -1.0*n1[0] + 0.5*n1[1]; │ │ │ │ │ - 70 c2 = 0.5*n2[0] + 0.5*n2[1]; │ │ │ │ │ - 71 } │ │ │ │ │ - 72 │ │ │ │ │ - 81 template │ │ │ │ │ -82 void interpolate(const F& ff, std::vector& out) const │ │ │ │ │ - 83 { │ │ │ │ │ - 84 // f gives v*outer normal at a point on the edge! │ │ │ │ │ - 85 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ - 86 typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ - 87 │ │ │ │ │ - 88 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ - 89 │ │ │ │ │ - 90 out.resize(12); │ │ │ │ │ - 91 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ - 92 │ │ │ │ │ - 93 const int qOrder = 4; │ │ │ │ │ - 94 const Dune::QuadratureRule& rule = Dune:: │ │ │ │ │ -QuadratureRules::rule(Dune::GeometryTypes::simplex(1), qOrder); │ │ │ │ │ - 95 │ │ │ │ │ - 96 for (typename Dune::QuadratureRule::const_iterator it=rule.begin │ │ │ │ │ -(); it!=rule.end(); ++it) │ │ │ │ │ - 97 { │ │ │ │ │ - 98 Scalar qPos = it->position(); │ │ │ │ │ - 99 │ │ │ │ │ - 100 typename LB::Traits::DomainType localPos; │ │ │ │ │ - 101 │ │ │ │ │ - 102 localPos[0] = qPos; │ │ │ │ │ - 103 localPos[1] = 0.0; │ │ │ │ │ - 104 auto y = f(localPos); │ │ │ │ │ - 105 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0/c0; │ │ │ │ │ - 106 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(1.0 - 2.0*qPos)*it->weight()/c0; │ │ │ │ │ - 107 out[2] += (y[0]*n0[0] + y[1]*n0[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it- │ │ │ │ │ ->weight()*sign0/c0; │ │ │ │ │ - 108 │ │ │ │ │ - 109 localPos[0] = 0.0; │ │ │ │ │ - 110 localPos[1] = qPos; │ │ │ │ │ - 111 y = f(localPos); │ │ │ │ │ - 112 out[3] += (y[0]*n1[0]+y[1]*n1[1])*it->weight()*sign1/c1; │ │ │ │ │ - 113 out[4] += (y[0]*n1[0]+y[1]*n1[1])*(2.0*qPos-1.0)*it->weight()/c1; │ │ │ │ │ - 114 out[5] += (y[0]*n1[0]+y[1]*n1[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it- │ │ │ │ │ ->weight()*sign1/c1; │ │ │ │ │ - 115 │ │ │ │ │ - 116 localPos[0] = 1.0 - qPos; │ │ │ │ │ - 117 localPos[1] = qPos; │ │ │ │ │ - 118 y = f(localPos); │ │ │ │ │ - 119 out[6] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2/c2; │ │ │ │ │ - 120 out[7] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight()/c2; │ │ │ │ │ - 121 out[8] += (y[0]*n2[0] + y[1]*n2[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it- │ │ │ │ │ ->weight()*sign2/c2; │ │ │ │ │ - 122 } │ │ │ │ │ - 123 │ │ │ │ │ - 124 // a volume part is needed here for dofs: 9 10 11 │ │ │ │ │ - 125 const QuadratureRule& rule2 = QuadratureRules::rule │ │ │ │ │ -(GeometryTypes::simplex(2), qOrder); │ │ │ │ │ - 126 │ │ │ │ │ - 127 for (typename QuadratureRule::const_iterator it=rule2.begin(); │ │ │ │ │ -it!=rule2.end(); ++it) │ │ │ │ │ - 128 { │ │ │ │ │ - 129 typename LB::Traits::DomainType localPos = it->position(); │ │ │ │ │ - 130 auto y = f(localPos); │ │ │ │ │ - 131 │ │ │ │ │ - 132 out[9] += y[0]*it->weight(); │ │ │ │ │ - 133 out[10] += y[1]*it->weight(); │ │ │ │ │ - 134 out[11] += (y[0]*(localPos[0]-2.0*localPos[0]*localPos[1]-localPos │ │ │ │ │ -[0]*localPos[0]) │ │ │ │ │ - 135 +y[1]*(-localPos[1]+2.0*localPos[0]*localPos[1]+localPos[1]*localPos │ │ │ │ │ -[1]))*it->weight(); │ │ │ │ │ - 136 } │ │ │ │ │ - 137 } │ │ │ │ │ - 138 │ │ │ │ │ - 139 private: │ │ │ │ │ - 140 typename LB::Traits::RangeFieldType sign0, sign1, sign2; │ │ │ │ │ - 141 typename LB::Traits::DomainType m0, m1, m2; │ │ │ │ │ - 142 typename LB::Traits::DomainType n0, n1, n2; │ │ │ │ │ - 143 typename LB::Traits::RangeFieldType c0, c1, c2; │ │ │ │ │ - 144 }; │ │ │ │ │ - 145} // end namespace Dune │ │ │ │ │ - 146#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 10#warning This header is deprecated │ │ │ │ │ + 11 │ │ │ │ │ + 12namespace Dune │ │ │ │ │ + 13{ │ │ │ │ │ + 14 │ │ │ │ │ + 22 template │ │ │ │ │ +23 using P1LocalFiniteElement │ │ │ │ │ + 24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ + 25 = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ + 26 │ │ │ │ │ + 27} │ │ │ │ │ + 28 │ │ │ │ │ + 29#endif │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM2Simplex2DLocalInterpolation │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:26 │ │ │ │ │ -Dune::BDM2Simplex2DLocalInterpolation::BDM2Simplex2DLocalInterpolation │ │ │ │ │ -BDM2Simplex2DLocalInterpolation() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:30 │ │ │ │ │ -Dune::BDM2Simplex2DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Interpolate a given function with shape functions. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:82 │ │ │ │ │ -Dune::BDM2Simplex2DLocalInterpolation::BDM2Simplex2DLocalInterpolation │ │ │ │ │ -BDM2Simplex2DLocalInterpolation(unsigned int s) │ │ │ │ │ -Make set number s, where 0 <= s < 8. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:40 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangesimplex.hh:838 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00383.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube2dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: pk1d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,55 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
brezzidouglasmarini1cube2dlocalcoefficients.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
pk1d.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../../common/localkey.hh"
│ │ │ │ +#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

class  Dune::BDM1Cube2DLocalCoefficients
 Layout map for Brezzi-Douglas-Marini-1 elements on quadrilaterals. More...
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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ 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 {} │ │ │ │ │ @@ -6,26 +6,38 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1cube2d │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini1cube2dlocalcoefficients.hh File Reference │ │ │ │ │ + * lagrange │ │ │ │ │ +Classes | Namespaces | Typedefs │ │ │ │ │ +pk1d.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localkey.hh" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM1Cube2DLocalCoefficients │ │ │ │ │ -  Layout map for Brezzi-Douglas-Marini-1 elements on quadrilaterals. │ │ │ │ │ - More... │ │ │ │ │ + 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... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +using Dune::Pk1DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, │ │ │ │ │ + 1, k > │ │ │ │ │ +  Lagrange finite element on the unit interval with arbitrary compile-time │ │ │ │ │ + order. │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00383_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube2dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: pk1d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,78 +70,152 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini1cube2dlocalcoefficients.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_PK1DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_PK1DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │
8#include <cstddef>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include "../../common/localkey.hh"
│ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/type.hh>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
15
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25
│ │ │ │ -
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
│ │ │ │ -
│ │ │ │ -
38 std::size_t size () const
│ │ │ │ -
39 {
│ │ │ │ -
40 return 8;
│ │ │ │ -
41 }
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
│ │ │ │ -
44 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
45 {
│ │ │ │ -
46 return li[i];
│ │ │ │ -
47 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
49 private:
│ │ │ │ -
50 std::vector<LocalKey> li;
│ │ │ │ -
51 };
│ │ │ │ -
│ │ │ │ -
52}
│ │ │ │ -
53#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
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,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
│ │ │ │ -
Layout map for Brezzi-Douglas-Marini-1 elements on quadrilaterals.
Definition brezzidouglasmarini1cube2dlocalcoefficients.hh:24
│ │ │ │ -
BDM1Cube2DLocalCoefficients()
Standard constructor.
Definition brezzidouglasmarini1cube2dlocalcoefficients.hh:28
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition brezzidouglasmarini1cube2dlocalcoefficients.hh:38
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition brezzidouglasmarini1cube2dlocalcoefficients.hh:44
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,79 +7,171 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1cube2d │ │ │ │ │ -brezzidouglasmarini1cube2dlocalcoefficients.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_PK1DLOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_PK1DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include "../../common/localkey.hh" │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ 15 │ │ │ │ │ -23 class BDM1Cube2DLocalCoefficients │ │ │ │ │ - 24 { │ │ │ │ │ - 25 │ │ │ │ │ - 26 public: │ │ │ │ │ -28 BDM1Cube2DLocalCoefficients () : li(8) │ │ │ │ │ - 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 │ │ │ │ │ -38 std::size_t size () const │ │ │ │ │ - 39 { │ │ │ │ │ - 40 return 8; │ │ │ │ │ - 41 } │ │ │ │ │ - 42 │ │ │ │ │ -44 const LocalKey& localKey (std::size_t i) const │ │ │ │ │ - 45 { │ │ │ │ │ - 46 return li[i]; │ │ │ │ │ - 47 } │ │ │ │ │ - 48 │ │ │ │ │ - 49 private: │ │ │ │ │ - 50 std::vector li; │ │ │ │ │ - 51 }; │ │ │ │ │ - 52} │ │ │ │ │ - 53#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 16#warning This header is deprecated │ │ │ │ │ + 17 │ │ │ │ │ + 18namespace Dune │ │ │ │ │ + 19{ │ │ │ │ │ + 20 │ │ │ │ │ + 25 template │ │ │ │ │ +26 using Pk1DLocalFiniteElement │ │ │ │ │ + 27 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ + 28 = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ + 29 │ │ │ │ │ + 30 │ │ │ │ │ + 32 │ │ │ │ │ + 39 template │ │ │ │ │ +40 class Pk1DFiniteElement { │ │ │ │ │ + 41 typedef typename Geometry::ctype DF; │ │ │ │ │ + 42 typedef Impl::LagrangeSimplexLocalBasis LocalBasis; │ │ │ │ │ + 43 typedef Impl::LagrangeSimplexLocalInterpolation │ │ │ │ │ +LocalInterpolation; │ │ │ │ │ + 44 │ │ │ │ │ + 45 public: │ │ │ │ │ +49 struct Traits { │ │ │ │ │ +50 typedef ScalarLocalToGlobalBasisAdaptor Basis; │ │ │ │ │ + 51 typedef LocalToGlobalInterpolationAdaptor< │ │ │ │ │ + 52 LocalInterpolation, │ │ │ │ │ + 53 typename Basis::Traits │ │ │ │ │ +54 > Interpolation; │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ + 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 │ │ │ │ │ +122 struct Pk1DFiniteElementFactory { │ │ │ │ │ +123 typedef Pk1DFiniteElement FiniteElement; │ │ │ │ │ + 124 │ │ │ │ │ + 126 │ │ │ │ │ + 140 template │ │ │ │ │ +141 const FiniteElement make(const Geometry& geometry, │ │ │ │ │ + 142 const VertexOrder& vertexOrder) │ │ │ │ │ + 143 { return FiniteElement(geometry, vertexOrder); } │ │ │ │ │ + 144 }; │ │ │ │ │ + 145} │ │ │ │ │ + 146 │ │ │ │ │ + 147#endif │ │ │ │ │ +localtoglobaladaptors.hh │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Cube2DLocalCoefficients │ │ │ │ │ -Layout map for Brezzi-Douglas-Marini-1 elements on quadrilaterals. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::BDM1Cube2DLocalCoefficients::BDM1Cube2DLocalCoefficients │ │ │ │ │ -BDM1Cube2DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalcoefficients.hh:28 │ │ │ │ │ -Dune::BDM1Cube2DLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalcoefficients.hh:38 │ │ │ │ │ -Dune::BDM1Cube2DLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalcoefficients.hh:44 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ +Dune::LocalToGlobalBasisAdaptorTraits │ │ │ │ │ +Traits class for local-to-global basis adaptors. │ │ │ │ │ +Definition localtoglobaladaptors.hh:30 │ │ │ │ │ +Dune::ScalarLocalToGlobalBasisAdaptor │ │ │ │ │ +Convert a simple scalar local basis into a global basis. │ │ │ │ │ +Definition localtoglobaladaptors.hh:65 │ │ │ │ │ +Dune::LocalToGlobalInterpolationAdaptor │ │ │ │ │ +Convert a local interpolation into a global interpolation. │ │ │ │ │ +Definition localtoglobaladaptors.hh:149 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangesimplex.hh:838 │ │ │ │ │ +Dune::Pk1DFiniteElement │ │ │ │ │ +Langrange finite element of arbitrary order on triangles. │ │ │ │ │ +Definition pk1d.hh:40 │ │ │ │ │ +Dune::Pk1DFiniteElement::Pk1DFiniteElement │ │ │ │ │ +Pk1DFiniteElement(const Geometry &geometry, const VertexOrder &vertexOrder) │ │ │ │ │ +construct a Pk1DFiniteElement │ │ │ │ │ +Definition pk1d.hh:83 │ │ │ │ │ +Dune::Pk1DFiniteElement::basis │ │ │ │ │ +const Traits::Basis & basis() const │ │ │ │ │ +Definition pk1d.hh:89 │ │ │ │ │ +Dune::Pk1DFiniteElement::type │ │ │ │ │ +const GeometryType & type() const │ │ │ │ │ +Definition pk1d.hh:94 │ │ │ │ │ +Dune::Pk1DFiniteElement::coefficients │ │ │ │ │ +const Traits::Coefficients & coefficients() const │ │ │ │ │ +Definition pk1d.hh:92 │ │ │ │ │ +Dune::Pk1DFiniteElement::interpolation │ │ │ │ │ +const Traits::Interpolation & interpolation() const │ │ │ │ │ +Definition pk1d.hh:90 │ │ │ │ │ +Dune::Pk1DFiniteElement::Traits │ │ │ │ │ +Definition pk1d.hh:49 │ │ │ │ │ +Dune::Pk1DFiniteElement::Traits::Basis │ │ │ │ │ +ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry > Basis │ │ │ │ │ +Definition pk1d.hh:50 │ │ │ │ │ +Dune::Pk1DFiniteElement::Traits::Interpolation │ │ │ │ │ +LocalToGlobalInterpolationAdaptor< LocalInterpolation, typename Basis::Traits > │ │ │ │ │ +Interpolation │ │ │ │ │ +Definition pk1d.hh:54 │ │ │ │ │ +Dune::Pk1DFiniteElement::Traits::Coefficients │ │ │ │ │ +Impl::LagrangeSimplexLocalCoefficients< 1, k > Coefficients │ │ │ │ │ +Definition pk1d.hh:55 │ │ │ │ │ +Dune::Pk1DFiniteElementFactory │ │ │ │ │ +Factory for Pk1DFiniteElement objects. │ │ │ │ │ +Definition pk1d.hh:122 │ │ │ │ │ +Dune::Pk1DFiniteElementFactory::make │ │ │ │ │ +const FiniteElement make(const Geometry &geometry, const VertexOrder │ │ │ │ │ +&vertexOrder) │ │ │ │ │ +construct Pk1DFiniteElementFactory │ │ │ │ │ +Definition pk1d.hh:141 │ │ │ │ │ +Dune::Pk1DFiniteElementFactory::FiniteElement │ │ │ │ │ +Pk1DFiniteElement< Geometry, RF, k > FiniteElement │ │ │ │ │ +Definition pk1d.hh:123 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00386.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube2dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: lagrangebasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,37 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
brezzidouglasmarini1cube2dlocalbasis.hh File Reference
│ │ │ │ +
lagrangebasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <bitset>
│ │ │ │ -#include <numeric>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include "../../common/localbasis.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::BDM1Cube2DLocalBasis< D, R >
 First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral. More...
struct  Dune::LagrangeBasisFactory< LP, dim, SF, CF >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,29 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1cube2d │ │ │ │ │ + * lagrange │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini1cube2dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localbasis.hh" │ │ │ │ │ +lagrangebasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM1Cube2DLocalBasis<_D,_R_> │ │ │ │ │ -  First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ - quadrilateral. More... │ │ │ │ │ +struct  Dune::LagrangeBasisFactory<_LP,_dim,_SF,_CF_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00386_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube2dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: lagrangebasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,241 +70,58 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini1cube2dlocalbasis.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LAGRANGEBASIS_HH
│ │ │ │ +
6#define DUNE_LAGRANGEBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <bitset>
│ │ │ │ -
10#include <numeric>
│ │ │ │ -
11#include <vector>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/common/fmatrix.hh>
│ │ │ │ -
14
│ │ │ │ -
15#include "../../common/localbasis.hh"
│ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
28 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
30 {
│ │ │ │ -
31
│ │ │ │ -
32 public:
│ │ │ │ -
33 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,2,Dune::FieldVector<R,2>,
│ │ │ │ -
34 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ -
35
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 {
│ │ │ │ -
39 for (size_t i=0; i<4; i++)
│ │ │ │ -
40 sign_[i] = 1.0;
│ │ │ │ -
41 }
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
│ │ │ │ -
48 BDM1Cube2DLocalBasis (std::bitset<4> s)
│ │ │ │ -
49 {
│ │ │ │ -
50 for (size_t i=0; i<4; i++)
│ │ │ │ -
51 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ -
│ │ │ │ -
55 unsigned int size () const
│ │ │ │ -
56 {
│ │ │ │ -
57 return 8;
│ │ │ │ -
58 }
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
│ │ │ │ -
66 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
67 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
68 {
│ │ │ │ -
69 out.resize(8);
│ │ │ │ -
70
│ │ │ │ -
71 out[0][0] = sign_[0]*(in[0] - 1.0);
│ │ │ │ -
72 out[0][1] = 0.0;
│ │ │ │ -
73 out[1][0] = 6.0*in[0]*in[1] - 3.0*in[0]-6*in[1] + 3.0;
│ │ │ │ -
74 out[1][1] = -3.0*in[1]*in[1] + 3.0*in[1];
│ │ │ │ -
75 out[2][0] = sign_[1]*(in[0]);
│ │ │ │ -
76 out[2][1] = 0.0;
│ │ │ │ -
77 out[3][0] = -6.0*in[0]*in[1] + 3.0*in[0];
│ │ │ │ -
78 out[3][1] = 3.0*in[1]*in[1] - 3.0*in[1];
│ │ │ │ -
79 out[4][0] = 0.0;
│ │ │ │ -
80 out[4][1] = sign_[2]*(in[1] - 1.0);
│ │ │ │ -
81 out[5][0] = 3.0*in[0]*in[0] - 3.0*in[0];
│ │ │ │ -
82 out[5][1] = -6.0*in[0]*in[1] + 6.0*in[0] + 3.0*in[1] - 3.0;
│ │ │ │ -
83 out[6][0] = 0.0;
│ │ │ │ -
84 out[6][1] = sign_[3]*(in[1]);
│ │ │ │ -
85 out[7][0] = -3.0*in[0]*in[0] + 3.0*in[0];
│ │ │ │ -
86 out[7][1] = 6.0*in[0]*in[1] - 3.0*in[1];
│ │ │ │ -
87 }
│ │ │ │ -
│ │ │ │ -
88
│ │ │ │ -
│ │ │ │ -
95 inline void evaluateJacobian (const typename Traits::DomainType& in,
│ │ │ │ -
96 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
97 {
│ │ │ │ -
98 out.resize(8);
│ │ │ │ -
99
│ │ │ │ -
100 out[0][0][0] = sign_[0];
│ │ │ │ -
101 out[0][0][1] = 0.0;
│ │ │ │ -
102 out[0][1][0] = 0.0;
│ │ │ │ -
103 out[0][1][1] = 0.0;
│ │ │ │ -
104
│ │ │ │ -
105 out[1][0][0] = 6.0*in[1] - 3.0;
│ │ │ │ -
106 out[1][0][1] = 6.0*in[0] - 6.0;
│ │ │ │ -
107 out[1][1][0] = 0.0;
│ │ │ │ -
108 out[1][1][1] = -6.0*in[1] + 3.0;
│ │ │ │ -
109
│ │ │ │ -
110 out[2][0][0] = sign_[1];
│ │ │ │ -
111 out[2][0][1] = 0.0;
│ │ │ │ -
112 out[2][1][0] = 0.0;
│ │ │ │ -
113 out[2][1][1] = 0.0;
│ │ │ │ -
114
│ │ │ │ -
115 out[3][0][0] = -6.0*in[1] + 3.0;
│ │ │ │ -
116 out[3][0][1] = -6.0*in[0];
│ │ │ │ -
117 out[3][1][0] = 0.0;
│ │ │ │ -
118 out[3][1][1] = 6.0*in[1] - 3.0;
│ │ │ │ -
119
│ │ │ │ -
120 out[4][0][0] = 0.0;
│ │ │ │ -
121 out[4][0][1] = 0.0;
│ │ │ │ -
122 out[4][1][0] = 0.0;
│ │ │ │ -
123 out[4][1][1] = sign_[2];
│ │ │ │ -
124
│ │ │ │ -
125 out[5][0][0] = 6.0*in[0] - 3.0;
│ │ │ │ -
126 out[5][0][1] = 0.0;
│ │ │ │ -
127 out[5][1][0] = -6.0*in[1] + 6.0;
│ │ │ │ -
128 out[5][1][1] = -6.0*in[0] + 3.0;
│ │ │ │ -
129
│ │ │ │ -
130 out[6][0][0] = 0.0;
│ │ │ │ -
131 out[6][0][1] = 0.0;
│ │ │ │ -
132 out[6][1][0] = 0.0;
│ │ │ │ -
133 out[6][1][1] = sign_[3];
│ │ │ │ -
134
│ │ │ │ -
135 out[7][0][0] = -6.0*in[0] + 3.0;
│ │ │ │ -
136 out[7][0][1] = 0.0;
│ │ │ │ -
137 out[7][1][0] = 6.0*in[1];
│ │ │ │ -
138 out[7][1][1] = 6.0*in[0] - 3.0;
│ │ │ │ -
139 }
│ │ │ │ -
│ │ │ │ -
140
│ │ │ │ -
│ │ │ │ -
142 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ -
143 const typename Traits::DomainType& in, // position
│ │ │ │ -
144 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
145 {
│ │ │ │ -
146 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
147 if (totalOrder == 0) {
│ │ │ │ -
148 evaluateFunction(in, out);
│ │ │ │ -
149 } else if (totalOrder == 1) {
│ │ │ │ -
150 out.resize(size());
│ │ │ │ -
151 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
152
│ │ │ │ -
153 switch (direction) {
│ │ │ │ -
154 case 0:
│ │ │ │ -
155 out[0][0] = sign_[0];
│ │ │ │ -
156 out[0][1] = 0.0;
│ │ │ │ -
157
│ │ │ │ -
158 out[1][0] = 6.0*in[1] - 3.0;
│ │ │ │ -
159 out[1][1] = 0.0;
│ │ │ │ -
160
│ │ │ │ -
161 out[2][0] = sign_[1];
│ │ │ │ -
162 out[2][1] = 0.0;
│ │ │ │ -
163
│ │ │ │ -
164 out[3][0] = -6.0*in[1] + 3.0;
│ │ │ │ -
165 out[3][1] = 0.0;
│ │ │ │ -
166
│ │ │ │ -
167 out[4][0] = 0.0;
│ │ │ │ -
168 out[4][1] = 0.0;
│ │ │ │ -
169
│ │ │ │ -
170 out[5][0] = 6.0*in[0] - 3.0;
│ │ │ │ -
171 out[5][1] = -6.0*in[1] + 6.0;
│ │ │ │ -
172
│ │ │ │ -
173 out[6][0] = 0.0;
│ │ │ │ -
174 out[6][1] = 0.0;
│ │ │ │ -
175
│ │ │ │ -
176 out[7][0] = -6.0*in[0] + 3.0;
│ │ │ │ -
177 out[7][1] = 6.0*in[1];
│ │ │ │ -
178 break;
│ │ │ │ -
179 case 1:
│ │ │ │ -
180 out[0][0] = 0.0;
│ │ │ │ -
181 out[0][1] = 0.0;
│ │ │ │ -
182
│ │ │ │ -
183 out[1][0] = 6.0*in[0] - 6.0;
│ │ │ │ -
184 out[1][1] = -6.0*in[1] + 3.0;
│ │ │ │ -
185
│ │ │ │ -
186 out[2][0] = 0.0;
│ │ │ │ -
187 out[2][1] = 0.0;
│ │ │ │ -
188
│ │ │ │ -
189 out[3][0] = -6.0*in[0];
│ │ │ │ -
190 out[3][1] = 6.0*in[1] - 3.0;
│ │ │ │ -
191
│ │ │ │ -
192 out[4][0] = 0.0;
│ │ │ │ -
193 out[4][1] = sign_[2];
│ │ │ │ -
194
│ │ │ │ -
195 out[5][0] = 0.0;
│ │ │ │ -
196 out[5][1] = -6.0*in[0] + 3.0;
│ │ │ │ -
197
│ │ │ │ -
198 out[6][0] = 0.0;
│ │ │ │ -
199 out[6][1] = sign_[3];
│ │ │ │ -
200
│ │ │ │ -
201 out[7][0] = 0.0;
│ │ │ │ -
202 out[7][1] = 6.0*in[0] - 3.0;
│ │ │ │ -
203 break;
│ │ │ │ -
204 default:
│ │ │ │ -
205 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
206 }
│ │ │ │ -
207 } else {
│ │ │ │ -
208 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
209 }
│ │ │ │ -
210 }
│ │ │ │ -
│ │ │ │ -
211
│ │ │ │ -
│ │ │ │ -
213 unsigned int order () const
│ │ │ │ -
214 {
│ │ │ │ -
215 return 2;
│ │ │ │ -
216 }
│ │ │ │ -
│ │ │ │ -
217
│ │ │ │ -
218 private:
│ │ │ │ -
219 std::array<R,4> sign_;
│ │ │ │ -
220 };
│ │ │ │ -
│ │ │ │ -
221}
│ │ │ │ -
222#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <dune/common/exceptions.hh>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ + │ │ │ │ +
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}
│ │ │ │ +
28
│ │ │ │ +
29#endif // #ifndef DUNE_LAGRANGEBASIS_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:30
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:95
│ │ │ │ -
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 brezzidouglasmarini1cube2dlocalbasis.hh:142
│ │ │ │ -
BDM1Cube2DLocalBasis()
Standard constructor.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:37
│ │ │ │ -
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition brezzidouglasmarini1cube2dlocalbasis.hh:34
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition brezzidouglasmarini1cube2dlocalbasis.hh:55
│ │ │ │ -
BDM1Cube2DLocalBasis(std::bitset< 4 > s)
Make set number s, where 0 <= s < 16.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:48
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:213
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:66
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
Definition lagrangebasis.hh:25
│ │ │ │ +
Definition defaultbasisfactory.hh:38
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,257 +7,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1cube2d │ │ │ │ │ -brezzidouglasmarini1cube2dlocalbasis.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_LAGRANGEBASIS_HH │ │ │ │ │ + 6#define DUNE_LAGRANGEBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include "../../common/localbasis.hh" │ │ │ │ │ - 16 │ │ │ │ │ - 17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ - 28 template │ │ │ │ │ -29 class BDM1Cube2DLocalBasis │ │ │ │ │ - 30 { │ │ │ │ │ - 31 │ │ │ │ │ - 32 public: │ │ │ │ │ - 33 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -34 Dune::FieldMatrix > Traits; │ │ │ │ │ - 35 │ │ │ │ │ -37 BDM1Cube2DLocalBasis () │ │ │ │ │ - 38 { │ │ │ │ │ - 39 for (size_t i=0; i<4; i++) │ │ │ │ │ - 40 sign_[i] = 1.0; │ │ │ │ │ - 41 } │ │ │ │ │ - 42 │ │ │ │ │ -48 BDM1Cube2DLocalBasis (std::bitset<4> s) │ │ │ │ │ - 49 { │ │ │ │ │ - 50 for (size_t i=0; i<4; i++) │ │ │ │ │ - 51 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ - 52 } │ │ │ │ │ - 53 │ │ │ │ │ -55 unsigned int size () const │ │ │ │ │ - 56 { │ │ │ │ │ - 57 return 8; │ │ │ │ │ - 58 } │ │ │ │ │ - 59 │ │ │ │ │ -66 inline void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ - 67 std::vector& out) const │ │ │ │ │ - 68 { │ │ │ │ │ - 69 out.resize(8); │ │ │ │ │ - 70 │ │ │ │ │ - 71 out[0][0] = sign_[0]*(in[0] - 1.0); │ │ │ │ │ - 72 out[0][1] = 0.0; │ │ │ │ │ - 73 out[1][0] = 6.0*in[0]*in[1] - 3.0*in[0]-6*in[1] + 3.0; │ │ │ │ │ - 74 out[1][1] = -3.0*in[1]*in[1] + 3.0*in[1]; │ │ │ │ │ - 75 out[2][0] = sign_[1]*(in[0]); │ │ │ │ │ - 76 out[2][1] = 0.0; │ │ │ │ │ - 77 out[3][0] = -6.0*in[0]*in[1] + 3.0*in[0]; │ │ │ │ │ - 78 out[3][1] = 3.0*in[1]*in[1] - 3.0*in[1]; │ │ │ │ │ - 79 out[4][0] = 0.0; │ │ │ │ │ - 80 out[4][1] = sign_[2]*(in[1] - 1.0); │ │ │ │ │ - 81 out[5][0] = 3.0*in[0]*in[0] - 3.0*in[0]; │ │ │ │ │ - 82 out[5][1] = -6.0*in[0]*in[1] + 6.0*in[0] + 3.0*in[1] - 3.0; │ │ │ │ │ - 83 out[6][0] = 0.0; │ │ │ │ │ - 84 out[6][1] = sign_[3]*(in[1]); │ │ │ │ │ - 85 out[7][0] = -3.0*in[0]*in[0] + 3.0*in[0]; │ │ │ │ │ - 86 out[7][1] = 6.0*in[0]*in[1] - 3.0*in[1]; │ │ │ │ │ - 87 } │ │ │ │ │ - 88 │ │ │ │ │ -95 inline void evaluateJacobian (const typename Traits::DomainType& in, │ │ │ │ │ - 96 std::vector& out) const │ │ │ │ │ - 97 { │ │ │ │ │ - 98 out.resize(8); │ │ │ │ │ - 99 │ │ │ │ │ - 100 out[0][0][0] = sign_[0]; │ │ │ │ │ - 101 out[0][0][1] = 0.0; │ │ │ │ │ - 102 out[0][1][0] = 0.0; │ │ │ │ │ - 103 out[0][1][1] = 0.0; │ │ │ │ │ - 104 │ │ │ │ │ - 105 out[1][0][0] = 6.0*in[1] - 3.0; │ │ │ │ │ - 106 out[1][0][1] = 6.0*in[0] - 6.0; │ │ │ │ │ - 107 out[1][1][0] = 0.0; │ │ │ │ │ - 108 out[1][1][1] = -6.0*in[1] + 3.0; │ │ │ │ │ - 109 │ │ │ │ │ - 110 out[2][0][0] = sign_[1]; │ │ │ │ │ - 111 out[2][0][1] = 0.0; │ │ │ │ │ - 112 out[2][1][0] = 0.0; │ │ │ │ │ - 113 out[2][1][1] = 0.0; │ │ │ │ │ - 114 │ │ │ │ │ - 115 out[3][0][0] = -6.0*in[1] + 3.0; │ │ │ │ │ - 116 out[3][0][1] = -6.0*in[0]; │ │ │ │ │ - 117 out[3][1][0] = 0.0; │ │ │ │ │ - 118 out[3][1][1] = 6.0*in[1] - 3.0; │ │ │ │ │ - 119 │ │ │ │ │ - 120 out[4][0][0] = 0.0; │ │ │ │ │ - 121 out[4][0][1] = 0.0; │ │ │ │ │ - 122 out[4][1][0] = 0.0; │ │ │ │ │ - 123 out[4][1][1] = sign_[2]; │ │ │ │ │ - 124 │ │ │ │ │ - 125 out[5][0][0] = 6.0*in[0] - 3.0; │ │ │ │ │ - 126 out[5][0][1] = 0.0; │ │ │ │ │ - 127 out[5][1][0] = -6.0*in[1] + 6.0; │ │ │ │ │ - 128 out[5][1][1] = -6.0*in[0] + 3.0; │ │ │ │ │ - 129 │ │ │ │ │ - 130 out[6][0][0] = 0.0; │ │ │ │ │ - 131 out[6][0][1] = 0.0; │ │ │ │ │ - 132 out[6][1][0] = 0.0; │ │ │ │ │ - 133 out[6][1][1] = sign_[3]; │ │ │ │ │ - 134 │ │ │ │ │ - 135 out[7][0][0] = -6.0*in[0] + 3.0; │ │ │ │ │ - 136 out[7][0][1] = 0.0; │ │ │ │ │ - 137 out[7][1][0] = 6.0*in[1]; │ │ │ │ │ - 138 out[7][1][1] = 6.0*in[0] - 3.0; │ │ │ │ │ - 139 } │ │ │ │ │ - 140 │ │ │ │ │ -142 void partial (const std::array& order, │ │ │ │ │ - 143 const typename Traits::DomainType& in, // position │ │ │ │ │ - 144 std::vector& out) const // return value │ │ │ │ │ - 145 { │ │ │ │ │ - 146 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ - 147 if (totalOrder == 0) { │ │ │ │ │ - 148 evaluateFunction(in, out); │ │ │ │ │ - 149 } else if (totalOrder == 1) { │ │ │ │ │ - 150 out.resize(size()); │ │ │ │ │ - 151 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ - 152 │ │ │ │ │ - 153 switch (direction) { │ │ │ │ │ - 154 case 0: │ │ │ │ │ - 155 out[0][0] = sign_[0]; │ │ │ │ │ - 156 out[0][1] = 0.0; │ │ │ │ │ - 157 │ │ │ │ │ - 158 out[1][0] = 6.0*in[1] - 3.0; │ │ │ │ │ - 159 out[1][1] = 0.0; │ │ │ │ │ - 160 │ │ │ │ │ - 161 out[2][0] = sign_[1]; │ │ │ │ │ - 162 out[2][1] = 0.0; │ │ │ │ │ - 163 │ │ │ │ │ - 164 out[3][0] = -6.0*in[1] + 3.0; │ │ │ │ │ - 165 out[3][1] = 0.0; │ │ │ │ │ - 166 │ │ │ │ │ - 167 out[4][0] = 0.0; │ │ │ │ │ - 168 out[4][1] = 0.0; │ │ │ │ │ - 169 │ │ │ │ │ - 170 out[5][0] = 6.0*in[0] - 3.0; │ │ │ │ │ - 171 out[5][1] = -6.0*in[1] + 6.0; │ │ │ │ │ - 172 │ │ │ │ │ - 173 out[6][0] = 0.0; │ │ │ │ │ - 174 out[6][1] = 0.0; │ │ │ │ │ - 175 │ │ │ │ │ - 176 out[7][0] = -6.0*in[0] + 3.0; │ │ │ │ │ - 177 out[7][1] = 6.0*in[1]; │ │ │ │ │ - 178 break; │ │ │ │ │ - 179 case 1: │ │ │ │ │ - 180 out[0][0] = 0.0; │ │ │ │ │ - 181 out[0][1] = 0.0; │ │ │ │ │ - 182 │ │ │ │ │ - 183 out[1][0] = 6.0*in[0] - 6.0; │ │ │ │ │ - 184 out[1][1] = -6.0*in[1] + 3.0; │ │ │ │ │ - 185 │ │ │ │ │ - 186 out[2][0] = 0.0; │ │ │ │ │ - 187 out[2][1] = 0.0; │ │ │ │ │ - 188 │ │ │ │ │ - 189 out[3][0] = -6.0*in[0]; │ │ │ │ │ - 190 out[3][1] = 6.0*in[1] - 3.0; │ │ │ │ │ - 191 │ │ │ │ │ - 192 out[4][0] = 0.0; │ │ │ │ │ - 193 out[4][1] = sign_[2]; │ │ │ │ │ - 194 │ │ │ │ │ - 195 out[5][0] = 0.0; │ │ │ │ │ - 196 out[5][1] = -6.0*in[0] + 3.0; │ │ │ │ │ - 197 │ │ │ │ │ - 198 out[6][0] = 0.0; │ │ │ │ │ - 199 out[6][1] = sign_[3]; │ │ │ │ │ - 200 │ │ │ │ │ - 201 out[7][0] = 0.0; │ │ │ │ │ - 202 out[7][1] = 6.0*in[0] - 3.0; │ │ │ │ │ - 203 break; │ │ │ │ │ - 204 default: │ │ │ │ │ - 205 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ - 206 } │ │ │ │ │ - 207 } else { │ │ │ │ │ - 208 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ - 209 } │ │ │ │ │ - 210 } │ │ │ │ │ - 211 │ │ │ │ │ -213 unsigned int order () const │ │ │ │ │ - 214 { │ │ │ │ │ - 215 return 2; │ │ │ │ │ - 216 } │ │ │ │ │ - 217 │ │ │ │ │ - 218 private: │ │ │ │ │ - 219 std::array sign_; │ │ │ │ │ - 220 }; │ │ │ │ │ - 221} │ │ │ │ │ - 222#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16namespace Dune │ │ │ │ │ + 17{ │ │ │ │ │ + 18 │ │ │ │ │ + 19 template< template class LP, │ │ │ │ │ + 20 unsigned int dim, class SF, class CF > │ │ │ │ │ +21 struct LagrangeBasisFactory │ │ │ │ │ + 22 : public DefaultBasisFactory< MonomialBasisFactory, │ │ │ │ │ + 23 LagrangeInterpolationFactory, │ │ │ │ │ + 24 dim,1,SF,CF > │ │ │ │ │ + 25 {}; │ │ │ │ │ + 26 │ │ │ │ │ + 27} │ │ │ │ │ + 28 │ │ │ │ │ + 29#endif // #ifndef DUNE_LAGRANGEBASIS_HH │ │ │ │ │ +monomialbasis.hh │ │ │ │ │ +defaultbasisfactory.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Cube2DLocalBasis │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ -quadrilateral. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalbasis.hh:30 │ │ │ │ │ -Dune::BDM1Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalbasis.hh:95 │ │ │ │ │ -Dune::BDM1Cube2DLocalBasis::partial │ │ │ │ │ -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 brezzidouglasmarini1cube2dlocalbasis.hh:142 │ │ │ │ │ -Dune::BDM1Cube2DLocalBasis::BDM1Cube2DLocalBasis │ │ │ │ │ -BDM1Cube2DLocalBasis() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalbasis.hh:37 │ │ │ │ │ -Dune::BDM1Cube2DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ -2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalbasis.hh:34 │ │ │ │ │ -Dune::BDM1Cube2DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalbasis.hh:55 │ │ │ │ │ -Dune::BDM1Cube2DLocalBasis::BDM1Cube2DLocalBasis │ │ │ │ │ -BDM1Cube2DLocalBasis(std::bitset< 4 > s) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalbasis.hh:48 │ │ │ │ │ -Dune::BDM1Cube2DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalbasis.hh:213 │ │ │ │ │ -Dune::BDM1Cube2DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalbasis.hh:66 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LagrangeBasisFactory │ │ │ │ │ +Definition lagrangebasis.hh:25 │ │ │ │ │ +Dune::DefaultBasisFactory │ │ │ │ │ +Definition defaultbasisfactory.hh:38 │ │ │ │ │ +interpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00389.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube2dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: lagrangepyramid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
brezzidouglasmarini1cube2dlocalinterpolation.hh File Reference
│ │ │ │ +
lagrangepyramid.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/geometry/quadraturerules.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::BDM1Cube2DLocalInterpolation< LB >
 First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral. More...
class  Dune::LagrangePyramidLocalFiniteElement< D, R, k >
 Lagrange finite element for 3d pyramids with compile-time polynomial order. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,32 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1cube2d │ │ │ │ │ + * lagrange │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini1cube2dlocalinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +lagrangepyramid.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::BDM1Cube2DLocalInterpolation<_LB_> │ │ │ │ │ -  First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ - quadrilateral. More... │ │ │ │ │ +class  Dune::LagrangePyramidLocalFiniteElement<_D,_R,_k_> │ │ │ │ │ +  Lagrange finite element for 3d pyramids with compile-time polynomial │ │ │ │ │ + order. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00389_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube2dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: lagrangepyramid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,142 +70,830 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini1cube2dlocalinterpolation.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_BREZZIDOUGLASMARINI1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
24 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ -
27
│ │ │ │ -
28 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
31 {
│ │ │ │ -
32 sign0 = sign1 = sign2 = sign3 = 1.0;
│ │ │ │ -
33 }
│ │ │ │ -
│ │ │ │ -
34
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41 {
│ │ │ │ -
42 sign0 = sign1 = sign2 = sign3 = 1.0;
│ │ │ │ -
43 if (s & 1)
│ │ │ │ -
44 {
│ │ │ │ -
45 sign0 = -1.0;
│ │ │ │ -
46 }
│ │ │ │ -
47 if (s & 2)
│ │ │ │ -
48 {
│ │ │ │ -
49 sign1 = -1.0;
│ │ │ │ -
50 }
│ │ │ │ -
51 if (s & 4)
│ │ │ │ -
52 {
│ │ │ │ -
53 sign2 = -1.0;
│ │ │ │ -
54 }
│ │ │ │ -
55 if (s & 8)
│ │ │ │ -
56 {
│ │ │ │ -
57 sign3 = -1.0;
│ │ │ │ -
58 }
│ │ │ │ -
59
│ │ │ │ -
60 n0[0] = -1.0;
│ │ │ │ -
61 n0[1] = 0.0;
│ │ │ │ -
62 n1[0] = 1.0;
│ │ │ │ -
63 n1[1] = 0.0;
│ │ │ │ -
64 n2[0] = 0.0;
│ │ │ │ -
65 n2[1] = -1.0;
│ │ │ │ -
66 n3[0] = 0.0;
│ │ │ │ -
67 n3[1] = 1.0;
│ │ │ │ -
68 }
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
78 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
79 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
80 {
│ │ │ │ -
81 // f gives v*outer normal at a point on the edge!
│ │ │ │ -
82 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ -
83 //typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │ -
84
│ │ │ │ -
85 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ -
86
│ │ │ │ -
87 out.resize(8);
│ │ │ │ -
88 fill(out.begin(), out.end(), 0.0);
│ │ │ │ -
89
│ │ │ │ -
90 const int qOrder = 4;
│ │ │ │ -
91 const QuadratureRule<Scalar,1>& rule = QuadratureRules<Scalar,1>::rule(GeometryTypes::cube(1), qOrder);
│ │ │ │ -
92
│ │ │ │ -
93 for (typename QuadratureRule<Scalar,1>::const_iterator it = rule.begin();
│ │ │ │ -
94 it != rule.end(); ++it)
│ │ │ │ -
95 {
│ │ │ │ -
96 Scalar qPos = it->position();
│ │ │ │ -
97 typename LB::Traits::DomainType localPos;
│ │ │ │ -
98
│ │ │ │ -
99 localPos[0] = 0.0;
│ │ │ │ -
100 localPos[1] = qPos;
│ │ │ │ -
101 auto y = f(localPos);
│ │ │ │ -
102 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0;
│ │ │ │ -
103 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight();
│ │ │ │ -
104
│ │ │ │ -
105 localPos[0] = 1.0;
│ │ │ │ -
106 localPos[1] = qPos;
│ │ │ │ -
107 y = f(localPos);
│ │ │ │ -
108 out[2] += (y[0]*n1[0] + y[1]*n1[1])*it->weight()*sign1;
│ │ │ │ -
109 out[3] += (y[0]*n1[0] + y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight();
│ │ │ │ -
110
│ │ │ │ -
111 localPos[0] = qPos;
│ │ │ │ -
112 localPos[1] = 0.0;
│ │ │ │ -
113 y = f(localPos);
│ │ │ │ -
114 out[4] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2;
│ │ │ │ -
115 out[5] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight();
│ │ │ │ -
116
│ │ │ │ -
117 localPos[0] = qPos;
│ │ │ │ -
118 localPos[1] = 1.0;
│ │ │ │ -
119 y = f(localPos);
│ │ │ │ -
120 out[6] += (y[0]*n3[0] + y[1]*n3[1])*it->weight()*sign3;
│ │ │ │ -
121 out[7] += (y[0]*n3[0] + y[1]*n3[1])*(2.0*qPos - 1.0)*it->weight();
│ │ │ │ -
122 }
│ │ │ │ -
123 }
│ │ │ │ -
│ │ │ │ -
124
│ │ │ │ -
125 private:
│ │ │ │ -
126 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3;
│ │ │ │ -
127 typename LB::Traits::DomainType n0, n1, n2, n3;
│ │ │ │ -
128 };
│ │ │ │ -
│ │ │ │ -
129}
│ │ │ │ -
130#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
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{
│ │ │ │ +
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 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
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral.
Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:26
│ │ │ │ -
BDM1Cube2DLocalInterpolation(unsigned int s)
Make set number s, where 0 <= s < 16.
Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:40
│ │ │ │ -
BDM1Cube2DLocalInterpolation()
Standard constructor.
Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:30
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:79
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,145 +7,874 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1cube2d │ │ │ │ │ -brezzidouglasmarini1cube2dlocalinterpolation.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_BREZZIDOUGLASMARINI1_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 24 template │ │ │ │ │ -25 class BDM1Cube2DLocalInterpolation │ │ │ │ │ - 26 { │ │ │ │ │ - 27 │ │ │ │ │ - 28 public: │ │ │ │ │ -30 BDM1Cube2DLocalInterpolation () │ │ │ │ │ - 31 { │ │ │ │ │ - 32 sign0 = sign1 = sign2 = sign3 = 1.0; │ │ │ │ │ - 33 } │ │ │ │ │ - 34 │ │ │ │ │ -40 BDM1Cube2DLocalInterpolation (unsigned int s) │ │ │ │ │ - 41 { │ │ │ │ │ - 42 sign0 = sign1 = sign2 = sign3 = 1.0; │ │ │ │ │ - 43 if (s & 1) │ │ │ │ │ - 44 { │ │ │ │ │ - 45 sign0 = -1.0; │ │ │ │ │ - 46 } │ │ │ │ │ - 47 if (s & 2) │ │ │ │ │ - 48 { │ │ │ │ │ - 49 sign1 = -1.0; │ │ │ │ │ - 50 } │ │ │ │ │ - 51 if (s & 4) │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15#include │ │ │ │ │ + 16 │ │ │ │ │ + 17#include │ │ │ │ │ + 18#include │ │ │ │ │ + 19#include │ │ │ │ │ + 20#include │ │ │ │ │ + 21 │ │ │ │ │ + 22namespace Dune { 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 Traits::DomainType& in, │ │ │ │ │ + 51 std::vector& out) const │ │ │ │ │ 52 { │ │ │ │ │ - 53 sign2 = -1.0; │ │ │ │ │ - 54 } │ │ │ │ │ - 55 if (s & 8) │ │ │ │ │ - 56 { │ │ │ │ │ - 57 sign3 = -1.0; │ │ │ │ │ - 58 } │ │ │ │ │ - 59 │ │ │ │ │ - 60 n0[0] = -1.0; │ │ │ │ │ - 61 n0[1] = 0.0; │ │ │ │ │ - 62 n1[0] = 1.0; │ │ │ │ │ - 63 n1[1] = 0.0; │ │ │ │ │ - 64 n2[0] = 0.0; │ │ │ │ │ - 65 n2[1] = -1.0; │ │ │ │ │ - 66 n3[0] = 0.0; │ │ │ │ │ - 67 n3[1] = 1.0; │ │ │ │ │ - 68 } │ │ │ │ │ - 69 │ │ │ │ │ - 78 template │ │ │ │ │ -79 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ - 80 { │ │ │ │ │ - 81 // f gives v*outer normal at a point on the edge! │ │ │ │ │ - 82 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ - 83 //typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ - 84 │ │ │ │ │ - 85 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ - 86 │ │ │ │ │ - 87 out.resize(8); │ │ │ │ │ - 88 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ - 89 │ │ │ │ │ - 90 const int qOrder = 4; │ │ │ │ │ - 91 const QuadratureRule& rule = QuadratureRules::rule │ │ │ │ │ -(GeometryTypes::cube(1), qOrder); │ │ │ │ │ - 92 │ │ │ │ │ - 93 for (typename QuadratureRule::const_iterator it = rule.begin(); │ │ │ │ │ - 94 it != rule.end(); ++it) │ │ │ │ │ - 95 { │ │ │ │ │ - 96 Scalar qPos = it->position(); │ │ │ │ │ - 97 typename LB::Traits::DomainType localPos; │ │ │ │ │ - 98 │ │ │ │ │ - 99 localPos[0] = 0.0; │ │ │ │ │ - 100 localPos[1] = qPos; │ │ │ │ │ - 101 auto y = f(localPos); │ │ │ │ │ - 102 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0; │ │ │ │ │ - 103 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight(); │ │ │ │ │ - 104 │ │ │ │ │ - 105 localPos[0] = 1.0; │ │ │ │ │ - 106 localPos[1] = qPos; │ │ │ │ │ - 107 y = f(localPos); │ │ │ │ │ - 108 out[2] += (y[0]*n1[0] + y[1]*n1[1])*it->weight()*sign1; │ │ │ │ │ - 109 out[3] += (y[0]*n1[0] + y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight(); │ │ │ │ │ - 110 │ │ │ │ │ - 111 localPos[0] = qPos; │ │ │ │ │ - 112 localPos[1] = 0.0; │ │ │ │ │ - 113 y = f(localPos); │ │ │ │ │ - 114 out[4] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2; │ │ │ │ │ - 115 out[5] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight(); │ │ │ │ │ - 116 │ │ │ │ │ - 117 localPos[0] = qPos; │ │ │ │ │ - 118 localPos[1] = 1.0; │ │ │ │ │ - 119 y = f(localPos); │ │ │ │ │ - 120 out[6] += (y[0]*n3[0] + y[1]*n3[1])*it->weight()*sign3; │ │ │ │ │ - 121 out[7] += (y[0]*n3[0] + y[1]*n3[1])*(2.0*qPos - 1.0)*it->weight(); │ │ │ │ │ - 122 } │ │ │ │ │ - 123 } │ │ │ │ │ - 124 │ │ │ │ │ - 125 private: │ │ │ │ │ - 126 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3; │ │ │ │ │ - 127 typename LB::Traits::DomainType n0, n1, n2, n3; │ │ │ │ │ - 128 }; │ │ │ │ │ - 129} │ │ │ │ │ - 130#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 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& 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 Traits::DomainType& 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 Dune │ │ │ │ │ + 779{ │ │ │ │ │ + 810 template │ │ │ │ │ +811 class LagrangePyramidLocalFiniteElement │ │ │ │ │ + 812 { │ │ │ │ │ + 813 public: │ │ │ │ │ +816 using Traits = LocalFiniteElementTraits, │ │ │ │ │ + 817 Impl::LagrangePyramidLocalCoefficients, │ │ │ │ │ + 818 Impl::LagrangePyramidLocalInterpolation > >; │ │ │ │ │ + 819 │ │ │ │ │ +825 LagrangePyramidLocalFiniteElement() {} │ │ │ │ │ + 826 │ │ │ │ │ +829 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 830 { │ │ │ │ │ + 831 return basis_; │ │ │ │ │ + 832 } │ │ │ │ │ + 833 │ │ │ │ │ +836 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 837 { │ │ │ │ │ + 838 return coefficients_; │ │ │ │ │ + 839 } │ │ │ │ │ + 840 │ │ │ │ │ +843 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 844 { │ │ │ │ │ + 845 return interpolation_; │ │ │ │ │ + 846 } │ │ │ │ │ + 847 │ │ │ │ │ +849 static constexpr std::size_t size () │ │ │ │ │ + 850 { │ │ │ │ │ + 851 return Impl::LagrangePyramidLocalBasis::size(); │ │ │ │ │ + 852 } │ │ │ │ │ + 853 │ │ │ │ │ +856 static constexpr GeometryType type () │ │ │ │ │ + 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 │ │ │ │ │ +localkey.hh │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Cube2DLocalInterpolation │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ -quadrilateral. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:26 │ │ │ │ │ -Dune::BDM1Cube2DLocalInterpolation::BDM1Cube2DLocalInterpolation │ │ │ │ │ -BDM1Cube2DLocalInterpolation(unsigned int s) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:40 │ │ │ │ │ -Dune::BDM1Cube2DLocalInterpolation::BDM1Cube2DLocalInterpolation │ │ │ │ │ -BDM1Cube2DLocalInterpolation() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:30 │ │ │ │ │ -Dune::BDM1Cube2DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Interpolate a given function with shape functions. │ │ │ │ │ -Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:79 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::LagrangePyramidLocalFiniteElement │ │ │ │ │ +Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ +Definition lagrangepyramid.hh:812 │ │ │ │ │ +Dune::LagrangePyramidLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ +Definition lagrangepyramid.hh:836 │ │ │ │ │ +Dune::LagrangePyramidLocalFiniteElement::size │ │ │ │ │ +static constexpr std::size_t size() │ │ │ │ │ +The number of shape functions. │ │ │ │ │ +Definition lagrangepyramid.hh:849 │ │ │ │ │ +Dune::LagrangePyramidLocalFiniteElement::LagrangePyramidLocalFiniteElement │ │ │ │ │ +LagrangePyramidLocalFiniteElement() │ │ │ │ │ +Default constructor. │ │ │ │ │ +Definition lagrangepyramid.hh:825 │ │ │ │ │ +Dune::LagrangePyramidLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +The reference element that the local finite element is defined on. │ │ │ │ │ +Definition lagrangepyramid.hh:856 │ │ │ │ │ +Dune::LagrangePyramidLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ +Definition lagrangepyramid.hh:829 │ │ │ │ │ +Dune::LagrangePyramidLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Returns object that evaluates degrees of freedom. │ │ │ │ │ +Definition lagrangepyramid.hh:843 │ │ │ │ │ +localbasis.hh │ │ │ │ │ localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00392.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube3dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: pk3d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
brezzidouglasmarini1cube3dlocalcoefficients.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
pk3d.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../../common/localkey.hh"
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::BDM1Cube3DLocalCoefficients
 Layout map for Brezzi-Douglas-Marini-1 elements on hexahedra. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

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

│ │ │ │ +Typedefs

template<class D , class R , unsigned int k>
using Dune::Pk3DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, 3, k >
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,25 +6,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1cube3d │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini1cube3dlocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localkey.hh" │ │ │ │ │ + * lagrange │ │ │ │ │ +Namespaces | Typedefs │ │ │ │ │ +pk3d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -class  Dune::BDM1Cube3DLocalCoefficients │ │ │ │ │ -  Layout map for Brezzi-Douglas-Marini-1 elements on hexahedra. More... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +using Dune::Pk3DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, │ │ │ │ │ + 3, k > │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00392_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube3dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: pk3d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,79 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini1cube3dlocalcoefficients.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#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_Pk3DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_Pk3DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include "../../common/localkey.hh"
│ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ + │ │ │ │ +
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 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 }
│ │ │ │ -
36 }
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ -
39 std::size_t size() const
│ │ │ │ -
40 {
│ │ │ │ -
41 return 18;
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ -
45 const LocalKey& localKey(std::size_t i) const
│ │ │ │ -
46 {
│ │ │ │ -
47 return li[i];
│ │ │ │ -
48 }
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ -
50 private:
│ │ │ │ -
51 std::vector<LocalKey> li;
│ │ │ │ -
52 };
│ │ │ │ -
│ │ │ │ -
53} // end namespace Dune
│ │ │ │ -
54#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
26#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Layout map for Brezzi-Douglas-Marini-1 elements on hexahedra.
Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:24
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:39
│ │ │ │ -
BDM1Cube3DLocalCoefficients()
Standard constructor.
Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:28
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:45
│ │ │ │ -
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 {} │ │ │ │ │ @@ -7,80 +7,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1cube3d │ │ │ │ │ -brezzidouglasmarini1cube3dlocalcoefficients.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_Pk3DLOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_Pk3DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include "../../common/localkey.hh" │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ -23 class BDM1Cube3DLocalCoefficients │ │ │ │ │ - 24 { │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#warning This header is deprecated │ │ │ │ │ + 11 │ │ │ │ │ + 12namespace Dune │ │ │ │ │ + 13{ │ │ │ │ │ + 14 │ │ │ │ │ + 19 template │ │ │ │ │ +20 using Pk3DLocalFiniteElement │ │ │ │ │ + 21 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ + 22 = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ + 23 │ │ │ │ │ + 24} │ │ │ │ │ 25 │ │ │ │ │ - 26 public: │ │ │ │ │ -28 BDM1Cube3DLocalCoefficients() : li(18) │ │ │ │ │ - 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 } │ │ │ │ │ - 36 } │ │ │ │ │ - 37 │ │ │ │ │ -39 std::size_t size() const │ │ │ │ │ - 40 { │ │ │ │ │ - 41 return 18; │ │ │ │ │ - 42 } │ │ │ │ │ - 43 │ │ │ │ │ -45 const LocalKey& localKey(std::size_t i) const │ │ │ │ │ - 46 { │ │ │ │ │ - 47 return li[i]; │ │ │ │ │ - 48 } │ │ │ │ │ - 49 │ │ │ │ │ - 50 private: │ │ │ │ │ - 51 std::vector li; │ │ │ │ │ - 52 }; │ │ │ │ │ - 53} // end namespace Dune │ │ │ │ │ - 54#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 26#endif │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Cube3DLocalCoefficients │ │ │ │ │ -Layout map for Brezzi-Douglas-Marini-1 elements on hexahedra. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::BDM1Cube3DLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:39 │ │ │ │ │ -Dune::BDM1Cube3DLocalCoefficients::BDM1Cube3DLocalCoefficients │ │ │ │ │ -BDM1Cube3DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:28 │ │ │ │ │ -Dune::BDM1Cube3DLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:45 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangesimplex.hh:838 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00395.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube3dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: pyramidp2.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
brezzidouglasmarini1cube3dlocalinterpolation.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
pyramidp2.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::BDM1Cube3DLocalInterpolation< LB >
 First order Brezzi-Douglas-Marini shape functions on the reference hexahedron. 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 {} │ │ │ │ │ @@ -6,25 +6,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1cube3d │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini1cube3dlocalinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * lagrange │ │ │ │ │ +Namespaces | Typedefs │ │ │ │ │ +pyramidp2.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -class  Dune::BDM1Cube3DLocalInterpolation<_LB_> │ │ │ │ │ -  First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ - hexahedron. More... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +using Dune::PyramidP2LocalFiniteElement = LagrangePyramidLocalFiniteElement< │ │ │ │ │ + D, R, 2 > │ │ │ │ │ +  Second-order Lagrangian finite element on a three-dimensional pyramid. │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00395_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube3dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: pyramidp2.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,134 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini1cube3dlocalinterpolation.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ + │ │ │ │
9
│ │ │ │ -
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +
10#warning This header is deprecated
│ │ │ │
11
│ │ │ │
12namespace Dune
│ │ │ │
13{
│ │ │ │
14
│ │ │ │ -
24 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ -
27
│ │ │ │ -
28 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
31 {
│ │ │ │ -
32 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0;
│ │ │ │ -
33 }
│ │ │ │ -
│ │ │ │ -
34
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41 {
│ │ │ │ -
42 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0;
│ │ │ │ -
43 if (s & 1)
│ │ │ │ -
44 {
│ │ │ │ -
45 sign0 = -1.0;
│ │ │ │ -
46 }
│ │ │ │ -
47 if (s & 2)
│ │ │ │ -
48 {
│ │ │ │ -
49 sign1 = -1.0;
│ │ │ │ -
50 }
│ │ │ │ -
51 if (s & 4)
│ │ │ │ -
52 {
│ │ │ │ -
53 sign2 = -1.0;
│ │ │ │ -
54 }
│ │ │ │ -
55 if (s & 8)
│ │ │ │ -
56 {
│ │ │ │ -
57 sign3 = -1.0;
│ │ │ │ -
58 }
│ │ │ │ -
59 if (s & 16)
│ │ │ │ -
60 {
│ │ │ │ -
61 sign4 = -1.0;
│ │ │ │ -
62 }
│ │ │ │ -
63 if (s & 32)
│ │ │ │ -
64 {
│ │ │ │ -
65 sign5 = -1.0;
│ │ │ │ -
66 }
│ │ │ │ -
67
│ │ │ │ -
68 n0[0] = -1.0;
│ │ │ │ -
69 n0[1] = 0.0;
│ │ │ │ -
70 n0[2] = 0.0;
│ │ │ │ -
71 n1[0] = 1.0;
│ │ │ │ -
72 n1[1] = 0.0;
│ │ │ │ -
73 n1[2] = 0.0;
│ │ │ │ -
74 n2[0] = 0.0;
│ │ │ │ -
75 n2[1] = -1.0;
│ │ │ │ -
76 n2[2] = 0.0;
│ │ │ │ -
77 n3[0] = 0.0;
│ │ │ │ -
78 n3[1] = 1.0;
│ │ │ │ -
79 n3[2] = 0.0;
│ │ │ │ -
80 n4[0] = 0.0;
│ │ │ │ -
81 n4[1] = 0.0;
│ │ │ │ -
82 n4[2] = -1.0;
│ │ │ │ -
83 n5[0] = 0.0;
│ │ │ │ -
84 n5[1] = 0.0;
│ │ │ │ -
85 n5[2] = 1.0;
│ │ │ │ -
86 }
│ │ │ │ -
│ │ │ │ -
87
│ │ │ │ -
96 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
97 void interpolate(const F& f, std::vector<C>& out) const
│ │ │ │ -
98 {
│ │ │ │ -
99 // f gives v*outer normal at a point on the edge!
│ │ │ │ -
100 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ -
101 //typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │ -
102
│ │ │ │ -
103 DUNE_THROW( NotImplemented, "Interpolation for BDM1Cube3D finite elements is not implemented." );
│ │ │ │ -
104
│ │ │ │ -
105 out.resize(18);
│ │ │ │ -
106 fill(out.begin(), out.end(), 0.0);
│ │ │ │ -
107
│ │ │ │ -
108 const int qOrder = 4;
│ │ │ │ -
109 const QuadratureRule<Scalar,1>& rule = QuadratureRules<Scalar,1>::rule(GeometryTypes::cube(1), qOrder);
│ │ │ │ -
110
│ │ │ │ -
111 for (typename QuadratureRule<Scalar,1>::const_iterator it = rule.begin();
│ │ │ │ -
112 it != rule.end(); ++it)
│ │ │ │ -
113 {
│ │ │ │ -
114 // TODO: write interpolation
│ │ │ │ -
115 }
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
118 private:
│ │ │ │ -
119 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3, sign4, sign5;
│ │ │ │ -
120 typename LB::Traits::DomainType n0, n1, n2, n3, n4, n5;
│ │ │ │ -
121 };
│ │ │ │ -
│ │ │ │ -
122} // end namespace Dune
│ │ │ │ -
123#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALINTERPOLATION_HH
│ │ │ │ +
19 template<class D, class R>
│ │ │ │ + │ │ │ │ +
21 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
23
│ │ │ │ +
24}
│ │ │ │ +
25
│ │ │ │ +
26#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on the reference hexahedron.
Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:26
│ │ │ │ -
BDM1Cube3DLocalInterpolation()
Standard constructor.
Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:30
│ │ │ │ -
void interpolate(const F &f, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:97
│ │ │ │ -
BDM1Cube3DLocalInterpolation(unsigned int s)
Make set number s, where 0 <= s < 64.
Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:40
│ │ │ │ +
Lagrange finite element for 3d pyramids with compile-time polynomial order.
Definition lagrangepyramid.hh:812
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,136 +7,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1cube3d │ │ │ │ │ -brezzidouglasmarini1cube3dlocalinterpolation.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ + 10#warning This header is deprecated │ │ │ │ │ 11 │ │ │ │ │ 12namespace Dune │ │ │ │ │ 13{ │ │ │ │ │ 14 │ │ │ │ │ - 24 template │ │ │ │ │ -25 class BDM1Cube3DLocalInterpolation │ │ │ │ │ - 26 { │ │ │ │ │ - 27 │ │ │ │ │ - 28 public: │ │ │ │ │ -30 BDM1Cube3DLocalInterpolation() │ │ │ │ │ - 31 { │ │ │ │ │ - 32 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0; │ │ │ │ │ - 33 } │ │ │ │ │ - 34 │ │ │ │ │ -40 BDM1Cube3DLocalInterpolation(unsigned int s) │ │ │ │ │ - 41 { │ │ │ │ │ - 42 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0; │ │ │ │ │ - 43 if (s & 1) │ │ │ │ │ - 44 { │ │ │ │ │ - 45 sign0 = -1.0; │ │ │ │ │ - 46 } │ │ │ │ │ - 47 if (s & 2) │ │ │ │ │ - 48 { │ │ │ │ │ - 49 sign1 = -1.0; │ │ │ │ │ - 50 } │ │ │ │ │ - 51 if (s & 4) │ │ │ │ │ - 52 { │ │ │ │ │ - 53 sign2 = -1.0; │ │ │ │ │ - 54 } │ │ │ │ │ - 55 if (s & 8) │ │ │ │ │ - 56 { │ │ │ │ │ - 57 sign3 = -1.0; │ │ │ │ │ - 58 } │ │ │ │ │ - 59 if (s & 16) │ │ │ │ │ - 60 { │ │ │ │ │ - 61 sign4 = -1.0; │ │ │ │ │ - 62 } │ │ │ │ │ - 63 if (s & 32) │ │ │ │ │ - 64 { │ │ │ │ │ - 65 sign5 = -1.0; │ │ │ │ │ - 66 } │ │ │ │ │ - 67 │ │ │ │ │ - 68 n0[0] = -1.0; │ │ │ │ │ - 69 n0[1] = 0.0; │ │ │ │ │ - 70 n0[2] = 0.0; │ │ │ │ │ - 71 n1[0] = 1.0; │ │ │ │ │ - 72 n1[1] = 0.0; │ │ │ │ │ - 73 n1[2] = 0.0; │ │ │ │ │ - 74 n2[0] = 0.0; │ │ │ │ │ - 75 n2[1] = -1.0; │ │ │ │ │ - 76 n2[2] = 0.0; │ │ │ │ │ - 77 n3[0] = 0.0; │ │ │ │ │ - 78 n3[1] = 1.0; │ │ │ │ │ - 79 n3[2] = 0.0; │ │ │ │ │ - 80 n4[0] = 0.0; │ │ │ │ │ - 81 n4[1] = 0.0; │ │ │ │ │ - 82 n4[2] = -1.0; │ │ │ │ │ - 83 n5[0] = 0.0; │ │ │ │ │ - 84 n5[1] = 0.0; │ │ │ │ │ - 85 n5[2] = 1.0; │ │ │ │ │ - 86 } │ │ │ │ │ - 87 │ │ │ │ │ - 96 template │ │ │ │ │ -97 void interpolate(const F& f, std::vector& out) const │ │ │ │ │ - 98 { │ │ │ │ │ - 99 // f gives v*outer normal at a point on the edge! │ │ │ │ │ - 100 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ - 101 //typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ - 102 │ │ │ │ │ - 103 DUNE_THROW( NotImplemented, "Interpolation for BDM1Cube3D finite elements │ │ │ │ │ -is not implemented." ); │ │ │ │ │ - 104 │ │ │ │ │ - 105 out.resize(18); │ │ │ │ │ - 106 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ - 107 │ │ │ │ │ - 108 const int qOrder = 4; │ │ │ │ │ - 109 const QuadratureRule& rule = QuadratureRules::rule │ │ │ │ │ -(GeometryTypes::cube(1), qOrder); │ │ │ │ │ - 110 │ │ │ │ │ - 111 for (typename QuadratureRule::const_iterator it = rule.begin(); │ │ │ │ │ - 112 it != rule.end(); ++it) │ │ │ │ │ - 113 { │ │ │ │ │ - 114 // TODO: write interpolation │ │ │ │ │ - 115 } │ │ │ │ │ - 116 } │ │ │ │ │ - 117 │ │ │ │ │ - 118 private: │ │ │ │ │ - 119 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3, sign4, │ │ │ │ │ -sign5; │ │ │ │ │ - 120 typename LB::Traits::DomainType n0, n1, n2, n3, n4, n5; │ │ │ │ │ - 121 }; │ │ │ │ │ - 122} // end namespace Dune │ │ │ │ │ - 123#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALINTERPOLATION_HH │ │ │ │ │ + 19 template │ │ │ │ │ +20 using PyramidP2LocalFiniteElement │ │ │ │ │ + 21 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]] │ │ │ │ │ + 22 = LagrangePyramidLocalFiniteElement; │ │ │ │ │ + 23 │ │ │ │ │ + 24} │ │ │ │ │ + 25 │ │ │ │ │ + 26#endif │ │ │ │ │ +lagrangepyramid.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Cube3DLocalInterpolation │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on the reference hexahedron. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:26 │ │ │ │ │ -Dune::BDM1Cube3DLocalInterpolation::BDM1Cube3DLocalInterpolation │ │ │ │ │ -BDM1Cube3DLocalInterpolation() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:30 │ │ │ │ │ -Dune::BDM1Cube3DLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &f, std::vector< C > &out) const │ │ │ │ │ -Interpolate a given function with shape functions. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:97 │ │ │ │ │ -Dune::BDM1Cube3DLocalInterpolation::BDM1Cube3DLocalInterpolation │ │ │ │ │ -BDM1Cube3DLocalInterpolation(unsigned int s) │ │ │ │ │ -Make set number s, where 0 <= s < 64. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:40 │ │ │ │ │ +Dune::LagrangePyramidLocalFiniteElement │ │ │ │ │ +Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ +Definition lagrangepyramid.hh:812 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00398.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube3dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: qk.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
brezzidouglasmarini1cube3dlocalbasis.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
qk.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#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::BDM1Cube3DLocalBasis< D, R >
 First order Brezzi-Douglas-Marini shape functions on the reference hexahedron. 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 {} │ │ │ │ │ @@ -6,29 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1cube3d │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini1cube3dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "../../common/localbasis.hh" │ │ │ │ │ + * lagrange │ │ │ │ │ +Namespaces | Typedefs │ │ │ │ │ +qk.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -class  Dune::BDM1Cube3DLocalBasis<_D,_R_> │ │ │ │ │ -  First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ - hexahedron. More... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +using Dune::QkLocalFiniteElement = LagrangeCubeLocalFiniteElement< D, R, d, k │ │ │ │ │ + > │ │ │ │ │ +  General Lagrange finite element for cubes with arbitrary dimension and │ │ │ │ │ + polynomial order. │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00398_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1cube3dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: qk.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,322 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini1cube3dlocalbasis.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_BREZZIDOUGLASMARINI1_CUBE3D_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALBASIS_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <bitset>
│ │ │ │ -
10#include <numeric>
│ │ │ │ -
11#include <vector>
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_QK_LOCALFINITEELEMENT_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_QK_LOCALFINITEELEMENT_HH
│ │ │ │ +
8
│ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11#warning This header is deprecated
│ │ │ │
12
│ │ │ │ -
13#include <dune/common/fmatrix.hh>
│ │ │ │ -
14
│ │ │ │ -
15#include "../../common/localbasis.hh"
│ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
29 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
31 {
│ │ │ │ -
32
│ │ │ │ -
33 public:
│ │ │ │ - │ │ │ │ -
35 R,3,Dune::FieldVector<R,3>,
│ │ │ │ -
36 Dune::FieldMatrix<R,3,3> > Traits;
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
40 {
│ │ │ │ -
41 for (size_t i=0; i<6; i++)
│ │ │ │ -
42 sign_[i] = 1.0;
│ │ │ │ -
43 }
│ │ │ │ -
│ │ │ │ -
44
│ │ │ │ -
│ │ │ │ -
50 BDM1Cube3DLocalBasis(std::bitset<6> s)
│ │ │ │ -
51 {
│ │ │ │ -
52 for (size_t i=0; i<6; i++)
│ │ │ │ -
53 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
│ │ │ │ -
57 unsigned int size() const
│ │ │ │ -
58 {
│ │ │ │ -
59 return 18;
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
│ │ │ │ -
68 inline void evaluateFunction(const typename Traits::DomainType& in,
│ │ │ │ -
69 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
70 {
│ │ │ │ -
71 out.resize(size());
│ │ │ │ -
72
│ │ │ │ -
73 out[0][0] = sign_[0] * (in[0] - 1.0);
│ │ │ │ -
74 out[0][1] = 0;
│ │ │ │ -
75 out[0][2] = 0;
│ │ │ │ -
76 out[1][0] = sign_[1] * in[0];
│ │ │ │ -
77 out[1][1] = 0;
│ │ │ │ -
78 out[1][2] = 0;
│ │ │ │ -
79 out[2][0] = 0;
│ │ │ │ -
80 out[2][1] = sign_[2] * (in[1] - 1.0);
│ │ │ │ -
81 out[2][2] = 0;
│ │ │ │ -
82 out[3][0] = 0;
│ │ │ │ -
83 out[3][1] = sign_[3] * in[1];
│ │ │ │ -
84 out[3][2] = 0;
│ │ │ │ -
85 out[4][0] = 0;
│ │ │ │ -
86 out[4][1] = 0;
│ │ │ │ -
87 out[4][2] = sign_[4] * (in[2] - 1.0);
│ │ │ │ -
88 out[5][0] = 0;
│ │ │ │ -
89 out[5][1] = 0;
│ │ │ │ -
90 out[5][2] = sign_[5] * in[2];
│ │ │ │ -
91 out[6][0] = 6.0 * in[0] * in[1] - 3 * in[0]-6 * in[1] + 3.0;
│ │ │ │ -
92 out[6][1] = -3.0 * in[1] * in[1] + 3 * in[1];
│ │ │ │ -
93 out[6][2] = 0;
│ │ │ │ -
94 out[7][0] = -6.0 * in[0] * in[1] + 3 * in[0];
│ │ │ │ -
95 out[7][1] = 3.0 * in[1] * in[1] - 3 * in[1];
│ │ │ │ -
96 out[7][2] = 0;
│ │ │ │ -
97 out[8][0] = 3.0 * in[0] * in[0] - 3 * in[0];
│ │ │ │ -
98 out[8][1] = -6.0 * in[0] * in[1] + 3 * in[1]+6 * in[0]-3.0;
│ │ │ │ -
99 out[8][2] = 0;
│ │ │ │ -
100 out[9][0] = -3.0 * in[0] * in[0] + 3 * in[0];
│ │ │ │ -
101 out[9][1] = 6.0 * in[0] * in[1] - 3 * in[1];
│ │ │ │ -
102 out[9][2] = 0;
│ │ │ │ -
103 out[10][0] = -3.0 * in[0] * in[0] + 3 * in[0];
│ │ │ │ -
104 out[10][1] = 0;
│ │ │ │ -
105 out[10][2] = 6.0 * in[0] * in[2]-6 * in[0]-3 * in[2] + 3.0;
│ │ │ │ -
106 out[11][0] = 3.0 * in[0] * in[0]-3 * in[0];
│ │ │ │ -
107 out[11][1] = 0;
│ │ │ │ -
108 out[11][2] = -6.0 * in[0] * in[2] + 3 * in[2];
│ │ │ │ -
109 out[12][0] = -6.0 * in[0] * in[2]+6 * in[2] + 3 * in[0]-3.0;
│ │ │ │ -
110 out[12][1] = 0;
│ │ │ │ -
111 out[12][2] = 3.0 * in[2] * in[2]-3 * in[2];
│ │ │ │ -
112 out[13][0] = -3 * in[0]+6 * in[0] * in[2];
│ │ │ │ -
113 out[13][1] = 0;
│ │ │ │ -
114 out[13][2] = -3.0 * in[2] * in[2] + 3 * in[2];
│ │ │ │ -
115 out[14][0] = 0;
│ │ │ │ -
116 out[14][1] = 6.0 * in[1] * in[2]-3 * in[1]-6 * in[2] + 3.0;
│ │ │ │ -
117 out[14][2] = -3 * in[2] * in[2] + 3 * in[2];
│ │ │ │ -
118 out[15][0] = 0;
│ │ │ │ -
119 out[15][1] = -6.0 * in[1] * in[2] + 3 * in[1];
│ │ │ │ -
120 out[15][2] = 3.0 * in[2] * in[2]-3 * in[2];
│ │ │ │ -
121 out[16][0] = 0;
│ │ │ │ -
122 out[16][1] = 3.0 * in[1] * in[1]-3 * in[1];
│ │ │ │ -
123 out[16][2] = -6.0 * in[1] * in[2] + 3 * in[2]+6 * in[1]-3.0;
│ │ │ │ -
124 out[17][0] = 0;
│ │ │ │ -
125 out[17][1] = -3.0 * in[1] * in[1] + 3 * in[1];
│ │ │ │ -
126 out[17][2] = 6.0 * in[1] * in[2] - 3.0 * in[2];
│ │ │ │ -
127 }
│ │ │ │ -
│ │ │ │ -
128
│ │ │ │ -
│ │ │ │ -
135 inline void evaluateJacobian(const typename Traits::DomainType& in,
│ │ │ │ -
136 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
137 {
│ │ │ │ -
138 out.resize(size());
│ │ │ │ -
139
│ │ │ │ -
140 out[0][0] = { sign_[0], 0, 0};
│ │ │ │ -
141 out[0][1] = { 0, 0, 0};
│ │ │ │ -
142 out[0][2] = { 0, 0, 0};
│ │ │ │ -
143
│ │ │ │ -
144 out[1][0] = { sign_[1], 0, 0};
│ │ │ │ -
145 out[1][1] = { 0, 0, 0};
│ │ │ │ -
146 out[1][2] = { 0, 0, 0};
│ │ │ │ -
147
│ │ │ │ -
148 out[2][0] = { 0, 0, 0};
│ │ │ │ -
149 out[2][1] = { 0, sign_[2], 0};
│ │ │ │ -
150 out[2][2] = { 0, 0, 0};
│ │ │ │ -
151
│ │ │ │ -
152 out[3][0] = { 0, 0, 0};
│ │ │ │ -
153 out[3][1] = { 0, sign_[3], 0};
│ │ │ │ -
154 out[3][2] = { 0, 0, 0};
│ │ │ │ -
155
│ │ │ │ -
156 out[4][0] = { 0, 0, 0};
│ │ │ │ -
157 out[4][1] = { 0, 0, 0};
│ │ │ │ -
158 out[4][2] = { 0, 0, sign_[4]};
│ │ │ │ -
159
│ │ │ │ -
160 out[5][0] = { 0, 0, 0};
│ │ │ │ -
161 out[5][1] = { 0, 0, 0};
│ │ │ │ -
162 out[5][2] = { 0, 0, sign_[5]};
│ │ │ │ -
163
│ │ │ │ -
164 out[6][0] = { 6*in[1]-3, 6*in[0]-6, 0};
│ │ │ │ -
165 out[6][1] = { 0, -6*in[1]+3, 0};
│ │ │ │ -
166 out[6][2] = { 0, 0, 0};
│ │ │ │ -
167
│ │ │ │ -
168 out[7][0] = {-6*in[1]+3, -6*in[0], 0};
│ │ │ │ -
169 out[7][1] = { 0, 6*in[1]-3, 0};
│ │ │ │ -
170 out[7][2] = { 0, 0, 0};
│ │ │ │ -
171
│ │ │ │ -
172 out[8][0] = { 6*in[0]-3, 0, 0};
│ │ │ │ -
173 out[8][1] = {-6*in[1]+6, -6*in[0]+3, 0};
│ │ │ │ -
174 out[8][2] = { 0, 0, 0};
│ │ │ │ -
175
│ │ │ │ -
176 out[9][0] = {-6*in[0]+3, 0, 0};
│ │ │ │ -
177 out[9][1] = { 6*in[1], 6*in[0]-3, 0};
│ │ │ │ -
178 out[9][2] = { 0, 0, 0};
│ │ │ │ -
179
│ │ │ │ -
180 out[10][0] = {-6*in[0]+3, 0, 0};
│ │ │ │ -
181 out[10][1] = { 0, 0, 0};
│ │ │ │ -
182 out[10][2] = { 6*in[2]-6, 0, 6*in[0]-3};
│ │ │ │ -
183
│ │ │ │ -
184 out[11][0] = { 6*in[0]-3, 0, 0};
│ │ │ │ -
185 out[11][1] = { 0, 0, 0};
│ │ │ │ -
186 out[11][2] = { -6*in[2], 0, -6*in[0]+3};
│ │ │ │ -
187
│ │ │ │ -
188 out[12][0] = {-6*in[2]+3, 0, -6*in[0]+6};
│ │ │ │ -
189 out[12][1] = { 0, 0, 0};
│ │ │ │ -
190 out[12][2] = { 0, 0, 6*in[2]-3};
│ │ │ │ -
191
│ │ │ │ -
192 out[13][0] = { 6*in[2]-3, 0, 6*in[0]};
│ │ │ │ -
193 out[13][1] = { 0, 0, 0};
│ │ │ │ -
194 out[13][2] = { 0, 0, -6*in[2]+3};
│ │ │ │ -
195
│ │ │ │ -
196 out[14][0] = { 0, 0, 0};
│ │ │ │ -
197 out[14][1] = { 0, 6*in[2]-3, 6*in[1]-6};
│ │ │ │ -
198 out[14][2] = { 0, 0, -6*in[2]+3};
│ │ │ │ -
199
│ │ │ │ -
200 out[15][0] = { 0, 0, 0};
│ │ │ │ -
201 out[15][1] = { 0, -6*in[2]+3, -6*in[1]};
│ │ │ │ -
202 out[15][2] = { 0, 0, 6*in[2]-3};
│ │ │ │ -
203
│ │ │ │ -
204 out[16][0] = { 0, 0, 0};
│ │ │ │ -
205 out[16][1] = { 0, 6*in[1]-3, 0};
│ │ │ │ -
206 out[16][2] = { 0, -6*in[2]+6, -6*in[1]+3};
│ │ │ │ -
207
│ │ │ │ -
208 out[17][0] = { 0, 0, 0};
│ │ │ │ -
209 out[17][1] = { 0, -6*in[1]+3, 0};
│ │ │ │ -
210 out[17][2] = { 0, 6*in[2], 6*in[1]-3};
│ │ │ │ -
211 }
│ │ │ │ -
│ │ │ │ -
212
│ │ │ │ -
│ │ │ │ -
214 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ -
215 const typename Traits::DomainType& in, // position
│ │ │ │ -
216 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
217 {
│ │ │ │ -
218 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
219 if (totalOrder == 0) {
│ │ │ │ -
220 evaluateFunction(in, out);
│ │ │ │ -
221 } else if (totalOrder == 1) {
│ │ │ │ -
222 out.resize(size());
│ │ │ │ -
223 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
224
│ │ │ │ -
225 switch (direction) {
│ │ │ │ -
226 case 0:
│ │ │ │ -
227 out[0] = { sign_[0], 0, 0};
│ │ │ │ -
228 out[1] = { sign_[1], 0, 0};
│ │ │ │ -
229 out[2] = { 0, 0, 0};
│ │ │ │ -
230 out[3] = { 0, 0, 0};
│ │ │ │ -
231 out[4] = { 0, 0, 0};
│ │ │ │ -
232 out[5] = { 0, 0, 0};
│ │ │ │ -
233 out[6] = { 6*in[1]-3, 0, 0};
│ │ │ │ -
234 out[7] = {-6*in[1]+3, 0, 0};
│ │ │ │ -
235 out[8] = { 6*in[0]-3, -6*in[1]+6, 0};
│ │ │ │ -
236 out[9] = {-6*in[0]+3, 6*in[1], 0};
│ │ │ │ -
237 out[10] = {-6*in[0]+3, 0, 6*in[2]-6};
│ │ │ │ -
238 out[11] = { 6*in[0]-3, 0, -6*in[2]};
│ │ │ │ -
239 out[12] = {-6*in[2]+3, 0, 0};
│ │ │ │ -
240 out[13] = { 6*in[2]-3, 0, 0};
│ │ │ │ -
241 out[14] = { 0, 0, 0};
│ │ │ │ -
242 out[15] = { 0, 0, 0};
│ │ │ │ -
243 out[16] = { 0, 0, 0};
│ │ │ │ -
244 out[17] = { 0, 0, 0};
│ │ │ │ -
245 break;
│ │ │ │ -
246 case 1:
│ │ │ │ -
247 out[0] = { 0, 0, 0};
│ │ │ │ -
248 out[1] = { 0, 0, 0};
│ │ │ │ -
249 out[2] = { 0, sign_[2], 0};
│ │ │ │ -
250 out[3] = { 0, sign_[3], 0};
│ │ │ │ -
251 out[4] = { 0, 0, 0};
│ │ │ │ -
252 out[5] = { 0, 0, 0};
│ │ │ │ -
253 out[6] = { 6*in[0]-6, -6*in[1]+3, 0};
│ │ │ │ -
254 out[7] = { -6*in[0], 6*in[1]-3, 0};
│ │ │ │ -
255 out[8] = { 0, -6*in[0]+3, 0};
│ │ │ │ -
256 out[9] = { 0, 6*in[0]-3, 0};
│ │ │ │ -
257 out[10] = { 0, 0, 0};
│ │ │ │ -
258 out[11] = { 0, 0, 0};
│ │ │ │ -
259 out[12] = { 0, 0, 0};
│ │ │ │ -
260 out[13] = { 0, 0, 0};
│ │ │ │ -
261 out[14] = { 0, 6*in[2]-3, 0};
│ │ │ │ -
262 out[15] = { 0, -6*in[2]+3, 0};
│ │ │ │ -
263 out[16] = { 0, 6*in[1]-3, -6*in[2]+6};
│ │ │ │ -
264 out[17] = { 0, -6*in[1]+3, 6*in[2]};
│ │ │ │ -
265 break;
│ │ │ │ -
266 case 2:
│ │ │ │ -
267 out[0] = { 0, 0, 0};
│ │ │ │ -
268 out[1] = { 0, 0, 0};
│ │ │ │ -
269 out[2] = { 0, 0, 0};
│ │ │ │ -
270 out[3] = { 0, 0, 0};
│ │ │ │ -
271 out[4] = { 0, 0, sign_[4]};
│ │ │ │ -
272 out[5] = { 0, 0, sign_[5]};
│ │ │ │ -
273 out[6] = { 0, 0, 0};
│ │ │ │ -
274 out[7] = { 0, 0, 0};
│ │ │ │ -
275 out[8] = { 0, 0, 0};
│ │ │ │ -
276 out[9] = { 0, 0, 0};
│ │ │ │ -
277 out[10] = { 0, 0, 6*in[0]-3};
│ │ │ │ -
278 out[11] = { 0, 0, -6*in[0]+3};
│ │ │ │ -
279 out[12] = {-6*in[0]+6, 0, 6*in[2]-3};
│ │ │ │ -
280 out[13] = { 6*in[0], 0, -6*in[2]+3};
│ │ │ │ -
281 out[14] = { 0, 6*in[1]-6, -6*in[2]+3};
│ │ │ │ -
282 out[15] = { 0, -6*in[1], 6*in[2]-3};
│ │ │ │ -
283 out[16] = { 0, 0, -6*in[1]+3};
│ │ │ │ -
284 out[17] = { 0, 0, 6*in[1]-3};
│ │ │ │ -
285 break;
│ │ │ │ -
286 default:
│ │ │ │ -
287 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
288 }
│ │ │ │ -
289 } else {
│ │ │ │ -
290 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
291 }
│ │ │ │ -
292 }
│ │ │ │ -
│ │ │ │ -
293
│ │ │ │ -
│ │ │ │ -
295 unsigned int order() const
│ │ │ │ -
296 {
│ │ │ │ -
297 return 2;
│ │ │ │ -
298 }
│ │ │ │ -
│ │ │ │ -
299
│ │ │ │ -
300 private:
│ │ │ │ -
301 std::array<R,6> sign_;
│ │ │ │ -
302 };
│ │ │ │ -
│ │ │ │ -
303} // end namespace Dune
│ │ │ │ -
304#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALBASIS_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
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on the reference hexahedron.
Definition brezzidouglasmarini1cube3dlocalbasis.hh:31
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition brezzidouglasmarini1cube3dlocalbasis.hh:135
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition brezzidouglasmarini1cube3dlocalbasis.hh:68
│ │ │ │ -
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
Definition brezzidouglasmarini1cube3dlocalbasis.hh:36
│ │ │ │ -
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 brezzidouglasmarini1cube3dlocalbasis.hh:214
│ │ │ │ -
BDM1Cube3DLocalBasis(std::bitset< 6 > s)
Make set number s, where 0 <= s < 64.
Definition brezzidouglasmarini1cube3dlocalbasis.hh:50
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition brezzidouglasmarini1cube3dlocalbasis.hh:295
│ │ │ │ -
BDM1Cube3DLocalBasis()
Standard constructor.
Definition brezzidouglasmarini1cube3dlocalbasis.hh:39
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition brezzidouglasmarini1cube3dlocalbasis.hh:57
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,336 +7,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ - * brezzidouglasmarini1cube3d │ │ │ │ │ -brezzidouglasmarini1cube3dlocalbasis.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_BREZZIDOUGLASMARINI1_CUBE3D_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALBASIS_HH │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ + 5 │ │ │ │ │ + 6#ifndef DUNE_LOCALFUNCTIONS_QK_LOCALFINITEELEMENT_HH │ │ │ │ │ + 7#define DUNE_LOCALFUNCTIONS_QK_LOCALFINITEELEMENT_HH │ │ │ │ │ + 8 │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#warning This header is deprecated │ │ │ │ │ 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include "../../common/localbasis.hh" │ │ │ │ │ - 16 │ │ │ │ │ - 17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ - 29 template │ │ │ │ │ -30 class BDM1Cube3DLocalBasis │ │ │ │ │ - 31 { │ │ │ │ │ - 32 │ │ │ │ │ - 33 public: │ │ │ │ │ - 34 typedef LocalBasisTraits, │ │ │ │ │ - 35 R,3,Dune::FieldVector, │ │ │ │ │ -36 Dune::FieldMatrix > Traits; │ │ │ │ │ - 37 │ │ │ │ │ -39 BDM1Cube3DLocalBasis() │ │ │ │ │ - 40 { │ │ │ │ │ - 41 for (size_t i=0; i<6; i++) │ │ │ │ │ - 42 sign_[i] = 1.0; │ │ │ │ │ - 43 } │ │ │ │ │ - 44 │ │ │ │ │ -50 BDM1Cube3DLocalBasis(std::bitset<6> s) │ │ │ │ │ - 51 { │ │ │ │ │ - 52 for (size_t i=0; i<6; i++) │ │ │ │ │ - 53 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ - 54 } │ │ │ │ │ - 55 │ │ │ │ │ -57 unsigned int size() const │ │ │ │ │ - 58 { │ │ │ │ │ - 59 return 18; │ │ │ │ │ - 60 } │ │ │ │ │ - 61 │ │ │ │ │ -68 inline void evaluateFunction(const typename Traits::DomainType& in, │ │ │ │ │ - 69 std::vector& out) const │ │ │ │ │ - 70 { │ │ │ │ │ - 71 out.resize(size()); │ │ │ │ │ - 72 │ │ │ │ │ - 73 out[0][0] = sign_[0] * (in[0] - 1.0); │ │ │ │ │ - 74 out[0][1] = 0; │ │ │ │ │ - 75 out[0][2] = 0; │ │ │ │ │ - 76 out[1][0] = sign_[1] * in[0]; │ │ │ │ │ - 77 out[1][1] = 0; │ │ │ │ │ - 78 out[1][2] = 0; │ │ │ │ │ - 79 out[2][0] = 0; │ │ │ │ │ - 80 out[2][1] = sign_[2] * (in[1] - 1.0); │ │ │ │ │ - 81 out[2][2] = 0; │ │ │ │ │ - 82 out[3][0] = 0; │ │ │ │ │ - 83 out[3][1] = sign_[3] * in[1]; │ │ │ │ │ - 84 out[3][2] = 0; │ │ │ │ │ - 85 out[4][0] = 0; │ │ │ │ │ - 86 out[4][1] = 0; │ │ │ │ │ - 87 out[4][2] = sign_[4] * (in[2] - 1.0); │ │ │ │ │ - 88 out[5][0] = 0; │ │ │ │ │ - 89 out[5][1] = 0; │ │ │ │ │ - 90 out[5][2] = sign_[5] * in[2]; │ │ │ │ │ - 91 out[6][0] = 6.0 * in[0] * in[1] - 3 * in[0]-6 * in[1] + 3.0; │ │ │ │ │ - 92 out[6][1] = -3.0 * in[1] * in[1] + 3 * in[1]; │ │ │ │ │ - 93 out[6][2] = 0; │ │ │ │ │ - 94 out[7][0] = -6.0 * in[0] * in[1] + 3 * in[0]; │ │ │ │ │ - 95 out[7][1] = 3.0 * in[1] * in[1] - 3 * in[1]; │ │ │ │ │ - 96 out[7][2] = 0; │ │ │ │ │ - 97 out[8][0] = 3.0 * in[0] * in[0] - 3 * in[0]; │ │ │ │ │ - 98 out[8][1] = -6.0 * in[0] * in[1] + 3 * in[1]+6 * in[0]-3.0; │ │ │ │ │ - 99 out[8][2] = 0; │ │ │ │ │ - 100 out[9][0] = -3.0 * in[0] * in[0] + 3 * in[0]; │ │ │ │ │ - 101 out[9][1] = 6.0 * in[0] * in[1] - 3 * in[1]; │ │ │ │ │ - 102 out[9][2] = 0; │ │ │ │ │ - 103 out[10][0] = -3.0 * in[0] * in[0] + 3 * in[0]; │ │ │ │ │ - 104 out[10][1] = 0; │ │ │ │ │ - 105 out[10][2] = 6.0 * in[0] * in[2]-6 * in[0]-3 * in[2] + 3.0; │ │ │ │ │ - 106 out[11][0] = 3.0 * in[0] * in[0]-3 * in[0]; │ │ │ │ │ - 107 out[11][1] = 0; │ │ │ │ │ - 108 out[11][2] = -6.0 * in[0] * in[2] + 3 * in[2]; │ │ │ │ │ - 109 out[12][0] = -6.0 * in[0] * in[2]+6 * in[2] + 3 * in[0]-3.0; │ │ │ │ │ - 110 out[12][1] = 0; │ │ │ │ │ - 111 out[12][2] = 3.0 * in[2] * in[2]-3 * in[2]; │ │ │ │ │ - 112 out[13][0] = -3 * in[0]+6 * in[0] * in[2]; │ │ │ │ │ - 113 out[13][1] = 0; │ │ │ │ │ - 114 out[13][2] = -3.0 * in[2] * in[2] + 3 * in[2]; │ │ │ │ │ - 115 out[14][0] = 0; │ │ │ │ │ - 116 out[14][1] = 6.0 * in[1] * in[2]-3 * in[1]-6 * in[2] + 3.0; │ │ │ │ │ - 117 out[14][2] = -3 * in[2] * in[2] + 3 * in[2]; │ │ │ │ │ - 118 out[15][0] = 0; │ │ │ │ │ - 119 out[15][1] = -6.0 * in[1] * in[2] + 3 * in[1]; │ │ │ │ │ - 120 out[15][2] = 3.0 * in[2] * in[2]-3 * in[2]; │ │ │ │ │ - 121 out[16][0] = 0; │ │ │ │ │ - 122 out[16][1] = 3.0 * in[1] * in[1]-3 * in[1]; │ │ │ │ │ - 123 out[16][2] = -6.0 * in[1] * in[2] + 3 * in[2]+6 * in[1]-3.0; │ │ │ │ │ - 124 out[17][0] = 0; │ │ │ │ │ - 125 out[17][1] = -3.0 * in[1] * in[1] + 3 * in[1]; │ │ │ │ │ - 126 out[17][2] = 6.0 * in[1] * in[2] - 3.0 * in[2]; │ │ │ │ │ - 127 } │ │ │ │ │ - 128 │ │ │ │ │ -135 inline void evaluateJacobian(const typename Traits::DomainType& in, │ │ │ │ │ - 136 std::vector& out) const │ │ │ │ │ - 137 { │ │ │ │ │ - 138 out.resize(size()); │ │ │ │ │ - 139 │ │ │ │ │ - 140 out[0][0] = { sign_[0], 0, 0}; │ │ │ │ │ - 141 out[0][1] = { 0, 0, 0}; │ │ │ │ │ - 142 out[0][2] = { 0, 0, 0}; │ │ │ │ │ - 143 │ │ │ │ │ - 144 out[1][0] = { sign_[1], 0, 0}; │ │ │ │ │ - 145 out[1][1] = { 0, 0, 0}; │ │ │ │ │ - 146 out[1][2] = { 0, 0, 0}; │ │ │ │ │ - 147 │ │ │ │ │ - 148 out[2][0] = { 0, 0, 0}; │ │ │ │ │ - 149 out[2][1] = { 0, sign_[2], 0}; │ │ │ │ │ - 150 out[2][2] = { 0, 0, 0}; │ │ │ │ │ - 151 │ │ │ │ │ - 152 out[3][0] = { 0, 0, 0}; │ │ │ │ │ - 153 out[3][1] = { 0, sign_[3], 0}; │ │ │ │ │ - 154 out[3][2] = { 0, 0, 0}; │ │ │ │ │ - 155 │ │ │ │ │ - 156 out[4][0] = { 0, 0, 0}; │ │ │ │ │ - 157 out[4][1] = { 0, 0, 0}; │ │ │ │ │ - 158 out[4][2] = { 0, 0, sign_[4]}; │ │ │ │ │ - 159 │ │ │ │ │ - 160 out[5][0] = { 0, 0, 0}; │ │ │ │ │ - 161 out[5][1] = { 0, 0, 0}; │ │ │ │ │ - 162 out[5][2] = { 0, 0, sign_[5]}; │ │ │ │ │ - 163 │ │ │ │ │ - 164 out[6][0] = { 6*in[1]-3, 6*in[0]-6, 0}; │ │ │ │ │ - 165 out[6][1] = { 0, -6*in[1]+3, 0}; │ │ │ │ │ - 166 out[6][2] = { 0, 0, 0}; │ │ │ │ │ - 167 │ │ │ │ │ - 168 out[7][0] = {-6*in[1]+3, -6*in[0], 0}; │ │ │ │ │ - 169 out[7][1] = { 0, 6*in[1]-3, 0}; │ │ │ │ │ - 170 out[7][2] = { 0, 0, 0}; │ │ │ │ │ - 171 │ │ │ │ │ - 172 out[8][0] = { 6*in[0]-3, 0, 0}; │ │ │ │ │ - 173 out[8][1] = {-6*in[1]+6, -6*in[0]+3, 0}; │ │ │ │ │ - 174 out[8][2] = { 0, 0, 0}; │ │ │ │ │ - 175 │ │ │ │ │ - 176 out[9][0] = {-6*in[0]+3, 0, 0}; │ │ │ │ │ - 177 out[9][1] = { 6*in[1], 6*in[0]-3, 0}; │ │ │ │ │ - 178 out[9][2] = { 0, 0, 0}; │ │ │ │ │ - 179 │ │ │ │ │ - 180 out[10][0] = {-6*in[0]+3, 0, 0}; │ │ │ │ │ - 181 out[10][1] = { 0, 0, 0}; │ │ │ │ │ - 182 out[10][2] = { 6*in[2]-6, 0, 6*in[0]-3}; │ │ │ │ │ - 183 │ │ │ │ │ - 184 out[11][0] = { 6*in[0]-3, 0, 0}; │ │ │ │ │ - 185 out[11][1] = { 0, 0, 0}; │ │ │ │ │ - 186 out[11][2] = { -6*in[2], 0, -6*in[0]+3}; │ │ │ │ │ - 187 │ │ │ │ │ - 188 out[12][0] = {-6*in[2]+3, 0, -6*in[0]+6}; │ │ │ │ │ - 189 out[12][1] = { 0, 0, 0}; │ │ │ │ │ - 190 out[12][2] = { 0, 0, 6*in[2]-3}; │ │ │ │ │ - 191 │ │ │ │ │ - 192 out[13][0] = { 6*in[2]-3, 0, 6*in[0]}; │ │ │ │ │ - 193 out[13][1] = { 0, 0, 0}; │ │ │ │ │ - 194 out[13][2] = { 0, 0, -6*in[2]+3}; │ │ │ │ │ - 195 │ │ │ │ │ - 196 out[14][0] = { 0, 0, 0}; │ │ │ │ │ - 197 out[14][1] = { 0, 6*in[2]-3, 6*in[1]-6}; │ │ │ │ │ - 198 out[14][2] = { 0, 0, -6*in[2]+3}; │ │ │ │ │ - 199 │ │ │ │ │ - 200 out[15][0] = { 0, 0, 0}; │ │ │ │ │ - 201 out[15][1] = { 0, -6*in[2]+3, -6*in[1]}; │ │ │ │ │ - 202 out[15][2] = { 0, 0, 6*in[2]-3}; │ │ │ │ │ - 203 │ │ │ │ │ - 204 out[16][0] = { 0, 0, 0}; │ │ │ │ │ - 205 out[16][1] = { 0, 6*in[1]-3, 0}; │ │ │ │ │ - 206 out[16][2] = { 0, -6*in[2]+6, -6*in[1]+3}; │ │ │ │ │ - 207 │ │ │ │ │ - 208 out[17][0] = { 0, 0, 0}; │ │ │ │ │ - 209 out[17][1] = { 0, -6*in[1]+3, 0}; │ │ │ │ │ - 210 out[17][2] = { 0, 6*in[2], 6*in[1]-3}; │ │ │ │ │ - 211 } │ │ │ │ │ - 212 │ │ │ │ │ -214 void partial (const std::array& order, │ │ │ │ │ - 215 const typename Traits::DomainType& in, // position │ │ │ │ │ - 216 std::vector& out) const // return value │ │ │ │ │ - 217 { │ │ │ │ │ - 218 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ - 219 if (totalOrder == 0) { │ │ │ │ │ - 220 evaluateFunction(in, out); │ │ │ │ │ - 221 } else if (totalOrder == 1) { │ │ │ │ │ - 222 out.resize(size()); │ │ │ │ │ - 223 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ - 224 │ │ │ │ │ - 225 switch (direction) { │ │ │ │ │ - 226 case 0: │ │ │ │ │ - 227 out[0] = { sign_[0], 0, 0}; │ │ │ │ │ - 228 out[1] = { sign_[1], 0, 0}; │ │ │ │ │ - 229 out[2] = { 0, 0, 0}; │ │ │ │ │ - 230 out[3] = { 0, 0, 0}; │ │ │ │ │ - 231 out[4] = { 0, 0, 0}; │ │ │ │ │ - 232 out[5] = { 0, 0, 0}; │ │ │ │ │ - 233 out[6] = { 6*in[1]-3, 0, 0}; │ │ │ │ │ - 234 out[7] = {-6*in[1]+3, 0, 0}; │ │ │ │ │ - 235 out[8] = { 6*in[0]-3, -6*in[1]+6, 0}; │ │ │ │ │ - 236 out[9] = {-6*in[0]+3, 6*in[1], 0}; │ │ │ │ │ - 237 out[10] = {-6*in[0]+3, 0, 6*in[2]-6}; │ │ │ │ │ - 238 out[11] = { 6*in[0]-3, 0, -6*in[2]}; │ │ │ │ │ - 239 out[12] = {-6*in[2]+3, 0, 0}; │ │ │ │ │ - 240 out[13] = { 6*in[2]-3, 0, 0}; │ │ │ │ │ - 241 out[14] = { 0, 0, 0}; │ │ │ │ │ - 242 out[15] = { 0, 0, 0}; │ │ │ │ │ - 243 out[16] = { 0, 0, 0}; │ │ │ │ │ - 244 out[17] = { 0, 0, 0}; │ │ │ │ │ - 245 break; │ │ │ │ │ - 246 case 1: │ │ │ │ │ - 247 out[0] = { 0, 0, 0}; │ │ │ │ │ - 248 out[1] = { 0, 0, 0}; │ │ │ │ │ - 249 out[2] = { 0, sign_[2], 0}; │ │ │ │ │ - 250 out[3] = { 0, sign_[3], 0}; │ │ │ │ │ - 251 out[4] = { 0, 0, 0}; │ │ │ │ │ - 252 out[5] = { 0, 0, 0}; │ │ │ │ │ - 253 out[6] = { 6*in[0]-6, -6*in[1]+3, 0}; │ │ │ │ │ - 254 out[7] = { -6*in[0], 6*in[1]-3, 0}; │ │ │ │ │ - 255 out[8] = { 0, -6*in[0]+3, 0}; │ │ │ │ │ - 256 out[9] = { 0, 6*in[0]-3, 0}; │ │ │ │ │ - 257 out[10] = { 0, 0, 0}; │ │ │ │ │ - 258 out[11] = { 0, 0, 0}; │ │ │ │ │ - 259 out[12] = { 0, 0, 0}; │ │ │ │ │ - 260 out[13] = { 0, 0, 0}; │ │ │ │ │ - 261 out[14] = { 0, 6*in[2]-3, 0}; │ │ │ │ │ - 262 out[15] = { 0, -6*in[2]+3, 0}; │ │ │ │ │ - 263 out[16] = { 0, 6*in[1]-3, -6*in[2]+6}; │ │ │ │ │ - 264 out[17] = { 0, -6*in[1]+3, 6*in[2]}; │ │ │ │ │ - 265 break; │ │ │ │ │ - 266 case 2: │ │ │ │ │ - 267 out[0] = { 0, 0, 0}; │ │ │ │ │ - 268 out[1] = { 0, 0, 0}; │ │ │ │ │ - 269 out[2] = { 0, 0, 0}; │ │ │ │ │ - 270 out[3] = { 0, 0, 0}; │ │ │ │ │ - 271 out[4] = { 0, 0, sign_[4]}; │ │ │ │ │ - 272 out[5] = { 0, 0, sign_[5]}; │ │ │ │ │ - 273 out[6] = { 0, 0, 0}; │ │ │ │ │ - 274 out[7] = { 0, 0, 0}; │ │ │ │ │ - 275 out[8] = { 0, 0, 0}; │ │ │ │ │ - 276 out[9] = { 0, 0, 0}; │ │ │ │ │ - 277 out[10] = { 0, 0, 6*in[0]-3}; │ │ │ │ │ - 278 out[11] = { 0, 0, -6*in[0]+3}; │ │ │ │ │ - 279 out[12] = {-6*in[0]+6, 0, 6*in[2]-3}; │ │ │ │ │ - 280 out[13] = { 6*in[0], 0, -6*in[2]+3}; │ │ │ │ │ - 281 out[14] = { 0, 6*in[1]-6, -6*in[2]+3}; │ │ │ │ │ - 282 out[15] = { 0, -6*in[1], 6*in[2]-3}; │ │ │ │ │ - 283 out[16] = { 0, 0, -6*in[1]+3}; │ │ │ │ │ - 284 out[17] = { 0, 0, 6*in[1]-3}; │ │ │ │ │ - 285 break; │ │ │ │ │ - 286 default: │ │ │ │ │ - 287 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ - 288 } │ │ │ │ │ - 289 } else { │ │ │ │ │ - 290 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ - 291 } │ │ │ │ │ - 292 } │ │ │ │ │ - 293 │ │ │ │ │ -295 unsigned int order() const │ │ │ │ │ - 296 { │ │ │ │ │ - 297 return 2; │ │ │ │ │ - 298 } │ │ │ │ │ - 299 │ │ │ │ │ - 300 private: │ │ │ │ │ - 301 std::array sign_; │ │ │ │ │ - 302 }; │ │ │ │ │ - 303} // end namespace Dune │ │ │ │ │ - 304#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALBASIS_HH │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 25 template │ │ │ │ │ +26 using QkLocalFiniteElement │ │ │ │ │ + 27 [[deprecated("use LagrangeCubeLocalFiniteElement instead")]] │ │ │ │ │ + 28 = LagrangeCubeLocalFiniteElement; │ │ │ │ │ + 29 │ │ │ │ │ + 30} │ │ │ │ │ + 31 │ │ │ │ │ + 32#endif │ │ │ │ │ +lagrangecube.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Cube3DLocalBasis │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on the reference hexahedron. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalbasis.hh:31 │ │ │ │ │ -Dune::BDM1Cube3DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalbasis.hh:135 │ │ │ │ │ -Dune::BDM1Cube3DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalbasis.hh:68 │ │ │ │ │ -Dune::BDM1Cube3DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ -3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalbasis.hh:36 │ │ │ │ │ -Dune::BDM1Cube3DLocalBasis::partial │ │ │ │ │ -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 brezzidouglasmarini1cube3dlocalbasis.hh:214 │ │ │ │ │ -Dune::BDM1Cube3DLocalBasis::BDM1Cube3DLocalBasis │ │ │ │ │ -BDM1Cube3DLocalBasis(std::bitset< 6 > s) │ │ │ │ │ -Make set number s, where 0 <= s < 64. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalbasis.hh:50 │ │ │ │ │ -Dune::BDM1Cube3DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalbasis.hh:295 │ │ │ │ │ -Dune::BDM1Cube3DLocalBasis::BDM1Cube3DLocalBasis │ │ │ │ │ -BDM1Cube3DLocalBasis() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalbasis.hh:39 │ │ │ │ │ -Dune::BDM1Cube3DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition brezzidouglasmarini1cube3dlocalbasis.hh:57 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LagrangeCubeLocalFiniteElement │ │ │ │ │ +Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangecube.hh:711 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00401.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarinisimplex.hh File Reference │ │ │ │ +dune-localfunctions: p23d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
brezzidouglasmarinisimplex.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
p23d.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2d.hh>
│ │ │ │ -#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2d.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::BrezziDouglasMariniSimplexLocalFiniteElement< D, R, 2, 1 >
 Brezzi-Douglas-Marini local finite elements for simplices with dimension 2 and order 1. More...
 
class  Dune::BrezziDouglasMariniSimplexLocalFiniteElement< D, R, 2, 2 >
 Brezzi-Douglas-Marini local finite elements for simplices with dimension 2 and order 2. 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 {} │ │ │ │ │ @@ -6,30 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -brezzidouglasmarinisimplex.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * lagrange │ │ │ │ │ +Namespaces | Typedefs │ │ │ │ │ +p23d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -class  Dune::BrezziDouglasMariniSimplexLocalFiniteElement<_D,_R,_2,_1_> │ │ │ │ │ -  Brezzi-Douglas-Marini local finite elements for simplices with │ │ │ │ │ - dimension 2 and order 1. More... │ │ │ │ │ -  │ │ │ │ │ -class  Dune::BrezziDouglasMariniSimplexLocalFiniteElement<_D,_R,_2,_2_> │ │ │ │ │ -  Brezzi-Douglas-Marini local finite elements for simplices with │ │ │ │ │ - dimension 2 and order 2. More... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +using Dune::P23DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, │ │ │ │ │ + 3, 2 > │ │ │ │ │ +  Second-order Lagrange local finite element on the reference tetrahedron. │ │ │ │ │ + │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00401_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarinisimplex.hh Source File │ │ │ │ +dune-localfunctions: p23d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,88 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarinisimplex.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINISIMPLEX_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINISIMPLEX_HH
│ │ │ │ +
5#ifndef DUNE_P2_3DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_P2_3DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
10#warning This header is deprecated
│ │ │ │
11
│ │ │ │
12namespace Dune
│ │ │ │
13{
│ │ │ │ -
22 template<class D, class R, unsigned int dim, unsigned int order>
│ │ │ │ - │ │ │ │ -
24
│ │ │ │ -
28 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
31 {
│ │ │ │ -
32 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 {}
│ │ │ │ -
│ │ │ │ -
36
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
44 {}
│ │ │ │ -
│ │ │ │ -
45 };
│ │ │ │ -
│ │ │ │ -
46
│ │ │ │ -
50 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
53 {
│ │ │ │ -
54 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
57 {}
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
66 {}
│ │ │ │ -
│ │ │ │ -
67 };
│ │ │ │ -
│ │ │ │ -
68
│ │ │ │ -
69} // namespace Dune
│ │ │ │ -
70
│ │ │ │ -
71#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINISIMPLEX_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
14
│ │ │ │ +
22 template<class D, class R>
│ │ │ │ + │ │ │ │ +
24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
26
│ │ │ │ +
27}
│ │ │ │ +
28
│ │ │ │ +
29#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on triangles.
Definition brezzidouglasmarini1simplex2d.hh:28
│ │ │ │ -
Second order Brezzi-Douglas-Marini shape functions on triangles.
Definition brezzidouglasmarini2simplex2d.hh:27
│ │ │ │ -
Brezzi-Douglas-Marini local finite element for simplices.
Definition brezzidouglasmarinisimplex.hh:23
│ │ │ │ -
BrezziDouglasMariniSimplexLocalFiniteElement(int s)
Constructor with a set of edge orientations.
Definition brezzidouglasmarinisimplex.hh:42
│ │ │ │ -
BrezziDouglasMariniSimplexLocalFiniteElement()
Default constructor.
Definition brezzidouglasmarinisimplex.hh:34
│ │ │ │ -
BrezziDouglasMariniSimplexLocalFiniteElement(int s)
Constructor with a set of edge orientations.
Definition brezzidouglasmarinisimplex.hh:64
│ │ │ │ -
BrezziDouglasMariniSimplexLocalFiniteElement()
Default constructor.
Definition brezzidouglasmarinisimplex.hh:56
│ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,95 +7,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ -brezzidouglasmarinisimplex.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINISIMPLEX_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINISIMPLEX_HH │ │ │ │ │ + 5#ifndef DUNE_P2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_P2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#warning This header is deprecated │ │ │ │ │ 11 │ │ │ │ │ 12namespace Dune │ │ │ │ │ 13{ │ │ │ │ │ - 22 template │ │ │ │ │ -23 class BrezziDouglasMariniSimplexLocalFiniteElement; │ │ │ │ │ - 24 │ │ │ │ │ - 28 template │ │ │ │ │ -29 class BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ - 30 : public BDM1Simplex2DLocalFiniteElement │ │ │ │ │ - 31 { │ │ │ │ │ - 32 public: │ │ │ │ │ -34 BrezziDouglasMariniSimplexLocalFiniteElement() │ │ │ │ │ - 35 {} │ │ │ │ │ - 36 │ │ │ │ │ -42 BrezziDouglasMariniSimplexLocalFiniteElement(int s) │ │ │ │ │ - 43 : BDM1Simplex2DLocalFiniteElement::BDM1Simplex2DLocalFiniteElement(s) │ │ │ │ │ - 44 {} │ │ │ │ │ - 45 }; │ │ │ │ │ - 46 │ │ │ │ │ - 50 template │ │ │ │ │ -51 class BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ - 52 : public BDM2Simplex2DLocalFiniteElement │ │ │ │ │ - 53 { │ │ │ │ │ - 54 public: │ │ │ │ │ -56 BrezziDouglasMariniSimplexLocalFiniteElement() │ │ │ │ │ - 57 {} │ │ │ │ │ - 58 │ │ │ │ │ -64 BrezziDouglasMariniSimplexLocalFiniteElement(int s) │ │ │ │ │ - 65 : BDM2Simplex2DLocalFiniteElement::BDM2Simplex2DLocalFiniteElement(s) │ │ │ │ │ - 66 {} │ │ │ │ │ - 67 }; │ │ │ │ │ - 68 │ │ │ │ │ - 69} // namespace Dune │ │ │ │ │ - 70 │ │ │ │ │ - 71#endif // #ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINISIMPLEX_HH │ │ │ │ │ -brezzidouglasmarini2simplex2d.hh │ │ │ │ │ -brezzidouglasmarini1simplex2d.hh │ │ │ │ │ + 14 │ │ │ │ │ + 22 template │ │ │ │ │ +23 using P23DLocalFiniteElement │ │ │ │ │ + 24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ + 25 = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ + 26 │ │ │ │ │ + 27} │ │ │ │ │ + 28 │ │ │ │ │ + 29#endif │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Simplex2DLocalFiniteElement │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2d.hh:28 │ │ │ │ │ -Dune::BDM2Simplex2DLocalFiniteElement │ │ │ │ │ -Second order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ -Definition brezzidouglasmarini2simplex2d.hh:27 │ │ │ │ │ -Dune::BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ -Brezzi-Douglas-Marini local finite element for simplices. │ │ │ │ │ -Definition brezzidouglasmarinisimplex.hh:23 │ │ │ │ │ -Dune::BrezziDouglasMariniSimplexLocalFiniteElement<_D,_R,_2,_1_>:: │ │ │ │ │ -BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ -BrezziDouglasMariniSimplexLocalFiniteElement(int s) │ │ │ │ │ -Constructor with a set of edge orientations. │ │ │ │ │ -Definition brezzidouglasmarinisimplex.hh:42 │ │ │ │ │ -Dune::BrezziDouglasMariniSimplexLocalFiniteElement<_D,_R,_2,_1_>:: │ │ │ │ │ -BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ -BrezziDouglasMariniSimplexLocalFiniteElement() │ │ │ │ │ -Default constructor. │ │ │ │ │ -Definition brezzidouglasmarinisimplex.hh:34 │ │ │ │ │ -Dune::BrezziDouglasMariniSimplexLocalFiniteElement<_D,_R,_2,_2_>:: │ │ │ │ │ -BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ -BrezziDouglasMariniSimplexLocalFiniteElement(int s) │ │ │ │ │ -Constructor with a set of edge orientations. │ │ │ │ │ -Definition brezzidouglasmarinisimplex.hh:64 │ │ │ │ │ -Dune::BrezziDouglasMariniSimplexLocalFiniteElement<_D,_R,_2,_2_>:: │ │ │ │ │ -BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ -BrezziDouglasMariniSimplexLocalFiniteElement() │ │ │ │ │ -Default constructor. │ │ │ │ │ -Definition brezzidouglasmarinisimplex.hh:56 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangesimplex.hh:838 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00404.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1simplex2d.hh File Reference │ │ │ │ +dune-localfunctions: prismp2.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
brezzidouglasmarini1simplex2d.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
prismp2.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include "../common/localfiniteelementtraits.hh"
│ │ │ │ -#include "brezzidouglasmarini1simplex2d/brezzidouglasmarini1simplex2dlocalbasis.hh"
│ │ │ │ -#include "brezzidouglasmarini1simplex2d/brezzidouglasmarini1simplex2dlocalcoefficients.hh"
│ │ │ │ -#include "brezzidouglasmarini1simplex2d/brezzidouglasmarini1simplex2dlocalinterpolation.hh"
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::BDM1Simplex2DLocalFiniteElement< D, R >
 First order Brezzi-Douglas-Marini shape functions on triangles. 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 {} │ │ │ │ │ @@ -6,29 +6,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -brezzidouglasmarini1simplex2d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "brezzidouglasmarini1simplex2d/ │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalbasis.hh" │ │ │ │ │ -#include "brezzidouglasmarini1simplex2d/ │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalcoefficients.hh" │ │ │ │ │ -#include "brezzidouglasmarini1simplex2d/ │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalinterpolation.hh" │ │ │ │ │ + * lagrange │ │ │ │ │ +Namespaces | Typedefs │ │ │ │ │ +prismp2.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -class  Dune::BDM1Simplex2DLocalFiniteElement<_D,_R_> │ │ │ │ │ -  First order Brezzi-Douglas-Marini shape functions on triangles. More... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +using Dune::PrismP2LocalFiniteElement = LagrangePrismLocalFiniteElement< D, R, │ │ │ │ │ + 2 > │ │ │ │ │ +  Second-order Lagrange finite element on a three-dimensional prism. │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00404_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini1simplex2d.hh Source File │ │ │ │ +dune-localfunctions: prismp2.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,124 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini1simplex2d.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_PRISM2_3DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_PRISM2_3DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ + │ │ │ │
9
│ │ │ │ -
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
10#warning This header is deprecated
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │
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::triangle;
│ │ │ │ -
74 }
│ │ │ │ -
│ │ │ │ -
75
│ │ │ │ -
76 private:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
80 };
│ │ │ │ -
│ │ │ │ -
81}
│ │ │ │ -
82#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALFINITEELEMENT_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
19 template<class D, class R>
│ │ │ │ + │ │ │ │ +
21 [[deprecated("use LagrangePrismLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
23
│ │ │ │ +
24}
│ │ │ │ +
25
│ │ │ │ +
26#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on triangles.
Definition brezzidouglasmarini1simplex2d.hh:28
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition brezzidouglasmarini1simplex2d.hh:50
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition brezzidouglasmarini1simplex2d.hh:55
│ │ │ │ -
static constexpr GeometryType type()
Definition brezzidouglasmarini1simplex2d.hh:71
│ │ │ │ -
BDM1Simplex2DLocalFiniteElement()
Standard constructor.
Definition brezzidouglasmarini1simplex2d.hh:37
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition brezzidouglasmarini1simplex2d.hh:60
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition brezzidouglasmarini1simplex2d.hh:66
│ │ │ │ -
BDM1Simplex2DLocalFiniteElement(int s)
Make set number s, where 0 <= s < 8.
Definition brezzidouglasmarini1simplex2d.hh:45
│ │ │ │ -
LocalFiniteElementTraits< BDM1Simplex2DLocalBasis< D, R >, BDM1Simplex2DLocalCoefficients, BDM1Simplex2DLocalInterpolation< BDM1Simplex2DLocalBasis< D, R > > > Traits
Definition brezzidouglasmarini1simplex2d.hh:34
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on the reference triangle.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:30
│ │ │ │ -
Layout map for Brezzi-Douglas-Marini-1 elements on triangles.
Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:24
│ │ │ │ -
First order Brezzi-Douglas-Marini shape functions on the reference triangle.
Definition brezzidouglasmarini1simplex2dlocalinterpolation.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
│ │ │ │ +
Lagrange finite element for 3d prisms with arbitrary compile-time polynomial order.
Definition lagrangeprism.hh:652
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,146 +7,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasmarini │ │ │ │ │ -brezzidouglasmarini1simplex2d.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_PRISM2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_PRISM2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "brezzidouglasmarini1simplex2d/ │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalbasis.hh" │ │ │ │ │ - 12#include "brezzidouglasmarini1simplex2d/ │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalcoefficients.hh" │ │ │ │ │ - 13#include "brezzidouglasmarini1simplex2d/ │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalinterpolation.hh" │ │ │ │ │ + 10#warning This header is deprecated │ │ │ │ │ + 11 │ │ │ │ │ + 12namespace Dune │ │ │ │ │ + 13{ │ │ │ │ │ 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 17 │ │ │ │ │ - 26 template │ │ │ │ │ -27 class BDM1Simplex2DLocalFiniteElement │ │ │ │ │ - 28 { │ │ │ │ │ - 29 │ │ │ │ │ - 30 public: │ │ │ │ │ - 31 typedef LocalFiniteElementTraits< │ │ │ │ │ - 32 BDM1Simplex2DLocalBasis, │ │ │ │ │ - 33 BDM1Simplex2DLocalCoefficients, │ │ │ │ │ -34 BDM1Simplex2DLocalInterpolation > > Traits; │ │ │ │ │ - 35 │ │ │ │ │ -37 BDM1Simplex2DLocalFiniteElement () │ │ │ │ │ - 38 {} │ │ │ │ │ - 39 │ │ │ │ │ -45 BDM1Simplex2DLocalFiniteElement (int s) : │ │ │ │ │ - 46 basis(s), │ │ │ │ │ - 47 interpolation(s) │ │ │ │ │ - 48 {} │ │ │ │ │ - 49 │ │ │ │ │ -50 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 51 { │ │ │ │ │ - 52 return basis; │ │ │ │ │ - 53 } │ │ │ │ │ - 54 │ │ │ │ │ -55 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 56 { │ │ │ │ │ - 57 return coefficients; │ │ │ │ │ - 58 } │ │ │ │ │ - 59 │ │ │ │ │ -60 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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::triangle; │ │ │ │ │ - 74 } │ │ │ │ │ - 75 │ │ │ │ │ - 76 private: │ │ │ │ │ - 77 BDM1Simplex2DLocalBasis basis; │ │ │ │ │ - 78 BDM1Simplex2DLocalCoefficients coefficients; │ │ │ │ │ - 79 BDM1Simplex2DLocalInterpolation > │ │ │ │ │ -interpolation; │ │ │ │ │ - 80 }; │ │ │ │ │ - 81} │ │ │ │ │ - 82#endif / │ │ │ │ │ -/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALFINITEELEMENT_HH │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalbasis.hh │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalinterpolation.hh │ │ │ │ │ -brezzidouglasmarini1simplex2dlocalcoefficients.hh │ │ │ │ │ + 19 template │ │ │ │ │ +20 using PrismP2LocalFiniteElement │ │ │ │ │ + 21 [[deprecated("use LagrangePrismLocalFiniteElement instead")]] │ │ │ │ │ + 22 = LagrangePrismLocalFiniteElement; │ │ │ │ │ + 23 │ │ │ │ │ + 24} │ │ │ │ │ + 25 │ │ │ │ │ + 26#endif │ │ │ │ │ +lagrangeprism.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDM1Simplex2DLocalFiniteElement │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2d.hh:28 │ │ │ │ │ -Dune::BDM1Simplex2DLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition brezzidouglasmarini1simplex2d.hh:50 │ │ │ │ │ -Dune::BDM1Simplex2DLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition brezzidouglasmarini1simplex2d.hh:55 │ │ │ │ │ -Dune::BDM1Simplex2DLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition brezzidouglasmarini1simplex2d.hh:71 │ │ │ │ │ -Dune::BDM1Simplex2DLocalFiniteElement::BDM1Simplex2DLocalFiniteElement │ │ │ │ │ -BDM1Simplex2DLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2d.hh:37 │ │ │ │ │ -Dune::BDM1Simplex2DLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition brezzidouglasmarini1simplex2d.hh:60 │ │ │ │ │ -Dune::BDM1Simplex2DLocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2d.hh:66 │ │ │ │ │ -Dune::BDM1Simplex2DLocalFiniteElement::BDM1Simplex2DLocalFiniteElement │ │ │ │ │ -BDM1Simplex2DLocalFiniteElement(int s) │ │ │ │ │ -Make set number s, where 0 <= s < 8. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2d.hh:45 │ │ │ │ │ -Dune::BDM1Simplex2DLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< BDM1Simplex2DLocalBasis< D, R >, │ │ │ │ │ -BDM1Simplex2DLocalCoefficients, BDM1Simplex2DLocalInterpolation< │ │ │ │ │ -BDM1Simplex2DLocalBasis< D, R > > > Traits │ │ │ │ │ -Definition brezzidouglasmarini1simplex2d.hh:34 │ │ │ │ │ -Dune::BDM1Simplex2DLocalBasis │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on the reference triangle. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalbasis.hh:30 │ │ │ │ │ -Dune::BDM1Simplex2DLocalCoefficients │ │ │ │ │ -Layout map for Brezzi-Douglas-Marini-1 elements on triangles. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:24 │ │ │ │ │ -Dune::BDM1Simplex2DLocalInterpolation │ │ │ │ │ -First order Brezzi-Douglas-Marini shape functions on the reference triangle. │ │ │ │ │ -Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:25 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::LagrangePrismLocalFiniteElement │ │ │ │ │ +Lagrange finite element for 3d prisms with arbitrary compile-time polynomial │ │ │ │ │ +order. │ │ │ │ │ +Definition lagrangeprism.hh:652 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00407.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interfaceswitch.hh File Reference │ │ │ │ +dune-localfunctions: p2.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,46 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
interfaceswitch.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
p2.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/common/shared_ptr.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

struct  Dune::FiniteElementInterfaceSwitch< FiniteElement, Dummy >
 Switch for uniform treatment of finite element with either the local or the global interface. More...
 
struct  Dune::BasisInterfaceSwitch< Basis, Dummy >
 Switch for uniform treatment of local and global basis classes. 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 {} │ │ │ │ │ @@ -6,32 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -interfaceswitch.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * lagrange │ │ │ │ │ +Namespaces | Typedefs │ │ │ │ │ +p2.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -struct  Dune::FiniteElementInterfaceSwitch<_FiniteElement,_Dummy_> │ │ │ │ │ -  Switch for uniform treatment of finite element with either the local │ │ │ │ │ - or the global interface. More... │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::BasisInterfaceSwitch<_Basis,_Dummy_> │ │ │ │ │ -  Switch for uniform treatment of local and global basis classes. │ │ │ │ │ - More... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +using Dune::P2LocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, d, │ │ │ │ │ + 2 > │ │ │ │ │ +  Second-order Lagrange finite element on the reference simplex with │ │ │ │ │ + compile-time dimension. │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00407_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interfaceswitch.hh Source File │ │ │ │ +dune-localfunctions: p2.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,198 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
interfaceswitch.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
│ │ │ │ -
6#ifndef DUNE_LOCALFUNCTIONS_COMMON_INTERFACESWITCH_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_COMMON_INTERFACESWITCH_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <cstddef>
│ │ │ │ -
10#include <memory>
│ │ │ │ -
11#include <vector>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/common/fmatrix.hh>
│ │ │ │ -
14#include <dune/common/typetraits.hh>
│ │ │ │ -
15#include <dune/common/shared_ptr.hh>
│ │ │ │ -
16
│ │ │ │ -
17namespace Dune {
│ │ │ │ -
18
│ │ │ │ -
21
│ │ │ │ -
29 template<class FiniteElement, class Dummy = void>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
32 typedef typename FiniteElement::Traits::Basis Basis;
│ │ │ │ -
34 typedef typename FiniteElement::Traits::Interpolation Interpolation;
│ │ │ │ -
36 typedef typename FiniteElement::Traits::Coefficients Coefficients;
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ -
39 static const Basis &basis(const FiniteElement& fe)
│ │ │ │ -
40 { return fe.basis(); }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
42 static const Interpolation &interpolation(const FiniteElement& fe)
│ │ │ │ -
43 { return fe.interpolation(); }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
45 static const Coefficients &coefficients(const FiniteElement& fe)
│ │ │ │ -
46 { return fe.coefficients(); }
│ │ │ │ -
│ │ │ │ -
47
│ │ │ │ -
49
│ │ │ │ -
78 typedef std::shared_ptr<const FiniteElement> Store;
│ │ │ │ -
80
│ │ │ │ -
│ │ │ │ -
85 static void setStore(Store& store, const FiniteElement& fe)
│ │ │ │ -
86 { store = std::make_shared<const FiniteElement>(fe); }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
88 static void setStore(Store& store, FiniteElement&& fe)
│ │ │ │ -
89 { store = std::make_shared<const FiniteElement>(std::move(fe)); }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
91 static void setStore(Store& store, const Store& fe)
│ │ │ │ -
92 { store = fe; }
│ │ │ │ -
│ │ │ │ -
93 };
│ │ │ │ -
│ │ │ │ -
94
│ │ │ │ -
95#ifndef DOXYGEN
│ │ │ │ -
98 template<class FiniteElement>
│ │ │ │ -
99 struct FiniteElementInterfaceSwitch<
│ │ │ │ -
100 FiniteElement,
│ │ │ │ -
101 typename std::enable_if<AlwaysTrue<typename FiniteElement::Traits::
│ │ │ │ -
102 LocalBasisType>::value>::type
│ │ │ │ -
103 >
│ │ │ │ -
104 {
│ │ │ │ -
106 typedef typename FiniteElement::Traits::LocalBasisType Basis;
│ │ │ │ -
108 typedef typename FiniteElement::Traits::LocalInterpolationType
│ │ │ │ - │ │ │ │ -
111 typedef typename FiniteElement::Traits::LocalCoefficientsType Coefficients;
│ │ │ │ -
112
│ │ │ │ -
114 static const Basis &basis(const FiniteElement& fe)
│ │ │ │ -
115 { return fe.localBasis(); }
│ │ │ │ -
117 static const Interpolation &interpolation(const FiniteElement& fe)
│ │ │ │ -
118 { return fe.localInterpolation(); }
│ │ │ │ -
120 static const Coefficients &coefficients(const FiniteElement& fe)
│ │ │ │ -
121 { return fe.localCoefficients(); }
│ │ │ │ -
122
│ │ │ │ -
124 typedef std::shared_ptr<const FiniteElement> Store;
│ │ │ │ -
126 static void setStore(Store& store, const FiniteElement& fe)
│ │ │ │ -
127 { store = stackobject_to_shared_ptr<const FiniteElement>(fe); }
│ │ │ │ -
129 static void setStore(Store& store, FiniteElement&& fe)
│ │ │ │ -
130 { store = std::make_shared<const FiniteElement>(std::move(fe)); }
│ │ │ │ -
132 static void setStore(Store& store, const Store& fe)
│ │ │ │ -
133 { store = fe; }
│ │ │ │ -
134 };
│ │ │ │ -
135#endif // !DOXYGEN
│ │ │ │ -
136
│ │ │ │ -
138
│ │ │ │ -
153 template<class Basis, class Dummy = void>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
156 typedef typename Basis::Traits::DomainField DomainField;
│ │ │ │ -
158 static const std::size_t dimDomainLocal = Basis::Traits::dimDomainLocal;
│ │ │ │ -
160 typedef typename Basis::Traits::DomainLocal DomainLocal;
│ │ │ │ -
161
│ │ │ │ -
163 typedef typename Basis::Traits::RangeField RangeField;
│ │ │ │ -
165 static const std::size_t dimRange = Basis::Traits::dimRange;
│ │ │ │ -
167 typedef typename Basis::Traits::Range Range;
│ │ │ │ -
168
│ │ │ │ -
170
│ │ │ │ -
180 template<typename Geometry>
│ │ │ │ -
│ │ │ │ -
181 static void gradient(const Basis& basis, const Geometry& geometry,
│ │ │ │ -
182 const DomainLocal& xl,
│ │ │ │ -
183 std::vector<FieldMatrix<RangeField, 1,
│ │ │ │ -
184 Geometry::coorddimension> >& grad)
│ │ │ │ -
185 {
│ │ │ │ -
186 grad.resize(basis.size());
│ │ │ │ -
187 basis.evaluateJacobian(xl, grad);
│ │ │ │ -
188 }
│ │ │ │ -
│ │ │ │ -
189 };
│ │ │ │ -
│ │ │ │ -
190
│ │ │ │ -
191#ifndef DOXYGEN
│ │ │ │ -
193 template<class Basis>
│ │ │ │ -
194 struct BasisInterfaceSwitch<Basis,
│ │ │ │ -
195 typename std::enable_if<
│ │ │ │ -
196 AlwaysTrue<
│ │ │ │ -
197 std::integral_constant<
│ │ │ │ -
198 std::size_t,
│ │ │ │ -
199 Basis::Traits::dimDomain
│ │ │ │ -
200 >
│ │ │ │ -
201 >::value
│ │ │ │ -
202 >::type
│ │ │ │ -
203 >
│ │ │ │ -
204 {
│ │ │ │ -
206 typedef typename Basis::Traits::DomainFieldType DomainField;
│ │ │ │ -
208 static const std::size_t dimDomainLocal = Basis::Traits::dimDomain;
│ │ │ │ -
210 typedef typename Basis::Traits::DomainType DomainLocal;
│ │ │ │ -
211
│ │ │ │ -
213 typedef typename Basis::Traits::RangeFieldType RangeField;
│ │ │ │ -
215 static const std::size_t dimRange = Basis::Traits::dimRange;
│ │ │ │ -
217 typedef typename Basis::Traits::RangeType Range;
│ │ │ │ -
218
│ │ │ │ -
220 template<typename Geometry>
│ │ │ │ -
221 static void gradient(const Basis& basis, const Geometry& geometry,
│ │ │ │ -
222 const DomainLocal& xl,
│ │ │ │ -
223 std::vector<FieldMatrix<RangeField, 1,
│ │ │ │ -
224 Geometry::coorddimension> >& grad)
│ │ │ │ -
225 {
│ │ │ │ -
226 std::vector<typename Basis::Traits::JacobianType> lgrad(basis.size());
│ │ │ │ -
227 basis.evaluateJacobian(xl, lgrad);
│ │ │ │ -
228
│ │ │ │ -
229 const typename Geometry::JacobianInverseTransposed& jac =
│ │ │ │ -
230 geometry.jacobianInverseTransposed(xl);
│ │ │ │ -
231
│ │ │ │ -
232 grad.resize(basis.size());
│ │ │ │ -
233 for(std::size_t i = 0; i < basis.size(); ++i)
│ │ │ │ -
234 jac.mv(lgrad[i][0], grad[i][0]);
│ │ │ │ -
235 }
│ │ │ │ -
236 };
│ │ │ │ -
237#endif // !DOXYGEN
│ │ │ │ -
238
│ │ │ │ -
239} // namespace Dune
│ │ │ │ -
240
│ │ │ │ -
241#endif // DUNE_LOCALFUNCTIONS_COMMON_INTERFACESWITCH_HH
│ │ │ │ +
5#ifndef DUNE_P2_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_P2_LOCALFINITEELEMENT_HH
│ │ │ │ +
7
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
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
│ │ │ │ -
Switch for uniform treatment of finite element with either the local or the global interface.
Definition interfaceswitch.hh:30
│ │ │ │ -
static const Coefficients & coefficients(const FiniteElement &fe)
access coefficients
Definition interfaceswitch.hh:45
│ │ │ │ -
static void setStore(Store &store, FiniteElement &&fe)
Store a finite element in the store.
Definition interfaceswitch.hh:88
│ │ │ │ -
FiniteElement::Traits::Coefficients Coefficients
export the type of the coefficients
Definition interfaceswitch.hh:36
│ │ │ │ -
static void setStore(Store &store, const Store &fe)
Store a finite element in the store.
Definition interfaceswitch.hh:91
│ │ │ │ -
static void setStore(Store &store, const FiniteElement &fe)
Store a finite element in the store.
Definition interfaceswitch.hh:85
│ │ │ │ -
FiniteElement::Traits::Interpolation Interpolation
export the type of the interpolation
Definition interfaceswitch.hh:34
│ │ │ │ -
std::shared_ptr< const FiniteElement > Store
Type for storing finite elements.
Definition interfaceswitch.hh:78
│ │ │ │ -
static const Basis & basis(const FiniteElement &fe)
access basis
Definition interfaceswitch.hh:39
│ │ │ │ -
FiniteElement::Traits::Basis Basis
export the type of the basis
Definition interfaceswitch.hh:32
│ │ │ │ -
static const Interpolation & interpolation(const FiniteElement &fe)
access interpolation
Definition interfaceswitch.hh:42
│ │ │ │ -
Switch for uniform treatment of local and global basis classes.
Definition interfaceswitch.hh:154
│ │ │ │ -
static const std::size_t dimRange
export dimension of the values
Definition interfaceswitch.hh:165
│ │ │ │ -
static const std::size_t dimDomainLocal
export dimension of local coordinates
Definition interfaceswitch.hh:158
│ │ │ │ -
Basis::Traits::RangeField RangeField
export field type of the values
Definition interfaceswitch.hh:163
│ │ │ │ -
Basis::Traits::Range Range
export vector type of the values
Definition interfaceswitch.hh:167
│ │ │ │ -
static void gradient(const Basis &basis, const Geometry &geometry, const DomainLocal &xl, std::vector< FieldMatrix< RangeField, 1, Geometry::coorddimension > > &grad)
Compute global gradient for scalar valued bases.
Definition interfaceswitch.hh:181
│ │ │ │ -
Basis::Traits::DomainLocal DomainLocal
export vector type of the local coordinates
Definition interfaceswitch.hh:160
│ │ │ │ -
Basis::Traits::DomainField DomainField
export field types of the coordinates
Definition interfaceswitch.hh:156
│ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,233 +7,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -interfaceswitch.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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 │ │ │ │ │ - 6#ifndef DUNE_LOCALFUNCTIONS_COMMON_INTERFACESWITCH_HH │ │ │ │ │ - 7#define DUNE_LOCALFUNCTIONS_COMMON_INTERFACESWITCH_HH │ │ │ │ │ - 8 │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16 │ │ │ │ │ - 17namespace Dune { │ │ │ │ │ - 18 │ │ │ │ │ - 21 │ │ │ │ │ - 29 template │ │ │ │ │ -30 struct FiniteElementInterfaceSwitch { │ │ │ │ │ -32 typedef typename FiniteElement::Traits::Basis Basis; │ │ │ │ │ -34 typedef typename FiniteElement::Traits::Interpolation Interpolation; │ │ │ │ │ -36 typedef typename FiniteElement::Traits::Coefficients Coefficients; │ │ │ │ │ - 37 │ │ │ │ │ -39 static const Basis &basis(const FiniteElement& fe) │ │ │ │ │ - 40 { return fe.basis(); } │ │ │ │ │ -42 static const Interpolation &interpolation(const FiniteElement& fe) │ │ │ │ │ - 43 { return fe.interpolation(); } │ │ │ │ │ -45 static const Coefficients &coefficients(const FiniteElement& fe) │ │ │ │ │ - 46 { return fe.coefficients(); } │ │ │ │ │ - 47 │ │ │ │ │ - 49 │ │ │ │ │ -78 typedef std::shared_ptr Store; │ │ │ │ │ - 80 │ │ │ │ │ -85 static void setStore(Store& store, const FiniteElement& fe) │ │ │ │ │ - 86 { store = std::make_shared(fe); } │ │ │ │ │ -88 static void setStore(Store& store, FiniteElement&& fe) │ │ │ │ │ - 89 { store = std::make_shared(std::move(fe)); } │ │ │ │ │ -91 static void setStore(Store& store, const Store& fe) │ │ │ │ │ - 92 { store = fe; } │ │ │ │ │ - 93 }; │ │ │ │ │ - 94 │ │ │ │ │ - 95#ifndef DOXYGEN │ │ │ │ │ - 98 template │ │ │ │ │ - 99 struct FiniteElementInterfaceSwitch< │ │ │ │ │ - 100 FiniteElement, │ │ │ │ │ - 101 typename std::enable_if::value>::type │ │ │ │ │ - 103 > │ │ │ │ │ - 104 { │ │ │ │ │ - 106 typedef typename FiniteElement::Traits::LocalBasisType Basis; │ │ │ │ │ - 108 typedef typename FiniteElement::Traits::LocalInterpolationType │ │ │ │ │ - 109 Interpolation; │ │ │ │ │ - 111 typedef typename FiniteElement::Traits::LocalCoefficientsType │ │ │ │ │ -Coefficients; │ │ │ │ │ - 112 │ │ │ │ │ - 114 static const Basis &basis(const FiniteElement& fe) │ │ │ │ │ - 115 { return fe.localBasis(); } │ │ │ │ │ - 117 static const Interpolation &interpolation(const FiniteElement& fe) │ │ │ │ │ - 118 { return fe.localInterpolation(); } │ │ │ │ │ - 120 static const Coefficients &coefficients(const FiniteElement& fe) │ │ │ │ │ - 121 { return fe.localCoefficients(); } │ │ │ │ │ - 122 │ │ │ │ │ - 124 typedef std::shared_ptr Store; │ │ │ │ │ - 126 static void setStore(Store& store, const FiniteElement& fe) │ │ │ │ │ - 127 { store = stackobject_to_shared_ptr(fe); } │ │ │ │ │ - 129 static void setStore(Store& store, FiniteElement&& fe) │ │ │ │ │ - 130 { store = std::make_shared(std::move(fe)); } │ │ │ │ │ - 132 static void setStore(Store& store, const Store& fe) │ │ │ │ │ - 133 { store = fe; } │ │ │ │ │ - 134 }; │ │ │ │ │ - 135#endif // !DOXYGEN │ │ │ │ │ - 136 │ │ │ │ │ - 138 │ │ │ │ │ - 153 template │ │ │ │ │ -154 struct BasisInterfaceSwitch { │ │ │ │ │ -156 typedef typename Basis::Traits::DomainField DomainField; │ │ │ │ │ -158 static const std::size_t dimDomainLocal = Basis::Traits::dimDomainLocal; │ │ │ │ │ -160 typedef typename Basis::Traits::DomainLocal DomainLocal; │ │ │ │ │ - 161 │ │ │ │ │ -163 typedef typename Basis::Traits::RangeField RangeField; │ │ │ │ │ -165 static const std::size_t dimRange = Basis::Traits::dimRange; │ │ │ │ │ -167 typedef typename Basis::Traits::Range Range; │ │ │ │ │ - 168 │ │ │ │ │ - 170 │ │ │ │ │ - 180 template │ │ │ │ │ -181 static void gradient(const Basis& basis, const Geometry& geometry, │ │ │ │ │ - 182 const DomainLocal& xl, │ │ │ │ │ - 183 std::vector >& grad) │ │ │ │ │ - 185 { │ │ │ │ │ - 186 grad.resize(basis.size()); │ │ │ │ │ - 187 basis.evaluateJacobian(xl, grad); │ │ │ │ │ - 188 } │ │ │ │ │ - 189 }; │ │ │ │ │ - 190 │ │ │ │ │ - 191#ifndef DOXYGEN │ │ │ │ │ - 193 template │ │ │ │ │ - 194 struct BasisInterfaceSwitch │ │ │ │ │ - 201 >::value │ │ │ │ │ - 202 >::type │ │ │ │ │ - 203 > │ │ │ │ │ - 204 { │ │ │ │ │ - 206 typedef typename Basis::Traits::DomainFieldType DomainField; │ │ │ │ │ - 208 static const std::size_t dimDomainLocal = Basis::Traits::dimDomain; │ │ │ │ │ - 210 typedef typename Basis::Traits::DomainType DomainLocal; │ │ │ │ │ - 211 │ │ │ │ │ - 213 typedef typename Basis::Traits::RangeFieldType RangeField; │ │ │ │ │ - 215 static const std::size_t dimRange = Basis::Traits::dimRange; │ │ │ │ │ - 217 typedef typename Basis::Traits::RangeType Range; │ │ │ │ │ - 218 │ │ │ │ │ - 220 template │ │ │ │ │ - 221 static void gradient(const Basis& basis, const Geometry& geometry, │ │ │ │ │ - 222 const DomainLocal& xl, │ │ │ │ │ - 223 std::vector >& grad) │ │ │ │ │ - 225 { │ │ │ │ │ - 226 std::vector lgrad(basis.size()); │ │ │ │ │ - 227 basis.evaluateJacobian(xl, lgrad); │ │ │ │ │ - 228 │ │ │ │ │ - 229 const typename Geometry::JacobianInverseTransposed& jac = │ │ │ │ │ - 230 geometry.jacobianInverseTransposed(xl); │ │ │ │ │ - 231 │ │ │ │ │ - 232 grad.resize(basis.size()); │ │ │ │ │ - 233 for(std::size_t i = 0; i < basis.size(); ++i) │ │ │ │ │ - 234 jac.mv(lgrad[i][0], grad[i][0]); │ │ │ │ │ - 235 } │ │ │ │ │ - 236 }; │ │ │ │ │ - 237#endif // !DOXYGEN │ │ │ │ │ - 238 │ │ │ │ │ - 239} // namespace Dune │ │ │ │ │ - 240 │ │ │ │ │ - 241#endif // DUNE_LOCALFUNCTIONS_COMMON_INTERFACESWITCH_HH │ │ │ │ │ + 5#ifndef DUNE_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#warning This header is deprecated │ │ │ │ │ + 11 │ │ │ │ │ + 12namespace Dune │ │ │ │ │ + 13{ │ │ │ │ │ + 14 │ │ │ │ │ + 19 template │ │ │ │ │ +20 using P2LocalFiniteElement │ │ │ │ │ + 21 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ + 22 = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ + 23 │ │ │ │ │ + 24} │ │ │ │ │ + 25 │ │ │ │ │ + 26#endif │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::FiniteElementInterfaceSwitch │ │ │ │ │ -Switch for uniform treatment of finite element with either the local or the │ │ │ │ │ -global interface. │ │ │ │ │ -Definition interfaceswitch.hh:30 │ │ │ │ │ -Dune::FiniteElementInterfaceSwitch::coefficients │ │ │ │ │ -static const Coefficients & coefficients(const FiniteElement &fe) │ │ │ │ │ -access coefficients │ │ │ │ │ -Definition interfaceswitch.hh:45 │ │ │ │ │ -Dune::FiniteElementInterfaceSwitch::setStore │ │ │ │ │ -static void setStore(Store &store, FiniteElement &&fe) │ │ │ │ │ -Store a finite element in the store. │ │ │ │ │ -Definition interfaceswitch.hh:88 │ │ │ │ │ -Dune::FiniteElementInterfaceSwitch::Coefficients │ │ │ │ │ -FiniteElement::Traits::Coefficients Coefficients │ │ │ │ │ -export the type of the coefficients │ │ │ │ │ -Definition interfaceswitch.hh:36 │ │ │ │ │ -Dune::FiniteElementInterfaceSwitch::setStore │ │ │ │ │ -static void setStore(Store &store, const Store &fe) │ │ │ │ │ -Store a finite element in the store. │ │ │ │ │ -Definition interfaceswitch.hh:91 │ │ │ │ │ -Dune::FiniteElementInterfaceSwitch::setStore │ │ │ │ │ -static void setStore(Store &store, const FiniteElement &fe) │ │ │ │ │ -Store a finite element in the store. │ │ │ │ │ -Definition interfaceswitch.hh:85 │ │ │ │ │ -Dune::FiniteElementInterfaceSwitch::Interpolation │ │ │ │ │ -FiniteElement::Traits::Interpolation Interpolation │ │ │ │ │ -export the type of the interpolation │ │ │ │ │ -Definition interfaceswitch.hh:34 │ │ │ │ │ -Dune::FiniteElementInterfaceSwitch::Store │ │ │ │ │ -std::shared_ptr< const FiniteElement > Store │ │ │ │ │ -Type for storing finite elements. │ │ │ │ │ -Definition interfaceswitch.hh:78 │ │ │ │ │ -Dune::FiniteElementInterfaceSwitch::basis │ │ │ │ │ -static const Basis & basis(const FiniteElement &fe) │ │ │ │ │ -access basis │ │ │ │ │ -Definition interfaceswitch.hh:39 │ │ │ │ │ -Dune::FiniteElementInterfaceSwitch::Basis │ │ │ │ │ -FiniteElement::Traits::Basis Basis │ │ │ │ │ -export the type of the basis │ │ │ │ │ -Definition interfaceswitch.hh:32 │ │ │ │ │ -Dune::FiniteElementInterfaceSwitch::interpolation │ │ │ │ │ -static const Interpolation & interpolation(const FiniteElement &fe) │ │ │ │ │ -access interpolation │ │ │ │ │ -Definition interfaceswitch.hh:42 │ │ │ │ │ -Dune::BasisInterfaceSwitch │ │ │ │ │ -Switch for uniform treatment of local and global basis classes. │ │ │ │ │ -Definition interfaceswitch.hh:154 │ │ │ │ │ -Dune::BasisInterfaceSwitch::dimRange │ │ │ │ │ -static const std::size_t dimRange │ │ │ │ │ -export dimension of the values │ │ │ │ │ -Definition interfaceswitch.hh:165 │ │ │ │ │ -Dune::BasisInterfaceSwitch::dimDomainLocal │ │ │ │ │ -static const std::size_t dimDomainLocal │ │ │ │ │ -export dimension of local coordinates │ │ │ │ │ -Definition interfaceswitch.hh:158 │ │ │ │ │ -Dune::BasisInterfaceSwitch::RangeField │ │ │ │ │ -Basis::Traits::RangeField RangeField │ │ │ │ │ -export field type of the values │ │ │ │ │ -Definition interfaceswitch.hh:163 │ │ │ │ │ -Dune::BasisInterfaceSwitch::Range │ │ │ │ │ -Basis::Traits::Range Range │ │ │ │ │ -export vector type of the values │ │ │ │ │ -Definition interfaceswitch.hh:167 │ │ │ │ │ -Dune::BasisInterfaceSwitch::gradient │ │ │ │ │ -static void gradient(const Basis &basis, const Geometry &geometry, const │ │ │ │ │ -DomainLocal &xl, std::vector< FieldMatrix< RangeField, 1, Geometry:: │ │ │ │ │ -coorddimension > > &grad) │ │ │ │ │ -Compute global gradient for scalar valued bases. │ │ │ │ │ -Definition interfaceswitch.hh:181 │ │ │ │ │ -Dune::BasisInterfaceSwitch::DomainLocal │ │ │ │ │ -Basis::Traits::DomainLocal DomainLocal │ │ │ │ │ -export vector type of the local coordinates │ │ │ │ │ -Definition interfaceswitch.hh:160 │ │ │ │ │ -Dune::BasisInterfaceSwitch::DomainField │ │ │ │ │ -Basis::Traits::DomainField DomainField │ │ │ │ │ -export field types of the coordinates │ │ │ │ │ -Definition interfaceswitch.hh:156 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangesimplex.hh:838 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00410.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interface.hh File Reference │ │ │ │ +dune-localfunctions: lagrangecoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,54 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
interface.hh File Reference
│ │ │ │ +
lagrangecoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/localfunctions/utility/field.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::FiniteElementInterface
 Interface for global-valued finite elements. More...
 
struct  Dune::FiniteElementInterface::Traits
 types of component objects More...
 
class  Dune::FiniteElementFactoryInterface< Geometry, VertexOrder >
 Factory interface for global-valued finite elements. More...
 
class  Dune::BasisInterface
 Interface for global-valued shape functions. More...
 
struct  Dune::BasisInterface::Traits
 types of domain and range More...
 
struct  Dune::InterpolationInterface
 Interface for global-valued interpolation. More...
 
struct  Dune::CoefficientsInterface
 Interface for global-valued coefficients. More...
struct  Dune::LagrangeCoefficientsFactory< LP, dim, F >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,44 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ + * lagrange │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -interface.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +lagrangecoefficients.hh File Reference │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ - class  Dune::FiniteElementInterface │ │ │ │ │ -  Interface for global-valued finite elements. More... │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::FiniteElementInterface::Traits │ │ │ │ │ -  types of component objects More... │ │ │ │ │ -  │ │ │ │ │ - class  Dune::FiniteElementFactoryInterface<_Geometry,_VertexOrder_> │ │ │ │ │ -  Factory interface for global-valued finite elements. More... │ │ │ │ │ -  │ │ │ │ │ - class  Dune::BasisInterface │ │ │ │ │ -  Interface for global-valued shape functions. More... │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::BasisInterface::Traits │ │ │ │ │ -  types of domain and range More... │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::InterpolationInterface │ │ │ │ │ -  Interface for global-valued interpolation. More... │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::CoefficientsInterface │ │ │ │ │ -  Interface for global-valued coefficients. More... │ │ │ │ │ +struct  Dune::LagrangeCoefficientsFactory<_LP,_dim,_F_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00410_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interface.hh Source File │ │ │ │ +dune-localfunctions: lagrangecoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,215 +70,81 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
interface.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
│ │ │ │ -
6#ifndef DUNE_LOCALFUNCTIONS_INTERFACE_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_INTERFACE_HH
│ │ │ │ -
8
│ │ │ │ -
9#ifndef HEADERCHECK
│ │ │ │ -
10#error This header exists for documentation purposes only and should never be included directly.
│ │ │ │ -
11#endif
│ │ │ │ -
12
│ │ │ │ -
13#include <array>
│ │ │ │ -
14#include <cstddef>
│ │ │ │ -
15#include <vector>
│ │ │ │ +
5#ifndef DUNE_LAGRANGECOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LAGRANGECOEFFICIENTS_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/fvector.hh>
│ │ │ │ +
11
│ │ │ │ +
12#include <dune/geometry/type.hh>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │
16
│ │ │ │ -
17
│ │ │ │ -
18#include <dune/geometry/type.hh>
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │
19
│ │ │ │ - │ │ │ │ -
21
│ │ │ │ -
22namespace Dune {
│ │ │ │ -
23
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ -
27 struct ImplementationDefined;
│ │ │ │ -
28
│ │ │ │ -
29 public:
│ │ │ │ -
31
│ │ │ │ -
│ │ │ │ -
34 struct Traits
│ │ │ │ -
35 {
│ │ │ │ -
37
│ │ │ │ -
42 typedef ImplementationDefined Basis;
│ │ │ │ -
44
│ │ │ │ -
49 typedef ImplementationDefined Coefficients;
│ │ │ │ -
51
│ │ │ │ -
56 typedef ImplementationDefined Interpolation;
│ │ │ │ -
57 };
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
60
│ │ │ │ - │ │ │ │ - │ │ │ │ -
70
│ │ │ │ -
72
│ │ │ │ -
76 const Traits::Basis& basis() const;
│ │ │ │ -
78
│ │ │ │ - │ │ │ │ -
84
│ │ │ │ - │ │ │ │ -
90 GeometryType type() const;
│ │ │ │ -
91 };
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
94
│ │ │ │ -
114 template<class Geometry, class VertexOrder>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
116 {
│ │ │ │ -
117 struct ImplementationDefined;
│ │ │ │ -
118
│ │ │ │ -
119 public:
│ │ │ │ -
121
│ │ │ │ -
126 typedef ImplementationDefined FiniteElement;
│ │ │ │ -
127
│ │ │ │ -
129
│ │ │ │ - │ │ │ │ -
133
│ │ │ │ -
154
│ │ │ │ -
156 const FiniteElement make(const Geometry&, const VertexOrder&, ...);
│ │ │ │ -
158 const FiniteElement make(const Geometry&, ...);
│ │ │ │ -
160 const FiniteElement make(const VertexOrder&, ...);
│ │ │ │ -
162
│ │ │ │ -
166 const FiniteElement make(const GeometryType&, ...);
│ │ │ │ -
168 const FiniteElement make(...);
│ │ │ │ -
169
│ │ │ │ -
171
│ │ │ │ -
172 };
│ │ │ │ -
│ │ │ │ -
173
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
176 {
│ │ │ │ -
177 struct ImplementationDefined;
│ │ │ │ -
178 constexpr static int implementationDefined = 42;
│ │ │ │ -
179
│ │ │ │ -
180 public:
│ │ │ │ -
182
│ │ │ │ -
│ │ │ │ -
187 struct Traits
│ │ │ │ -
188 {
│ │ │ │ -
191
│ │ │ │ -
193 typedef ImplementationDefined DomainFieldType;
│ │ │ │ -
194
│ │ │ │ -
196 constexpr static int dimDomain = implementationDefined;
│ │ │ │ -
197
│ │ │ │ -
199 typedef ImplementationDefined DomainType;
│ │ │ │ -
200
│ │ │ │ -
202
│ │ │ │ -
205
│ │ │ │ -
207 typedef ImplementationDefined RangeFieldType;
│ │ │ │ -
208
│ │ │ │ -
210 constexpr static int dimRange = implementationDefined;
│ │ │ │ -
211
│ │ │ │ -
213 typedef ImplementationDefined RangeType;
│ │ │ │ -
214
│ │ │ │ -
216
│ │ │ │ -
218
│ │ │ │ -
222 typedef ImplementationDefined Jacobian;
│ │ │ │ -
223 };
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
224
│ │ │ │ -
226 std::size_t size () const;
│ │ │ │ -
228 std::size_t order () const;
│ │ │ │ -
229
│ │ │ │ - │ │ │ │ -
232 std::vector<Traits::RangeType>& out) const;
│ │ │ │ -
233
│ │ │ │ - │ │ │ │ -
236 std::vector<Traits::Jacobian>& out) const;
│ │ │ │ -
237
│ │ │ │ -
243 void partial(const std::array<unsigned int,Traits::dimDomain>& order,
│ │ │ │ -
244 const typename Traits::DomainType& in,
│ │ │ │ -
245 std::vector<typename Traits::RangeType>& out) const;
│ │ │ │ -
246 };
│ │ │ │ +
42 static void release( Object *object ) { delete object; }
│ │ │ │ +
43 };
│ │ │ │
│ │ │ │ -
247
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
250 {
│ │ │ │ -
252
│ │ │ │ - │ │ │ │ -
256
│ │ │ │ -
258
│ │ │ │ -
267 template<typename F, typename C>
│ │ │ │ -
268 void interpolate (const F& f, std::vector<C>& out) const;
│ │ │ │ -
269 };
│ │ │ │ -
│ │ │ │ -
270
│ │ │ │ -
272
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
278 {
│ │ │ │ -
280 std::size_t size() const;
│ │ │ │ -
281
│ │ │ │ -
283 const LocalKey& localKey(std::size_t i) const;
│ │ │ │ -
284 };
│ │ │ │ -
│ │ │ │ -
285}
│ │ │ │ -
286#endif // DUNE_LOCALFUNCTIONS_INTERFACE_HH
│ │ │ │ - │ │ │ │ +
44
│ │ │ │ +
45}
│ │ │ │ +
46
│ │ │ │ +
47#endif // DUNE_LAGRANGECOEFFICIENTS_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Interface for global-valued finite elements.
Definition interface.hh:26
│ │ │ │ -
GeometryType type() const
Extract geometry type of this finite element.
│ │ │ │ -
const Traits::Basis & basis() const
Extract basis of this finite element.
│ │ │ │ -
const Traits::Coefficients & coefficients() const
Extract coefficients of this finite element.
│ │ │ │ -
const Traits::Interpolation & interpolation() const
Extract interpolation of this finite element.
│ │ │ │ -
FiniteElementInterface(const FiniteElementInterface &)
Finite elements are CopyConstructible.
│ │ │ │ -
FiniteElementInterface(...)
Construct a finite element.
│ │ │ │ -
types of component objects
Definition interface.hh:35
│ │ │ │ -
ImplementationDefined Basis
type of the Basis
Definition interface.hh:42
│ │ │ │ -
ImplementationDefined Coefficients
type of the Coefficients
Definition interface.hh:49
│ │ │ │ -
ImplementationDefined Interpolation
type of the Interpolation
Definition interface.hh:56
│ │ │ │ -
Factory interface for global-valued finite elements.
Definition interface.hh:116
│ │ │ │ -
const FiniteElement make(const VertexOrder &,...)
create a finite element from a vertex ordering
│ │ │ │ -
const FiniteElement make(...)
create a finite element
│ │ │ │ -
const FiniteElement make(const GeometryType &,...)
create a finite element from a geometry type
│ │ │ │ -
FiniteElementFactoryInterface(...)
Construct a finite element factory.
│ │ │ │ -
ImplementationDefined FiniteElement
Type of the finite element.
Definition interface.hh:126
│ │ │ │ -
const FiniteElement make(const Geometry &, const VertexOrder &,...)
create a finite element from a geometry and a vertex ordering
│ │ │ │ -
const FiniteElement make(const Geometry &,...)
create a finite element from a geometry
│ │ │ │ -
Interface for global-valued shape functions.
Definition interface.hh:176
│ │ │ │ -
void partial(const std::array< unsigned int, Traits::dimDomain > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of any order of all shape functions.
│ │ │ │ -
void evaluateFunction(const Traits::DomainType &in, std::vector< Traits::RangeType > &out) const
Evaluate all shape functions at given position.
│ │ │ │ -
std::size_t order() const
Polynomial order of the shape functions for quadrature.
│ │ │ │ -
void evaluateJacobian(const Traits::DomainType &in, std::vector< Traits::Jacobian > &out) const
Evaluate Jacobian of all shape functions at given position.
│ │ │ │ -
std::size_t size() const
Number of shape functions.
│ │ │ │ -
types of domain and range
Definition interface.hh:188
│ │ │ │ -
static constexpr int dimRange
dimension of the range
Definition interface.hh:210
│ │ │ │ -
ImplementationDefined Jacobian
Jacobian properties.
Definition interface.hh:222
│ │ │ │ -
ImplementationDefined DomainType
Type used for coordinate vectors in the domain.
Definition interface.hh:199
│ │ │ │ -
ImplementationDefined RangeFieldType
Field type of the range.
Definition interface.hh:207
│ │ │ │ -
ImplementationDefined DomainFieldType
Field type of the domain.
Definition interface.hh:193
│ │ │ │ -
ImplementationDefined RangeType
Type used for range values.
Definition interface.hh:213
│ │ │ │ -
static constexpr int dimDomain
dimension of the domain
Definition interface.hh:196
│ │ │ │ -
Interface for global-valued interpolation.
Definition interface.hh:250
│ │ │ │ -
BasisInterface::Traits Traits
Export basis traits.
Definition interface.hh:255
│ │ │ │ -
void interpolate(const F &f, std::vector< C > &out) const
Determine coefficients interpolating a given function.
│ │ │ │ -
Interface for global-valued coefficients.
Definition interface.hh:278
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
│ │ │ │ -
std::size_t size() const
number of coefficients
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,292 +7,82 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -interface.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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 │ │ │ │ │ - 6#ifndef DUNE_LOCALFUNCTIONS_INTERFACE_HH │ │ │ │ │ - 7#define DUNE_LOCALFUNCTIONS_INTERFACE_HH │ │ │ │ │ - 8 │ │ │ │ │ - 9#ifndef HEADERCHECK │ │ │ │ │ - 10#error This header exists for documentation purposes only and should never │ │ │ │ │ -be included directly. │ │ │ │ │ - 11#endif │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ + 5#ifndef DUNE_LAGRANGECOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_LAGRANGECOEFFICIENTS_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ 16 │ │ │ │ │ - 17 │ │ │ │ │ - 18#include │ │ │ │ │ + 17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ 19 │ │ │ │ │ - 20#include │ │ │ │ │ - 21 │ │ │ │ │ - 22namespace Dune { │ │ │ │ │ - 23 │ │ │ │ │ -25 class FiniteElementInterface │ │ │ │ │ - 26 { │ │ │ │ │ - 27 struct ImplementationDefined; │ │ │ │ │ - 28 │ │ │ │ │ - 29 public: │ │ │ │ │ - 31 │ │ │ │ │ -34 struct Traits │ │ │ │ │ - 35 { │ │ │ │ │ - 37 │ │ │ │ │ -42 typedef ImplementationDefined Basis; │ │ │ │ │ + 20 template< template class LP, │ │ │ │ │ + 21 unsigned int dim, class F> │ │ │ │ │ +22 struct LagrangeCoefficientsFactory │ │ │ │ │ + 23 { │ │ │ │ │ +24 static const unsigned int dimension = dim; │ │ │ │ │ +25 const typedef LP 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(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 } │ │ │ │ │ +42 static void release( Object *object ) { delete object; } │ │ │ │ │ + 43 }; │ │ │ │ │ 44 │ │ │ │ │ -49 typedef ImplementationDefined Coefficients; │ │ │ │ │ - 51 │ │ │ │ │ -56 typedef ImplementationDefined Interpolation; │ │ │ │ │ - 57 }; │ │ │ │ │ - 58 │ │ │ │ │ - 60 │ │ │ │ │ -67 FiniteElementInterface(...); │ │ │ │ │ -69 FiniteElementInterface(const FiniteElementInterface&); │ │ │ │ │ - 70 │ │ │ │ │ - 72 │ │ │ │ │ -76 const Traits::Basis& basis() const; │ │ │ │ │ - 78 │ │ │ │ │ -82 const Traits::Coefficients& coefficients() const; │ │ │ │ │ - 84 │ │ │ │ │ -88 const Traits::Interpolation& interpolation() const; │ │ │ │ │ -90 GeometryType type() const; │ │ │ │ │ - 91 }; │ │ │ │ │ - 92 │ │ │ │ │ - 94 │ │ │ │ │ - 114 template │ │ │ │ │ -115 class FiniteElementFactoryInterface │ │ │ │ │ - 116 { │ │ │ │ │ - 117 struct ImplementationDefined; │ │ │ │ │ - 118 │ │ │ │ │ - 119 public: │ │ │ │ │ - 121 │ │ │ │ │ -126 typedef ImplementationDefined FiniteElement; │ │ │ │ │ - 127 │ │ │ │ │ - 129 │ │ │ │ │ -132 FiniteElementFactoryInterface(...); │ │ │ │ │ - 133 │ │ │ │ │ - 154 │ │ │ │ │ -156 const FiniteElement make(const Geometry&, const VertexOrder&, ...); │ │ │ │ │ -158 const FiniteElement make(const Geometry&, ...); │ │ │ │ │ -160 const FiniteElement make(const VertexOrder&, ...); │ │ │ │ │ - 162 │ │ │ │ │ -166 const FiniteElement make(const GeometryType&, ...); │ │ │ │ │ -168 const FiniteElement make(...); │ │ │ │ │ - 169 │ │ │ │ │ - 171 │ │ │ │ │ - 172 }; │ │ │ │ │ - 173 │ │ │ │ │ -175 class BasisInterface │ │ │ │ │ - 176 { │ │ │ │ │ - 177 struct ImplementationDefined; │ │ │ │ │ - 178 constexpr static int implementationDefined = 42; │ │ │ │ │ - 179 │ │ │ │ │ - 180 public: │ │ │ │ │ - 182 │ │ │ │ │ -187 struct Traits │ │ │ │ │ - 188 { │ │ │ │ │ - 191 │ │ │ │ │ -193 typedef ImplementationDefined DomainFieldType; │ │ │ │ │ - 194 │ │ │ │ │ -196 constexpr static int dimDomain = implementationDefined; │ │ │ │ │ - 197 │ │ │ │ │ -199 typedef ImplementationDefined DomainType; │ │ │ │ │ - 200 │ │ │ │ │ - 202 │ │ │ │ │ - 205 │ │ │ │ │ -207 typedef ImplementationDefined RangeFieldType; │ │ │ │ │ - 208 │ │ │ │ │ -210 constexpr static int dimRange = implementationDefined; │ │ │ │ │ - 211 │ │ │ │ │ -213 typedef ImplementationDefined RangeType; │ │ │ │ │ - 214 │ │ │ │ │ - 216 │ │ │ │ │ - 218 │ │ │ │ │ -222 typedef ImplementationDefined Jacobian; │ │ │ │ │ - 223 }; │ │ │ │ │ - 224 │ │ │ │ │ -226 std::size_t size () const; │ │ │ │ │ -228 std::size_t order () const; │ │ │ │ │ - 229 │ │ │ │ │ -231 void evaluateFunction(const Traits::DomainType& in, │ │ │ │ │ - 232 std::vector& out) const; │ │ │ │ │ - 233 │ │ │ │ │ -235 void evaluateJacobian(const Traits::DomainType& in, │ │ │ │ │ - 236 std::vector& out) const; │ │ │ │ │ - 237 │ │ │ │ │ -243 void partial(const std::array& order, │ │ │ │ │ - 244 const typename Traits::DomainType& in, │ │ │ │ │ - 245 std::vector& out) const; │ │ │ │ │ - 246 }; │ │ │ │ │ - 247 │ │ │ │ │ -249 struct InterpolationInterface │ │ │ │ │ - 250 { │ │ │ │ │ - 252 │ │ │ │ │ -255 typedef BasisInterface::Traits Traits; │ │ │ │ │ - 256 │ │ │ │ │ - 258 │ │ │ │ │ - 267 template │ │ │ │ │ -268 void interpolate (const F& f, std::vector& out) const; │ │ │ │ │ - 269 }; │ │ │ │ │ - 270 │ │ │ │ │ - 272 │ │ │ │ │ -277 struct CoefficientsInterface │ │ │ │ │ - 278 { │ │ │ │ │ -280 std::size_t size() const; │ │ │ │ │ - 281 │ │ │ │ │ -283 const LocalKey& localKey(std::size_t i) const; │ │ │ │ │ - 284 }; │ │ │ │ │ - 285} │ │ │ │ │ - 286#endif // DUNE_LOCALFUNCTIONS_INTERFACE_HH │ │ │ │ │ + 45} │ │ │ │ │ + 46 │ │ │ │ │ + 47#endif // DUNE_LAGRANGECOEFFICIENTS_HH │ │ │ │ │ localkey.hh │ │ │ │ │ +field.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::FiniteElementInterface │ │ │ │ │ -Interface for global-valued finite elements. │ │ │ │ │ -Definition interface.hh:26 │ │ │ │ │ -Dune::FiniteElementInterface::type │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -Extract geometry type of this finite element. │ │ │ │ │ -Dune::FiniteElementInterface::basis │ │ │ │ │ -const Traits::Basis & basis() const │ │ │ │ │ -Extract basis of this finite element. │ │ │ │ │ -Dune::FiniteElementInterface::coefficients │ │ │ │ │ -const Traits::Coefficients & coefficients() const │ │ │ │ │ -Extract coefficients of this finite element. │ │ │ │ │ -Dune::FiniteElementInterface::interpolation │ │ │ │ │ -const Traits::Interpolation & interpolation() const │ │ │ │ │ -Extract interpolation of this finite element. │ │ │ │ │ -Dune::FiniteElementInterface::FiniteElementInterface │ │ │ │ │ -FiniteElementInterface(const FiniteElementInterface &) │ │ │ │ │ -Finite elements are CopyConstructible. │ │ │ │ │ -Dune::FiniteElementInterface::FiniteElementInterface │ │ │ │ │ -FiniteElementInterface(...) │ │ │ │ │ -Construct a finite element. │ │ │ │ │ -Dune::FiniteElementInterface::Traits │ │ │ │ │ -types of component objects │ │ │ │ │ -Definition interface.hh:35 │ │ │ │ │ -Dune::FiniteElementInterface::Traits::Basis │ │ │ │ │ -ImplementationDefined Basis │ │ │ │ │ -type of the Basis │ │ │ │ │ -Definition interface.hh:42 │ │ │ │ │ -Dune::FiniteElementInterface::Traits::Coefficients │ │ │ │ │ -ImplementationDefined Coefficients │ │ │ │ │ -type of the Coefficients │ │ │ │ │ -Definition interface.hh:49 │ │ │ │ │ -Dune::FiniteElementInterface::Traits::Interpolation │ │ │ │ │ -ImplementationDefined Interpolation │ │ │ │ │ -type of the Interpolation │ │ │ │ │ -Definition interface.hh:56 │ │ │ │ │ -Dune::FiniteElementFactoryInterface │ │ │ │ │ -Factory interface for global-valued finite elements. │ │ │ │ │ -Definition interface.hh:116 │ │ │ │ │ -Dune::FiniteElementFactoryInterface::make │ │ │ │ │ -const FiniteElement make(const VertexOrder &,...) │ │ │ │ │ -create a finite element from a vertex ordering │ │ │ │ │ -Dune::FiniteElementFactoryInterface::make │ │ │ │ │ -const FiniteElement make(...) │ │ │ │ │ -create a finite element │ │ │ │ │ -Dune::FiniteElementFactoryInterface::make │ │ │ │ │ -const FiniteElement make(const GeometryType &,...) │ │ │ │ │ -create a finite element from a geometry type │ │ │ │ │ -Dune::FiniteElementFactoryInterface::FiniteElementFactoryInterface │ │ │ │ │ -FiniteElementFactoryInterface(...) │ │ │ │ │ -Construct a finite element factory. │ │ │ │ │ -Dune::FiniteElementFactoryInterface::FiniteElement │ │ │ │ │ -ImplementationDefined FiniteElement │ │ │ │ │ -Type of the finite element. │ │ │ │ │ -Definition interface.hh:126 │ │ │ │ │ -Dune::FiniteElementFactoryInterface::make │ │ │ │ │ -const FiniteElement make(const Geometry &, const VertexOrder &,...) │ │ │ │ │ -create a finite element from a geometry and a vertex ordering │ │ │ │ │ -Dune::FiniteElementFactoryInterface::make │ │ │ │ │ -const FiniteElement make(const Geometry &,...) │ │ │ │ │ -create a finite element from a geometry │ │ │ │ │ -Dune::BasisInterface │ │ │ │ │ -Interface for global-valued shape functions. │ │ │ │ │ -Definition interface.hh:176 │ │ │ │ │ -Dune::BasisInterface::partial │ │ │ │ │ -void partial(const std::array< unsigned int, Traits::dimDomain > &order, const │ │ │ │ │ -typename Traits::DomainType &in, std::vector< typename Traits::RangeType > │ │ │ │ │ -&out) const │ │ │ │ │ -Evaluate partial derivatives of any order of all shape functions. │ │ │ │ │ -Dune::BasisInterface::evaluateFunction │ │ │ │ │ -void evaluateFunction(const Traits::DomainType &in, std::vector< Traits:: │ │ │ │ │ -RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions at given position. │ │ │ │ │ -Dune::BasisInterface::order │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -Polynomial order of the shape functions for quadrature. │ │ │ │ │ -Dune::BasisInterface::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const Traits::DomainType &in, std::vector< Traits:: │ │ │ │ │ -Jacobian > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions at given position. │ │ │ │ │ -Dune::BasisInterface::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -Number of shape functions. │ │ │ │ │ -Dune::BasisInterface::Traits │ │ │ │ │ -types of domain and range │ │ │ │ │ -Definition interface.hh:188 │ │ │ │ │ -Dune::BasisInterface::Traits::dimRange │ │ │ │ │ -static constexpr int dimRange │ │ │ │ │ -dimension of the range │ │ │ │ │ -Definition interface.hh:210 │ │ │ │ │ -Dune::BasisInterface::Traits::Jacobian │ │ │ │ │ -ImplementationDefined Jacobian │ │ │ │ │ -Jacobian properties. │ │ │ │ │ -Definition interface.hh:222 │ │ │ │ │ -Dune::BasisInterface::Traits::DomainType │ │ │ │ │ -ImplementationDefined DomainType │ │ │ │ │ -Type used for coordinate vectors in the domain. │ │ │ │ │ -Definition interface.hh:199 │ │ │ │ │ -Dune::BasisInterface::Traits::RangeFieldType │ │ │ │ │ -ImplementationDefined RangeFieldType │ │ │ │ │ -Field type of the range. │ │ │ │ │ -Definition interface.hh:207 │ │ │ │ │ -Dune::BasisInterface::Traits::DomainFieldType │ │ │ │ │ -ImplementationDefined DomainFieldType │ │ │ │ │ -Field type of the domain. │ │ │ │ │ -Definition interface.hh:193 │ │ │ │ │ -Dune::BasisInterface::Traits::RangeType │ │ │ │ │ -ImplementationDefined RangeType │ │ │ │ │ -Type used for range values. │ │ │ │ │ -Definition interface.hh:213 │ │ │ │ │ -Dune::BasisInterface::Traits::dimDomain │ │ │ │ │ -static constexpr int dimDomain │ │ │ │ │ -dimension of the domain │ │ │ │ │ -Definition interface.hh:196 │ │ │ │ │ -Dune::InterpolationInterface │ │ │ │ │ -Interface for global-valued interpolation. │ │ │ │ │ -Definition interface.hh:250 │ │ │ │ │ -Dune::InterpolationInterface::Traits │ │ │ │ │ -BasisInterface::Traits Traits │ │ │ │ │ -Export basis traits. │ │ │ │ │ -Definition interface.hh:255 │ │ │ │ │ -Dune::InterpolationInterface::interpolate │ │ │ │ │ -void interpolate(const F &f, std::vector< C > &out) const │ │ │ │ │ -Determine coefficients interpolating a given function. │ │ │ │ │ -Dune::CoefficientsInterface │ │ │ │ │ -Interface for global-valued coefficients. │ │ │ │ │ -Definition interface.hh:278 │ │ │ │ │ -Dune::CoefficientsInterface::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Dune::CoefficientsInterface::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ +Dune::LagrangeCoefficientsFactory │ │ │ │ │ +Definition lagrangecoefficients.hh:23 │ │ │ │ │ +Dune::LagrangeCoefficientsFactory::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition lagrangecoefficients.hh:24 │ │ │ │ │ +Dune::LagrangeCoefficientsFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition lagrangecoefficients.hh:42 │ │ │ │ │ +Dune::LagrangeCoefficientsFactory::Object │ │ │ │ │ +const typedef LP< F, dim > Object │ │ │ │ │ +Definition lagrangecoefficients.hh:25 │ │ │ │ │ +Dune::LagrangeCoefficientsFactory::create │ │ │ │ │ +static Object * create(const Key &order) │ │ │ │ │ +Definition lagrangecoefficients.hh:29 │ │ │ │ │ +Dune::LagrangeCoefficientsFactory::Key │ │ │ │ │ +std::size_t Key │ │ │ │ │ +Definition lagrangecoefficients.hh:26 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00413.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localfiniteelementtraits.hh File Reference │ │ │ │ +dune-localfunctions: prismp1.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,37 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
localfiniteelementtraits.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
prismp1.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

struct  Dune::LocalFiniteElementTraits< LB, LC, LI >
 traits helper struct 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 {} │ │ │ │ │ @@ -6,21 +6,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -localfiniteelementtraits.hh File Reference │ │ │ │ │ + * lagrange │ │ │ │ │ +Namespaces | Typedefs │ │ │ │ │ +prismp1.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -struct  Dune::LocalFiniteElementTraits<_LB,_LC,_LI_> │ │ │ │ │ -  traits helper struct More... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +using Dune::PrismP1LocalFiniteElement = LagrangePrismLocalFiniteElement< D, R, │ │ │ │ │ + 1 > │ │ │ │ │ +  First-order Lagrangian finite element on a prism. │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00413_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localfiniteelementtraits.hh Source File │ │ │ │ +dune-localfunctions: prismp1.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,50 +70,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
localfiniteelementtraits.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_LOCALFINITEELEMENTTRAITS_HH
│ │ │ │ -
6#define DUNE_LOCALFINITEELEMENTTRAITS_HH
│ │ │ │ +
5#ifndef DUNE_P13DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_P13DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8namespace Dune {
│ │ │ │ + │ │ │ │
9
│ │ │ │ -
11 template<class LB, class LC, class LI>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
13 {
│ │ │ │ -
16 typedef LB LocalBasisType;
│ │ │ │ -
17
│ │ │ │ - │ │ │ │ -
21
│ │ │ │ - │ │ │ │ -
25 };
│ │ │ │ -
│ │ │ │ -
26
│ │ │ │ -
27}
│ │ │ │ -
28
│ │ │ │ -
29#endif
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,50 +7,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_LOCALFINITEELEMENTTRAITS_HH │ │ │ │ │ - 6#define DUNE_LOCALFINITEELEMENTTRAITS_HH │ │ │ │ │ + 5#ifndef DUNE_P13DLOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_P13DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8namespace Dune { │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 11 template │ │ │ │ │ -12 struct LocalFiniteElementTraits │ │ │ │ │ - 13 { │ │ │ │ │ -16 typedef LB LocalBasisType; │ │ │ │ │ - 17 │ │ │ │ │ -20 typedef LC LocalCoefficientsType; │ │ │ │ │ - 21 │ │ │ │ │ -24 typedef LI LocalInterpolationType; │ │ │ │ │ - 25 }; │ │ │ │ │ - 26 │ │ │ │ │ - 27} │ │ │ │ │ - 28 │ │ │ │ │ - 29#endif │ │ │ │ │ + 10#warning This header is deprecated │ │ │ │ │ + 11 │ │ │ │ │ + 12namespace Dune │ │ │ │ │ + 13{ │ │ │ │ │ + 14 │ │ │ │ │ + 19 template │ │ │ │ │ +20 using PrismP1LocalFiniteElement │ │ │ │ │ + 21 [[deprecated("use LagrangePrismLocalFiniteElement instead")]] │ │ │ │ │ + 22 = LagrangePrismLocalFiniteElement; │ │ │ │ │ + 23 │ │ │ │ │ + 24} │ │ │ │ │ + 25 │ │ │ │ │ + 26#endif │ │ │ │ │ +lagrangeprism.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::LagrangePrismLocalFiniteElement │ │ │ │ │ +Lagrange finite element for 3d prisms with arbitrary compile-time polynomial │ │ │ │ │ +order. │ │ │ │ │ +Definition lagrangeprism.hh:652 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00419.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: virtualwrappers.hh File Reference │ │ │ │ +dune-localfunctions: emptypoints.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,48 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
virtualwrappers.hh File Reference
│ │ │ │ +
emptypoints.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ -#include <dune/localfunctions/common/virtualinterface.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::LocalFiniteElementCloneFactoryHelper< Imp, IsInterface >
class  Dune::LagrangePoint< F, dim >
 
struct  Dune::LocalFiniteElementCloneFactory< Imp >
 
class  Dune::LocalBasisVirtualImp< T, Imp >
 class for wrapping a basis using the virtual interface More...
 
class  Dune::LocalInterpolationVirtualImp< DomainType, RangeType, Imp >
 class for wrapping a local interpolation using the virtual interface More...
 
class  Dune::LocalCoefficientsVirtualImp< Imp >
 class for wrapping local coefficients using the virtual interface More...
 
class  Dune::LocalFiniteElementVirtualImp< Imp >
 class for wrapping a finite element using the virtual interface More...
class  Dune::EmptyPointSet< F, dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,41 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ + * lagrange │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -virtualwrappers.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +emptypoints.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  Dune::LocalFiniteElementCloneFactoryHelper<_Imp,_IsInterface_> │ │ │ │ │ +class  Dune::LagrangePoint<_F,_dim_> │ │ │ │ │   │ │ │ │ │ -struct  Dune::LocalFiniteElementCloneFactory<_Imp_> │ │ │ │ │ -  │ │ │ │ │ - class  Dune::LocalBasisVirtualImp<_T,_Imp_> │ │ │ │ │ -  class for wrapping a basis using the virtual interface More... │ │ │ │ │ -  │ │ │ │ │ - class  Dune::LocalInterpolationVirtualImp<_DomainType,_RangeType,_Imp_> │ │ │ │ │ -  class for wrapping a local interpolation using the virtual interface │ │ │ │ │ - More... │ │ │ │ │ -  │ │ │ │ │ - class  Dune::LocalCoefficientsVirtualImp<_Imp_> │ │ │ │ │ -  class for wrapping local coefficients using the virtual interface │ │ │ │ │ - More... │ │ │ │ │ -  │ │ │ │ │ - class  Dune::LocalFiniteElementVirtualImp<_Imp_> │ │ │ │ │ -  class for wrapping a finite element using the virtual interface │ │ │ │ │ - More... │ │ │ │ │ +class  Dune::EmptyPointSet<_F,_dim_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00419_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: virtualwrappers.hh Source File │ │ │ │ +dune-localfunctions: emptypoints.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,410 +70,185 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
virtualwrappers.hh
│ │ │ │ +
emptypoints.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_COMMON_VIRTUALWRAPPERS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_COMMON_VIRTUALWRAPPERS_HH
│ │ │ │ +
5#ifndef DUNE_LAGRANGE_EMPTYPOINTS_HH
│ │ │ │ +
6#define DUNE_LAGRANGE_EMPTYPOINTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ +
8#include <vector>
│ │ │ │
9
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17 // forward declaration needed by friend declarations
│ │ │ │ -
18 template<class Imp>
│ │ │ │ -
19 class LocalFiniteElementVirtualImp;
│ │ │ │ +
10#include <dune/common/fvector.hh>
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
16 template< class F, unsigned int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
18 {
│ │ │ │ + │ │ │ │
20
│ │ │ │ -
21 // default clone method is the copy constructor
│ │ │ │ -
22 template<class Imp, bool IsInterface>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
│ │ │ │ -
25 static Imp* clone(const Imp& imp)
│ │ │ │ -
26 {
│ │ │ │ -
27 return new Imp(imp);
│ │ │ │ -
28 }
│ │ │ │ -
│ │ │ │ -
29 };
│ │ │ │ -
│ │ │ │ +
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 // if FE derives from virtual interface the clone method is used
│ │ │ │ -
32 template<class Imp>
│ │ │ │ -
33 struct LocalFiniteElementCloneFactoryHelper<Imp, true>
│ │ │ │ -
34 {
│ │ │ │ -
35 static Imp* clone(const Imp& imp)
│ │ │ │ -
36 {
│ │ │ │ -
37 return imp.clone();
│ │ │ │ -
38 }
│ │ │ │ -
39 };
│ │ │ │ -
40
│ │ │ │ -
41 // factory template to clone and create an objects
│ │ │ │ -
42 template<class Imp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
44 {
│ │ │ │ - │ │ │ │ -
46
│ │ │ │ -
│ │ │ │ -
47 static Imp* clone(const Imp& imp)
│ │ │ │ -
48 {
│ │ │ │ - │ │ │ │ -
50 }
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
│ │ │ │ -
52 static Imp* create()
│ │ │ │ -
53 {
│ │ │ │ -
54 return new Imp;
│ │ │ │ -
55 }
│ │ │ │ +
│ │ │ │ +
31 const Vector &point () const
│ │ │ │ +
32 {
│ │ │ │ +
33 return point_;
│ │ │ │ +
34 }
│ │ │ │ +
│ │ │ │ +
35
│ │ │ │ +
│ │ │ │ +
36 const LocalKey &localKey () const
│ │ │ │ +
37 {
│ │ │ │ +
38 return localKey_;
│ │ │ │ +
39 }
│ │ │ │
│ │ │ │ -
56 };
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ +
40
│ │ │ │ +
│ │ │ │ +
41 const Field weight () const
│ │ │ │ +
42 {
│ │ │ │ +
43 return weight_;
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
49 };
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
51 // EmptyPointSet
│ │ │ │ +
52 // --------------
│ │ │ │ +
53
│ │ │ │ +
54 template< class F, unsigned int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
56 {
│ │ │ │ + │ │ │ │
58
│ │ │ │ -
59
│ │ │ │ -
60 // -----------------------------------------------------------------
│ │ │ │ -
61 // Basis
│ │ │ │ -
62 // -----------------------------------------------------------------
│ │ │ │ +
59 public:
│ │ │ │ +
60 typedef F Field;
│ │ │ │ +
61
│ │ │ │ +
62 static const unsigned int dimension = dim;
│ │ │ │
63
│ │ │ │ -
64
│ │ │ │ + │ │ │ │
65
│ │ │ │ -
72 template<class T , class Imp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
75 {
│ │ │ │ -
76 template<class FEImp>
│ │ │ │ - │ │ │ │ -
78
│ │ │ │ -
79 protected:
│ │ │ │ -
80
│ │ │ │ -
│ │ │ │ -
82 LocalBasisVirtualImp( const Imp &imp )
│ │ │ │ -
83 : impl_(imp)
│ │ │ │ -
84 {}
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
86 public:
│ │ │ │ -
87 using Traits = T;
│ │ │ │ -
88
│ │ │ │ +
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 unsigned int size () const
│ │ │ │ +
90 const LocalKey &localKey ( const unsigned int i ) const
│ │ │ │
91 {
│ │ │ │ -
92 return impl_.size();
│ │ │ │ +
92 return (*this)[ i ].localKey();
│ │ │ │
93 }
│ │ │ │
│ │ │ │
94
│ │ │ │ -
│ │ │ │ -
96 unsigned int order () const
│ │ │ │ -
97 {
│ │ │ │ -
98 return impl_.order();
│ │ │ │ -
99 }
│ │ │ │ -
│ │ │ │ -
100
│ │ │ │ -
│ │ │ │ -
102 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
103 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
104 {
│ │ │ │ -
105 impl_.evaluateFunction(in,out);
│ │ │ │ -
106 }
│ │ │ │ -
│ │ │ │ -
107
│ │ │ │ -
│ │ │ │ -
109 inline void evaluateJacobian(
│ │ │ │ -
110 const typename Traits::DomainType& in,
│ │ │ │ -
111 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
112 {
│ │ │ │ -
113 impl_.evaluateJacobian(in,out);
│ │ │ │ -
114 }
│ │ │ │ -
│ │ │ │ -
115
│ │ │ │ -
│ │ │ │ -
121 void partial(const std::array<unsigned int,Traits::dimDomain>& order,
│ │ │ │ -
122 const typename Traits::DomainType& in,
│ │ │ │ -
123 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
124 {
│ │ │ │ -
125 impl_.partial(order,in,out);
│ │ │ │ -
126 }
│ │ │ │ -
│ │ │ │ -
127
│ │ │ │ -
128 protected:
│ │ │ │ -
129 const Imp& impl_;
│ │ │ │ -
130 };
│ │ │ │ -
│ │ │ │ -
131
│ │ │ │ -
132
│ │ │ │ -
133
│ │ │ │ -
134 // -----------------------------------------------------------------
│ │ │ │ -
135 // Interpolation
│ │ │ │ -
136 // -----------------------------------------------------------------
│ │ │ │ -
137
│ │ │ │ -
146 template<class DomainType, class RangeType, class Imp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
148 : public LocalInterpolationVirtualInterface< DomainType, RangeType >
│ │ │ │ -
149 {
│ │ │ │ -
150 template<class FEImp>
│ │ │ │ - │ │ │ │ -
152
│ │ │ │ - │ │ │ │ -
154
│ │ │ │ -
155 protected:
│ │ │ │ -
156
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
159 : impl_(imp) {}
│ │ │ │ -
│ │ │ │ -
160
│ │ │ │ -
161 public:
│ │ │ │ -
162
│ │ │ │ - │ │ │ │ -
164
│ │ │ │ - │ │ │ │ -
166
│ │ │ │ -
│ │ │ │ -
168 virtual void interpolate (const FunctionType& f, std::vector<CoefficientType>& out) const
│ │ │ │ -
169 {
│ │ │ │ -
170 impl_.interpolate(f,out);
│ │ │ │ -
171 }
│ │ │ │ -
│ │ │ │ -
172
│ │ │ │ -
173 protected:
│ │ │ │ -
174 const Imp& impl_;
│ │ │ │ -
175
│ │ │ │ -
176 };
│ │ │ │ -
│ │ │ │ -
177
│ │ │ │ -
178
│ │ │ │ -
179
│ │ │ │ -
180 // -----------------------------------------------------------------
│ │ │ │ -
181 // Coefficients
│ │ │ │ -
182 // -----------------------------------------------------------------
│ │ │ │ -
183
│ │ │ │ -
190 template<class Imp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
193 {
│ │ │ │ -
194 template<class FEImp>
│ │ │ │ - │ │ │ │ -
196
│ │ │ │ -
197 protected:
│ │ │ │ -
198
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
201 : impl_(imp)
│ │ │ │ -
202 {}
│ │ │ │ -
│ │ │ │ -
203
│ │ │ │ -
204 public:
│ │ │ │ -
205
│ │ │ │ -
│ │ │ │ -
207 std::size_t size () const
│ │ │ │ -
208 {
│ │ │ │ -
209 return impl_.size();
│ │ │ │ -
210 }
│ │ │ │ -
│ │ │ │ -
211
│ │ │ │ -
│ │ │ │ -
213 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
214 {
│ │ │ │ -
215 return impl_.localKey(i);
│ │ │ │ -
216 }
│ │ │ │ -
│ │ │ │ -
217
│ │ │ │ -
218 protected:
│ │ │ │ -
219 const Imp& impl_;
│ │ │ │ -
220
│ │ │ │ -
221 };
│ │ │ │ -
│ │ │ │ -
222
│ │ │ │ -
223
│ │ │ │ -
224
│ │ │ │ -
225 // -----------------------------------------------------------------
│ │ │ │ -
226 // Finite Element
│ │ │ │ -
227 // -----------------------------------------------------------------
│ │ │ │ -
228
│ │ │ │ -
237 template<class Imp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
239 : public LocalFiniteElementVirtualInterface<typename Imp::Traits::LocalBasisType::Traits>
│ │ │ │ -
240 {
│ │ │ │ -
241 using LocalBasisTraits = typename Imp::Traits::LocalBasisType::Traits;
│ │ │ │ - │ │ │ │ -
243
│ │ │ │ -
244 public:
│ │ │ │ -
245 typedef typename Interface::Traits Traits;
│ │ │ │ -
246
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
253 {}
│ │ │ │ -
│ │ │ │ -
254
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
257 : impl_(LocalFiniteElementCloneFactory<Imp>::create()),
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
261 {}
│ │ │ │ -
│ │ │ │ -
262
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
269 {}
│ │ │ │ -
│ │ │ │ -
270
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
272 {
│ │ │ │ -
273 delete impl_;
│ │ │ │ -
274 }
│ │ │ │ -
│ │ │ │ -
275
│ │ │ │ -
│ │ │ │ -
277 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
278 {
│ │ │ │ -
279 return localBasisImp_;
│ │ │ │ -
280 }
│ │ │ │ -
│ │ │ │ -
281
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
284 {
│ │ │ │ - │ │ │ │ -
286 }
│ │ │ │ -
│ │ │ │ -
287
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
290 {
│ │ │ │ - │ │ │ │ -
292 }
│ │ │ │ -
│ │ │ │ -
293
│ │ │ │ -
│ │ │ │ -
295 unsigned int size () const
│ │ │ │ -
296 {
│ │ │ │ -
297 return impl_->size();
│ │ │ │ -
298 }
│ │ │ │ -
│ │ │ │ -
299
│ │ │ │ -
│ │ │ │ -
301 const GeometryType type () const
│ │ │ │ -
302 {
│ │ │ │ -
303 return impl_->type();
│ │ │ │ -
304 }
│ │ │ │ -
│ │ │ │ -
305
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
312 {
│ │ │ │ -
313 return new LocalFiniteElementVirtualImp<Imp>(*this);
│ │ │ │ -
314 }
│ │ │ │ -
│ │ │ │ -
315
│ │ │ │ -
316 protected:
│ │ │ │ -
317 const Imp* impl_;
│ │ │ │ -
318
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
323 typename Imp::Traits::LocalInterpolationType> localInterpolationImp_;
│ │ │ │ -
324 };
│ │ │ │ -
│ │ │ │ -
325}
│ │ │ │ -
326#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
95 std::size_t order () const
│ │ │ │ +
96 {
│ │ │ │ +
97 return order_;
│ │ │ │ +
98 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
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
│ │ │ │
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
virtual base class for a local interpolation
Definition virtualinterface.hh:190
│ │ │ │ -
std::function< RangeType(DomainType)> FunctionType
type of function to interpolate
Definition virtualinterface.hh:194
│ │ │ │ -
RangeType::field_type CoefficientType
type of the coefficient vector in the interpolate method
Definition virtualinterface.hh:197
│ │ │ │ -
virtual base class for a local basis
Definition virtualinterface.hh:97
│ │ │ │ -
virtual base class for local coefficients
Definition virtualinterface.hh:259
│ │ │ │ -
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
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition virtualwrappers.hh:277
│ │ │ │ -
virtual LocalFiniteElementVirtualImp< Imp > * clone() const
clone this wrapper
Definition virtualwrappers.hh:311
│ │ │ │ -
const LocalInterpolationVirtualImp< typename LocalBasisTraits::DomainType, typename LocalBasisTraits::RangeType, typename Imp::Traits::LocalInterpolationType > localInterpolationImp_
Definition virtualwrappers.hh:323
│ │ │ │ -
LocalFiniteElementVirtualImp(const Imp &imp)
taking a LocalFiniteElementVirtualInterface implementation
Definition virtualwrappers.hh:248
│ │ │ │ -
Interface::Traits Traits
Definition virtualwrappers.hh:245
│ │ │ │ -
LocalFiniteElementVirtualImp()
Default constructor. Assumes that the implementation class is default constructible as well.
Definition virtualwrappers.hh:256
│ │ │ │ -
LocalFiniteElementVirtualImp(const LocalFiniteElementVirtualImp &other)
Copy contructor needed for deep copy.
Definition virtualwrappers.hh:264
│ │ │ │ -
~LocalFiniteElementVirtualImp()
Definition virtualwrappers.hh:271
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition virtualwrappers.hh:295
│ │ │ │ -
const GeometryType type() const
Definition virtualwrappers.hh:301
│ │ │ │ -
const Imp * impl_
Definition virtualwrappers.hh:317
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition virtualwrappers.hh:283
│ │ │ │ -
const LocalBasisVirtualImp< LocalBasisTraits, typename Imp::Traits::LocalBasisType > localBasisImp_
Definition virtualwrappers.hh:319
│ │ │ │ -
const LocalCoefficientsVirtualImp< typename Imp::Traits::LocalCoefficientsType > localCoefficientsImp_
Definition virtualwrappers.hh:320
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition virtualwrappers.hh:289
│ │ │ │ -
Definition virtualwrappers.hh:24
│ │ │ │ -
static Imp * clone(const Imp &imp)
Definition virtualwrappers.hh:25
│ │ │ │ -
Definition virtualwrappers.hh:44
│ │ │ │ -
static Imp * clone(const Imp &imp)
Definition virtualwrappers.hh:47
│ │ │ │ -
static Imp * create()
Definition virtualwrappers.hh:52
│ │ │ │ -
LocalFiniteElementVirtualInterface< typename Imp::Traits::LocalBasisType::Traits > Interface
Definition virtualwrappers.hh:45
│ │ │ │ -
class for wrapping a basis using the virtual interface
Definition virtualwrappers.hh:75
│ │ │ │ -
void partial(const std::array< unsigned int, Traits::dimDomain > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of any order of all shape functions.
Definition virtualwrappers.hh:121
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all basis function at given position.
Definition virtualwrappers.hh:102
│ │ │ │ -
const Imp & impl_
Definition virtualwrappers.hh:129
│ │ │ │ -
unsigned int size() const
Number of shape functions.
Definition virtualwrappers.hh:90
│ │ │ │ -
T Traits
Definition virtualwrappers.hh:87
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate jacobian of all shape functions at given position.
Definition virtualwrappers.hh:109
│ │ │ │ -
LocalBasisVirtualImp(const Imp &imp)
constructor taking an implementation of the interface
Definition virtualwrappers.hh:82
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition virtualwrappers.hh:96
│ │ │ │ -
class for wrapping a local interpolation using the virtual interface
Definition virtualwrappers.hh:149
│ │ │ │ -
virtual void interpolate(const FunctionType &f, std::vector< CoefficientType > &out) const
determine coefficients interpolating a given function
Definition virtualwrappers.hh:168
│ │ │ │ -
const Imp & impl_
Definition virtualwrappers.hh:174
│ │ │ │ -
Base::FunctionType FunctionType
Definition virtualwrappers.hh:163
│ │ │ │ -
LocalInterpolationVirtualImp(const Imp &imp)
constructor taking an implementation of the Dune::LocalInterpolationVirtualInterface
Definition virtualwrappers.hh:158
│ │ │ │ -
Base::CoefficientType CoefficientType
Definition virtualwrappers.hh:165
│ │ │ │ -
class for wrapping local coefficients using the virtual interface
Definition virtualwrappers.hh:193
│ │ │ │ -
LocalCoefficientsVirtualImp(const Imp &imp)
constructor taking an implementation of the Dune::LocalCoefficientsVirtualInterface
Definition virtualwrappers.hh:200
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition virtualwrappers.hh:213
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition virtualwrappers.hh:207
│ │ │ │ -
const Imp & impl_
Definition virtualwrappers.hh:219
│ │ │ │ - │ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,491 +7,205 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -virtualwrappers.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +emptypoints.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_COMMON_VIRTUALWRAPPERS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_COMMON_VIRTUALWRAPPERS_HH │ │ │ │ │ + 5#ifndef DUNE_LAGRANGE_EMPTYPOINTS_HH │ │ │ │ │ + 6#define DUNE_LAGRANGE_EMPTYPOINTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ + 10#include │ │ │ │ │ 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14namespace Dune │ │ │ │ │ - 15{ │ │ │ │ │ - 16 │ │ │ │ │ - 17 // forward declaration needed by friend declarations │ │ │ │ │ - 18 template │ │ │ │ │ - 19 class LocalFiniteElementVirtualImp; │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ + 16 template< class F, unsigned int dim > │ │ │ │ │ +17 class LagrangePoint │ │ │ │ │ + 18 { │ │ │ │ │ + 19 typedef LagrangePoint<_F,_dim_> This; │ │ │ │ │ 20 │ │ │ │ │ - 21 // default clone method is the copy constructor │ │ │ │ │ - 22 template │ │ │ │ │ -23 struct LocalFiniteElementCloneFactoryHelper │ │ │ │ │ - 24 { │ │ │ │ │ -25 static Imp* clone(const Imp& imp) │ │ │ │ │ - 26 { │ │ │ │ │ - 27 return new Imp(imp); │ │ │ │ │ - 28 } │ │ │ │ │ - 29 }; │ │ │ │ │ + 21 template< class, class > │ │ │ │ │ +22 friend class LagrangePointSetImpl; │ │ │ │ │ + 23 │ │ │ │ │ + 24 public: │ │ │ │ │ +25 static const int dimension = dim; │ │ │ │ │ + 26 │ │ │ │ │ +27 typedef F Field; │ │ │ │ │ + 28 │ │ │ │ │ +29 typedef FieldVector< Field, dimension > Vector; │ │ │ │ │ 30 │ │ │ │ │ - 31 // if FE derives from virtual interface the clone method is used │ │ │ │ │ - 32 template │ │ │ │ │ - 33 struct LocalFiniteElementCloneFactoryHelper │ │ │ │ │ - 34 { │ │ │ │ │ - 35 static Imp* clone(const Imp& imp) │ │ │ │ │ - 36 { │ │ │ │ │ - 37 return imp.clone(); │ │ │ │ │ - 38 } │ │ │ │ │ - 39 }; │ │ │ │ │ +31 const Vector &point () const │ │ │ │ │ + 32 { │ │ │ │ │ + 33 return point_; │ │ │ │ │ + 34 } │ │ │ │ │ + 35 │ │ │ │ │ +36 const LocalKey &localKey () const │ │ │ │ │ + 37 { │ │ │ │ │ + 38 return localKey_; │ │ │ │ │ + 39 } │ │ │ │ │ 40 │ │ │ │ │ - 41 // factory template to clone and create an objects │ │ │ │ │ - 42 template │ │ │ │ │ -43 struct LocalFiniteElementCloneFactory │ │ │ │ │ - 44 { │ │ │ │ │ -45 typedef LocalFiniteElementVirtualInterface Interface; │ │ │ │ │ - 46 │ │ │ │ │ -47 static Imp* clone(const Imp& imp) │ │ │ │ │ - 48 { │ │ │ │ │ - 49 return LocalFiniteElementCloneFactoryHelper::value>::clone(imp); │ │ │ │ │ - 50 } │ │ │ │ │ - 51 │ │ │ │ │ -52 static Imp* create() │ │ │ │ │ - 53 { │ │ │ │ │ - 54 return new Imp; │ │ │ │ │ - 55 } │ │ │ │ │ - 56 }; │ │ │ │ │ - 57 │ │ │ │ │ +41 const Field weight () const │ │ │ │ │ + 42 { │ │ │ │ │ + 43 return weight_; │ │ │ │ │ + 44 } │ │ │ │ │ + 45 │ │ │ │ │ +46 Vector point_ = {}; │ │ │ │ │ +47 LocalKey localKey_ = {}; │ │ │ │ │ +48 Field weight_ = {}; │ │ │ │ │ + 49 }; │ │ │ │ │ + 50 │ │ │ │ │ + 51 // EmptyPointSet │ │ │ │ │ + 52 // -------------- │ │ │ │ │ + 53 │ │ │ │ │ + 54 template< class F, unsigned int dim > │ │ │ │ │ +55 class EmptyPointSet │ │ │ │ │ + 56 { │ │ │ │ │ + 57 typedef EmptyPointSet<_F,_dim_> This; │ │ │ │ │ 58 │ │ │ │ │ - 59 │ │ │ │ │ - 60 // ----------------------------------------------------------------- │ │ │ │ │ - 61 // Basis │ │ │ │ │ - 62 // ----------------------------------------------------------------- │ │ │ │ │ + 59 public: │ │ │ │ │ +60 typedef F Field; │ │ │ │ │ + 61 │ │ │ │ │ +62 static const unsigned int dimension = dim; │ │ │ │ │ 63 │ │ │ │ │ - 64 │ │ │ │ │ +64 typedef Dune::LagrangePoint<_Field,_dimension_> LagrangePoint; │ │ │ │ │ 65 │ │ │ │ │ - 72 template │ │ │ │ │ -73 class LocalBasisVirtualImp │ │ │ │ │ - 74 : public LocalBasisVirtualInterface │ │ │ │ │ +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 template │ │ │ │ │ -77 friend class LocalFiniteElementVirtualImp; │ │ │ │ │ - 78 │ │ │ │ │ - 79 protected: │ │ │ │ │ - 80 │ │ │ │ │ -82 LocalBasisVirtualImp( const Imp &imp ) │ │ │ │ │ - 83 : impl_(imp) │ │ │ │ │ - 84 {} │ │ │ │ │ - 85 │ │ │ │ │ - 86 public: │ │ │ │ │ -87 using Traits = T; │ │ │ │ │ - 88 │ │ │ │ │ -90 unsigned int size () const │ │ │ │ │ + 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 impl_.size(); │ │ │ │ │ + 92 return (*this)[ i ].localKey(); │ │ │ │ │ 93 } │ │ │ │ │ 94 │ │ │ │ │ -96 unsigned int order () const │ │ │ │ │ - 97 { │ │ │ │ │ - 98 return impl_.order(); │ │ │ │ │ - 99 } │ │ │ │ │ - 100 │ │ │ │ │ -102 inline void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ - 103 std::vector& out) const │ │ │ │ │ - 104 { │ │ │ │ │ - 105 impl_.evaluateFunction(in,out); │ │ │ │ │ - 106 } │ │ │ │ │ - 107 │ │ │ │ │ -109 inline void evaluateJacobian( │ │ │ │ │ - 110 const typename Traits::DomainType& in, │ │ │ │ │ - 111 std::vector& out) const │ │ │ │ │ - 112 { │ │ │ │ │ - 113 impl_.evaluateJacobian(in,out); │ │ │ │ │ - 114 } │ │ │ │ │ - 115 │ │ │ │ │ -121 void partial(const std::array& order, │ │ │ │ │ - 122 const typename Traits::DomainType& in, │ │ │ │ │ - 123 std::vector& out) const │ │ │ │ │ - 124 { │ │ │ │ │ - 125 impl_.partial(order,in,out); │ │ │ │ │ - 126 } │ │ │ │ │ - 127 │ │ │ │ │ - 128 protected: │ │ │ │ │ -129 const Imp& impl_; │ │ │ │ │ - 130 }; │ │ │ │ │ - 131 │ │ │ │ │ - 132 │ │ │ │ │ - 133 │ │ │ │ │ - 134 // ----------------------------------------------------------------- │ │ │ │ │ - 135 // Interpolation │ │ │ │ │ - 136 // ----------------------------------------------------------------- │ │ │ │ │ - 137 │ │ │ │ │ - 146 template │ │ │ │ │ -147 class LocalInterpolationVirtualImp │ │ │ │ │ - 148 : public LocalInterpolationVirtualInterface< DomainType, RangeType > │ │ │ │ │ - 149 { │ │ │ │ │ - 150 template │ │ │ │ │ -151 friend class LocalFiniteElementVirtualImp; │ │ │ │ │ - 152 │ │ │ │ │ - 153 typedef LocalInterpolationVirtualInterface<_DomainType,_RangeType_> Base; │ │ │ │ │ - 154 │ │ │ │ │ - 155 protected: │ │ │ │ │ - 156 │ │ │ │ │ -158 LocalInterpolationVirtualImp( const Imp &imp) │ │ │ │ │ - 159 : impl_(imp) {} │ │ │ │ │ - 160 │ │ │ │ │ - 161 public: │ │ │ │ │ - 162 │ │ │ │ │ -163 typedef typename Base::FunctionType FunctionType; │ │ │ │ │ - 164 │ │ │ │ │ -165 typedef typename Base::CoefficientType CoefficientType; │ │ │ │ │ - 166 │ │ │ │ │ -168 virtual void interpolate (const FunctionType& f, std:: │ │ │ │ │ -vector& out) const │ │ │ │ │ - 169 { │ │ │ │ │ - 170 impl_.interpolate(f,out); │ │ │ │ │ - 171 } │ │ │ │ │ - 172 │ │ │ │ │ - 173 protected: │ │ │ │ │ -174 const Imp& impl_; │ │ │ │ │ - 175 │ │ │ │ │ - 176 }; │ │ │ │ │ - 177 │ │ │ │ │ - 178 │ │ │ │ │ - 179 │ │ │ │ │ - 180 // ----------------------------------------------------------------- │ │ │ │ │ - 181 // Coefficients │ │ │ │ │ - 182 // ----------------------------------------------------------------- │ │ │ │ │ - 183 │ │ │ │ │ - 190 template │ │ │ │ │ -191 class LocalCoefficientsVirtualImp │ │ │ │ │ - 192 : public LocalCoefficientsVirtualInterface │ │ │ │ │ - 193 { │ │ │ │ │ - 194 template │ │ │ │ │ -195 friend class LocalFiniteElementVirtualImp; │ │ │ │ │ - 196 │ │ │ │ │ - 197 protected: │ │ │ │ │ - 198 │ │ │ │ │ -200 LocalCoefficientsVirtualImp( const Imp &imp ) │ │ │ │ │ - 201 : impl_(imp) │ │ │ │ │ - 202 {} │ │ │ │ │ - 203 │ │ │ │ │ - 204 public: │ │ │ │ │ - 205 │ │ │ │ │ -207 std::size_t size () const │ │ │ │ │ - 208 { │ │ │ │ │ - 209 return impl_.size(); │ │ │ │ │ - 210 } │ │ │ │ │ - 211 │ │ │ │ │ -213 const LocalKey& localKey (std::size_t i) const │ │ │ │ │ - 214 { │ │ │ │ │ - 215 return impl_.localKey(i); │ │ │ │ │ - 216 } │ │ │ │ │ - 217 │ │ │ │ │ - 218 protected: │ │ │ │ │ -219 const Imp& impl_; │ │ │ │ │ - 220 │ │ │ │ │ - 221 }; │ │ │ │ │ - 222 │ │ │ │ │ - 223 │ │ │ │ │ - 224 │ │ │ │ │ - 225 // ----------------------------------------------------------------- │ │ │ │ │ - 226 // Finite Element │ │ │ │ │ - 227 // ----------------------------------------------------------------- │ │ │ │ │ - 228 │ │ │ │ │ - 237 template │ │ │ │ │ -238 class LocalFiniteElementVirtualImp │ │ │ │ │ - 239 : public LocalFiniteElementVirtualInterface │ │ │ │ │ - 240 { │ │ │ │ │ - 241 using LocalBasisTraits = typename Imp::Traits::LocalBasisType::Traits; │ │ │ │ │ - 242 using Interface = LocalFiniteElementVirtualInterface; │ │ │ │ │ - 243 │ │ │ │ │ - 244 public: │ │ │ │ │ -245 typedef typename Interface::Traits Traits; │ │ │ │ │ - 246 │ │ │ │ │ -248 LocalFiniteElementVirtualImp( const Imp &imp ) │ │ │ │ │ - 249 : impl_(LocalFiniteElementCloneFactory::clone(imp)), │ │ │ │ │ - 250 localBasisImp_(impl_->localBasis()), │ │ │ │ │ - 251 localCoefficientsImp_(impl_->localCoefficients()), │ │ │ │ │ - 252 localInterpolationImp_(impl_->localInterpolation()) │ │ │ │ │ - 253 {} │ │ │ │ │ - 254 │ │ │ │ │ -256 LocalFiniteElementVirtualImp() │ │ │ │ │ - 257 : impl_(LocalFiniteElementCloneFactory::create()), │ │ │ │ │ - 258 localBasisImp_(impl_->localBasis()), │ │ │ │ │ - 259 localCoefficientsImp_(impl_->localCoefficients()), │ │ │ │ │ - 260 localInterpolationImp_(impl_->localInterpolation()) │ │ │ │ │ - 261 {} │ │ │ │ │ - 262 │ │ │ │ │ -264 LocalFiniteElementVirtualImp(const LocalFiniteElementVirtualImp& other) │ │ │ │ │ - 265 : impl_(LocalFiniteElementCloneFactory::clone(*other.impl_)), │ │ │ │ │ - 266 localBasisImp_(impl_->localBasis()), │ │ │ │ │ - 267 localCoefficientsImp_(impl_->localCoefficients()), │ │ │ │ │ - 268 localInterpolationImp_(impl_->localInterpolation()) │ │ │ │ │ - 269 {} │ │ │ │ │ - 270 │ │ │ │ │ -271 ~LocalFiniteElementVirtualImp() │ │ │ │ │ - 272 { │ │ │ │ │ - 273 delete impl_; │ │ │ │ │ - 274 } │ │ │ │ │ - 275 │ │ │ │ │ -277 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 278 { │ │ │ │ │ - 279 return localBasisImp_; │ │ │ │ │ - 280 } │ │ │ │ │ - 281 │ │ │ │ │ -283 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 284 { │ │ │ │ │ - 285 return localCoefficientsImp_; │ │ │ │ │ - 286 } │ │ │ │ │ - 287 │ │ │ │ │ -289 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 290 { │ │ │ │ │ - 291 return localInterpolationImp_; │ │ │ │ │ - 292 } │ │ │ │ │ - 293 │ │ │ │ │ -295 unsigned int size () const │ │ │ │ │ - 296 { │ │ │ │ │ - 297 return impl_->size(); │ │ │ │ │ - 298 } │ │ │ │ │ - 299 │ │ │ │ │ -301 const GeometryType type () const │ │ │ │ │ - 302 { │ │ │ │ │ - 303 return impl_->type(); │ │ │ │ │ - 304 } │ │ │ │ │ - 305 │ │ │ │ │ -311 virtual LocalFiniteElementVirtualImp* clone() const │ │ │ │ │ - 312 { │ │ │ │ │ - 313 return new LocalFiniteElementVirtualImp(*this); │ │ │ │ │ - 314 } │ │ │ │ │ - 315 │ │ │ │ │ - 316 protected: │ │ │ │ │ -317 const Imp* impl_; │ │ │ │ │ - 318 │ │ │ │ │ -319 const LocalBasisVirtualImp localBasisImp_; │ │ │ │ │ -320 const LocalCoefficientsVirtualImp localCoefficientsImp_; │ │ │ │ │ - 321 const LocalInterpolationVirtualImp localInterpolationImp_; │ │ │ │ │ - 324 }; │ │ │ │ │ - 325} │ │ │ │ │ - 326#endif │ │ │ │ │ -virtualinterface.hh │ │ │ │ │ +95 std::size_t order () const │ │ │ │ │ + 96 { │ │ │ │ │ + 97 return order_; │ │ │ │ │ + 98 } │ │ │ │ │ + 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 │ │ │ │ │ localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalBasisTraits::RangeType │ │ │ │ │ -R RangeType │ │ │ │ │ -range type │ │ │ │ │ -Definition common/localbasis.hh:51 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ Dune::LocalKey │ │ │ │ │ Describe position of one degree of freedom. │ │ │ │ │ Definition localkey.hh:23 │ │ │ │ │ -Dune::LocalInterpolationVirtualInterface │ │ │ │ │ -virtual base class for a local interpolation │ │ │ │ │ -Definition virtualinterface.hh:190 │ │ │ │ │ -Dune::LocalInterpolationVirtualInterface::FunctionType │ │ │ │ │ -std::function< RangeType(DomainType)> FunctionType │ │ │ │ │ -type of function to interpolate │ │ │ │ │ -Definition virtualinterface.hh:194 │ │ │ │ │ -Dune::LocalInterpolationVirtualInterface::CoefficientType │ │ │ │ │ -RangeType::field_type CoefficientType │ │ │ │ │ -type of the coefficient vector in the interpolate method │ │ │ │ │ -Definition virtualinterface.hh:197 │ │ │ │ │ -Dune::LocalBasisVirtualInterface │ │ │ │ │ -virtual base class for a local basis │ │ │ │ │ -Definition virtualinterface.hh:97 │ │ │ │ │ -Dune::LocalCoefficientsVirtualInterface │ │ │ │ │ -virtual base class for local coefficients │ │ │ │ │ -Definition virtualinterface.hh:259 │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface │ │ │ │ │ -virtual base class for local finite elements with functions │ │ │ │ │ -Definition virtualinterface.hh:286 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp │ │ │ │ │ -class for wrapping a finite element using the virtual interface │ │ │ │ │ -Definition virtualwrappers.hh:240 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition virtualwrappers.hh:277 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::clone │ │ │ │ │ -virtual LocalFiniteElementVirtualImp< Imp > * clone() const │ │ │ │ │ -clone this wrapper │ │ │ │ │ -Definition virtualwrappers.hh:311 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::localInterpolationImp_ │ │ │ │ │ -const LocalInterpolationVirtualImp< typename LocalBasisTraits::DomainType, │ │ │ │ │ -typename LocalBasisTraits::RangeType, typename Imp::Traits:: │ │ │ │ │ -LocalInterpolationType > localInterpolationImp_ │ │ │ │ │ -Definition virtualwrappers.hh:323 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::LocalFiniteElementVirtualImp │ │ │ │ │ -LocalFiniteElementVirtualImp(const Imp &imp) │ │ │ │ │ -taking a LocalFiniteElementVirtualInterface implementation │ │ │ │ │ -Definition virtualwrappers.hh:248 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::Traits │ │ │ │ │ -Interface::Traits Traits │ │ │ │ │ -Definition virtualwrappers.hh:245 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::LocalFiniteElementVirtualImp │ │ │ │ │ -LocalFiniteElementVirtualImp() │ │ │ │ │ -Default constructor. Assumes that the implementation class is default │ │ │ │ │ -constructible as well. │ │ │ │ │ -Definition virtualwrappers.hh:256 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::LocalFiniteElementVirtualImp │ │ │ │ │ -LocalFiniteElementVirtualImp(const LocalFiniteElementVirtualImp &other) │ │ │ │ │ -Copy contructor needed for deep copy. │ │ │ │ │ -Definition virtualwrappers.hh:264 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::~LocalFiniteElementVirtualImp │ │ │ │ │ -~LocalFiniteElementVirtualImp() │ │ │ │ │ -Definition virtualwrappers.hh:271 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition virtualwrappers.hh:295 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::type │ │ │ │ │ -const GeometryType type() const │ │ │ │ │ -Definition virtualwrappers.hh:301 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::impl_ │ │ │ │ │ -const Imp * impl_ │ │ │ │ │ -Definition virtualwrappers.hh:317 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition virtualwrappers.hh:283 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::localBasisImp_ │ │ │ │ │ -const LocalBasisVirtualImp< LocalBasisTraits, typename Imp::Traits:: │ │ │ │ │ -LocalBasisType > localBasisImp_ │ │ │ │ │ -Definition virtualwrappers.hh:319 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::localCoefficientsImp_ │ │ │ │ │ -const LocalCoefficientsVirtualImp< typename Imp::Traits::LocalCoefficientsType │ │ │ │ │ -> localCoefficientsImp_ │ │ │ │ │ -Definition virtualwrappers.hh:320 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition virtualwrappers.hh:289 │ │ │ │ │ -Dune::LocalFiniteElementCloneFactoryHelper │ │ │ │ │ -Definition virtualwrappers.hh:24 │ │ │ │ │ -Dune::LocalFiniteElementCloneFactoryHelper::clone │ │ │ │ │ -static Imp * clone(const Imp &imp) │ │ │ │ │ -Definition virtualwrappers.hh:25 │ │ │ │ │ -Dune::LocalFiniteElementCloneFactory │ │ │ │ │ -Definition virtualwrappers.hh:44 │ │ │ │ │ -Dune::LocalFiniteElementCloneFactory::clone │ │ │ │ │ -static Imp * clone(const Imp &imp) │ │ │ │ │ -Definition virtualwrappers.hh:47 │ │ │ │ │ -Dune::LocalFiniteElementCloneFactory::create │ │ │ │ │ -static Imp * create() │ │ │ │ │ -Definition virtualwrappers.hh:52 │ │ │ │ │ -Dune::LocalFiniteElementCloneFactory::Interface │ │ │ │ │ -LocalFiniteElementVirtualInterface< typename Imp::Traits::LocalBasisType:: │ │ │ │ │ -Traits > Interface │ │ │ │ │ -Definition virtualwrappers.hh:45 │ │ │ │ │ -Dune::LocalBasisVirtualImp │ │ │ │ │ -class for wrapping a basis using the virtual interface │ │ │ │ │ -Definition virtualwrappers.hh:75 │ │ │ │ │ -Dune::LocalBasisVirtualImp::partial │ │ │ │ │ -void partial(const std::array< unsigned int, Traits::dimDomain > &order, const │ │ │ │ │ -typename Traits::DomainType &in, std::vector< typename Traits::RangeType > │ │ │ │ │ -&out) const │ │ │ │ │ -Evaluate partial derivatives of any order of all shape functions. │ │ │ │ │ -Definition virtualwrappers.hh:121 │ │ │ │ │ -Dune::LocalBasisVirtualImp::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all basis function at given position. │ │ │ │ │ -Definition virtualwrappers.hh:102 │ │ │ │ │ -Dune::LocalBasisVirtualImp::impl_ │ │ │ │ │ -const Imp & impl_ │ │ │ │ │ -Definition virtualwrappers.hh:129 │ │ │ │ │ -Dune::LocalBasisVirtualImp::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions. │ │ │ │ │ -Definition virtualwrappers.hh:90 │ │ │ │ │ -Dune::LocalBasisVirtualImp::Traits │ │ │ │ │ -T Traits │ │ │ │ │ -Definition virtualwrappers.hh:87 │ │ │ │ │ -Dune::LocalBasisVirtualImp::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate jacobian of all shape functions at given position. │ │ │ │ │ -Definition virtualwrappers.hh:109 │ │ │ │ │ -Dune::LocalBasisVirtualImp::LocalBasisVirtualImp │ │ │ │ │ -LocalBasisVirtualImp(const Imp &imp) │ │ │ │ │ -constructor taking an implementation of the interface │ │ │ │ │ -Definition virtualwrappers.hh:82 │ │ │ │ │ -Dune::LocalBasisVirtualImp::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition virtualwrappers.hh:96 │ │ │ │ │ -Dune::LocalInterpolationVirtualImp │ │ │ │ │ -class for wrapping a local interpolation using the virtual interface │ │ │ │ │ -Definition virtualwrappers.hh:149 │ │ │ │ │ -Dune::LocalInterpolationVirtualImp::interpolate │ │ │ │ │ -virtual void interpolate(const FunctionType &f, std::vector< CoefficientType > │ │ │ │ │ -&out) const │ │ │ │ │ -determine coefficients interpolating a given function │ │ │ │ │ -Definition virtualwrappers.hh:168 │ │ │ │ │ -Dune::LocalInterpolationVirtualImp::impl_ │ │ │ │ │ -const Imp & impl_ │ │ │ │ │ -Definition virtualwrappers.hh:174 │ │ │ │ │ -Dune::LocalInterpolationVirtualImp::FunctionType │ │ │ │ │ -Base::FunctionType FunctionType │ │ │ │ │ -Definition virtualwrappers.hh:163 │ │ │ │ │ -Dune::LocalInterpolationVirtualImp::LocalInterpolationVirtualImp │ │ │ │ │ -LocalInterpolationVirtualImp(const Imp &imp) │ │ │ │ │ -constructor taking an implementation of the Dune:: │ │ │ │ │ -LocalInterpolationVirtualInterface │ │ │ │ │ -Definition virtualwrappers.hh:158 │ │ │ │ │ -Dune::LocalInterpolationVirtualImp::CoefficientType │ │ │ │ │ -Base::CoefficientType CoefficientType │ │ │ │ │ -Definition virtualwrappers.hh:165 │ │ │ │ │ -Dune::LocalCoefficientsVirtualImp │ │ │ │ │ -class for wrapping local coefficients using the virtual interface │ │ │ │ │ -Definition virtualwrappers.hh:193 │ │ │ │ │ -Dune::LocalCoefficientsVirtualImp::LocalCoefficientsVirtualImp │ │ │ │ │ -LocalCoefficientsVirtualImp(const Imp &imp) │ │ │ │ │ -constructor taking an implementation of the Dune:: │ │ │ │ │ -LocalCoefficientsVirtualInterface │ │ │ │ │ -Definition virtualwrappers.hh:200 │ │ │ │ │ -Dune::LocalCoefficientsVirtualImp::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition virtualwrappers.hh:213 │ │ │ │ │ -Dune::LocalCoefficientsVirtualImp::size │ │ │ │ │ +Dune::LagrangePoint │ │ │ │ │ +Definition emptypoints.hh:18 │ │ │ │ │ +Dune::LagrangePoint::localKey │ │ │ │ │ +const LocalKey & localKey() const │ │ │ │ │ +Definition emptypoints.hh:36 │ │ │ │ │ +Dune::LagrangePoint::weight_ │ │ │ │ │ +Field weight_ │ │ │ │ │ +Definition emptypoints.hh:48 │ │ │ │ │ +Dune::LagrangePoint::dimension │ │ │ │ │ +static const int dimension │ │ │ │ │ +Definition emptypoints.hh:25 │ │ │ │ │ +Dune::LagrangePoint::LagrangePointSetImpl │ │ │ │ │ +friend class LagrangePointSetImpl │ │ │ │ │ +Definition emptypoints.hh:22 │ │ │ │ │ +Dune::LagrangePoint::point_ │ │ │ │ │ +Vector point_ │ │ │ │ │ +Definition emptypoints.hh:46 │ │ │ │ │ +Dune::LagrangePoint::weight │ │ │ │ │ +const Field weight() const │ │ │ │ │ +Definition emptypoints.hh:41 │ │ │ │ │ +Dune::LagrangePoint::Vector │ │ │ │ │ +FieldVector< Field, dimension > Vector │ │ │ │ │ +Definition emptypoints.hh:29 │ │ │ │ │ +Dune::LagrangePoint::Field │ │ │ │ │ +F Field │ │ │ │ │ +Definition emptypoints.hh:27 │ │ │ │ │ +Dune::LagrangePoint::point │ │ │ │ │ +const Vector & point() const │ │ │ │ │ +Definition emptypoints.hh:31 │ │ │ │ │ +Dune::LagrangePoint::localKey_ │ │ │ │ │ +LocalKey localKey_ │ │ │ │ │ +Definition emptypoints.hh:47 │ │ │ │ │ +Dune::EmptyPointSet │ │ │ │ │ +Definition emptypoints.hh:56 │ │ │ │ │ +Dune::EmptyPointSet::order │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +Definition emptypoints.hh:95 │ │ │ │ │ +Dune::EmptyPointSet::order_ │ │ │ │ │ +std::size_t order_ │ │ │ │ │ +Definition emptypoints.hh:106 │ │ │ │ │ +Dune::EmptyPointSet::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition emptypoints.hh:62 │ │ │ │ │ +Dune::EmptyPointSet::EmptyPointSet │ │ │ │ │ +EmptyPointSet(const std::size_t order) │ │ │ │ │ +Definition emptypoints.hh:69 │ │ │ │ │ +Dune::EmptyPointSet::operator[] │ │ │ │ │ +const LagrangePoint & operator[](const unsigned int i) const │ │ │ │ │ +Definition emptypoints.hh:74 │ │ │ │ │ +Dune::EmptyPointSet::size │ │ │ │ │ std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition virtualwrappers.hh:207 │ │ │ │ │ -Dune::LocalCoefficientsVirtualImp::impl_ │ │ │ │ │ -const Imp & impl_ │ │ │ │ │ -Definition virtualwrappers.hh:219 │ │ │ │ │ -localbasis.hh │ │ │ │ │ +Definition emptypoints.hh:100 │ │ │ │ │ +Dune::EmptyPointSet::LagrangePoint │ │ │ │ │ +Dune::LagrangePoint< Field, dimension > LagrangePoint │ │ │ │ │ +Definition emptypoints.hh:64 │ │ │ │ │ +Dune::EmptyPointSet::localKey │ │ │ │ │ +const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ +Definition emptypoints.hh:90 │ │ │ │ │ +Dune::EmptyPointSet::begin │ │ │ │ │ +iterator begin() const │ │ │ │ │ +Definition emptypoints.hh:80 │ │ │ │ │ +Dune::EmptyPointSet::end │ │ │ │ │ +iterator end() const │ │ │ │ │ +Definition emptypoints.hh:85 │ │ │ │ │ +Dune::EmptyPointSet::Field │ │ │ │ │ +F Field │ │ │ │ │ +Definition emptypoints.hh:60 │ │ │ │ │ +Dune::EmptyPointSet::points_ │ │ │ │ │ +std::vector< LagrangePoint > points_ │ │ │ │ │ +Definition emptypoints.hh:107 │ │ │ │ │ +Dune::EmptyPointSet::iterator │ │ │ │ │ +std::vector< LagrangePoint >::const_iterator iterator │ │ │ │ │ +Definition emptypoints.hh:66 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00422.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localtoglobaladaptors.hh File Reference │ │ │ │ +dune-localfunctions: pq22d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,51 +65,34 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
localtoglobaladaptors.hh File Reference
│ │ │ │ +
pq22d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/geometry/type.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

struct  Dune::LocalToGlobalBasisAdaptorTraits< LocalBasisTraits, dimDomainGlobal_ >
 Traits class for local-to-global basis adaptors. More...
 
class  Dune::ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry >
 Convert a simple scalar local basis into a global basis. More...
 
class  Dune::LocalToGlobalInterpolationAdaptor< LocalInterpolation, Traits_ >
 Convert a local interpolation into a global interpolation. More...
 
struct  Dune::ScalarLocalToGlobalFiniteElementAdaptor< LocalFiniteElement, Geometry >
 Convert a simple scalar local finite element into a global finite element. More...
 
struct  Dune::ScalarLocalToGlobalFiniteElementAdaptor< LocalFiniteElement, Geometry >::Traits
 
class  Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory< LocalFiniteElement, Geometry >
 Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. More...
class  Dune::PQ22DLocalFiniteElement< D, R >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,46 +6,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ + * lagrange │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -localtoglobaladaptors.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +pq22d.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  Dune::LocalToGlobalBasisAdaptorTraits<_LocalBasisTraits, │ │ │ │ │ - dimDomainGlobal__> │ │ │ │ │ -  Traits class for local-to-global basis adaptors. More... │ │ │ │ │ -  │ │ │ │ │ - class  Dune::ScalarLocalToGlobalBasisAdaptor<_LocalBasis,_Geometry_> │ │ │ │ │ -  Convert a simple scalar local basis into a global basis. More... │ │ │ │ │ -  │ │ │ │ │ - class  Dune::LocalToGlobalInterpolationAdaptor<_LocalInterpolation,_Traits__> │ │ │ │ │ -  Convert a local interpolation into a global interpolation. More... │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::ScalarLocalToGlobalFiniteElementAdaptor<_LocalFiniteElement, │ │ │ │ │ - Geometry_> │ │ │ │ │ -  Convert a simple scalar local finite element into a global finite │ │ │ │ │ - element. More... │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::ScalarLocalToGlobalFiniteElementAdaptor<_LocalFiniteElement, │ │ │ │ │ - Geometry_>::Traits │ │ │ │ │ -  │ │ │ │ │ - class  Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory< │ │ │ │ │ - LocalFiniteElement,_Geometry_> │ │ │ │ │ -  Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. More... │ │ │ │ │ +class  Dune::PQ22DLocalFiniteElement<_D,_R_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00422_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localtoglobaladaptors.hh Source File │ │ │ │ +dune-localfunctions: pq22d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,270 +70,132 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
localtoglobaladaptors.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
│ │ │ │ -
6#ifndef DUNE_LOCALFUNCTIONS_COMMON_LOCALTOGLOBALADAPTORS_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_COMMON_LOCALTOGLOBALADAPTORS_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <cstddef>
│ │ │ │ -
10#include <vector>
│ │ │ │ +
5#ifndef DUNE_PQ22DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_PQ22DLOCALFINITEELEMENT_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <dune/common/fmatrix.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │
11
│ │ │ │ -
12#include <dune/common/fmatrix.hh>
│ │ │ │ -
13#include <dune/common/fvector.hh>
│ │ │ │ -
14#include <dune/common/typetraits.hh>
│ │ │ │ -
15
│ │ │ │ -
16#include <dune/geometry/type.hh>
│ │ │ │ -
17
│ │ │ │ -
18namespace Dune {
│ │ │ │ -
19
│ │ │ │ -
21
│ │ │ │ -
29 template<class LocalBasisTraits, std::size_t dimDomainGlobal_>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
32 static const std::size_t dimDomainLocal = LocalBasisTraits::dimDomain;
│ │ │ │ -
33 static const std::size_t dimDomainGlobal = dimDomainGlobal_;
│ │ │ │ - │ │ │ │ -
35 typedef FieldVector<DomainField, dimDomainGlobal> DomainGlobal;
│ │ │ │ -
36
│ │ │ │ - │ │ │ │ -
38 static const std::size_t dimRange = LocalBasisTraits::dimRange;
│ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ +
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 typedef FieldMatrix<RangeField, dimRange, dimDomainGlobal> Jacobian;
│ │ │ │ -
42 };
│ │ │ │ +
│ │ │ │ +
41 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
42 {
│ │ │ │ +
43 return lfeVariant_.localBasis();
│ │ │ │ +
44 }
│ │ │ │
│ │ │ │ -
43
│ │ │ │
45
│ │ │ │ -
64 template<class LocalBasis, class Geometry>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
66 static_assert(LocalBasis::Traits::dimRange == 1,
│ │ │ │ -
67 "ScalarLocalToGlobalBasisAdaptor can only wrap a "
│ │ │ │ -
68 "scalar local basis.");
│ │ │ │ -
69 static_assert((std::is_same<typename LocalBasis::Traits::DomainFieldType,
│ │ │ │ -
70 typename Geometry::ctype>::value),
│ │ │ │ -
71 "ScalarLocalToGlobalBasisAdaptor: LocalBasis must use "
│ │ │ │ -
72 "the same ctype as Geometry");
│ │ │ │ -
73 static_assert
│ │ │ │ -
74 ( static_cast<std::size_t>(LocalBasis::Traits::dimDomain) ==
│ │ │ │ -
75 static_cast<std::size_t>(Geometry::mydimension),
│ │ │ │ -
76 "ScalarLocalToGlobalBasisAdaptor: LocalBasis domain dimension must "
│ │ │ │ -
77 "match local dimension of Geometry");
│ │ │ │ -
78
│ │ │ │ -
79 const LocalBasis& localBasis;
│ │ │ │ -
80 Geometry geometry;
│ │ │ │ -
81
│ │ │ │ -
82 public:
│ │ │ │ -
83 typedef LocalToGlobalBasisAdaptorTraits<typename LocalBasis::Traits,
│ │ │ │ -
84 Geometry::coorddimension> Traits;
│ │ │ │ -
85
│ │ │ │ -
87
│ │ │ │ -
│ │ │ │ -
96 ScalarLocalToGlobalBasisAdaptor(const LocalBasis& localBasis_,
│ │ │ │ -
97 const Geometry& geometry_) :
│ │ │ │ -
98 localBasis(localBasis_), geometry(geometry_)
│ │ │ │ -
99 { }
│ │ │ │ -
│ │ │ │ -
100
│ │ │ │ -
101 std::size_t size() const { return localBasis.size(); }
│ │ │ │ -
103
│ │ │ │ -
│ │ │ │ -
110 std::size_t order() const {
│ │ │ │ -
111 if(geometry.affine())
│ │ │ │ -
112 // affine linear
│ │ │ │ -
113 return localBasis.order();
│ │ │ │ -
114 else
│ │ │ │ -
115 // assume at most order dim
│ │ │ │ -
116 return localBasis.order() + Traits::dimDomainGlobal - 1;
│ │ │ │ -
117 }
│ │ │ │ -
│ │ │ │ -
118
│ │ │ │ -
│ │ │ │ -
119 void evaluateFunction(const typename Traits::DomainLocal& in,
│ │ │ │ -
120 std::vector<typename Traits::Range>& out) const
│ │ │ │ -
121 {
│ │ │ │ -
122 localBasis.evaluateFunction(in, out);
│ │ │ │ -
123 }
│ │ │ │ -
│ │ │ │ -
124
│ │ │ │ -
│ │ │ │ -
125 void evaluateJacobian(const typename Traits::DomainLocal& in,
│ │ │ │ -
126 std::vector<typename Traits::Jacobian>& out) const
│ │ │ │ -
127 {
│ │ │ │ -
128 std::vector<typename LocalBasis::Traits::JacobianType>
│ │ │ │ -
129 localJacobian(size());
│ │ │ │ -
130 localBasis.evaluateJacobian(in, localJacobian);
│ │ │ │ -
131
│ │ │ │ -
132 const typename Geometry::JacobianInverseTransposed &geoJacobian =
│ │ │ │ -
133 geometry.jacobianInverseTransposed(in);
│ │ │ │ -
134
│ │ │ │ -
135 out.resize(size());
│ │ │ │ -
136 for(std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
137 geoJacobian.mv(localJacobian[i][0], out[i][0]);
│ │ │ │ -
138 }
│ │ │ │ -
│ │ │ │ -
139 };
│ │ │ │ -
│ │ │ │ -
140
│ │ │ │ -
142
│ │ │ │ -
148 template<class LocalInterpolation, class Traits_>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
150 const LocalInterpolation& localInterpolation;
│ │ │ │ -
151
│ │ │ │ -
152 public:
│ │ │ │ -
153 typedef Traits_ Traits;
│ │ │ │ -
154
│ │ │ │ -
156
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
165 ( const LocalInterpolation& localInterpolation_) :
│ │ │ │ -
166 localInterpolation(localInterpolation_)
│ │ │ │ -
167 { }
│ │ │ │ -
│ │ │ │ -
168
│ │ │ │ -
169 template<class Function, class Coeff>
│ │ │ │ -
│ │ │ │ -
170 void interpolate(const Function& function, std::vector<Coeff>& out) const
│ │ │ │ -
171 { localInterpolation.interpolate(function, out); }
│ │ │ │ -
│ │ │ │ -
172 };
│ │ │ │ -
│ │ │ │ -
173
│ │ │ │ -
176
│ │ │ │ -
186 template<class LocalFiniteElement, class Geometry>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
191 struct Traits {
│ │ │ │ -
192 typedef ScalarLocalToGlobalBasisAdaptor<typename LocalFiniteElement::
│ │ │ │ -
193 Traits::LocalBasisType, Geometry> Basis;
│ │ │ │ -
194 typedef LocalToGlobalInterpolationAdaptor<typename LocalFiniteElement::
│ │ │ │ -
195 Traits::LocalInterpolationType, typename Basis::Traits>
│ │ │ │ - │ │ │ │ -
197 typedef typename LocalFiniteElement::Traits::LocalCoefficientsType
│ │ │ │ - │ │ │ │ -
199 };
│ │ │ │ -
│ │ │ │ -
200
│ │ │ │ -
201 private:
│ │ │ │ -
202 const LocalFiniteElement &localFE;
│ │ │ │ -
203 typename Traits::Basis basis_;
│ │ │ │ -
204 typename Traits::Interpolation interpolation_;
│ │ │ │ -
205
│ │ │ │ -
206 public:
│ │ │ │ -
208
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
218 ( const LocalFiniteElement& localFE_, const Geometry &geometry) :
│ │ │ │ -
219 localFE(localFE_),
│ │ │ │ -
220 basis_(localFE.localBasis(), geometry),
│ │ │ │ -
221 interpolation_(localFE.localInterpolation())
│ │ │ │ -
222 { }
│ │ │ │ -
│ │ │ │ -
223
│ │ │ │ -
224 const typename Traits::Basis& basis() const { return basis_; }
│ │ │ │ -
│ │ │ │ -
225 const typename Traits::Interpolation& interpolation() const
│ │ │ │ -
226 { return interpolation_; }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
227 const typename Traits::Coefficients& coefficients() const
│ │ │ │ -
228 { return localFE.localCoefficients(); }
│ │ │ │ -
│ │ │ │ -
229 GeometryType type() const { return localFE.type(); }
│ │ │ │ -
230 };
│ │ │ │ -
│ │ │ │ -
231
│ │ │ │ -
233
│ │ │ │ -
243 template<class LocalFiniteElement, class Geometry>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
245 const LocalFiniteElement& localFE;
│ │ │ │ -
246
│ │ │ │ -
247 public:
│ │ │ │ -
248 typedef ScalarLocalToGlobalFiniteElementAdaptor<LocalFiniteElement,
│ │ │ │ -
249 Geometry> FiniteElement;
│ │ │ │ -
250
│ │ │ │ -
252
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
261 (const LocalFiniteElement &localFE_) : localFE(localFE_) {}
│ │ │ │ -
│ │ │ │ -
262
│ │ │ │ -
264
│ │ │ │ -
│ │ │ │ -
274 const FiniteElement make(const Geometry& geometry) {
│ │ │ │ -
275 return FiniteElement(localFE, geometry);
│ │ │ │ -
276 }
│ │ │ │ -
│ │ │ │ -
277 };
│ │ │ │ -
│ │ │ │ -
278
│ │ │ │ -
279} // namespace Dune
│ │ │ │ -
280
│ │ │ │ -
281#endif // DUNE_LOCALFUNCTIONS_COMMON_LOCALTOGLOBALADAPTORS_HH
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
RF RangeFieldType
Export type for range field.
Definition common/localbasis.hh:45
│ │ │ │ -
static constexpr int dimRange
dimension of the range
Definition common/localbasis.hh:48
│ │ │ │ -
DF DomainFieldType
Export type for domain field.
Definition common/localbasis.hh:36
│ │ │ │ -
static constexpr int dimDomain
dimension of the domain
Definition common/localbasis.hh:39
│ │ │ │ -
R RangeType
range type
Definition common/localbasis.hh:51
│ │ │ │ -
Traits class for local-to-global basis adaptors.
Definition localtoglobaladaptors.hh:30
│ │ │ │ -
LocalBasisTraits::RangeFieldType RangeField
Definition localtoglobaladaptors.hh:37
│ │ │ │ -
LocalBasisTraits::DomainFieldType DomainField
Definition localtoglobaladaptors.hh:31
│ │ │ │ -
FieldMatrix< RangeField, dimRange, dimDomainGlobal > Jacobian
Definition localtoglobaladaptors.hh:41
│ │ │ │ -
static const std::size_t dimDomainLocal
Definition localtoglobaladaptors.hh:32
│ │ │ │ -
LocalBasisTraits::RangeType Range
Definition localtoglobaladaptors.hh:39
│ │ │ │ -
static const std::size_t dimDomainGlobal
Definition localtoglobaladaptors.hh:33
│ │ │ │ -
static const std::size_t dimRange
Definition localtoglobaladaptors.hh:38
│ │ │ │ -
FieldVector< DomainField, dimDomainGlobal > DomainGlobal
Definition localtoglobaladaptors.hh:35
│ │ │ │ -
LocalBasisTraits::DomainType DomainLocal
Definition localtoglobaladaptors.hh:34
│ │ │ │ -
Convert a simple scalar local basis into a global basis.
Definition localtoglobaladaptors.hh:65
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainLocal &in, std::vector< typename Traits::Jacobian > &out) const
Definition localtoglobaladaptors.hh:125
│ │ │ │ -
std::size_t order() const
return maximum polynomial order of the base function
Definition localtoglobaladaptors.hh:110
│ │ │ │ -
LocalToGlobalBasisAdaptorTraits< typename LocalBasis::Traits, Geometry::coorddimension > Traits
Definition localtoglobaladaptors.hh:84
│ │ │ │ -
ScalarLocalToGlobalBasisAdaptor(const LocalBasis &localBasis_, const Geometry &geometry_)
construct a ScalarLocalToGlobalBasisAdaptor
Definition localtoglobaladaptors.hh:96
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainLocal &in, std::vector< typename Traits::Range > &out) const
Definition localtoglobaladaptors.hh:119
│ │ │ │ -
std::size_t size() const
Definition localtoglobaladaptors.hh:101
│ │ │ │ -
Convert a local interpolation into a global interpolation.
Definition localtoglobaladaptors.hh:149
│ │ │ │ -
LocalToGlobalInterpolationAdaptor(const LocalInterpolation &localInterpolation_)
construct a LocalToGlobalInterpolationAdaptor
Definition localtoglobaladaptors.hh:165
│ │ │ │ -
void interpolate(const Function &function, std::vector< Coeff > &out) const
Definition localtoglobaladaptors.hh:170
│ │ │ │ -
Traits_ Traits
Definition localtoglobaladaptors.hh:153
│ │ │ │ -
Convert a simple scalar local finite element into a global finite element.
Definition localtoglobaladaptors.hh:187
│ │ │ │ -
GeometryType type() const
Definition localtoglobaladaptors.hh:229
│ │ │ │ -
const Traits::Coefficients & coefficients() const
Definition localtoglobaladaptors.hh:227
│ │ │ │ -
const Traits::Interpolation & interpolation() const
Definition localtoglobaladaptors.hh:225
│ │ │ │ -
const Traits::Basis & basis() const
Definition localtoglobaladaptors.hh:224
│ │ │ │ -
ScalarLocalToGlobalFiniteElementAdaptor(const LocalFiniteElement &localFE_, const Geometry &geometry)
construct a ScalarLocalToGlobalFiniteElementAdaptor
Definition localtoglobaladaptors.hh:218
│ │ │ │ -
Definition localtoglobaladaptors.hh:191
│ │ │ │ -
LocalToGlobalInterpolationAdaptor< typename LocalFiniteElement::Traits::LocalInterpolationType, typename Basis::Traits > Interpolation
Definition localtoglobaladaptors.hh:196
│ │ │ │ -
LocalFiniteElement::Traits::LocalCoefficientsType Coefficients
Definition localtoglobaladaptors.hh:198
│ │ │ │ -
ScalarLocalToGlobalBasisAdaptor< typename LocalFiniteElement::Traits::LocalBasisType, Geometry > Basis
Definition localtoglobaladaptors.hh:193
│ │ │ │ -
Factory for ScalarLocalToGlobalFiniteElementAdaptor objects.
Definition localtoglobaladaptors.hh:244
│ │ │ │ -
const FiniteElement make(const Geometry &geometry)
construct ScalarLocalToGlobalFiniteElementAdaptor
Definition localtoglobaladaptors.hh:274
│ │ │ │ -
ScalarLocalToGlobalFiniteElementAdaptor< LocalFiniteElement, Geometry > FiniteElement
Definition localtoglobaladaptors.hh:249
│ │ │ │ -
ScalarLocalToGlobalFiniteElementAdaptorFactory(const LocalFiniteElement &localFE_)
construct a ScalarLocalToGlobalFiniteElementAdaptorFactory
Definition localtoglobaladaptors.hh:261
│ │ │ │ + │ │ │ │ +
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 {} │ │ │ │ │ @@ -7,335 +7,158 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -localtoglobaladaptors.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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 │ │ │ │ │ - 6#ifndef DUNE_LOCALFUNCTIONS_COMMON_LOCALTOGLOBALADAPTORS_HH │ │ │ │ │ - 7#define DUNE_LOCALFUNCTIONS_COMMON_LOCALTOGLOBALADAPTORS_HH │ │ │ │ │ - 8 │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ + 5#ifndef DUNE_PQ22DLOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_PQ22DLOCALFINITEELEMENT_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15 │ │ │ │ │ - 16#include │ │ │ │ │ - 17 │ │ │ │ │ - 18namespace Dune { │ │ │ │ │ - 19 │ │ │ │ │ - 21 │ │ │ │ │ - 29 template │ │ │ │ │ -30 struct LocalToGlobalBasisAdaptorTraits { │ │ │ │ │ -31 typedef typename LocalBasisTraits::DomainFieldType DomainField; │ │ │ │ │ -32 static const std::size_t dimDomainLocal = LocalBasisTraits::dimDomain; │ │ │ │ │ -33 static const std::size_t dimDomainGlobal = dimDomainGlobal_; │ │ │ │ │ -34 typedef typename LocalBasisTraits::DomainType DomainLocal; │ │ │ │ │ -35 typedef FieldVector DomainGlobal; │ │ │ │ │ - 36 │ │ │ │ │ -37 typedef typename LocalBasisTraits::RangeFieldType RangeField; │ │ │ │ │ -38 static const std::size_t dimRange = LocalBasisTraits::dimRange; │ │ │ │ │ -39 typedef typename LocalBasisTraits::RangeType Range; │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 17 template │ │ │ │ │ +18 class PQ22DLocalFiniteElement │ │ │ │ │ + 19 { │ │ │ │ │ + 20 using LFEVariant = │ │ │ │ │ +LocalFiniteElementVariant, │ │ │ │ │ + 21 LagrangeCubeLocalFiniteElement >; │ │ │ │ │ + 22 public: │ │ │ │ │ +23 using Traits = typename LFEVariant::Traits; │ │ │ │ │ + 24 │ │ │ │ │ +25 PQ22DLocalFiniteElement ( const GeometryType > ) │ │ │ │ │ + 26 { │ │ │ │ │ + 27 if ( gt.isTriangle() ) │ │ │ │ │ + 28 lfeVariant_ = LagrangeSimplexLocalFiniteElement(); │ │ │ │ │ + 29 else if ( gt.isQuadrilateral() ) │ │ │ │ │ + 30 lfeVariant_ = LagrangeCubeLocalFiniteElement(); │ │ │ │ │ + 31 } │ │ │ │ │ + 32 │ │ │ │ │ +33 PQ22DLocalFiniteElement ( const GeometryType >, const std::vector vertexmap ) │ │ │ │ │ + 34 { │ │ │ │ │ + 35 if ( gt.isTriangle() ) │ │ │ │ │ + 36 lfeVariant_ = LagrangeSimplexLocalFiniteElement(vertexmap); │ │ │ │ │ + 37 else if ( gt.isQuadrilateral() ) │ │ │ │ │ + 38 lfeVariant_ = LagrangeCubeLocalFiniteElement(); │ │ │ │ │ + 39 } │ │ │ │ │ 40 │ │ │ │ │ -41 typedef FieldMatrix Jacobian; │ │ │ │ │ - 42 }; │ │ │ │ │ - 43 │ │ │ │ │ +41 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 42 { │ │ │ │ │ + 43 return lfeVariant_.localBasis(); │ │ │ │ │ + 44 } │ │ │ │ │ 45 │ │ │ │ │ - 64 template │ │ │ │ │ -65 class ScalarLocalToGlobalBasisAdaptor { │ │ │ │ │ - 66 static_assert(LocalBasis::Traits::dimRange == 1, │ │ │ │ │ - 67 "ScalarLocalToGlobalBasisAdaptor can only wrap a " │ │ │ │ │ - 68 "scalar local basis."); │ │ │ │ │ - 69 static_assert((std::is_same::value), │ │ │ │ │ - 71 "ScalarLocalToGlobalBasisAdaptor: LocalBasis must use " │ │ │ │ │ - 72 "the same ctype as Geometry"); │ │ │ │ │ - 73 static_assert │ │ │ │ │ - 74 ( static_cast(LocalBasis::Traits::dimDomain) == │ │ │ │ │ - 75 static_cast(Geometry::mydimension), │ │ │ │ │ - 76 "ScalarLocalToGlobalBasisAdaptor: LocalBasis domain dimension must " │ │ │ │ │ - 77 "match local dimension of Geometry"); │ │ │ │ │ - 78 │ │ │ │ │ - 79 const LocalBasis& localBasis; │ │ │ │ │ - 80 Geometry geometry; │ │ │ │ │ - 81 │ │ │ │ │ - 82 public: │ │ │ │ │ - 83 typedef LocalToGlobalBasisAdaptorTraits Traits; │ │ │ │ │ - 85 │ │ │ │ │ - 87 │ │ │ │ │ -96 ScalarLocalToGlobalBasisAdaptor(const LocalBasis& localBasis_, │ │ │ │ │ - 97 const Geometry& geometry_) : │ │ │ │ │ - 98 localBasis(localBasis_), geometry(geometry_) │ │ │ │ │ - 99 { } │ │ │ │ │ - 100 │ │ │ │ │ -101 std::size_t size() const { return localBasis.size(); } │ │ │ │ │ - 103 │ │ │ │ │ -110 std::size_t order() const { │ │ │ │ │ - 111 if(geometry.affine()) │ │ │ │ │ - 112 // affine linear │ │ │ │ │ - 113 return localBasis.order(); │ │ │ │ │ - 114 else │ │ │ │ │ - 115 // assume at most order dim │ │ │ │ │ - 116 return localBasis.order() + Traits::dimDomainGlobal - 1; │ │ │ │ │ - 117 } │ │ │ │ │ - 118 │ │ │ │ │ -119 void evaluateFunction(const typename Traits::DomainLocal& in, │ │ │ │ │ - 120 std::vector& out) const │ │ │ │ │ - 121 { │ │ │ │ │ - 122 localBasis.evaluateFunction(in, out); │ │ │ │ │ - 123 } │ │ │ │ │ - 124 │ │ │ │ │ -125 void evaluateJacobian(const typename Traits::DomainLocal& in, │ │ │ │ │ - 126 std::vector& out) const │ │ │ │ │ - 127 { │ │ │ │ │ - 128 std::vector │ │ │ │ │ - 129 localJacobian(size()); │ │ │ │ │ - 130 localBasis.evaluateJacobian(in, localJacobian); │ │ │ │ │ - 131 │ │ │ │ │ - 132 const typename Geometry::JacobianInverseTransposed &geoJacobian = │ │ │ │ │ - 133 geometry.jacobianInverseTransposed(in); │ │ │ │ │ - 134 │ │ │ │ │ - 135 out.resize(size()); │ │ │ │ │ - 136 for(std::size_t i = 0; i < size(); ++i) │ │ │ │ │ - 137 geoJacobian.mv(localJacobian[i][0], out[i][0]); │ │ │ │ │ - 138 } │ │ │ │ │ - 139 }; │ │ │ │ │ - 140 │ │ │ │ │ - 142 │ │ │ │ │ - 148 template │ │ │ │ │ -149 class LocalToGlobalInterpolationAdaptor { │ │ │ │ │ - 150 const LocalInterpolation& localInterpolation; │ │ │ │ │ - 151 │ │ │ │ │ - 152 public: │ │ │ │ │ -153 typedef Traits_ Traits; │ │ │ │ │ - 154 │ │ │ │ │ - 156 │ │ │ │ │ -164 LocalToGlobalInterpolationAdaptor │ │ │ │ │ - 165 ( const LocalInterpolation& localInterpolation_) : │ │ │ │ │ - 166 localInterpolation(localInterpolation_) │ │ │ │ │ - 167 { } │ │ │ │ │ - 168 │ │ │ │ │ - 169 template │ │ │ │ │ -170 void interpolate(const Function& function, std::vector& out) const │ │ │ │ │ - 171 { localInterpolation.interpolate(function, out); } │ │ │ │ │ - 172 }; │ │ │ │ │ - 173 │ │ │ │ │ - 176 │ │ │ │ │ - 186 template │ │ │ │ │ -187 struct ScalarLocalToGlobalFiniteElementAdaptor { │ │ │ │ │ -191 struct Traits { │ │ │ │ │ - 192 typedef ScalarLocalToGlobalBasisAdaptor Basis; │ │ │ │ │ - 194 typedef LocalToGlobalInterpolationAdaptor │ │ │ │ │ -196 Interpolation; │ │ │ │ │ - 197 typedef typename LocalFiniteElement::Traits::LocalCoefficientsType │ │ │ │ │ -198 Coefficients; │ │ │ │ │ - 199 }; │ │ │ │ │ - 200 │ │ │ │ │ - 201 private: │ │ │ │ │ - 202 const LocalFiniteElement &localFE; │ │ │ │ │ - 203 typename Traits::Basis basis_; │ │ │ │ │ - 204 typename Traits::Interpolation interpolation_; │ │ │ │ │ - 205 │ │ │ │ │ - 206 public: │ │ │ │ │ - 208 │ │ │ │ │ -217 ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ - 218 ( const LocalFiniteElement& localFE_, const Geometry &geometry) : │ │ │ │ │ - 219 localFE(localFE_), │ │ │ │ │ - 220 basis_(localFE.localBasis(), geometry), │ │ │ │ │ - 221 interpolation_(localFE.localInterpolation()) │ │ │ │ │ - 222 { } │ │ │ │ │ - 223 │ │ │ │ │ -224 const typename Traits::Basis& basis() const { return basis_; } │ │ │ │ │ -225 const typename Traits::Interpolation& interpolation() const │ │ │ │ │ - 226 { return interpolation_; } │ │ │ │ │ -227 const typename Traits::Coefficients& coefficients() const │ │ │ │ │ - 228 { return localFE.localCoefficients(); } │ │ │ │ │ -229 GeometryType type() const { return localFE.type(); } │ │ │ │ │ - 230 }; │ │ │ │ │ - 231 │ │ │ │ │ - 233 │ │ │ │ │ - 243 template │ │ │ │ │ -244 class ScalarLocalToGlobalFiniteElementAdaptorFactory { │ │ │ │ │ - 245 const LocalFiniteElement& localFE; │ │ │ │ │ - 246 │ │ │ │ │ - 247 public: │ │ │ │ │ - 248 typedef ScalarLocalToGlobalFiniteElementAdaptor FiniteElement; │ │ │ │ │ - 250 │ │ │ │ │ - 252 │ │ │ │ │ -260 ScalarLocalToGlobalFiniteElementAdaptorFactory │ │ │ │ │ - 261 (const LocalFiniteElement &localFE_) : localFE(localFE_) {} │ │ │ │ │ - 262 │ │ │ │ │ - 264 │ │ │ │ │ -274 const FiniteElement make(const Geometry& geometry) { │ │ │ │ │ - 275 return FiniteElement(localFE, geometry); │ │ │ │ │ - 276 } │ │ │ │ │ - 277 }; │ │ │ │ │ - 278 │ │ │ │ │ - 279} // namespace Dune │ │ │ │ │ - 280 │ │ │ │ │ - 281#endif // DUNE_LOCALFUNCTIONS_COMMON_LOCALTOGLOBALADAPTORS_HH │ │ │ │ │ +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 │ │ │ │ │ +localfiniteelementvariant.hh │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ +lagrangecube.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalBasisTraits::RangeFieldType │ │ │ │ │ -RF RangeFieldType │ │ │ │ │ -Export type for range field. │ │ │ │ │ -Definition common/localbasis.hh:45 │ │ │ │ │ -Dune::LocalBasisTraits::dimRange │ │ │ │ │ -static constexpr int dimRange │ │ │ │ │ -dimension of the range │ │ │ │ │ -Definition common/localbasis.hh:48 │ │ │ │ │ -Dune::LocalBasisTraits::DomainFieldType │ │ │ │ │ -DF DomainFieldType │ │ │ │ │ -Export type for domain field. │ │ │ │ │ -Definition common/localbasis.hh:36 │ │ │ │ │ -Dune::LocalBasisTraits::dimDomain │ │ │ │ │ -static constexpr int dimDomain │ │ │ │ │ -dimension of the domain │ │ │ │ │ -Definition common/localbasis.hh:39 │ │ │ │ │ -Dune::LocalBasisTraits::RangeType │ │ │ │ │ -R RangeType │ │ │ │ │ -range type │ │ │ │ │ -Definition common/localbasis.hh:51 │ │ │ │ │ -Dune::LocalToGlobalBasisAdaptorTraits │ │ │ │ │ -Traits class for local-to-global basis adaptors. │ │ │ │ │ -Definition localtoglobaladaptors.hh:30 │ │ │ │ │ -Dune::LocalToGlobalBasisAdaptorTraits::RangeField │ │ │ │ │ -LocalBasisTraits::RangeFieldType RangeField │ │ │ │ │ -Definition localtoglobaladaptors.hh:37 │ │ │ │ │ -Dune::LocalToGlobalBasisAdaptorTraits::DomainField │ │ │ │ │ -LocalBasisTraits::DomainFieldType DomainField │ │ │ │ │ -Definition localtoglobaladaptors.hh:31 │ │ │ │ │ -Dune::LocalToGlobalBasisAdaptorTraits::Jacobian │ │ │ │ │ -FieldMatrix< RangeField, dimRange, dimDomainGlobal > Jacobian │ │ │ │ │ -Definition localtoglobaladaptors.hh:41 │ │ │ │ │ -Dune::LocalToGlobalBasisAdaptorTraits::dimDomainLocal │ │ │ │ │ -static const std::size_t dimDomainLocal │ │ │ │ │ -Definition localtoglobaladaptors.hh:32 │ │ │ │ │ -Dune::LocalToGlobalBasisAdaptorTraits::Range │ │ │ │ │ -LocalBasisTraits::RangeType Range │ │ │ │ │ -Definition localtoglobaladaptors.hh:39 │ │ │ │ │ -Dune::LocalToGlobalBasisAdaptorTraits::dimDomainGlobal │ │ │ │ │ -static const std::size_t dimDomainGlobal │ │ │ │ │ -Definition localtoglobaladaptors.hh:33 │ │ │ │ │ -Dune::LocalToGlobalBasisAdaptorTraits::dimRange │ │ │ │ │ -static const std::size_t dimRange │ │ │ │ │ -Definition localtoglobaladaptors.hh:38 │ │ │ │ │ -Dune::LocalToGlobalBasisAdaptorTraits::DomainGlobal │ │ │ │ │ -FieldVector< DomainField, dimDomainGlobal > DomainGlobal │ │ │ │ │ -Definition localtoglobaladaptors.hh:35 │ │ │ │ │ -Dune::LocalToGlobalBasisAdaptorTraits::DomainLocal │ │ │ │ │ -LocalBasisTraits::DomainType DomainLocal │ │ │ │ │ -Definition localtoglobaladaptors.hh:34 │ │ │ │ │ -Dune::ScalarLocalToGlobalBasisAdaptor │ │ │ │ │ -Convert a simple scalar local basis into a global basis. │ │ │ │ │ -Definition localtoglobaladaptors.hh:65 │ │ │ │ │ -Dune::ScalarLocalToGlobalBasisAdaptor::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainLocal &in, std::vector< │ │ │ │ │ -typename Traits::Jacobian > &out) const │ │ │ │ │ -Definition localtoglobaladaptors.hh:125 │ │ │ │ │ -Dune::ScalarLocalToGlobalBasisAdaptor::order │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -return maximum polynomial order of the base function │ │ │ │ │ -Definition localtoglobaladaptors.hh:110 │ │ │ │ │ -Dune::ScalarLocalToGlobalBasisAdaptor::Traits │ │ │ │ │ -LocalToGlobalBasisAdaptorTraits< typename LocalBasis::Traits, Geometry:: │ │ │ │ │ -coorddimension > Traits │ │ │ │ │ -Definition localtoglobaladaptors.hh:84 │ │ │ │ │ -Dune::ScalarLocalToGlobalBasisAdaptor::ScalarLocalToGlobalBasisAdaptor │ │ │ │ │ -ScalarLocalToGlobalBasisAdaptor(const LocalBasis &localBasis_, const Geometry │ │ │ │ │ -&geometry_) │ │ │ │ │ -construct a ScalarLocalToGlobalBasisAdaptor │ │ │ │ │ -Definition localtoglobaladaptors.hh:96 │ │ │ │ │ -Dune::ScalarLocalToGlobalBasisAdaptor::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainLocal &in, std::vector< │ │ │ │ │ -typename Traits::Range > &out) const │ │ │ │ │ -Definition localtoglobaladaptors.hh:119 │ │ │ │ │ -Dune::ScalarLocalToGlobalBasisAdaptor::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -Definition localtoglobaladaptors.hh:101 │ │ │ │ │ -Dune::LocalToGlobalInterpolationAdaptor │ │ │ │ │ -Convert a local interpolation into a global interpolation. │ │ │ │ │ -Definition localtoglobaladaptors.hh:149 │ │ │ │ │ -Dune::LocalToGlobalInterpolationAdaptor::LocalToGlobalInterpolationAdaptor │ │ │ │ │ -LocalToGlobalInterpolationAdaptor(const LocalInterpolation │ │ │ │ │ -&localInterpolation_) │ │ │ │ │ -construct a LocalToGlobalInterpolationAdaptor │ │ │ │ │ -Definition localtoglobaladaptors.hh:165 │ │ │ │ │ -Dune::LocalToGlobalInterpolationAdaptor::interpolate │ │ │ │ │ -void interpolate(const Function &function, std::vector< Coeff > &out) const │ │ │ │ │ -Definition localtoglobaladaptors.hh:170 │ │ │ │ │ -Dune::LocalToGlobalInterpolationAdaptor::Traits │ │ │ │ │ -Traits_ Traits │ │ │ │ │ -Definition localtoglobaladaptors.hh:153 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ -Convert a simple scalar local finite element into a global finite element. │ │ │ │ │ -Definition localtoglobaladaptors.hh:187 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptor::type │ │ │ │ │ +Dune::LocalFiniteElementVariant<_LagrangeSimplexLocalFiniteElement<_D,_R,_2,_2 │ │ │ │ │ +>,_LagrangeCubeLocalFiniteElement<_D,_R,_2,_2_>_> │ │ │ │ │ +Dune::LocalFiniteElementVariant<_LagrangeSimplexLocalFiniteElement<_D,_R,_2,_2 │ │ │ │ │ +>,_LagrangeCubeLocalFiniteElement<_D,_R,_2,_2_>_>::Traits │ │ │ │ │ +typename Dune::LocalFiniteElementTraits< LocalBasis, LocalCoefficients, │ │ │ │ │ +LocalInterpolation > Traits │ │ │ │ │ +Export LocalFiniteElementTraits. │ │ │ │ │ +Definition localfiniteelementvariant.hh:269 │ │ │ │ │ +Dune::LocalFiniteElementVariant::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions. │ │ │ │ │ +Definition localfiniteelementvariant.hh:374 │ │ │ │ │ +Dune::LocalFiniteElementVariant::type │ │ │ │ │ +constexpr GeometryType type() const │ │ │ │ │ +Number of shape functions. │ │ │ │ │ +Definition localfiniteelementvariant.hh:382 │ │ │ │ │ +Dune::LocalFiniteElementVariant::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Provide access to LocalBasis implementation of this LocalFiniteElement. │ │ │ │ │ +Definition localfiniteelementvariant.hh:350 │ │ │ │ │ +Dune::LocalFiniteElementVariant::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Provide access to LocalCoefficients implementation of this LocalFiniteElement. │ │ │ │ │ +Definition localfiniteelementvariant.hh:358 │ │ │ │ │ +Dune::LocalFiniteElementVariant::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Provide access to LocalInterpolation implementation of this LocalFiniteElement. │ │ │ │ │ +Definition localfiniteelementvariant.hh:366 │ │ │ │ │ +Dune::LagrangeCubeLocalFiniteElement │ │ │ │ │ +Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangecube.hh:711 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangesimplex.hh:838 │ │ │ │ │ +Dune::PQ22DLocalFiniteElement │ │ │ │ │ +Definition pq22d.hh:19 │ │ │ │ │ +Dune::PQ22DLocalFiniteElement::Traits │ │ │ │ │ +typename LFEVariant::Traits Traits │ │ │ │ │ +Definition pq22d.hh:23 │ │ │ │ │ +Dune::PQ22DLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition pq22d.hh:46 │ │ │ │ │ +Dune::PQ22DLocalFiniteElement::PQ22DLocalFiniteElement │ │ │ │ │ +PQ22DLocalFiniteElement(const GeometryType >, const std::vector< unsigned int │ │ │ │ │ +> vertexmap) │ │ │ │ │ +Definition pq22d.hh:33 │ │ │ │ │ +Dune::PQ22DLocalFiniteElement::PQ22DLocalFiniteElement │ │ │ │ │ +PQ22DLocalFiniteElement(const GeometryType >) │ │ │ │ │ +Definition pq22d.hh:25 │ │ │ │ │ +Dune::PQ22DLocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition pq22d.hh:57 │ │ │ │ │ +Dune::PQ22DLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition pq22d.hh:51 │ │ │ │ │ +Dune::PQ22DLocalFiniteElement::type │ │ │ │ │ GeometryType type() const │ │ │ │ │ -Definition localtoglobaladaptors.hh:229 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptor::coefficients │ │ │ │ │ -const Traits::Coefficients & coefficients() const │ │ │ │ │ -Definition localtoglobaladaptors.hh:227 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptor::interpolation │ │ │ │ │ -const Traits::Interpolation & interpolation() const │ │ │ │ │ -Definition localtoglobaladaptors.hh:225 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptor::basis │ │ │ │ │ -const Traits::Basis & basis() const │ │ │ │ │ -Definition localtoglobaladaptors.hh:224 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptor:: │ │ │ │ │ -ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ -ScalarLocalToGlobalFiniteElementAdaptor(const LocalFiniteElement &localFE_, │ │ │ │ │ -const Geometry &geometry) │ │ │ │ │ -construct a ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ -Definition localtoglobaladaptors.hh:218 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptor::Traits │ │ │ │ │ -Definition localtoglobaladaptors.hh:191 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptor::Traits::Interpolation │ │ │ │ │ -LocalToGlobalInterpolationAdaptor< typename LocalFiniteElement::Traits:: │ │ │ │ │ -LocalInterpolationType, typename Basis::Traits > Interpolation │ │ │ │ │ -Definition localtoglobaladaptors.hh:196 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptor::Traits::Coefficients │ │ │ │ │ -LocalFiniteElement::Traits::LocalCoefficientsType Coefficients │ │ │ │ │ -Definition localtoglobaladaptors.hh:198 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptor::Traits::Basis │ │ │ │ │ -ScalarLocalToGlobalBasisAdaptor< typename LocalFiniteElement::Traits:: │ │ │ │ │ -LocalBasisType, Geometry > Basis │ │ │ │ │ -Definition localtoglobaladaptors.hh:193 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory │ │ │ │ │ -Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. │ │ │ │ │ -Definition localtoglobaladaptors.hh:244 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory::make │ │ │ │ │ -const FiniteElement make(const Geometry &geometry) │ │ │ │ │ -construct ScalarLocalToGlobalFiniteElementAdaptor │ │ │ │ │ -Definition localtoglobaladaptors.hh:274 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory::FiniteElement │ │ │ │ │ -ScalarLocalToGlobalFiniteElementAdaptor< LocalFiniteElement, Geometry > │ │ │ │ │ -FiniteElement │ │ │ │ │ -Definition localtoglobaladaptors.hh:249 │ │ │ │ │ -Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory:: │ │ │ │ │ -ScalarLocalToGlobalFiniteElementAdaptorFactory │ │ │ │ │ -ScalarLocalToGlobalFiniteElementAdaptorFactory(const LocalFiniteElement │ │ │ │ │ -&localFE_) │ │ │ │ │ -construct a ScalarLocalToGlobalFiniteElementAdaptorFactory │ │ │ │ │ -Definition localtoglobaladaptors.hh:261 │ │ │ │ │ +Definition pq22d.hh:62 │ │ │ │ │ +Dune::PQ22DLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition pq22d.hh:41 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00425.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localfiniteelementvariant.hh File Reference │ │ │ │ +dune-localfunctions: q1.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,47 +65,49 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
localfiniteelementvariant.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
q1.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <type_traits>
│ │ │ │ -#include <variant>
│ │ │ │ -#include <dune/common/typeutilities.hh>
│ │ │ │ -#include <dune/common/std/type_traits.hh>
│ │ │ │ -#include <dune/common/overloadset.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.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::LocalFiniteElementVariant< Implementations >
 Type erasure class for wrapping LocalFiniteElement classes. More...
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 {} │ │ │ │ │ @@ -6,31 +6,31 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -localfiniteelementvariant.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * lagrange │ │ │ │ │ +Classes | Namespaces | Typedefs │ │ │ │ │ +q1.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::LocalFiniteElementVariant<_Implementations_> │ │ │ │ │ -  Type erasure class for wrapping LocalFiniteElement classes. More... │ │ │ │ │ +class  Dune::Q1FiniteElementFactory<_Geometry,_RF_> │ │ │ │ │ +  Factory for global-valued Q1 elements. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +using Dune::Q1LocalFiniteElement = LagrangeCubeLocalFiniteElement< D, R, dim, │ │ │ │ │ + 1 > │ │ │ │ │ +  The local Q1 finite element on cubes. │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00425_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localfiniteelementvariant.hh Source File │ │ │ │ +dune-localfunctions: q1.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,387 +70,83 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
localfiniteelementvariant.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_COMMON_LOCALFINITEELEMENTVARIANT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANT_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <type_traits>
│ │ │ │ -
10#include <variant>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/typeutilities.hh>
│ │ │ │ -
13#include <dune/common/std/type_traits.hh>
│ │ │ │ -
14#include <dune/common/overloadset.hh>
│ │ │ │ -
15
│ │ │ │ -
16#include <dune/geometry/type.hh>
│ │ │ │ -
17
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
21
│ │ │ │ -
22
│ │ │ │ -
23namespace Dune {
│ │ │ │ -
24
│ │ │ │ -
25namespace Impl {
│ │ │ │ -
26
│ │ │ │ -
27 // Helper for visiting a variant containing monostate.
│ │ │ │ -
28 // Since a generic lambda will in most cases not compile
│ │ │ │ -
29 // for monostate, we add special empty overloads for monostate.
│ │ │ │ -
30 // Hence visitIf will simply do nothing in the case of a
│ │ │ │ -
31 // monostate value.
│ │ │ │ -
32 template<class Visitor, class Variant>
│ │ │ │ -
33 void visitIf(Visitor&& visitor, Variant&& variant)
│ │ │ │ -
34 {
│ │ │ │ -
35 auto visitorWithFallback = overload([&](std::monostate&) {}, [&](const std::monostate&) {}, visitor);
│ │ │ │ -
36 std::visit(visitorWithFallback, variant);
│ │ │ │ -
37 }
│ │ │ │ -
38
│ │ │ │ -
39 template<class... Implementations>
│ │ │ │ -
40 class LocalBasisVariant
│ │ │ │ -
41 {
│ │ │ │ -
42
│ │ │ │ -
43 template<class I0, class... II>
│ │ │ │ -
44 struct FirstType
│ │ │ │ -
45 { using type = I0; };
│ │ │ │ -
46
│ │ │ │ -
47 using FirstImpTraits = typename FirstType<Implementations...>::type::Traits;
│ │ │ │ -
48
│ │ │ │ -
49 public:
│ │ │ │ -
50
│ │ │ │ -
51 // We do not simply copy Implementation::LocalBasisTraits because this
│ │ │ │ -
52 // may be implementation specific. To stay clean, we simply put all its
│ │ │ │ -
53 // data into the default LocalBasisTraits.
│ │ │ │ -
54 using Traits = typename Dune::LocalBasisTraits<
│ │ │ │ -
55 typename FirstImpTraits::DomainFieldType,
│ │ │ │ -
56 FirstImpTraits::dimDomain,
│ │ │ │ -
57 typename FirstImpTraits::DomainType,
│ │ │ │ -
58 typename FirstImpTraits::RangeFieldType,
│ │ │ │ -
59 FirstImpTraits::dimRange,
│ │ │ │ -
60 typename FirstImpTraits::RangeType,
│ │ │ │ -
61 typename FirstImpTraits::JacobianType>;
│ │ │ │ -
62
│ │ │ │ -
63 template<class Implementation>
│ │ │ │ -
64 LocalBasisVariant(const Implementation& impl) :
│ │ │ │ -
65 impl_(&impl),
│ │ │ │ -
66 size_(impl.size()),
│ │ │ │ -
67 order_(impl.order())
│ │ │ │ -
68 {}
│ │ │ │ -
69
│ │ │ │ -
70 LocalBasisVariant() = default;
│ │ │ │ -
71 LocalBasisVariant(const LocalBasisVariant& other) = default;
│ │ │ │ -
72 LocalBasisVariant(LocalBasisVariant&& other) = default;
│ │ │ │ -
73 LocalBasisVariant& operator=(const LocalBasisVariant& other) = default;
│ │ │ │ -
74 LocalBasisVariant& operator=(LocalBasisVariant&& other) = default;
│ │ │ │ -
75
│ │ │ │ -
79 unsigned int size() const
│ │ │ │ -
80 {
│ │ │ │ -
81 return size_;
│ │ │ │ -
82 }
│ │ │ │ -
83
│ │ │ │ -
87 unsigned int order() const
│ │ │ │ -
88 {
│ │ │ │ -
89 return order_;
│ │ │ │ -
90 }
│ │ │ │ -
91
│ │ │ │ -
95 inline void evaluateFunction(
│ │ │ │ -
96 const typename Traits::DomainType& x,
│ │ │ │ -
97 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
98 {
│ │ │ │ -
99 Impl::visitIf([&](const auto* impl) { impl->evaluateFunction(x, out); }, impl_);
│ │ │ │ -
100 }
│ │ │ │ -
101
│ │ │ │ -
105 inline void evaluateJacobian(
│ │ │ │ -
106 const typename Traits::DomainType& x,
│ │ │ │ -
107 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
108 {
│ │ │ │ -
109 Impl::visitIf([&](const auto* impl) { impl->evaluateJacobian(x, out); }, impl_);
│ │ │ │ -
110 }
│ │ │ │ -
111
│ │ │ │ -
119 void partial(
│ │ │ │ -
120 const std::array<unsigned int,Traits::dimDomain>& order,
│ │ │ │ -
121 const typename Traits::DomainType& x,
│ │ │ │ -
122 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
123 {
│ │ │ │ -
124 Impl::visitIf([&](const auto* impl) { impl->partial(order, x, out); }, impl_);
│ │ │ │ -
125 }
│ │ │ │ -
126
│ │ │ │ -
127 private:
│ │ │ │ -
128 std::variant<std::monostate, const Implementations*...> impl_;
│ │ │ │ -
129 std::size_t size_;
│ │ │ │ -
130 std::size_t order_;
│ │ │ │ -
131 };
│ │ │ │ -
132
│ │ │ │ -
133
│ │ │ │ -
134 template<class... Implementations>
│ │ │ │ -
135 class LocalCoefficientsVariant
│ │ │ │ -
136 {
│ │ │ │ -
137 public:
│ │ │ │ -
138
│ │ │ │ -
139 template<class Implementation>
│ │ │ │ -
140 LocalCoefficientsVariant(const Implementation& impl) :
│ │ │ │ -
141 impl_(&impl),
│ │ │ │ -
142 size_(impl.size())
│ │ │ │ -
143 {}
│ │ │ │ -
144
│ │ │ │ -
145 LocalCoefficientsVariant() = default;
│ │ │ │ -
146 LocalCoefficientsVariant(const LocalCoefficientsVariant& other) = default;
│ │ │ │ -
147 LocalCoefficientsVariant(LocalCoefficientsVariant&& other) = default;
│ │ │ │ -
148 LocalCoefficientsVariant& operator=(const LocalCoefficientsVariant& other) = default;
│ │ │ │ -
149 LocalCoefficientsVariant& operator=(LocalCoefficientsVariant&& other) = default;
│ │ │ │ -
150
│ │ │ │ -
154 unsigned int size() const
│ │ │ │ -
155 {
│ │ │ │ -
156 return size_;
│ │ │ │ -
157 }
│ │ │ │ -
158
│ │ │ │ -
159 const Dune::LocalKey& localKey (std::size_t i) const
│ │ │ │ -
160 {
│ │ │ │ -
161 // We can't use visitIf since we have to return something
│ │ │ │ -
162 // even for a monostate value. Since the return type is
│ │ │ │ -
163 // an l-value reference, we use a default constructed
│ │ │ │ -
164 // dummy LocalKey value.
│ │ │ │ -
165 static const Dune::LocalKey dummyLocalKey;
│ │ │ │ -
166 return std::visit(overload(
│ │ │ │ -
167 [&](const std::monostate&) -> decltype(auto) { return (dummyLocalKey);},
│ │ │ │ -
168 [&](const auto* impl) -> decltype(auto) { return impl->localKey(i); }), impl_);
│ │ │ │ -
169 }
│ │ │ │ -
170
│ │ │ │ -
171 private:
│ │ │ │ -
172 std::variant<std::monostate, const Implementations*...> impl_;
│ │ │ │ -
173 std::size_t size_;
│ │ │ │ -
174 };
│ │ │ │ -
175
│ │ │ │ -
176
│ │ │ │ -
177 template<class... Implementations>
│ │ │ │ -
178 class LocalInterpolationVariant
│ │ │ │ -
179 {
│ │ │ │ -
180 public:
│ │ │ │ -
181
│ │ │ │ -
182 template<class Implementation>
│ │ │ │ -
183 LocalInterpolationVariant(const Implementation& impl) :
│ │ │ │ -
184 impl_(&impl)
│ │ │ │ -
185 {}
│ │ │ │ -
186
│ │ │ │ -
187 LocalInterpolationVariant() = default;
│ │ │ │ -
188 LocalInterpolationVariant(const LocalInterpolationVariant& other) = default;
│ │ │ │ -
189 LocalInterpolationVariant(LocalInterpolationVariant&& other) = default;
│ │ │ │ -
190 LocalInterpolationVariant& operator=(const LocalInterpolationVariant& other) = default;
│ │ │ │ -
191 LocalInterpolationVariant& operator=(LocalInterpolationVariant&& other) = default;
│ │ │ │ -
192
│ │ │ │ -
193 template<typename F, typename C>
│ │ │ │ -
194 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
195 {
│ │ │ │ -
196 Impl::visitIf([&](const auto* impl) { impl->interpolate(ff, out); }, impl_);
│ │ │ │ -
197 }
│ │ │ │ -
198
│ │ │ │ -
199 private:
│ │ │ │ -
200 std::variant<std::monostate, const Implementations*...> impl_;
│ │ │ │ -
201 };
│ │ │ │ -
202
│ │ │ │ -
203} // namespace Impl
│ │ │ │ -
204
│ │ │ │ -
205
│ │ │ │ -
234 template<class... Implementations>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
236 {
│ │ │ │ -
237
│ │ │ │ -
238 // In each LocalFooVariant we store a std::variant<std::monostate, const FooImpl*...>, i.e. a std::variant
│ │ │ │ -
239 // with the pointer to the Foo implementation unless LocalFiniteElementVariant stores a monostate. In this
│ │ │ │ -
240 // case each LocalFooVariant also stores a monostate (and not a monostate*).
│ │ │ │ -
241 using LocalBasis = Impl::LocalBasisVariant<typename Implementations::Traits::LocalBasisType...>;
│ │ │ │ -
242 using LocalCoefficients = Impl::LocalCoefficientsVariant<typename Implementations::Traits::LocalCoefficientsType...>;
│ │ │ │ -
243 using LocalInterpolation = Impl::LocalInterpolationVariant<typename Implementations::Traits::LocalInterpolationType...>;
│ │ │ │ -
244
│ │ │ │ -
245 // Update members after changing impl_
│ │ │ │ -
246 void updateMembers()
│ │ │ │ -
247 {
│ │ │ │ -
248 std::visit(overload(
│ │ │ │ -
249 [&](std::monostate&) {
│ │ │ │ -
250 localBasis_ = LocalBasis();
│ │ │ │ -
251 localCoefficients_ = LocalCoefficients();
│ │ │ │ -
252 localInterpolation_ = LocalInterpolation();
│ │ │ │ -
253 size_ = 0;
│ │ │ │ -
254 geometryType_ = GeometryType{};
│ │ │ │ -
255 }, [&](auto&& impl) {
│ │ │ │ -
256 localBasis_ = LocalBasis(impl.localBasis());
│ │ │ │ -
257 localCoefficients_ = LocalCoefficients(impl.localCoefficients());
│ │ │ │ -
258 localInterpolation_ = LocalInterpolation(impl.localInterpolation());
│ │ │ │ -
259 size_ = impl.size();
│ │ │ │ -
260 geometryType_ = impl.type();
│ │ │ │ -
261 }), impl_);
│ │ │ │ -
262 }
│ │ │ │ -
263
│ │ │ │ -
264 public:
│ │ │ │ -
265
│ │ │ │ - │ │ │ │ -
270
│ │ │ │ - │ │ │ │ -
275
│ │ │ │ -
│ │ │ │ -
279 LocalFiniteElementVariant(const std::monostate& monostate)
│ │ │ │ -
280 {}
│ │ │ │ -
│ │ │ │ -
281
│ │ │ │ -
288 template<class Implementation,
│ │ │ │ -
289 std::enable_if_t<std::disjunction<std::is_same<std::decay_t<Implementation>, Implementations>...>::value, int> = 0>
│ │ │ │ -
│ │ │ │ -
290 LocalFiniteElementVariant(Implementation&& impl) :
│ │ │ │ -
291 impl_(std::forward<Implementation>(impl))
│ │ │ │ -
292 {
│ │ │ │ -
293 updateMembers();
│ │ │ │ -
294 }
│ │ │ │ -
│ │ │ │ -
295
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
300 impl_(other.impl_)
│ │ │ │ -
301 {
│ │ │ │ -
302 updateMembers();
│ │ │ │ -
303 }
│ │ │ │ -
│ │ │ │ -
304
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
309 impl_(std::move(other.impl_))
│ │ │ │ -
310 {
│ │ │ │ -
311 updateMembers();
│ │ │ │ -
312 }
│ │ │ │ -
│ │ │ │ -
313
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
318 {
│ │ │ │ -
319 impl_ = other.impl_;
│ │ │ │ -
320 updateMembers();
│ │ │ │ -
321 return *this;
│ │ │ │ -
322 }
│ │ │ │ -
│ │ │ │ -
323
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
328 {
│ │ │ │ -
329 impl_ = std::move(other.impl_);
│ │ │ │ -
330 updateMembers();
│ │ │ │ -
331 return *this;
│ │ │ │ -
332 }
│ │ │ │ -
│ │ │ │ -
333
│ │ │ │ -
337 template<class Implementation,
│ │ │ │ -
338 std::enable_if_t<std::disjunction<std::is_same<std::decay_t<Implementation>, Implementations>...>::value, int> = 0>
│ │ │ │ -
│ │ │ │ -
339 LocalFiniteElementVariant& operator=(Implementation&& impl)
│ │ │ │ -
340 {
│ │ │ │ -
341 impl_ = std::forward<Implementation>(impl);
│ │ │ │ -
342 updateMembers();
│ │ │ │ -
343 return *this;
│ │ │ │ -
344 }
│ │ │ │ -
│ │ │ │ -
345
│ │ │ │ -
346
│ │ │ │ -
│ │ │ │ -
350 const typename Traits::LocalBasisType& localBasis() const
│ │ │ │ -
351 {
│ │ │ │ -
352 return localBasis_;
│ │ │ │ -
353 }
│ │ │ │ -
│ │ │ │ -
354
│ │ │ │ -
│ │ │ │ -
358 const typename Traits::LocalCoefficientsType& localCoefficients() const
│ │ │ │ -
359 {
│ │ │ │ -
360 return localCoefficients_;
│ │ │ │ -
361 }
│ │ │ │ -
│ │ │ │ -
362
│ │ │ │ -
│ │ │ │ -
366 const typename Traits::LocalInterpolationType& localInterpolation() const
│ │ │ │ -
367 {
│ │ │ │ -
368 return localInterpolation_;
│ │ │ │ -
369 }
│ │ │ │ -
│ │ │ │ -
370
│ │ │ │ -
│ │ │ │ -
374 unsigned int size() const
│ │ │ │ -
375 {
│ │ │ │ -
376 return size_;
│ │ │ │ -
377 }
│ │ │ │ -
│ │ │ │ -
378
│ │ │ │ -
│ │ │ │ -
382 constexpr GeometryType type() const
│ │ │ │ -
383 {
│ │ │ │ -
384 return geometryType_;
│ │ │ │ -
385 }
│ │ │ │ -
│ │ │ │ -
386
│ │ │ │ -
│ │ │ │ -
398 const auto& variant() const
│ │ │ │ -
399 {
│ │ │ │ -
400 return impl_;
│ │ │ │ -
401 }
│ │ │ │ -
│ │ │ │ -
402
│ │ │ │ -
│ │ │ │ -
408 operator bool () const
│ │ │ │ -
409 {
│ │ │ │ -
410 return not(std::holds_alternative<std::monostate>(variant()));
│ │ │ │ -
411 }
│ │ │ │ -
│ │ │ │ -
412
│ │ │ │ -
413 private:
│ │ │ │ -
414 std::variant<std::monostate, Implementations...> impl_;
│ │ │ │ -
415 std::size_t size_;
│ │ │ │ -
416 GeometryType geometryType_;
│ │ │ │ -
417 LocalBasis localBasis_;
│ │ │ │ -
418 LocalCoefficients localCoefficients_;
│ │ │ │ -
419 LocalInterpolation localInterpolation_;
│ │ │ │ -
420 };
│ │ │ │ -
│ │ │ │ -
421
│ │ │ │ -
422} // end namespace Dune
│ │ │ │ -
423
│ │ │ │ -
424#endif // DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANT_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_Q1_LOCALFINITEELEMENT_HH
│ │ │ │ +
7#define DUNE_Q1_LOCALFINITEELEMENT_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <dune/geometry/type.hh>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
Type erasure class for wrapping LocalFiniteElement classes.
Definition localfiniteelementvariant.hh:236
│ │ │ │ -
typename Dune::LocalFiniteElementTraits< LocalBasis, LocalCoefficients, LocalInterpolation > Traits
Export LocalFiniteElementTraits.
Definition localfiniteelementvariant.hh:269
│ │ │ │ -
const auto & variant() const
Provide access to underlying std::variant.
Definition localfiniteelementvariant.hh:398
│ │ │ │ -
unsigned int size() const
Number of shape functions.
Definition localfiniteelementvariant.hh:374
│ │ │ │ -
constexpr GeometryType type() const
Number of shape functions.
Definition localfiniteelementvariant.hh:382
│ │ │ │ -
LocalFiniteElementVariant(LocalFiniteElementVariant &&other)
Move constructor.
Definition localfiniteelementvariant.hh:308
│ │ │ │ -
LocalFiniteElementVariant & operator=(Implementation &&impl)
Assignment from implementation.
Definition localfiniteelementvariant.hh:339
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Provide access to LocalBasis implementation of this LocalFiniteElement.
Definition localfiniteelementvariant.hh:350
│ │ │ │ -
LocalFiniteElementVariant & operator=(const LocalFiniteElementVariant &other)
Copy assignment.
Definition localfiniteelementvariant.hh:317
│ │ │ │ -
LocalFiniteElementVariant(const std::monostate &monostate)
Construct empty LocalFiniteElementVariant.
Definition localfiniteelementvariant.hh:279
│ │ │ │ -
LocalFiniteElementVariant(const LocalFiniteElementVariant &other)
Copy constructor.
Definition localfiniteelementvariant.hh:299
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Provide access to LocalCoefficients implementation of this LocalFiniteElement.
Definition localfiniteelementvariant.hh:358
│ │ │ │ -
LocalFiniteElementVariant(Implementation &&impl)
Construct LocalFiniteElementVariant.
Definition localfiniteelementvariant.hh:290
│ │ │ │ -
LocalFiniteElementVariant & operator=(LocalFiniteElementVariant &&other)
Move assignment.
Definition localfiniteelementvariant.hh:327
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Provide access to LocalInterpolation implementation of this LocalFiniteElement.
Definition localfiniteelementvariant.hh:366
│ │ │ │ -
LocalFiniteElementVariant()=default
Construct empty LocalFiniteElementVariant.
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.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
│ │ │ │ +
Factory for global-valued Q1 elements.
Definition q1.hh:47
│ │ │ │ +
Q1FiniteElementFactory()
default constructor
Definition q1.hh:57
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,426 +7,85 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -localfiniteelementvariant.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_COMMON_LOCALFINITEELEMENTVARIANT_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANT_HH │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15 │ │ │ │ │ - 16#include │ │ │ │ │ - 17 │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include │ │ │ │ │ - 20#include │ │ │ │ │ - 21 │ │ │ │ │ - 22 │ │ │ │ │ - 23namespace Dune { │ │ │ │ │ - 24 │ │ │ │ │ - 25namespace Impl { │ │ │ │ │ - 26 │ │ │ │ │ - 27 // Helper for visiting a variant containing monostate. │ │ │ │ │ - 28 // Since a generic lambda will in most cases not compile │ │ │ │ │ - 29 // for monostate, we add special empty overloads for monostate. │ │ │ │ │ - 30 // Hence visitIf will simply do nothing in the case of a │ │ │ │ │ - 31 // monostate value. │ │ │ │ │ - 32 template │ │ │ │ │ - 33 void visitIf(Visitor&& visitor, Variant&& variant) │ │ │ │ │ - 34 { │ │ │ │ │ - 35 auto visitorWithFallback = overload([&](std::monostate&) {}, [&](const │ │ │ │ │ -std::monostate&) {}, visitor); │ │ │ │ │ - 36 std::visit(visitorWithFallback, variant); │ │ │ │ │ - 37 } │ │ │ │ │ - 38 │ │ │ │ │ - 39 template │ │ │ │ │ - 40 class LocalBasisVariant │ │ │ │ │ - 41 { │ │ │ │ │ - 42 │ │ │ │ │ - 43 template │ │ │ │ │ - 44 struct FirstType │ │ │ │ │ - 45 { using type = I0; }; │ │ │ │ │ - 46 │ │ │ │ │ - 47 using FirstImpTraits = typename FirstType::type:: │ │ │ │ │ -Traits; │ │ │ │ │ - 48 │ │ │ │ │ - 49 public: │ │ │ │ │ - 50 │ │ │ │ │ - 51 // We do not simply copy Implementation::LocalBasisTraits because this │ │ │ │ │ - 52 // may be implementation specific. To stay clean, we simply put all its │ │ │ │ │ - 53 // data into the default LocalBasisTraits. │ │ │ │ │ - 54 using Traits = typename Dune::LocalBasisTraits< │ │ │ │ │ - 55 typename FirstImpTraits::DomainFieldType, │ │ │ │ │ - 56 FirstImpTraits::dimDomain, │ │ │ │ │ - 57 typename FirstImpTraits::DomainType, │ │ │ │ │ - 58 typename FirstImpTraits::RangeFieldType, │ │ │ │ │ - 59 FirstImpTraits::dimRange, │ │ │ │ │ - 60 typename FirstImpTraits::RangeType, │ │ │ │ │ - 61 typename FirstImpTraits::JacobianType>; │ │ │ │ │ - 62 │ │ │ │ │ - 63 template │ │ │ │ │ - 64 LocalBasisVariant(const Implementation& impl) : │ │ │ │ │ - 65 impl_(&impl), │ │ │ │ │ - 66 size_(impl.size()), │ │ │ │ │ - 67 order_(impl.order()) │ │ │ │ │ - 68 {} │ │ │ │ │ - 69 │ │ │ │ │ - 70 LocalBasisVariant() = default; │ │ │ │ │ - 71 LocalBasisVariant(const LocalBasisVariant& other) = default; │ │ │ │ │ - 72 LocalBasisVariant(LocalBasisVariant&& other) = default; │ │ │ │ │ - 73 LocalBasisVariant& operator=(const LocalBasisVariant& other) = default; │ │ │ │ │ - 74 LocalBasisVariant& operator=(LocalBasisVariant&& other) = default; │ │ │ │ │ - 75 │ │ │ │ │ - 79 unsigned int size() const │ │ │ │ │ - 80 { │ │ │ │ │ - 81 return size_; │ │ │ │ │ - 82 } │ │ │ │ │ - 83 │ │ │ │ │ - 87 unsigned int order() const │ │ │ │ │ - 88 { │ │ │ │ │ - 89 return order_; │ │ │ │ │ - 90 } │ │ │ │ │ - 91 │ │ │ │ │ - 95 inline void evaluateFunction( │ │ │ │ │ - 96 const typename Traits::DomainType& x, │ │ │ │ │ - 97 std::vector& out) const │ │ │ │ │ - 98 { │ │ │ │ │ - 99 Impl::visitIf([&](const auto* impl) { impl->evaluateFunction(x, out); }, │ │ │ │ │ -impl_); │ │ │ │ │ - 100 } │ │ │ │ │ - 101 │ │ │ │ │ - 105 inline void evaluateJacobian( │ │ │ │ │ - 106 const typename Traits::DomainType& x, │ │ │ │ │ - 107 std::vector& out) const │ │ │ │ │ - 108 { │ │ │ │ │ - 109 Impl::visitIf([&](const auto* impl) { impl->evaluateJacobian(x, out); }, │ │ │ │ │ -impl_); │ │ │ │ │ - 110 } │ │ │ │ │ - 111 │ │ │ │ │ - 119 void partial( │ │ │ │ │ - 120 const std::array& order, │ │ │ │ │ - 121 const typename Traits::DomainType& x, │ │ │ │ │ - 122 std::vector& out) const │ │ │ │ │ - 123 { │ │ │ │ │ - 124 Impl::visitIf([&](const auto* impl) { impl->partial(order, x, out); }, │ │ │ │ │ -impl_); │ │ │ │ │ - 125 } │ │ │ │ │ - 126 │ │ │ │ │ - 127 private: │ │ │ │ │ - 128 std::variant impl_; │ │ │ │ │ - 129 std::size_t size_; │ │ │ │ │ - 130 std::size_t order_; │ │ │ │ │ - 131 }; │ │ │ │ │ - 132 │ │ │ │ │ - 133 │ │ │ │ │ - 134 template │ │ │ │ │ - 135 class LocalCoefficientsVariant │ │ │ │ │ - 136 { │ │ │ │ │ - 137 public: │ │ │ │ │ - 138 │ │ │ │ │ - 139 template │ │ │ │ │ - 140 LocalCoefficientsVariant(const Implementation& impl) : │ │ │ │ │ - 141 impl_(&impl), │ │ │ │ │ - 142 size_(impl.size()) │ │ │ │ │ - 143 {} │ │ │ │ │ - 144 │ │ │ │ │ - 145 LocalCoefficientsVariant() = default; │ │ │ │ │ - 146 LocalCoefficientsVariant(const LocalCoefficientsVariant& other) = default; │ │ │ │ │ - 147 LocalCoefficientsVariant(LocalCoefficientsVariant&& other) = default; │ │ │ │ │ - 148 LocalCoefficientsVariant& operator=(const LocalCoefficientsVariant& other) │ │ │ │ │ -= default; │ │ │ │ │ - 149 LocalCoefficientsVariant& operator=(LocalCoefficientsVariant&& other) = │ │ │ │ │ -default; │ │ │ │ │ - 150 │ │ │ │ │ - 154 unsigned int size() const │ │ │ │ │ - 155 { │ │ │ │ │ - 156 return size_; │ │ │ │ │ - 157 } │ │ │ │ │ - 158 │ │ │ │ │ - 159 const Dune::LocalKey& localKey (std::size_t i) const │ │ │ │ │ - 160 { │ │ │ │ │ - 161 // We can't use visitIf since we have to return something │ │ │ │ │ - 162 // even for a monostate value. Since the return type is │ │ │ │ │ - 163 // an l-value reference, we use a default constructed │ │ │ │ │ - 164 // dummy LocalKey value. │ │ │ │ │ - 165 static const Dune::LocalKey dummyLocalKey; │ │ │ │ │ - 166 return std::visit(overload( │ │ │ │ │ - 167 [&](const std::monostate&) -> decltype(auto) { return (dummyLocalKey);}, │ │ │ │ │ - 168 [&](const auto* impl) -> decltype(auto) { return impl->localKey(i); }), │ │ │ │ │ -impl_); │ │ │ │ │ - 169 } │ │ │ │ │ - 170 │ │ │ │ │ - 171 private: │ │ │ │ │ - 172 std::variant impl_; │ │ │ │ │ - 173 std::size_t size_; │ │ │ │ │ - 174 }; │ │ │ │ │ - 175 │ │ │ │ │ - 176 │ │ │ │ │ - 177 template │ │ │ │ │ - 178 class LocalInterpolationVariant │ │ │ │ │ - 179 { │ │ │ │ │ - 180 public: │ │ │ │ │ - 181 │ │ │ │ │ - 182 template │ │ │ │ │ - 183 LocalInterpolationVariant(const Implementation& impl) : │ │ │ │ │ - 184 impl_(&impl) │ │ │ │ │ - 185 {} │ │ │ │ │ - 186 │ │ │ │ │ - 187 LocalInterpolationVariant() = default; │ │ │ │ │ - 188 LocalInterpolationVariant(const LocalInterpolationVariant& other) = │ │ │ │ │ -default; │ │ │ │ │ - 189 LocalInterpolationVariant(LocalInterpolationVariant&& other) = default; │ │ │ │ │ - 190 LocalInterpolationVariant& operator=(const LocalInterpolationVariant& │ │ │ │ │ -other) = default; │ │ │ │ │ - 191 LocalInterpolationVariant& operator=(LocalInterpolationVariant&& other) = │ │ │ │ │ -default; │ │ │ │ │ - 192 │ │ │ │ │ - 193 template │ │ │ │ │ - 194 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ - 195 { │ │ │ │ │ - 196 Impl::visitIf([&](const auto* impl) { impl->interpolate(ff, out); }, │ │ │ │ │ -impl_); │ │ │ │ │ - 197 } │ │ │ │ │ - 198 │ │ │ │ │ - 199 private: │ │ │ │ │ - 200 std::variant impl_; │ │ │ │ │ - 201 }; │ │ │ │ │ - 202 │ │ │ │ │ - 203} // namespace Impl │ │ │ │ │ - 204 │ │ │ │ │ - 205 │ │ │ │ │ - 234 template │ │ │ │ │ -235 class LocalFiniteElementVariant │ │ │ │ │ - 236 { │ │ │ │ │ - 237 │ │ │ │ │ - 238 // In each LocalFooVariant we store a std::variant, i.e. a std::variant │ │ │ │ │ - 239 // with the pointer to the Foo implementation unless │ │ │ │ │ -LocalFiniteElementVariant stores a monostate. In this │ │ │ │ │ - 240 // case each LocalFooVariant also stores a monostate (and not a │ │ │ │ │ -monostate*). │ │ │ │ │ - 241 using LocalBasis = Impl::LocalBasisVariant; │ │ │ │ │ - 242 using LocalCoefficients = Impl::LocalCoefficientsVariant; │ │ │ │ │ - 243 using LocalInterpolation = Impl::LocalInterpolationVariant; │ │ │ │ │ - 244 │ │ │ │ │ - 245 // Update members after changing impl_ │ │ │ │ │ - 246 void updateMembers() │ │ │ │ │ - 247 { │ │ │ │ │ - 248 std::visit(overload( │ │ │ │ │ - 249 [&](std::monostate&) { │ │ │ │ │ - 250 localBasis_ = LocalBasis(); │ │ │ │ │ - 251 localCoefficients_ = LocalCoefficients(); │ │ │ │ │ - 252 localInterpolation_ = LocalInterpolation(); │ │ │ │ │ - 253 size_ = 0; │ │ │ │ │ - 254 geometryType_ = GeometryType{}; │ │ │ │ │ - 255 }, [&](auto&& impl) { │ │ │ │ │ - 256 localBasis_ = LocalBasis(impl.localBasis()); │ │ │ │ │ - 257 localCoefficients_ = LocalCoefficients(impl.localCoefficients()); │ │ │ │ │ - 258 localInterpolation_ = LocalInterpolation(impl.localInterpolation()); │ │ │ │ │ - 259 size_ = impl.size(); │ │ │ │ │ - 260 geometryType_ = impl.type(); │ │ │ │ │ - 261 }), impl_); │ │ │ │ │ - 262 } │ │ │ │ │ - 263 │ │ │ │ │ - 264 public: │ │ │ │ │ - 265 │ │ │ │ │ -269 using Traits = typename Dune::LocalFiniteElementTraits; │ │ │ │ │ - 270 │ │ │ │ │ -274 LocalFiniteElementVariant() = default; │ │ │ │ │ - 275 │ │ │ │ │ -279 LocalFiniteElementVariant(const std::monostate& monostate) │ │ │ │ │ - 280 {} │ │ │ │ │ - 281 │ │ │ │ │ - 288 template, Implementations>...>::value, int> = 0> │ │ │ │ │ -290 LocalFiniteElementVariant(Implementation&& impl) : │ │ │ │ │ - 291 impl_(std::forward(impl)) │ │ │ │ │ - 292 { │ │ │ │ │ - 293 updateMembers(); │ │ │ │ │ - 294 } │ │ │ │ │ - 295 │ │ │ │ │ -299 LocalFiniteElementVariant(const LocalFiniteElementVariant& other) : │ │ │ │ │ - 300 impl_(other.impl_) │ │ │ │ │ - 301 { │ │ │ │ │ - 302 updateMembers(); │ │ │ │ │ - 303 } │ │ │ │ │ - 304 │ │ │ │ │ -308 LocalFiniteElementVariant(LocalFiniteElementVariant&& other) : │ │ │ │ │ - 309 impl_(std::move(other.impl_)) │ │ │ │ │ - 310 { │ │ │ │ │ - 311 updateMembers(); │ │ │ │ │ - 312 } │ │ │ │ │ - 313 │ │ │ │ │ -317 LocalFiniteElementVariant& operator=(const LocalFiniteElementVariant& │ │ │ │ │ -other) │ │ │ │ │ - 318 { │ │ │ │ │ - 319 impl_ = other.impl_; │ │ │ │ │ - 320 updateMembers(); │ │ │ │ │ - 321 return *this; │ │ │ │ │ - 322 } │ │ │ │ │ - 323 │ │ │ │ │ -327 LocalFiniteElementVariant& operator=(LocalFiniteElementVariant&& other) │ │ │ │ │ - 328 { │ │ │ │ │ - 329 impl_ = std::move(other.impl_); │ │ │ │ │ - 330 updateMembers(); │ │ │ │ │ - 331 return *this; │ │ │ │ │ - 332 } │ │ │ │ │ - 333 │ │ │ │ │ - 337 template, Implementations>...>::value, int> = 0> │ │ │ │ │ -339 LocalFiniteElementVariant& operator=(Implementation&& impl) │ │ │ │ │ - 340 { │ │ │ │ │ - 341 impl_ = std::forward(impl); │ │ │ │ │ - 342 updateMembers(); │ │ │ │ │ - 343 return *this; │ │ │ │ │ - 344 } │ │ │ │ │ - 345 │ │ │ │ │ - 346 │ │ │ │ │ -350 const typename Traits::LocalBasisType& localBasis() const │ │ │ │ │ - 351 { │ │ │ │ │ - 352 return localBasis_; │ │ │ │ │ - 353 } │ │ │ │ │ - 354 │ │ │ │ │ -358 const typename Traits::LocalCoefficientsType& localCoefficients() const │ │ │ │ │ - 359 { │ │ │ │ │ - 360 return localCoefficients_; │ │ │ │ │ - 361 } │ │ │ │ │ - 362 │ │ │ │ │ -366 const typename Traits::LocalInterpolationType& localInterpolation() const │ │ │ │ │ - 367 { │ │ │ │ │ - 368 return localInterpolation_; │ │ │ │ │ - 369 } │ │ │ │ │ - 370 │ │ │ │ │ -374 unsigned int size() const │ │ │ │ │ - 375 { │ │ │ │ │ - 376 return size_; │ │ │ │ │ - 377 } │ │ │ │ │ - 378 │ │ │ │ │ -382 constexpr GeometryType type() const │ │ │ │ │ - 383 { │ │ │ │ │ - 384 return geometryType_; │ │ │ │ │ - 385 } │ │ │ │ │ - 386 │ │ │ │ │ -398 const auto& variant() const │ │ │ │ │ - 399 { │ │ │ │ │ - 400 return impl_; │ │ │ │ │ - 401 } │ │ │ │ │ - 402 │ │ │ │ │ -408 operator bool () const │ │ │ │ │ - 409 { │ │ │ │ │ - 410 return not(std::holds_alternative(variant())); │ │ │ │ │ - 411 } │ │ │ │ │ - 412 │ │ │ │ │ - 413 private: │ │ │ │ │ - 414 std::variant impl_; │ │ │ │ │ - 415 std::size_t size_; │ │ │ │ │ - 416 GeometryType geometryType_; │ │ │ │ │ - 417 LocalBasis localBasis_; │ │ │ │ │ - 418 LocalCoefficients localCoefficients_; │ │ │ │ │ - 419 LocalInterpolation localInterpolation_; │ │ │ │ │ - 420 }; │ │ │ │ │ - 421 │ │ │ │ │ - 422} // end namespace Dune │ │ │ │ │ - 423 │ │ │ │ │ - 424#endif // DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANT_HH │ │ │ │ │ + 5 │ │ │ │ │ + 6#ifndef DUNE_Q1_LOCALFINITEELEMENT_HH │ │ │ │ │ + 7#define DUNE_Q1_LOCALFINITEELEMENT_HH │ │ │ │ │ + 8 │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15#warning This header is deprecated │ │ │ │ │ + 16 │ │ │ │ │ + 17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ + 19 │ │ │ │ │ + 27 template │ │ │ │ │ +28 using Q1LocalFiniteElement │ │ │ │ │ + 29 [[deprecated("use LagrangeCubeLocalFiniteElement instead")]] │ │ │ │ │ + 30 = LagrangeCubeLocalFiniteElement; │ │ │ │ │ + 31 │ │ │ │ │ + 32 │ │ │ │ │ + 34 │ │ │ │ │ + 39 template │ │ │ │ │ +40 class Q1FiniteElementFactory : │ │ │ │ │ + 41 public ScalarLocalToGlobalFiniteElementAdaptorFactory< │ │ │ │ │ + 42 LagrangeCubeLocalFiniteElement< │ │ │ │ │ + 43 typename Geometry::ctype, RF, Geometry::mydimension, 1 │ │ │ │ │ + 44 >, │ │ │ │ │ + 45 Geometry │ │ │ │ │ + 46 > │ │ │ │ │ + 47 { │ │ │ │ │ + 48 typedef LagrangeCubeLocalFiniteElement< │ │ │ │ │ + 49 typename Geometry::ctype, RF, Geometry::mydimension, 1 │ │ │ │ │ + 50 > LFE; │ │ │ │ │ + 51 typedef ScalarLocalToGlobalFiniteElementAdaptorFactory Base; │ │ │ │ │ + 52 │ │ │ │ │ + 53 static const LFE lfe; │ │ │ │ │ + 54 │ │ │ │ │ + 55 public: │ │ │ │ │ +57 Q1FiniteElementFactory() : Base(lfe) {} │ │ │ │ │ + 58 }; │ │ │ │ │ + 59 │ │ │ │ │ + 60 template │ │ │ │ │ + 61 const typename Q1FiniteElementFactory::LFE │ │ │ │ │ + 62 Q1FiniteElementFactory::lfe; │ │ │ │ │ + 63} │ │ │ │ │ + 64 │ │ │ │ │ + 65#endif │ │ │ │ │ +localtoglobaladaptors.hh │ │ │ │ │ localfiniteelementtraits.hh │ │ │ │ │ -localkey.hh │ │ │ │ │ +lagrangecube.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementVariant │ │ │ │ │ -Type erasure class for wrapping LocalFiniteElement classes. │ │ │ │ │ -Definition localfiniteelementvariant.hh:236 │ │ │ │ │ -Dune::LocalFiniteElementVariant::Traits │ │ │ │ │ -typename Dune::LocalFiniteElementTraits< LocalBasis, LocalCoefficients, │ │ │ │ │ -LocalInterpolation > Traits │ │ │ │ │ -Export LocalFiniteElementTraits. │ │ │ │ │ -Definition localfiniteelementvariant.hh:269 │ │ │ │ │ -Dune::LocalFiniteElementVariant::variant │ │ │ │ │ -const auto & variant() const │ │ │ │ │ -Provide access to underlying std::variant. │ │ │ │ │ -Definition localfiniteelementvariant.hh:398 │ │ │ │ │ -Dune::LocalFiniteElementVariant::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions. │ │ │ │ │ -Definition localfiniteelementvariant.hh:374 │ │ │ │ │ -Dune::LocalFiniteElementVariant::type │ │ │ │ │ -constexpr GeometryType type() const │ │ │ │ │ -Number of shape functions. │ │ │ │ │ -Definition localfiniteelementvariant.hh:382 │ │ │ │ │ -Dune::LocalFiniteElementVariant::LocalFiniteElementVariant │ │ │ │ │ -LocalFiniteElementVariant(LocalFiniteElementVariant &&other) │ │ │ │ │ -Move constructor. │ │ │ │ │ -Definition localfiniteelementvariant.hh:308 │ │ │ │ │ -Dune::LocalFiniteElementVariant::operator= │ │ │ │ │ -LocalFiniteElementVariant & operator=(Implementation &&impl) │ │ │ │ │ -Assignment from implementation. │ │ │ │ │ -Definition localfiniteelementvariant.hh:339 │ │ │ │ │ -Dune::LocalFiniteElementVariant::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Provide access to LocalBasis implementation of this LocalFiniteElement. │ │ │ │ │ -Definition localfiniteelementvariant.hh:350 │ │ │ │ │ -Dune::LocalFiniteElementVariant::operator= │ │ │ │ │ -LocalFiniteElementVariant & operator=(const LocalFiniteElementVariant &other) │ │ │ │ │ -Copy assignment. │ │ │ │ │ -Definition localfiniteelementvariant.hh:317 │ │ │ │ │ -Dune::LocalFiniteElementVariant::LocalFiniteElementVariant │ │ │ │ │ -LocalFiniteElementVariant(const std::monostate &monostate) │ │ │ │ │ -Construct empty LocalFiniteElementVariant. │ │ │ │ │ -Definition localfiniteelementvariant.hh:279 │ │ │ │ │ -Dune::LocalFiniteElementVariant::LocalFiniteElementVariant │ │ │ │ │ -LocalFiniteElementVariant(const LocalFiniteElementVariant &other) │ │ │ │ │ -Copy constructor. │ │ │ │ │ -Definition localfiniteelementvariant.hh:299 │ │ │ │ │ -Dune::LocalFiniteElementVariant::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Provide access to LocalCoefficients implementation of this LocalFiniteElement. │ │ │ │ │ -Definition localfiniteelementvariant.hh:358 │ │ │ │ │ -Dune::LocalFiniteElementVariant::LocalFiniteElementVariant │ │ │ │ │ -LocalFiniteElementVariant(Implementation &&impl) │ │ │ │ │ -Construct LocalFiniteElementVariant. │ │ │ │ │ -Definition localfiniteelementvariant.hh:290 │ │ │ │ │ -Dune::LocalFiniteElementVariant::operator= │ │ │ │ │ -LocalFiniteElementVariant & operator=(LocalFiniteElementVariant &&other) │ │ │ │ │ -Move assignment. │ │ │ │ │ -Definition localfiniteelementvariant.hh:327 │ │ │ │ │ -Dune::LocalFiniteElementVariant::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Provide access to LocalInterpolation implementation of this LocalFiniteElement. │ │ │ │ │ -Definition localfiniteelementvariant.hh:366 │ │ │ │ │ -Dune::LocalFiniteElementVariant::LocalFiniteElementVariant │ │ │ │ │ -LocalFiniteElementVariant()=default │ │ │ │ │ -Construct empty LocalFiniteElementVariant. │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -localbasis.hh │ │ │ │ │ +Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory │ │ │ │ │ +Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. │ │ │ │ │ +Definition localtoglobaladaptors.hh:244 │ │ │ │ │ +Dune::LagrangeCubeLocalFiniteElement │ │ │ │ │ +Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangecube.hh:711 │ │ │ │ │ +Dune::Q1FiniteElementFactory │ │ │ │ │ +Factory for global-valued Q1 elements. │ │ │ │ │ +Definition q1.hh:47 │ │ │ │ │ +Dune::Q1FiniteElementFactory::Q1FiniteElementFactory │ │ │ │ │ +Q1FiniteElementFactory() │ │ │ │ │ +default constructor │ │ │ │ │ +Definition q1.hh:57 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00428.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localfiniteelementvariantcache.hh File Reference │ │ │ │ +dune-localfunctions: lagrangesimplex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
localfiniteelementvariantcache.hh File Reference
│ │ │ │ +
lagrangesimplex.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <tuple>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <type_traits>
│ │ │ │ -#include <dune/common/std/type_traits.hh>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/typelist.hh>
│ │ │ │ -#include <dune/common/hybridutilities.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/geometry/typeindex.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementvariant.hh>
│ │ │ │ +
#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>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::LocalFiniteElementVariantCache< Base >
 A cache storing a compile time selection of local finite element implementations. More...
class  Dune::LagrangeSimplexLocalFiniteElement< D, R, d, k >
 Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,33 +6,33 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ + * lagrange │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -localfiniteelementvariantcache.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +lagrangesimplex.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::LocalFiniteElementVariantCache<_Base_> │ │ │ │ │ -  A cache storing a compile time selection of local finite element │ │ │ │ │ - implementations. More... │ │ │ │ │ +class  Dune::LagrangeSimplexLocalFiniteElement<_D,_R,_d,_k_> │ │ │ │ │ +  Lagrange finite element for simplices with arbitrary compile-time │ │ │ │ │ + dimension and polynomial order. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00428_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localfiniteelementvariantcache.hh Source File │ │ │ │ +dune-localfunctions: lagrangesimplex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,138 +70,879 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
localfiniteelementvariantcache.hh
│ │ │ │ +
lagrangesimplex.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_COMMON_LOCALFINITEELEMENTVARIANTCACHE_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANTCACHE_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGESIMPLEX_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGESIMPLEX_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9#include <tuple>
│ │ │ │ -
10#include <utility>
│ │ │ │ -
11#include <type_traits>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/common/std/type_traits.hh>
│ │ │ │ -
14#include <dune/common/exceptions.hh>
│ │ │ │ -
15#include <dune/common/typelist.hh>
│ │ │ │ -
16#include <dune/common/hybridutilities.hh>
│ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <numeric>
│ │ │ │ +
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>
│ │ │ │ +
15
│ │ │ │ +
16#include <dune/geometry/referenceelements.hh>
│ │ │ │
17
│ │ │ │ -
18#include <dune/geometry/type.hh>
│ │ │ │ -
19#include <dune/geometry/typeindex.hh>
│ │ │ │ -
20
│ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
22
│ │ │ │ -
23
│ │ │ │ -
24namespace Dune {
│ │ │ │ -
25
│ │ │ │ -
26namespace Impl {
│ │ │ │ -
27
│ │ │ │ -
28 // This class provides the index method of LocalGeometryTypeIndex
│ │ │ │ -
29 // but throws a Dune::RangeError if the dimension does not match.
│ │ │ │ -
30 // This can be helpful to catch errors in a LocalFiniteElementVariantCache
│ │ │ │ -
31 // instance based on dimension specific GeometryType indices.
│ │ │ │ -
32 template<std::size_t dim>
│ │ │ │ -
33 struct FixedDimLocalGeometryTypeIndex {
│ │ │ │ -
34 inline static std::size_t index(const GeometryType &gt)
│ │ │ │ -
35 {
│ │ │ │ -
36 if (gt.dim() != dim)
│ │ │ │ -
37 DUNE_THROW(Dune::RangeError, "Asking for dim=" << dim << " specific index of GeometryType with dimension " << gt.dim());
│ │ │ │ -
38 return LocalGeometryTypeIndex::index(gt);
│ │ │ │ -
39 }
│ │ │ │ -
40 };
│ │ │ │ -
41
│ │ │ │ -
42} // end namespace Impl
│ │ │ │ -
43
│ │ │ │ -
66template<class Base>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
68{
│ │ │ │ -
69
│ │ │ │ -
70 template<class LFEImplTuple>
│ │ │ │ -
71 struct GenerateLFEVariant;
│ │ │ │ -
72
│ │ │ │ -
73 template<class Index, class... LFEImpl>
│ │ │ │ -
74 struct GenerateLFEVariant<std::tuple<std::pair<Index, LFEImpl>...>>
│ │ │ │ -
75 {
│ │ │ │ -
76 using type = UniqueTypes_t<LocalFiniteElementVariant, decltype(std::declval<LFEImpl>()())...>;
│ │ │ │ -
77 };
│ │ │ │ +
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 using Base::getImplementations;
│ │ │ │ -
80 using Base::index;
│ │ │ │ -
81 using Implementations = decltype(std::declval<Base>().getImplementations());
│ │ │ │ -
82
│ │ │ │ -
83public:
│ │ │ │ -
84
│ │ │ │ -
92 using FiniteElementType = typename GenerateLFEVariant<Implementations>::type;
│ │ │ │ -
93
│ │ │ │ -
98 template<class... Args>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
100 Base(std::forward<Args>(args)...)
│ │ │ │ -
101 {
│ │ │ │ -
102 Dune::Hybrid::forEach(getImplementations(), [&,this](auto feImpl) {
│ │ │ │ -
103 auto implIndex = feImpl.first;
│ │ │ │ -
104 if (cache_.size() < implIndex+1)
│ │ │ │ -
105 cache_.resize(implIndex+1);
│ │ │ │ -
106 cache_[implIndex] = feImpl.second();
│ │ │ │ -
107 });
│ │ │ │ -
108 }
│ │ │ │ -
│ │ │ │ -
109
│ │ │ │ - │ │ │ │ -
112
│ │ │ │ - │ │ │ │ -
115
│ │ │ │ -
120 template<class... Key>
│ │ │ │ -
│ │ │ │ -
121 const auto& get(const Key&... key) const
│ │ │ │ -
122 {
│ │ │ │ -
123 auto implIndex = index(key...);
│ │ │ │ -
124 if (implIndex >= cache_.size())
│ │ │ │ -
125 DUNE_THROW(Dune::RangeError,"There is no LocalFiniteElement of the requested type.");
│ │ │ │ -
126 if (not(cache_[implIndex]))
│ │ │ │ -
127 DUNE_THROW(Dune::RangeError,"There is no LocalFiniteElement of the requested type.");
│ │ │ │ -
128 return cache_[implIndex];
│ │ │ │ -
129 }
│ │ │ │ -
│ │ │ │ -
130
│ │ │ │ -
131private:
│ │ │ │ -
132 std::vector<FiniteElementType> cache_;
│ │ │ │ -
133};
│ │ │ │ -
│ │ │ │ -
134
│ │ │ │ -
135
│ │ │ │ -
136
│ │ │ │ -
137} // namespace Dune
│ │ │ │ -
138
│ │ │ │ -
139
│ │ │ │ -
140
│ │ │ │ -
141
│ │ │ │ -
142#endif // DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANT_HH
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
A cache storing a compile time selection of local finite element implementations.
Definition localfiniteelementvariantcache.hh:68
│ │ │ │ -
LocalFiniteElementVariantCache(Args &&... args)
Default constructor.
Definition localfiniteelementvariantcache.hh:99
│ │ │ │ -
LocalFiniteElementVariantCache(LocalFiniteElementVariantCache &&other)=default
Move constructor.
│ │ │ │ -
const auto & get(const Key &... key) const
Get the LocalFiniteElement for the given key data.
Definition localfiniteelementvariantcache.hh:121
│ │ │ │ -
LocalFiniteElementVariantCache(const LocalFiniteElementVariantCache &other)=default
Copy constructor.
│ │ │ │ -
typename GenerateLFEVariant< Implementations >::type FiniteElementType
Type of exported LocalFiniteElement's.
Definition localfiniteelementvariantcache.hh:92
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,151 +7,931 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -localfiniteelementvariantcache.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +lagrangesimplex.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_COMMON_LOCALFINITEELEMENTVARIANTCACHE_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANTCACHE_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGESIMPLEX_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGESIMPLEX_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16#include │ │ │ │ │ 17 │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include │ │ │ │ │ - 20 │ │ │ │ │ - 21#include │ │ │ │ │ + 18#include │ │ │ │ │ + 19#include │ │ │ │ │ + 20#include │ │ │ │ │ + 21#include │ │ │ │ │ 22 │ │ │ │ │ - 23 │ │ │ │ │ - 24namespace Dune { │ │ │ │ │ - 25 │ │ │ │ │ - 26namespace Impl { │ │ │ │ │ - 27 │ │ │ │ │ - 28 // This class provides the index method of LocalGeometryTypeIndex │ │ │ │ │ - 29 // but throws a Dune::RangeError if the dimension does not match. │ │ │ │ │ - 30 // This can be helpful to catch errors in a LocalFiniteElementVariantCache │ │ │ │ │ - 31 // instance based on dimension specific GeometryType indices. │ │ │ │ │ - 32 template │ │ │ │ │ - 33 struct FixedDimLocalGeometryTypeIndex { │ │ │ │ │ - 34 inline static std::size_t index(const GeometryType >) │ │ │ │ │ - 35 { │ │ │ │ │ - 36 if (gt.dim() != dim) │ │ │ │ │ - 37 DUNE_THROW(Dune::RangeError, "Asking for dim=" << dim << " specific index │ │ │ │ │ -of GeometryType with dimension " << gt.dim()); │ │ │ │ │ - 38 return LocalGeometryTypeIndex::index(gt); │ │ │ │ │ - 39 } │ │ │ │ │ - 40 }; │ │ │ │ │ - 41 │ │ │ │ │ - 42} // end namespace Impl │ │ │ │ │ - 43 │ │ │ │ │ - 66template │ │ │ │ │ -67class LocalFiniteElementVariantCache : Base │ │ │ │ │ - 68{ │ │ │ │ │ - 69 │ │ │ │ │ - 70 template │ │ │ │ │ - 71 struct GenerateLFEVariant; │ │ │ │ │ - 72 │ │ │ │ │ - 73 template │ │ │ │ │ - 74 struct GenerateLFEVariant...>> │ │ │ │ │ - 75 { │ │ │ │ │ - 76 using type = UniqueTypes_t()())...>; │ │ │ │ │ - 77 }; │ │ │ │ │ + 23namespace Dune { 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 Traits::DomainType& 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 using Base::getImplementations; │ │ │ │ │ - 80 using Base::index; │ │ │ │ │ - 81 using Implementations = decltype(std::declval().getImplementations │ │ │ │ │ + 79 if (dim==1) │ │ │ │ │ + 80 { │ │ │ │ │ + 81 for (unsigned int i=0; i=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& 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 Traits::DomainType& 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 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 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 │ │ │ │ │ ()); │ │ │ │ │ - 82 │ │ │ │ │ - 83public: │ │ │ │ │ - 84 │ │ │ │ │ -92 using FiniteElementType = typename GenerateLFEVariant:: │ │ │ │ │ -type; │ │ │ │ │ - 93 │ │ │ │ │ - 98 template │ │ │ │ │ -99 LocalFiniteElementVariantCache(Args&&... args) : │ │ │ │ │ - 100 Base(std::forward(args)...) │ │ │ │ │ - 101 { │ │ │ │ │ - 102 Dune::Hybrid::forEach(getImplementations(), [&,this](auto feImpl) { │ │ │ │ │ - 103 auto implIndex = feImpl.first; │ │ │ │ │ - 104 if (cache_.size() < implIndex+1) │ │ │ │ │ - 105 cache_.resize(implIndex+1); │ │ │ │ │ - 106 cache_[implIndex] = feImpl.second(); │ │ │ │ │ - 107 }); │ │ │ │ │ - 108 } │ │ │ │ │ - 109 │ │ │ │ │ -111 LocalFiniteElementVariantCache(const LocalFiniteElementVariantCache& other) │ │ │ │ │ -= default; │ │ │ │ │ - 112 │ │ │ │ │ -114 LocalFiniteElementVariantCache(LocalFiniteElementVariantCache&& other) = │ │ │ │ │ -default; │ │ │ │ │ - 115 │ │ │ │ │ - 120 template │ │ │ │ │ -121 const auto& get(const Key&... key) const │ │ │ │ │ - 122 { │ │ │ │ │ - 123 auto implIndex = index(key...); │ │ │ │ │ - 124 if (implIndex >= cache_.size()) │ │ │ │ │ - 125 DUNE_THROW(Dune::RangeError,"There is no LocalFiniteElement of the │ │ │ │ │ -requested type."); │ │ │ │ │ - 126 if (not(cache_[implIndex])) │ │ │ │ │ - 127 DUNE_THROW(Dune::RangeError,"There is no LocalFiniteElement of the │ │ │ │ │ -requested type."); │ │ │ │ │ - 128 return cache_[implIndex]; │ │ │ │ │ - 129 } │ │ │ │ │ - 130 │ │ │ │ │ - 131private: │ │ │ │ │ - 132 std::vector cache_; │ │ │ │ │ - 133}; │ │ │ │ │ - 134 │ │ │ │ │ - 135 │ │ │ │ │ - 136 │ │ │ │ │ - 137} // namespace Dune │ │ │ │ │ - 138 │ │ │ │ │ - 139 │ │ │ │ │ - 140 │ │ │ │ │ - 141 │ │ │ │ │ - 142#endif // DUNE_LOCALFUNCTIONS_COMMON_LOCALFINITEELEMENTVARIANT_HH │ │ │ │ │ -localfiniteelementvariant.hh │ │ │ │ │ + 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 │ │ │ │ │ +837 class LagrangeSimplexLocalFiniteElement │ │ │ │ │ + 838 { │ │ │ │ │ + 839 public: │ │ │ │ │ +842 using Traits = LocalFiniteElementTraits, │ │ │ │ │ + 843 Impl::LagrangeSimplexLocalCoefficients, │ │ │ │ │ + 844 Impl::LagrangeSimplexLocalInterpolation > >; │ │ │ │ │ + 845 │ │ │ │ │ +847 LagrangeSimplexLocalFiniteElement() {} │ │ │ │ │ + 848 │ │ │ │ │ + 853 template │ │ │ │ │ +854 LagrangeSimplexLocalFiniteElement(const VertexMap& vertexmap) │ │ │ │ │ + 855 : coefficients_(vertexmap) │ │ │ │ │ + 856 {} │ │ │ │ │ + 857 │ │ │ │ │ +860 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 861 { │ │ │ │ │ + 862 return basis_; │ │ │ │ │ + 863 } │ │ │ │ │ + 864 │ │ │ │ │ +867 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 868 { │ │ │ │ │ + 869 return coefficients_; │ │ │ │ │ + 870 } │ │ │ │ │ + 871 │ │ │ │ │ +874 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 875 { │ │ │ │ │ + 876 return interpolation_; │ │ │ │ │ + 877 } │ │ │ │ │ + 878 │ │ │ │ │ +880 static constexpr std::size_t size () │ │ │ │ │ + 881 { │ │ │ │ │ + 882 return Impl::LagrangeSimplexLocalBasis::size(); │ │ │ │ │ + 883 } │ │ │ │ │ + 884 │ │ │ │ │ +887 static constexpr GeometryType type () │ │ │ │ │ + 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 │ │ │ │ │ +localkey.hh │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementVariantCache │ │ │ │ │ -A cache storing a compile time selection of local finite element │ │ │ │ │ -implementations. │ │ │ │ │ -Definition localfiniteelementvariantcache.hh:68 │ │ │ │ │ -Dune::LocalFiniteElementVariantCache::LocalFiniteElementVariantCache │ │ │ │ │ -LocalFiniteElementVariantCache(Args &&... args) │ │ │ │ │ -Default constructor. │ │ │ │ │ -Definition localfiniteelementvariantcache.hh:99 │ │ │ │ │ -Dune::LocalFiniteElementVariantCache::LocalFiniteElementVariantCache │ │ │ │ │ -LocalFiniteElementVariantCache(LocalFiniteElementVariantCache &&other)=default │ │ │ │ │ -Move constructor. │ │ │ │ │ -Dune::LocalFiniteElementVariantCache::get │ │ │ │ │ -const auto & get(const Key &... key) const │ │ │ │ │ -Get the LocalFiniteElement for the given key data. │ │ │ │ │ -Definition localfiniteelementvariantcache.hh:121 │ │ │ │ │ -Dune::LocalFiniteElementVariantCache::LocalFiniteElementVariantCache │ │ │ │ │ -LocalFiniteElementVariantCache(const LocalFiniteElementVariantCache │ │ │ │ │ -&other)=default │ │ │ │ │ -Copy constructor. │ │ │ │ │ -Dune::LocalFiniteElementVariantCache::FiniteElementType │ │ │ │ │ -typename GenerateLFEVariant< Implementations >::type FiniteElementType │ │ │ │ │ -Type of exported LocalFiniteElement's. │ │ │ │ │ -Definition localfiniteelementvariantcache.hh:92 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LocalBasisTraits::RangeType │ │ │ │ │ +R RangeType │ │ │ │ │ +range type │ │ │ │ │ +Definition common/localbasis.hh:51 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangesimplex.hh:838 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Returns object that evaluates degrees of freedom. │ │ │ │ │ +Definition lagrangesimplex.hh:874 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ +Definition lagrangesimplex.hh:860 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement::LagrangeSimplexLocalFiniteElement │ │ │ │ │ +LagrangeSimplexLocalFiniteElement() │ │ │ │ │ +Definition lagrangesimplex.hh:847 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement::size │ │ │ │ │ +static constexpr std::size_t size() │ │ │ │ │ +The number of shape functions. │ │ │ │ │ +Definition lagrangesimplex.hh:880 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement::LagrangeSimplexLocalFiniteElement │ │ │ │ │ +LagrangeSimplexLocalFiniteElement(const VertexMap &vertexmap) │ │ │ │ │ +Definition lagrangesimplex.hh:854 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ +Definition lagrangesimplex.hh:867 │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +The reference element that the local finite element is defined on. │ │ │ │ │ +Definition lagrangesimplex.hh:887 │ │ │ │ │ +localbasis.hh │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00431.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: virtualinterface.hh File Reference │ │ │ │ +dune-localfunctions: pk.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,63 +65,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
virtualinterface.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
pk.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <type_traits>
│ │ │ │ -#include <array>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <functional>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::LocalFiniteElementFunctionBase< FE >
 Return a proper base class for functions to use with LocalInterpolation. More...
 
struct  Dune::LocalFiniteElementFunctionBase< FE >::FunctionBaseDummy::Traits
 
class  Dune::LocalBasisVirtualInterface< T >
 virtual base class for a local basis More...
 
class  Dune::LocalInterpolationVirtualInterfaceBase< DomainType, RangeType >
 virtual base class for a local interpolation More...
 
class  Dune::LocalInterpolationVirtualInterface< DomainType, RangeType >
 virtual base class for a local interpolation More...
 
class  Dune::LocalCoefficientsVirtualInterface
 virtual base class for local coefficients More...
 
class  Dune::LocalFiniteElementVirtualInterface< T >
 virtual base class for local finite elements with functions More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

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

│ │ │ │ +Typedefs

template<class D , class R , int d, int k>
using Dune::PkLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, d, k >
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,48 +6,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -virtualinterface.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * lagrange │ │ │ │ │ +Namespaces | Typedefs │ │ │ │ │ +pk.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ - class  Dune::LocalFiniteElementFunctionBase<_FE_> │ │ │ │ │ -  Return a proper base class for functions to use with │ │ │ │ │ - LocalInterpolation. More... │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::LocalFiniteElementFunctionBase<_FE_>::FunctionBaseDummy::Traits │ │ │ │ │ -  │ │ │ │ │ - class  Dune::LocalBasisVirtualInterface<_T_> │ │ │ │ │ -  virtual base class for a local basis More... │ │ │ │ │ -  │ │ │ │ │ - class  Dune::LocalInterpolationVirtualInterfaceBase<_DomainType,_RangeType_> │ │ │ │ │ -  virtual base class for a local interpolation More... │ │ │ │ │ -  │ │ │ │ │ - class  Dune::LocalInterpolationVirtualInterface<_DomainType,_RangeType_> │ │ │ │ │ -  virtual base class for a local interpolation More... │ │ │ │ │ -  │ │ │ │ │ - class  Dune::LocalCoefficientsVirtualInterface │ │ │ │ │ -  virtual base class for local coefficients More... │ │ │ │ │ -  │ │ │ │ │ - class  Dune::LocalFiniteElementVirtualInterface<_T_> │ │ │ │ │ -  virtual base class for local finite elements with functions More... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +using Dune::PkLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, d, │ │ │ │ │ + k > │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00431_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: virtualinterface.hh Source File │ │ │ │ +dune-localfunctions: pk.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,300 +70,45 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
virtualinterface.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_LOCALFUNCTIONS_COMMON_VIRTUALINTERFACE_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_COMMON_VIRTUALINTERFACE_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <type_traits>
│ │ │ │ -
9#include <array>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11#include <functional>
│ │ │ │ +
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
│ │ │ │ -
13#include <dune/geometry/type.hh>
│ │ │ │ -
14
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
19
│ │ │ │ -
20namespace Dune
│ │ │ │ -
21{
│ │ │ │ -
22
│ │ │ │ -
23 // forward declaration needed by the helper traits
│ │ │ │ -
24 template<class DomainType, class RangeType>
│ │ │ │ -
25 class LocalInterpolationVirtualInterface;
│ │ │ │ -
26
│ │ │ │ -
27 // -----------------------------------------------------------------
│ │ │ │ -
28 // Helper traits classes
│ │ │ │ -
29 // -----------------------------------------------------------------
│ │ │ │ -
30
│ │ │ │ -
43 template<class FE>
│ │ │ │ -
│ │ │ │ -
44 class
│ │ │ │ -
45 [[deprecated("Dune::LocalFiniteElementFunctionBase is deprecated after Dune 2.7. You can now pass functions providing operator() to interpolate.")]]
│ │ │ │ - │ │ │ │ -
47 {
│ │ │ │ -
48 typedef typename FE::Traits::LocalBasisType::Traits::DomainType Domain;
│ │ │ │ -
49 typedef typename FE::Traits::LocalBasisType::Traits::RangeType Range;
│ │ │ │ -
50
│ │ │ │ -
51 // Hack: Keep a copy of Dune::Function here. This allows to avoid depending
│ │ │ │ -
52 // on the deprecated dune-common header while still keeping the LocalFiniteElementFunctionBase
│ │ │ │ -
53 // mechanism working during its deprecation period.
│ │ │ │ -
54 class FunctionBaseDummy
│ │ │ │ -
55 {
│ │ │ │ -
56 public:
│ │ │ │ -
57
│ │ │ │ -
58 using RangeType = Range;
│ │ │ │ -
59 using DomainType = Domain;
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ -
61 struct Traits
│ │ │ │ -
62 {
│ │ │ │ -
63 using RangeType = Range;
│ │ │ │ -
64 using DomainType = Domain;
│ │ │ │ -
65 };
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
67 void evaluate(const DomainType& x, RangeType& y) const;
│ │ │ │ -
68 };
│ │ │ │ -
69
│ │ │ │ -
70 public:
│ │ │ │ -
71
│ │ │ │ -
72 using VirtualFunctionBase = FunctionBaseDummy;
│ │ │ │ -
73 using FunctionBase = FunctionBaseDummy;
│ │ │ │ -
74
│ │ │ │ -
80 using type = FunctionBaseDummy;
│ │ │ │ -
81 };
│ │ │ │ -
│ │ │ │ -
82
│ │ │ │ -
83
│ │ │ │ -
84
│ │ │ │ -
85 // -----------------------------------------------------------------
│ │ │ │ -
86 // Basis
│ │ │ │ -
87 // -----------------------------------------------------------------
│ │ │ │ -
88
│ │ │ │ -
95 template<class T>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
97 {
│ │ │ │ -
98 public:
│ │ │ │ -
99 using Traits = T;
│ │ │ │ -
100
│ │ │ │ -
101
│ │ │ │ - │ │ │ │ -
103
│ │ │ │ -
105 virtual unsigned int size () const = 0;
│ │ │ │ -
106
│ │ │ │ -
108 virtual unsigned int order () const = 0;
│ │ │ │ -
109
│ │ │ │ -
115 virtual void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
116 std::vector<typename Traits::RangeType>& out) const = 0;
│ │ │ │ -
117
│ │ │ │ -
126 virtual void evaluateJacobian(const typename Traits::DomainType& in, // position
│ │ │ │ -
127 std::vector<typename Traits::JacobianType>& out) const = 0;
│ │ │ │ -
128
│ │ │ │ -
134 virtual void partial(const std::array<unsigned int,Traits::dimDomain>& order,
│ │ │ │ -
135 const typename Traits::DomainType& in,
│ │ │ │ -
136 std::vector<typename Traits::RangeType>& out) const = 0;
│ │ │ │ -
137 };
│ │ │ │ -
│ │ │ │ -
138
│ │ │ │ -
139
│ │ │ │ -
140
│ │ │ │ -
141 // -----------------------------------------------------------------
│ │ │ │ -
142 // Interpolation
│ │ │ │ -
143 // -----------------------------------------------------------------
│ │ │ │ -
144
│ │ │ │ -
157 template<class DomainType, class RangeType>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
159 {
│ │ │ │ -
160 public:
│ │ │ │ -
161
│ │ │ │ -
163 using FunctionType = std::function<RangeType(DomainType)>;
│ │ │ │ -
164
│ │ │ │ -
166 typedef typename RangeType::field_type CoefficientType;
│ │ │ │ -
167
│ │ │ │ - │ │ │ │ -
169
│ │ │ │ -
177 virtual void interpolate (const FunctionType& f, std::vector<CoefficientType>& out) const = 0;
│ │ │ │ -
178 };
│ │ │ │ -
│ │ │ │ -
179
│ │ │ │ -
187 template<class DomainType, class RangeType>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
189 : public LocalInterpolationVirtualInterfaceBase<DomainType, RangeType>
│ │ │ │ -
190 {
│ │ │ │ -
191 public:
│ │ │ │ -
192
│ │ │ │ -
194 using FunctionType = std::function<RangeType(DomainType)>;
│ │ │ │ -
195
│ │ │ │ -
197 typedef typename RangeType::field_type CoefficientType;
│ │ │ │ -
198
│ │ │ │ -
199
│ │ │ │ - │ │ │ │ -
201
│ │ │ │ -
202 // This method is only noted again for to make the documentation complete.
│ │ │ │ -
203
│ │ │ │ -
211 virtual void interpolate (const FunctionType& f, std::vector<CoefficientType>& out) const = 0;
│ │ │ │ -
212
│ │ │ │ -
218 template<class F,
│ │ │ │ -
219 std::enable_if_t<not std::is_base_of<FunctionType, F>::value, int> = 0>
│ │ │ │ -
│ │ │ │ -
220 void interpolate (const F& ff, std::vector<CoefficientType>& out) const
│ │ │ │ -
221 {
│ │ │ │ -
222 const auto& f = Impl::makeFunctionWithCallOperator<DomainType>(ff);
│ │ │ │ -
223
│ │ │ │ - │ │ │ │ -
225 asBase.interpolate(FunctionType(std::cref(f)),out);
│ │ │ │ -
226 }
│ │ │ │ -
│ │ │ │ -
227
│ │ │ │ -
233 template<class F, class C>
│ │ │ │ -
│ │ │ │ -
234 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
235 {
│ │ │ │ -
236 const auto& f = Impl::makeFunctionWithCallOperator<DomainType>(ff);
│ │ │ │ -
237
│ │ │ │ -
238 std::vector<CoefficientType> outDummy;
│ │ │ │ - │ │ │ │ -
240 asBase.interpolate(FunctionType(std::cref(f)),outDummy);
│ │ │ │ -
241 out.resize(outDummy.size());
│ │ │ │ -
242 for(typename std::vector<CoefficientType>::size_type i=0; i<outDummy.size(); ++i)
│ │ │ │ -
243 out[i] = outDummy[i];
│ │ │ │ -
244 }
│ │ │ │ -
│ │ │ │ -
245 };
│ │ │ │ -
│ │ │ │ -
246
│ │ │ │ -
247
│ │ │ │ -
248
│ │ │ │ -
249 // -----------------------------------------------------------------
│ │ │ │ -
250 // Coefficients
│ │ │ │ -
251 // -----------------------------------------------------------------
│ │ │ │ -
252
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
259 {
│ │ │ │ -
260 public:
│ │ │ │ -
261
│ │ │ │ - │ │ │ │ -
263
│ │ │ │ -
265 virtual std::size_t size () const = 0;
│ │ │ │ -
266
│ │ │ │ -
268 const virtual LocalKey& localKey (std::size_t i) const = 0;
│ │ │ │ -
269
│ │ │ │ -
270 };
│ │ │ │ -
│ │ │ │ -
271
│ │ │ │ -
272
│ │ │ │ -
273
│ │ │ │ -
274 // -----------------------------------------------------------------
│ │ │ │ -
275 // Finite Element
│ │ │ │ -
276 // -----------------------------------------------------------------
│ │ │ │ -
277
│ │ │ │ -
278
│ │ │ │ -
284 template<class T>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
286 {
│ │ │ │ -
287 using LocalBasisTraits = T;
│ │ │ │ -
288 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
295
│ │ │ │ - │ │ │ │ -
297
│ │ │ │ -
299 virtual const typename Traits::LocalBasisType& localBasis () const = 0;
│ │ │ │ -
300
│ │ │ │ -
302 virtual const typename Traits::LocalCoefficientsType& localCoefficients () const = 0;
│ │ │ │ -
303
│ │ │ │ -
305 virtual const typename Traits::LocalInterpolationType& localInterpolation () const = 0;
│ │ │ │ -
306
│ │ │ │ -
308 virtual unsigned int size () const = 0;
│ │ │ │ -
309
│ │ │ │ -
311 virtual const GeometryType type () const = 0;
│ │ │ │ -
312
│ │ │ │ - │ │ │ │ -
314 };
│ │ │ │ -
│ │ │ │ -
315}
│ │ │ │ -
316#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
18 template<class D, class R, int d, int k>
│ │ │ │ + │ │ │ │ +
20 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
22}
│ │ │ │ +
23
│ │ │ │ +
24#endif
│ │ │ │ + │ │ │ │
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
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
virtual base class for a local interpolation
Definition virtualinterface.hh:190
│ │ │ │ -
virtual ~LocalInterpolationVirtualInterface()
Definition virtualinterface.hh:200
│ │ │ │ -
std::function< RangeType(DomainType)> FunctionType
type of function to interpolate
Definition virtualinterface.hh:194
│ │ │ │ -
RangeType::field_type CoefficientType
type of the coefficient vector in the interpolate method
Definition virtualinterface.hh:197
│ │ │ │ -
void interpolate(const F &ff, std::vector< CoefficientType > &out) const
determine coefficients interpolating a given function
Definition virtualinterface.hh:220
│ │ │ │ -
virtual void interpolate(const FunctionType &f, std::vector< CoefficientType > &out) const =0
determine coefficients interpolating a given function
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
determine coefficients interpolating a given function
Definition virtualinterface.hh:234
│ │ │ │ -
Return a proper base class for functions to use with LocalInterpolation.
Definition virtualinterface.hh:47
│ │ │ │ -
FunctionBaseDummy FunctionBase
Definition virtualinterface.hh:73
│ │ │ │ -
FunctionBaseDummy VirtualFunctionBase
Definition virtualinterface.hh:72
│ │ │ │ -
FunctionBaseDummy type
Base class type for functions to use with LocalInterpolation.
Definition virtualinterface.hh:80
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Domain DomainType
Definition virtualinterface.hh:64
│ │ │ │ -
virtual base class for a local basis
Definition virtualinterface.hh:97
│ │ │ │ -
virtual unsigned int order() const =0
Polynomial order of the shape functions.
│ │ │ │ -
virtual void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const =0
Evaluate jacobian of all shape functions at given position.
│ │ │ │ -
virtual unsigned int size() const =0
Number of shape functions.
│ │ │ │ -
T Traits
Definition virtualinterface.hh:99
│ │ │ │ -
virtual void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const =0
Evaluate all basis function at given position.
│ │ │ │ -
virtual ~LocalBasisVirtualInterface()
Definition virtualinterface.hh:102
│ │ │ │ -
virtual void partial(const std::array< unsigned int, Traits::dimDomain > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const =0
Evaluate partial derivatives of any order of all shape functions.
│ │ │ │ -
virtual base class for a local interpolation
Definition virtualinterface.hh:159
│ │ │ │ -
std::function< RangeType(DomainType)> FunctionType
type of function to interpolate
Definition virtualinterface.hh:163
│ │ │ │ -
RangeType::field_type CoefficientType
type of the coefficient vector in the interpolate method
Definition virtualinterface.hh:166
│ │ │ │ -
virtual ~LocalInterpolationVirtualInterfaceBase()
Definition virtualinterface.hh:168
│ │ │ │ -
virtual void interpolate(const FunctionType &f, std::vector< CoefficientType > &out) const =0
determine coefficients interpolating a given function
│ │ │ │ -
virtual base class for local coefficients
Definition virtualinterface.hh:259
│ │ │ │ -
virtual ~LocalCoefficientsVirtualInterface()
Definition virtualinterface.hh:262
│ │ │ │ -
virtual std::size_t size() const =0
number of coefficients
│ │ │ │ -
virtual const LocalKey & localKey(std::size_t i) const =0
get i'th index
│ │ │ │ -
virtual base class for local finite elements with functions
Definition virtualinterface.hh:286
│ │ │ │ -
virtual LocalFiniteElementVirtualInterface< T > * clone() const =0
│ │ │ │ -
virtual const Traits::LocalInterpolationType & localInterpolation() const =0
│ │ │ │ -
virtual unsigned int size() const =0
│ │ │ │ -
virtual const Traits::LocalBasisType & localBasis() const =0
│ │ │ │ -
virtual const GeometryType type() const =0
│ │ │ │ -
LocalFiniteElementTraits< LocalBasisVirtualInterface< LocalBasisTraits >, LocalCoefficientsVirtualInterface, LocalInterpolationVirtualInterface< typename LocalBasisTraits::DomainType, typename LocalBasisTraits::RangeType > > Traits
Definition virtualinterface.hh:294
│ │ │ │ -
virtual ~LocalFiniteElementVirtualInterface()
Definition virtualinterface.hh:296
│ │ │ │ -
virtual const Traits::LocalCoefficientsType & localCoefficients() const =0
│ │ │ │ - │ │ │ │ - │ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,392 +7,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -virtualinterface.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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 │ │ │ │ │ + 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_LOCALFUNCTIONS_COMMON_VIRTUALINTERFACE_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_COMMON_VIRTUALINTERFACE_HH │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ + 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 │ │ │ │ │ + 10 │ │ │ │ │ + 11#warning This header is deprecated │ │ │ │ │ 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ - 19 │ │ │ │ │ - 20namespace Dune │ │ │ │ │ - 21{ │ │ │ │ │ - 22 │ │ │ │ │ - 23 // forward declaration needed by the helper traits │ │ │ │ │ - 24 template │ │ │ │ │ - 25 class LocalInterpolationVirtualInterface; │ │ │ │ │ - 26 │ │ │ │ │ - 27 // ----------------------------------------------------------------- │ │ │ │ │ - 28 // Helper traits classes │ │ │ │ │ - 29 // ----------------------------------------------------------------- │ │ │ │ │ - 30 │ │ │ │ │ - 43 template │ │ │ │ │ -44 class │ │ │ │ │ - 45 [[deprecated("Dune::LocalFiniteElementFunctionBase is deprecated after Dune │ │ │ │ │ -2.7. You can now pass functions providing operator() to interpolate.")]] │ │ │ │ │ - 46 LocalFiniteElementFunctionBase │ │ │ │ │ - 47 { │ │ │ │ │ - 48 typedef typename FE::Traits::LocalBasisType::Traits::DomainType Domain; │ │ │ │ │ - 49 typedef typename FE::Traits::LocalBasisType::Traits::RangeType Range; │ │ │ │ │ - 50 │ │ │ │ │ - 51 // Hack: Keep a copy of Dune::Function here. This allows to avoid depending │ │ │ │ │ - 52 // on the deprecated dune-common header while still keeping the │ │ │ │ │ -LocalFiniteElementFunctionBase │ │ │ │ │ - 53 // mechanism working during its deprecation period. │ │ │ │ │ - 54 class FunctionBaseDummy │ │ │ │ │ - 55 { │ │ │ │ │ - 56 public: │ │ │ │ │ - 57 │ │ │ │ │ - 58 using RangeType = Range; │ │ │ │ │ - 59 using DomainType = Domain; │ │ │ │ │ - 60 │ │ │ │ │ -61 struct Traits │ │ │ │ │ - 62 { │ │ │ │ │ -63 using RangeType = Range; │ │ │ │ │ -64 using DomainType = Domain; │ │ │ │ │ - 65 }; │ │ │ │ │ - 66 │ │ │ │ │ - 67 void evaluate(const DomainType& x, RangeType& y) const; │ │ │ │ │ - 68 }; │ │ │ │ │ - 69 │ │ │ │ │ - 70 public: │ │ │ │ │ - 71 │ │ │ │ │ -72 using VirtualFunctionBase = FunctionBaseDummy; │ │ │ │ │ -73 using FunctionBase = FunctionBaseDummy; │ │ │ │ │ - 74 │ │ │ │ │ -80 using type = FunctionBaseDummy; │ │ │ │ │ - 81 }; │ │ │ │ │ - 82 │ │ │ │ │ - 83 │ │ │ │ │ - 84 │ │ │ │ │ - 85 // ----------------------------------------------------------------- │ │ │ │ │ - 86 // Basis │ │ │ │ │ - 87 // ----------------------------------------------------------------- │ │ │ │ │ - 88 │ │ │ │ │ - 95 template │ │ │ │ │ -96 class LocalBasisVirtualInterface │ │ │ │ │ - 97 { │ │ │ │ │ - 98 public: │ │ │ │ │ -99 using Traits = T; │ │ │ │ │ - 100 │ │ │ │ │ - 101 │ │ │ │ │ -102 virtual ~LocalBasisVirtualInterface() {} │ │ │ │ │ - 103 │ │ │ │ │ -105 virtual unsigned int size () const = 0; │ │ │ │ │ - 106 │ │ │ │ │ -108 virtual unsigned int order () const = 0; │ │ │ │ │ - 109 │ │ │ │ │ -115 virtual void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ - 116 std::vector& out) const = 0; │ │ │ │ │ - 117 │ │ │ │ │ -126 virtual void evaluateJacobian(const typename Traits::DomainType& in, / │ │ │ │ │ -/ position │ │ │ │ │ - 127 std::vector& out) const = 0; │ │ │ │ │ - 128 │ │ │ │ │ -134 virtual void partial(const std::array& │ │ │ │ │ -order, │ │ │ │ │ - 135 const typename Traits::DomainType& in, │ │ │ │ │ - 136 std::vector& out) const = 0; │ │ │ │ │ - 137 }; │ │ │ │ │ - 138 │ │ │ │ │ - 139 │ │ │ │ │ - 140 │ │ │ │ │ - 141 // ----------------------------------------------------------------- │ │ │ │ │ - 142 // Interpolation │ │ │ │ │ - 143 // ----------------------------------------------------------------- │ │ │ │ │ - 144 │ │ │ │ │ - 157 template │ │ │ │ │ -158 class LocalInterpolationVirtualInterfaceBase │ │ │ │ │ - 159 { │ │ │ │ │ - 160 public: │ │ │ │ │ - 161 │ │ │ │ │ -163 using FunctionType = std::function; │ │ │ │ │ - 164 │ │ │ │ │ -166 typedef typename RangeType::field_type CoefficientType; │ │ │ │ │ - 167 │ │ │ │ │ -168 virtual ~LocalInterpolationVirtualInterfaceBase() {} │ │ │ │ │ - 169 │ │ │ │ │ -177 virtual void interpolate (const FunctionType& f, std:: │ │ │ │ │ -vector& out) const = 0; │ │ │ │ │ - 178 }; │ │ │ │ │ - 179 │ │ │ │ │ - 187 template │ │ │ │ │ -188 class LocalInterpolationVirtualInterface │ │ │ │ │ - 189 : public LocalInterpolationVirtualInterfaceBase │ │ │ │ │ - 190 { │ │ │ │ │ - 191 public: │ │ │ │ │ - 192 │ │ │ │ │ -194 using FunctionType = std::function; │ │ │ │ │ - 195 │ │ │ │ │ -197 typedef typename RangeType::field_type CoefficientType; │ │ │ │ │ - 198 │ │ │ │ │ - 199 │ │ │ │ │ -200 virtual ~LocalInterpolationVirtualInterface() {} │ │ │ │ │ - 201 │ │ │ │ │ - 202 // This method is only noted again for to make the documentation complete. │ │ │ │ │ - 203 │ │ │ │ │ -211 virtual void interpolate (const FunctionType& f, std:: │ │ │ │ │ -vector& out) const = 0; │ │ │ │ │ - 212 │ │ │ │ │ - 218 template::value, int> = 0> │ │ │ │ │ -220 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ - 221 { │ │ │ │ │ - 222 const auto& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ - 223 │ │ │ │ │ - 224 const LocalInterpolationVirtualInterfaceBase& │ │ │ │ │ -asBase = *this; │ │ │ │ │ - 225 asBase.interpolate(FunctionType(std::cref(f)),out); │ │ │ │ │ - 226 } │ │ │ │ │ - 227 │ │ │ │ │ - 233 template │ │ │ │ │ -234 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ - 235 { │ │ │ │ │ - 236 const auto& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ - 237 │ │ │ │ │ - 238 std::vector outDummy; │ │ │ │ │ - 239 const LocalInterpolationVirtualInterfaceBase& │ │ │ │ │ -asBase = *this; │ │ │ │ │ - 240 asBase.interpolate(FunctionType(std::cref(f)),outDummy); │ │ │ │ │ - 241 out.resize(outDummy.size()); │ │ │ │ │ - 242 for(typename std::vector::size_type i=0; i │ │ │ │ │ -285 class LocalFiniteElementVirtualInterface │ │ │ │ │ - 286 { │ │ │ │ │ - 287 using LocalBasisTraits = T; │ │ │ │ │ - 288 public: │ │ │ │ │ - 289 typedef LocalFiniteElementTraits< │ │ │ │ │ - 290 LocalBasisVirtualInterface, │ │ │ │ │ - 291 LocalCoefficientsVirtualInterface, │ │ │ │ │ - 292 LocalInterpolationVirtualInterface< │ │ │ │ │ - 293 typename LocalBasisTraits::DomainType, │ │ │ │ │ -294 typename LocalBasisTraits::RangeType> > Traits; │ │ │ │ │ - 295 │ │ │ │ │ -296 virtual ~LocalFiniteElementVirtualInterface() {} │ │ │ │ │ - 297 │ │ │ │ │ -299 virtual const typename Traits::LocalBasisType& localBasis () const = 0; │ │ │ │ │ - 300 │ │ │ │ │ -302 virtual const typename Traits::LocalCoefficientsType& localCoefficients () │ │ │ │ │ -const = 0; │ │ │ │ │ - 303 │ │ │ │ │ -305 virtual const typename Traits::LocalInterpolationType& localInterpolation │ │ │ │ │ -() const = 0; │ │ │ │ │ - 306 │ │ │ │ │ -308 virtual unsigned int size () const = 0; │ │ │ │ │ - 309 │ │ │ │ │ -311 virtual const GeometryType type () const = 0; │ │ │ │ │ - 312 │ │ │ │ │ -313 virtual LocalFiniteElementVirtualInterface* clone() const = 0; │ │ │ │ │ - 314 }; │ │ │ │ │ - 315} │ │ │ │ │ - 316#endif │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -localkey.hh │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 18 template │ │ │ │ │ +19 using PkLocalFiniteElement │ │ │ │ │ + 20 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ + 21 = LagrangeSimplexLocalFiniteElement; │ │ │ │ │ + 22} │ │ │ │ │ + 23 │ │ │ │ │ + 24#endif │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalBasisTraits::RangeType │ │ │ │ │ -R RangeType │ │ │ │ │ -range type │ │ │ │ │ -Definition common/localbasis.hh:51 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::LocalInterpolationVirtualInterface │ │ │ │ │ -virtual base class for a local interpolation │ │ │ │ │ -Definition virtualinterface.hh:190 │ │ │ │ │ -Dune::LocalInterpolationVirtualInterface::~LocalInterpolationVirtualInterface │ │ │ │ │ -virtual ~LocalInterpolationVirtualInterface() │ │ │ │ │ -Definition virtualinterface.hh:200 │ │ │ │ │ -Dune::LocalInterpolationVirtualInterface::FunctionType │ │ │ │ │ -std::function< RangeType(DomainType)> FunctionType │ │ │ │ │ -type of function to interpolate │ │ │ │ │ -Definition virtualinterface.hh:194 │ │ │ │ │ -Dune::LocalInterpolationVirtualInterface::CoefficientType │ │ │ │ │ -RangeType::field_type CoefficientType │ │ │ │ │ -type of the coefficient vector in the interpolate method │ │ │ │ │ -Definition virtualinterface.hh:197 │ │ │ │ │ -Dune::LocalInterpolationVirtualInterface::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< CoefficientType > &out) const │ │ │ │ │ -determine coefficients interpolating a given function │ │ │ │ │ -Definition virtualinterface.hh:220 │ │ │ │ │ -Dune::LocalInterpolationVirtualInterface::interpolate │ │ │ │ │ -virtual void interpolate(const FunctionType &f, std::vector< CoefficientType > │ │ │ │ │ -&out) const =0 │ │ │ │ │ -determine coefficients interpolating a given function │ │ │ │ │ -Dune::LocalInterpolationVirtualInterface::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -determine coefficients interpolating a given function │ │ │ │ │ -Definition virtualinterface.hh:234 │ │ │ │ │ -Dune::LocalFiniteElementFunctionBase │ │ │ │ │ -Return a proper base class for functions to use with LocalInterpolation. │ │ │ │ │ -Definition virtualinterface.hh:47 │ │ │ │ │ -Dune::LocalFiniteElementFunctionBase::FunctionBase │ │ │ │ │ -FunctionBaseDummy FunctionBase │ │ │ │ │ -Definition virtualinterface.hh:73 │ │ │ │ │ -Dune::LocalFiniteElementFunctionBase::VirtualFunctionBase │ │ │ │ │ -FunctionBaseDummy VirtualFunctionBase │ │ │ │ │ -Definition virtualinterface.hh:72 │ │ │ │ │ -Dune::LocalFiniteElementFunctionBase::type │ │ │ │ │ -FunctionBaseDummy type │ │ │ │ │ -Base class type for functions to use with LocalInterpolation. │ │ │ │ │ -Definition virtualinterface.hh:80 │ │ │ │ │ -Dune::LocalFiniteElementFunctionBase::FunctionBaseDummy::Traits │ │ │ │ │ -Definition virtualinterface.hh:62 │ │ │ │ │ -Dune::LocalFiniteElementFunctionBase::FunctionBaseDummy::Traits::RangeType │ │ │ │ │ -Range RangeType │ │ │ │ │ -Definition virtualinterface.hh:63 │ │ │ │ │ -Dune::LocalFiniteElementFunctionBase::FunctionBaseDummy::Traits::DomainType │ │ │ │ │ -Domain DomainType │ │ │ │ │ -Definition virtualinterface.hh:64 │ │ │ │ │ -Dune::LocalBasisVirtualInterface │ │ │ │ │ -virtual base class for a local basis │ │ │ │ │ -Definition virtualinterface.hh:97 │ │ │ │ │ -Dune::LocalBasisVirtualInterface::order │ │ │ │ │ -virtual unsigned int order() const =0 │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Dune::LocalBasisVirtualInterface::evaluateJacobian │ │ │ │ │ -virtual void evaluateJacobian(const typename Traits::DomainType &in, std:: │ │ │ │ │ -vector< typename Traits::JacobianType > &out) const =0 │ │ │ │ │ -Evaluate jacobian of all shape functions at given position. │ │ │ │ │ -Dune::LocalBasisVirtualInterface::size │ │ │ │ │ -virtual unsigned int size() const =0 │ │ │ │ │ -Number of shape functions. │ │ │ │ │ -Dune::LocalBasisVirtualInterface::Traits │ │ │ │ │ -T Traits │ │ │ │ │ -Definition virtualinterface.hh:99 │ │ │ │ │ -Dune::LocalBasisVirtualInterface::evaluateFunction │ │ │ │ │ -virtual void evaluateFunction(const typename Traits::DomainType &in, std:: │ │ │ │ │ -vector< typename Traits::RangeType > &out) const =0 │ │ │ │ │ -Evaluate all basis function at given position. │ │ │ │ │ -Dune::LocalBasisVirtualInterface::~LocalBasisVirtualInterface │ │ │ │ │ -virtual ~LocalBasisVirtualInterface() │ │ │ │ │ -Definition virtualinterface.hh:102 │ │ │ │ │ -Dune::LocalBasisVirtualInterface::partial │ │ │ │ │ -virtual void partial(const std::array< unsigned int, Traits::dimDomain > │ │ │ │ │ -&order, const typename Traits::DomainType &in, std::vector< typename Traits:: │ │ │ │ │ -RangeType > &out) const =0 │ │ │ │ │ -Evaluate partial derivatives of any order of all shape functions. │ │ │ │ │ -Dune::LocalInterpolationVirtualInterfaceBase │ │ │ │ │ -virtual base class for a local interpolation │ │ │ │ │ -Definition virtualinterface.hh:159 │ │ │ │ │ -Dune::LocalInterpolationVirtualInterfaceBase::FunctionType │ │ │ │ │ -std::function< RangeType(DomainType)> FunctionType │ │ │ │ │ -type of function to interpolate │ │ │ │ │ -Definition virtualinterface.hh:163 │ │ │ │ │ -Dune::LocalInterpolationVirtualInterfaceBase::CoefficientType │ │ │ │ │ -RangeType::field_type CoefficientType │ │ │ │ │ -type of the coefficient vector in the interpolate method │ │ │ │ │ -Definition virtualinterface.hh:166 │ │ │ │ │ -Dune::LocalInterpolationVirtualInterfaceBase:: │ │ │ │ │ -~LocalInterpolationVirtualInterfaceBase │ │ │ │ │ -virtual ~LocalInterpolationVirtualInterfaceBase() │ │ │ │ │ -Definition virtualinterface.hh:168 │ │ │ │ │ -Dune::LocalInterpolationVirtualInterfaceBase::interpolate │ │ │ │ │ -virtual void interpolate(const FunctionType &f, std::vector< CoefficientType > │ │ │ │ │ -&out) const =0 │ │ │ │ │ -determine coefficients interpolating a given function │ │ │ │ │ -Dune::LocalCoefficientsVirtualInterface │ │ │ │ │ -virtual base class for local coefficients │ │ │ │ │ -Definition virtualinterface.hh:259 │ │ │ │ │ -Dune::LocalCoefficientsVirtualInterface::~LocalCoefficientsVirtualInterface │ │ │ │ │ -virtual ~LocalCoefficientsVirtualInterface() │ │ │ │ │ -Definition virtualinterface.hh:262 │ │ │ │ │ -Dune::LocalCoefficientsVirtualInterface::size │ │ │ │ │ -virtual std::size_t size() const =0 │ │ │ │ │ -number of coefficients │ │ │ │ │ -Dune::LocalCoefficientsVirtualInterface::localKey │ │ │ │ │ -virtual const LocalKey & localKey(std::size_t i) const =0 │ │ │ │ │ -get i'th index │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface │ │ │ │ │ -virtual base class for local finite elements with functions │ │ │ │ │ -Definition virtualinterface.hh:286 │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface::clone │ │ │ │ │ -virtual LocalFiniteElementVirtualInterface< T > * clone() const =0 │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface::localInterpolation │ │ │ │ │ -virtual const Traits::LocalInterpolationType & localInterpolation() const =0 │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface::size │ │ │ │ │ -virtual unsigned int size() const =0 │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface::localBasis │ │ │ │ │ -virtual const Traits::LocalBasisType & localBasis() const =0 │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface::type │ │ │ │ │ -virtual const GeometryType type() const =0 │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface::Traits │ │ │ │ │ -LocalFiniteElementTraits< LocalBasisVirtualInterface< LocalBasisTraits >, │ │ │ │ │ -LocalCoefficientsVirtualInterface, LocalInterpolationVirtualInterface< typename │ │ │ │ │ -LocalBasisTraits::DomainType, typename LocalBasisTraits::RangeType > > Traits │ │ │ │ │ -Definition virtualinterface.hh:294 │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface::~LocalFiniteElementVirtualInterface │ │ │ │ │ -virtual ~LocalFiniteElementVirtualInterface() │ │ │ │ │ -Definition virtualinterface.hh:296 │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface::localCoefficients │ │ │ │ │ -virtual const Traits::LocalCoefficientsType & localCoefficients() const =0 │ │ │ │ │ -localbasis.hh │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LagrangeSimplexLocalFiniteElement │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +Definition lagrangesimplex.hh:838 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00437.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localkey.hh File Reference │ │ │ │ +dune-localfunctions: pyramidp1.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
localkey.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
pyramidp1.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <cstddef>
│ │ │ │ -#include <ostream>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::LocalKey
 Describe position of one degree of freedom. 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 {} │ │ │ │ │ @@ -6,24 +6,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -localkey.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * lagrange │ │ │ │ │ +Namespaces | Typedefs │ │ │ │ │ +pyramidp1.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -class  Dune::LocalKey │ │ │ │ │ -  Describe position of one degree of freedom. More... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Typedefs │ │ │ │ │ +template │ │ │ │ │ +using Dune::PyramidP1LocalFiniteElement = LagrangePyramidLocalFiniteElement< │ │ │ │ │ + D, R, 1 > │ │ │ │ │ +  First-order Lagrangian finite element on a three-dimensional pyramid. │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00437_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localkey.hh Source File │ │ │ │ +dune-localfunctions: pyramidp1.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,122 +70,47 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
localkey.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_LOCALKEY_HH
│ │ │ │ -
6#define DUNE_LOCALKEY_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <cstddef>
│ │ │ │ -
10#include <ostream>
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
23 {
│ │ │ │ -
24 public:
│ │ │ │ -
25
│ │ │ │ -
27 enum {
│ │ │ │ - │ │ │ │ -
37 };
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41 {}
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
│ │ │ │ -
48 LocalKey (unsigned int s, unsigned int c, unsigned int i)
│ │ │ │ -
49 {
│ │ │ │ -
50 values_[0] = s;
│ │ │ │ -
51 values_[1] = c;
│ │ │ │ -
52 values_[2] = i;
│ │ │ │ -
53 }
│ │ │ │ -
│ │ │ │ -
54
│ │ │ │ -
│ │ │ │ -
56 inline unsigned int subEntity () const
│ │ │ │ -
57 {
│ │ │ │ -
58 return values_[0];
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ -
62 inline unsigned int codim () const
│ │ │ │ -
63 {
│ │ │ │ -
64 return values_[1];
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
│ │ │ │ -
68 inline unsigned int index () const
│ │ │ │ -
69 {
│ │ │ │ -
70 return values_[2];
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
│ │ │ │ -
74 void index (unsigned int i)
│ │ │ │ -
75 {
│ │ │ │ -
76 values_[2] = i;
│ │ │ │ -
77 }
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
│ │ │ │ -
80 bool operator< (const LocalKey& other) const
│ │ │ │ -
81 {
│ │ │ │ -
82 return values_ < other.values_;
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
│ │ │ │ -
86 friend std::ostream& operator<< (std::ostream& s, const LocalKey& localKey)
│ │ │ │ -
87 {
│ │ │ │ -
88 return s << "[ subEntity: " << localKey.subEntity()
│ │ │ │ -
89 << ", codim: " << localKey.codim()
│ │ │ │ -
90 << ", index: " << localKey.index() << " ]";
│ │ │ │ -
91 }
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
93 private:
│ │ │ │ -
94
│ │ │ │ -
95 // We use an array to store the values in order to be able to use the array::operator< implementation
│ │ │ │ -
96 std::array<unsigned int,3> values_;
│ │ │ │ -
97
│ │ │ │ -
98 };
│ │ │ │ -
│ │ │ │ -
99
│ │ │ │ -
100}
│ │ │ │ -
101#endif
│ │ │ │ +
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
│ │ │ │ +
20 template<class D, class R>
│ │ │ │ + │ │ │ │ +
22 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
24
│ │ │ │ +
25}
│ │ │ │ +
26
│ │ │ │ +
27#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
LocalKey()
Standard constructor for uninitialized local index.
Definition localkey.hh:40
│ │ │ │ -
unsigned int index() const
Return offset within subentity.
Definition localkey.hh:68
│ │ │ │ -
unsigned int codim() const
Return codim of associated entity.
Definition localkey.hh:62
│ │ │ │ -
unsigned int subEntity() const
Return number of associated subentity.
Definition localkey.hh:56
│ │ │ │ -
LocalKey(unsigned int s, unsigned int c, unsigned int i)
Initialize all components.
Definition localkey.hh:48
│ │ │ │ -
bool operator<(const LocalKey &other) const
Less-than operator so we can use this class as a key type in stl containers.
Definition localkey.hh:80
│ │ │ │ -
@ intersectionCodim
Codimension returned by LocalKey::codim() for degrees of freedom attached to an intersection.
Definition localkey.hh:36
│ │ │ │ -
void index(unsigned int i)
Set index component.
Definition localkey.hh:74
│ │ │ │ -
friend std::ostream & operator<<(std::ostream &s, const LocalKey &localKey)
Write LocalKey object to output stream.
Definition localkey.hh:86
│ │ │ │ +
Lagrange finite element for 3d pyramids with compile-time polynomial order.
Definition lagrangepyramid.hh:812
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,129 +7,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * common │ │ │ │ │ -localkey.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +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_LOCALKEY_HH │ │ │ │ │ - 6#define DUNE_LOCALKEY_HH │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12namespace Dune │ │ │ │ │ - 13{ │ │ │ │ │ -22 class LocalKey │ │ │ │ │ - 23 { │ │ │ │ │ - 24 public: │ │ │ │ │ - 25 │ │ │ │ │ - 27 enum { │ │ │ │ │ - 36 intersectionCodim=666 │ │ │ │ │ -37 }; │ │ │ │ │ - 38 │ │ │ │ │ -40 LocalKey () │ │ │ │ │ - 41 {} │ │ │ │ │ - 42 │ │ │ │ │ -48 LocalKey (unsigned int s, unsigned int c, unsigned int i) │ │ │ │ │ - 49 { │ │ │ │ │ - 50 values_[0] = s; │ │ │ │ │ - 51 values_[1] = c; │ │ │ │ │ - 52 values_[2] = i; │ │ │ │ │ - 53 } │ │ │ │ │ - 54 │ │ │ │ │ -56 inline unsigned int subEntity () const │ │ │ │ │ - 57 { │ │ │ │ │ - 58 return values_[0]; │ │ │ │ │ - 59 } │ │ │ │ │ - 60 │ │ │ │ │ -62 inline unsigned int codim () const │ │ │ │ │ - 63 { │ │ │ │ │ - 64 return values_[1]; │ │ │ │ │ - 65 } │ │ │ │ │ - 66 │ │ │ │ │ -68 inline unsigned int index () const │ │ │ │ │ - 69 { │ │ │ │ │ - 70 return values_[2]; │ │ │ │ │ - 71 } │ │ │ │ │ - 72 │ │ │ │ │ -74 void index (unsigned int i) │ │ │ │ │ - 75 { │ │ │ │ │ - 76 values_[2] = i; │ │ │ │ │ - 77 } │ │ │ │ │ - 78 │ │ │ │ │ -80 bool operator<(const LocalKey& other) const │ │ │ │ │ - 81 { │ │ │ │ │ - 82 return values_ < other.values_; │ │ │ │ │ - 83 } │ │ │ │ │ - 84 │ │ │ │ │ -86 friend std::ostream& operator<<(std::ostream& s, const LocalKey& localKey) │ │ │ │ │ - 87 { │ │ │ │ │ - 88 return s << "[ subEntity: " << localKey.subEntity() │ │ │ │ │ - 89 << ", codim: " << localKey.codim() │ │ │ │ │ - 90 << ", index: " << localKey.index() << " ]"; │ │ │ │ │ - 91 } │ │ │ │ │ - 92 │ │ │ │ │ - 93 private: │ │ │ │ │ - 94 │ │ │ │ │ - 95 // We use an array to store the values in order to be able to use the │ │ │ │ │ -array::operator< implementation │ │ │ │ │ - 96 std::array values_; │ │ │ │ │ - 97 │ │ │ │ │ - 98 }; │ │ │ │ │ - 99 │ │ │ │ │ - 100} │ │ │ │ │ - 101#endif │ │ │ │ │ + 5 │ │ │ │ │ + 6#ifndef DUNE_PYRAMID_P1_LOCALFINITEELEMENT_HH │ │ │ │ │ + 7#define DUNE_PYRAMID_P1_LOCALFINITEELEMENT_HH │ │ │ │ │ + 8 │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#warning This header is deprecated │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ + 20 template │ │ │ │ │ +21 using PyramidP1LocalFiniteElement │ │ │ │ │ + 22 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]] │ │ │ │ │ + 23 = LagrangePyramidLocalFiniteElement; │ │ │ │ │ + 24 │ │ │ │ │ + 25} │ │ │ │ │ + 26 │ │ │ │ │ + 27#endif │ │ │ │ │ +lagrangepyramid.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::LocalKey::LocalKey │ │ │ │ │ -LocalKey() │ │ │ │ │ -Standard constructor for uninitialized local index. │ │ │ │ │ -Definition localkey.hh:40 │ │ │ │ │ -Dune::LocalKey::index │ │ │ │ │ -unsigned int index() const │ │ │ │ │ -Return offset within subentity. │ │ │ │ │ -Definition localkey.hh:68 │ │ │ │ │ -Dune::LocalKey::codim │ │ │ │ │ -unsigned int codim() const │ │ │ │ │ -Return codim of associated entity. │ │ │ │ │ -Definition localkey.hh:62 │ │ │ │ │ -Dune::LocalKey::subEntity │ │ │ │ │ -unsigned int subEntity() const │ │ │ │ │ -Return number of associated subentity. │ │ │ │ │ -Definition localkey.hh:56 │ │ │ │ │ -Dune::LocalKey::LocalKey │ │ │ │ │ -LocalKey(unsigned int s, unsigned int c, unsigned int i) │ │ │ │ │ -Initialize all components. │ │ │ │ │ -Definition localkey.hh:48 │ │ │ │ │ -Dune::LocalKey::operator< │ │ │ │ │ -bool operator<(const LocalKey &other) const │ │ │ │ │ -Less-than operator so we can use this class as a key type in stl containers. │ │ │ │ │ -Definition localkey.hh:80 │ │ │ │ │ -Dune::LocalKey::intersectionCodim │ │ │ │ │ -@ intersectionCodim │ │ │ │ │ -Codimension returned by LocalKey::codim() for degrees of freedom attached to an │ │ │ │ │ -intersection. │ │ │ │ │ -Definition localkey.hh:36 │ │ │ │ │ -Dune::LocalKey::index │ │ │ │ │ -void index(unsigned int i) │ │ │ │ │ -Set index component. │ │ │ │ │ -Definition localkey.hh:74 │ │ │ │ │ -Dune::LocalKey::operator<< │ │ │ │ │ -friend std::ostream & operator<<(std::ostream &s, const LocalKey &localKey) │ │ │ │ │ -Write LocalKey object to output stream. │ │ │ │ │ -Definition localkey.hh:86 │ │ │ │ │ +Dune::LagrangePyramidLocalFiniteElement │ │ │ │ │ +Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ +Definition lagrangepyramid.hh:812 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00440.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: bdfmcube.hh File Reference │ │ │ │ +dune-localfunctions: nedelec.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,25 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
bdfmcube.hh File Reference
│ │ │ │ +
nedelec.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>
│ │ │ │ + │ │ │ │

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...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

namespace  Dune
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,28 +6,14 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasfortinmarini │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -bdfmcube.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +nedelec.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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... │ │ │ │ │ -  │ │ │ │ │ - Namespaces │ │ │ │ │ -namespace  Dune │ │ │ │ │ -  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00440_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: bdfmcube.hh Source File │ │ │ │ +dune-localfunctions: nedelec.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,95 +70,38 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
bdfmcube.hh
│ │ │ │ +
nedelec.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_NEDELEC_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_NEDELEC_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
79} // namespace Dune
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ -
81#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_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
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8// Nedelec element implementations with run-time order
│ │ │ │ +
9// [include them here once they exist]
│ │ │ │ +
10
│ │ │ │ +
11// Nedelec element implementations with compile-time order
│ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15#endif // #ifndef DUNE_LOCALFUNCTIONS_NEDELEC_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,116 +7,30 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasfortinmarini │ │ │ │ │ -bdfmcube.hh │ │ │ │ │ +nedelec.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_NEDELEC_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_NEDELEC_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15 │ │ │ │ │ - 16 │ │ │ │ │ -17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ - 19 │ │ │ │ │ - 43 template │ │ │ │ │ -44 class BDFMCubeLocalFiniteElement │ │ │ │ │ - 45 { │ │ │ │ │ - 46 using LocalBasis = BDFMCubeLocalBasis; │ │ │ │ │ - 47 using LocalCoefficients = BDFMCubeLocalCoefficients; │ │ │ │ │ - 48 using LocalInterpolation = BDFMCubeLocalInterpolation; │ │ │ │ │ - 49 │ │ │ │ │ - 50 public: │ │ │ │ │ -51 using Traits = LocalFiniteElementTraits; │ │ │ │ │ - 52 │ │ │ │ │ -54 BDFMCubeLocalFiniteElement () {} │ │ │ │ │ - 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 }; │ │ │ │ │ - 78 │ │ │ │ │ - 79} // namespace Dune │ │ │ │ │ - 80 │ │ │ │ │ - 81#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_HH │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -localcoefficients.hh │ │ │ │ │ -Dune │ │ │ │ │ -Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDFMCubeLocalFiniteElement │ │ │ │ │ -Brezzi-Douglas-Fortin-Marini finite elements for cubes. │ │ │ │ │ -Definition bdfmcube.hh:45 │ │ │ │ │ -Dune::BDFMCubeLocalFiniteElement::localCoefficients │ │ │ │ │ -auto localCoefficients() const -> const LocalCoefficients & │ │ │ │ │ -Definition bdfmcube.hh:66 │ │ │ │ │ -Dune::BDFMCubeLocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition bdfmcube.hh:70 │ │ │ │ │ -Dune::BDFMCubeLocalFiniteElement::BDFMCubeLocalFiniteElement │ │ │ │ │ -BDFMCubeLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition bdfmcube.hh:54 │ │ │ │ │ -Dune::BDFMCubeLocalFiniteElement::localBasis │ │ │ │ │ -auto localBasis() const -> const LocalBasis & │ │ │ │ │ -Definition bdfmcube.hh:65 │ │ │ │ │ -Dune::BDFMCubeLocalFiniteElement::type │ │ │ │ │ -static constexpr auto type() -> GeometryType │ │ │ │ │ -Definition bdfmcube.hh:71 │ │ │ │ │ -Dune::BDFMCubeLocalFiniteElement::localInterpolation │ │ │ │ │ -auto localInterpolation() const -> const LocalInterpolation & │ │ │ │ │ -Definition bdfmcube.hh:67 │ │ │ │ │ -Dune::BDFMCubeLocalFiniteElement::BDFMCubeLocalFiniteElement │ │ │ │ │ -BDFMCubeLocalFiniteElement(std::bitset< 2 *dim > s) │ │ │ │ │ -Make set number s, where 0 <= s < 2^(2*dim) │ │ │ │ │ -Definition bdfmcube.hh:61 │ │ │ │ │ -Dune::BDFMCubeLocalBasis │ │ │ │ │ -Brezzi-Douglas-Fortin-Marini shape functions on a reference cube. │ │ │ │ │ -Definition brezzidouglasfortinmarini/cube/localbasis.hh:37 │ │ │ │ │ -Dune::BDFMCubeLocalCoefficients │ │ │ │ │ -Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes. │ │ │ │ │ -Definition localcoefficients.hh:33 │ │ │ │ │ -Dune::BDFMCubeLocalInterpolation │ │ │ │ │ -Interpolation for Brezzi-Douglas-Fortin-Marini shape functions on cubes. │ │ │ │ │ -Definition brezzidouglasfortinmarini/cube/localinterpolation.hh:38 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -localbasis.hh │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ + 8// Nedelec element implementations with run-time order │ │ │ │ │ + 9// [include them here once they exist] │ │ │ │ │ + 10 │ │ │ │ │ + 11// Nedelec element implementations with compile-time order │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15#endif // #ifndef DUNE_LOCALFUNCTIONS_NEDELEC_HH │ │ │ │ │ +nedelec1stkindcube.hh │ │ │ │ │ +nedelec1stkindsimplex.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00443.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: crouzeixraviart.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,37 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
localcoefficients.hh File Reference
│ │ │ │ +
crouzeixraviart.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>
│ │ │ │ +
#include <array>
│ │ │ │ +#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::BDFMCubeLocalCoefficients< D, R, dim, order >
 Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes. More...
class  Dune::CrouzeixRaviartLocalFiniteElement< D, R, dim >
 Crouzeix-Raviart finite element. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,28 +6,30 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasfortinmarini │ │ │ │ │ - * cube │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -localcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +crouzeixraviart.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ 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... │ │ │ │ │ +class  Dune::CrouzeixRaviartLocalFiniteElement<_D,_R,_dim_> │ │ │ │ │ +  Crouzeix-Raviart finite element. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00443_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localcoefficients.hh Source File │ │ │ │ +dune-localfunctions: crouzeixraviart.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,102 +70,234 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
localcoefficients.hh
│ │ │ │ +
crouzeixraviart.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
│ │ │ │ - │ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +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
│ │ │ │ +
7
│ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <numeric>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │ +
12#include <dune/common/fvector.hh>
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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();
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,114 +7,250 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * brezzidouglasfortinmarini │ │ │ │ │ - * cube │ │ │ │ │ -localcoefficients.hh │ │ │ │ │ +crouzeixraviart.hh │ │ │ │ │ Go_to_the_documentation_of_this_file. │ │ │ │ │ - 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 │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 17 │ │ │ │ │ - 31 template │ │ │ │ │ -32 class BDFMCubeLocalCoefficients │ │ │ │ │ - 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: │ │ │ │ │ -42 BDFMCubeLocalCoefficients () : li(numDofs) │ │ │ │ │ - 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 } │ │ │ │ │ + 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_CROUZEIXRAVIART_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_CROUZEIXRAVIART_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16 │ │ │ │ │ + 17#include │ │ │ │ │ + 18#include │ │ │ │ │ + 19#include │ │ │ │ │ + 20#include │ │ │ │ │ + 21 │ │ │ │ │ + 22namespace Dune { 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 Traits::DomainType& 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 │ │ │ │ │ -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 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 │ │ │ │ │ + 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 Traits::DomainType& 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(); │ │ │ │ │ + 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 Dune │ │ │ │ │ + 182{ │ │ │ │ │ + 189 template │ │ │ │ │ +190 class CrouzeixRaviartLocalFiniteElement │ │ │ │ │ + 191 { │ │ │ │ │ + 192 public: │ │ │ │ │ +195 using Traits = LocalFiniteElementTraits, │ │ │ │ │ + 196 Impl::CrouzeixRaviartLocalCoefficients, │ │ │ │ │ + 197 Impl::CrouzeixRaviartLocalInterpolation > >; │ │ │ │ │ + 198 │ │ │ │ │ +201 const typename Traits::LocalBasisType& localBasis() const │ │ │ │ │ + 202 { │ │ │ │ │ + 203 return basis_; │ │ │ │ │ + 204 } │ │ │ │ │ + 205 │ │ │ │ │ +208 const typename Traits::LocalCoefficientsType& localCoefficients() const │ │ │ │ │ + 209 { │ │ │ │ │ + 210 return coefficients_; │ │ │ │ │ + 211 } │ │ │ │ │ + 212 │ │ │ │ │ +215 const typename Traits::LocalInterpolationType& localInterpolation() const │ │ │ │ │ + 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 basis_; │ │ │ │ │ + 235 Impl::CrouzeixRaviartLocalCoefficients coefficients_; │ │ │ │ │ + 236 Impl::CrouzeixRaviartLocalInterpolation > interpolation_; │ │ │ │ │ + 237 }; │ │ │ │ │ + 238 │ │ │ │ │ + 239} // namespace Dune │ │ │ │ │ + 240 │ │ │ │ │ + 241#endif // DUNE_LOCALFUNCTIONS_CROUZEIXRAVIART_HH │ │ │ │ │ localkey.hh │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::BDFMCubeLocalCoefficients │ │ │ │ │ -Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes. │ │ │ │ │ -Definition localcoefficients.hh:33 │ │ │ │ │ -Dune::BDFMCubeLocalCoefficients::BDFMCubeLocalCoefficients │ │ │ │ │ -BDFMCubeLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition localcoefficients.hh:42 │ │ │ │ │ -Dune::BDFMCubeLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition localcoefficients.hh:53 │ │ │ │ │ -Dune::BDFMCubeLocalCoefficients::localKey │ │ │ │ │ -auto localKey(std::size_t i) const -> const LocalKey & │ │ │ │ │ -geth i'th index │ │ │ │ │ -Definition localcoefficients.hh:56 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ +Dune::CrouzeixRaviartLocalFiniteElement │ │ │ │ │ +Crouzeix-Raviart finite element. │ │ │ │ │ +Definition crouzeixraviart.hh:191 │ │ │ │ │ +Dune::CrouzeixRaviartLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +The reference element that the local finite element is defined on. │ │ │ │ │ +Definition crouzeixraviart.hh:228 │ │ │ │ │ +Dune::CrouzeixRaviartLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ +Definition crouzeixraviart.hh:208 │ │ │ │ │ +Dune::CrouzeixRaviartLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Returns object that evaluates degrees of freedom. │ │ │ │ │ +Definition crouzeixraviart.hh:215 │ │ │ │ │ +Dune::CrouzeixRaviartLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ +Definition crouzeixraviart.hh:201 │ │ │ │ │ +Dune::CrouzeixRaviartLocalFiniteElement::size │ │ │ │ │ +static constexpr std::size_t size() │ │ │ │ │ +The number of shape functions. │ │ │ │ │ +Definition crouzeixraviart.hh:221 │ │ │ │ │ +localbasis.hh │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00446.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refined.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini2simplex2dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,30 +65,44 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refined.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
brezzidouglasmarini2simplex2dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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>
│ │ │ │ +
#include <array>
│ │ │ │ +#include <bitset>
│ │ │ │ +#include <numeric>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include "../../common/localbasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ -

Detailed Description

│ │ │ │ -

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

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

│ │ │ │ +Classes

class  Dune::BDM2Simplex2DLocalBasis< D, R >
 First order Brezzi-Douglas-Marini shape functions on quadrilaterals. More...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,19 +6,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -refined.hh File Reference │ │ │ │ │ -Convenience header that includes all available LocalFiniteElements based on │ │ │ │ │ -uniform element refinement. More... │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini2simplex2d │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ -***** Detailed Description ***** │ │ │ │ │ -Convenience header that includes all available LocalFiniteElements based on │ │ │ │ │ -uniform element refinement. │ │ │ │ │ + Classes │ │ │ │ │ +class  Dune::BDM2Simplex2DLocalBasis<_D,_R_> │ │ │ │ │ +  First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ + More... │ │ │ │ │ +  │ │ │ │ │ + Namespaces │ │ │ │ │ +namespace  Dune │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00446_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refined.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini2simplex2dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,29 +70,334 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refined.hh
│ │ │ │ +
brezzidouglasmarini2simplex2dlocalbasis.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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Piecewise P0 finite element.
│ │ │ │ - │ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALBASIS_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <bitset>
│ │ │ │ +
10#include <numeric>
│ │ │ │ +
11#include <vector>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/common/fmatrix.hh>
│ │ │ │ +
14
│ │ │ │ +
15#include "../../common/localbasis.hh"
│ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
28 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 {
│ │ │ │ +
31
│ │ │ │ +
32 public:
│ │ │ │ + │ │ │ │ +
34 R,2,Dune::FieldVector<R,2>,
│ │ │ │ +
35 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ +
36
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
39 {
│ │ │ │ +
40 for (size_t i=0; i<3; i++)
│ │ │ │ +
41 sign_[i] = 1.0;
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
│ │ │ │ +
49 BDM2Simplex2DLocalBasis(std::bitset<3> s)
│ │ │ │ +
50 {
│ │ │ │ +
51 for (size_t i=0; i<3; i++)
│ │ │ │ +
52 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ +
56 unsigned int size() const
│ │ │ │ +
57 {
│ │ │ │ +
58 return 12;
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ +
67 inline void evaluateFunction(const typename Traits::DomainType& in,
│ │ │ │ +
68 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
69 {
│ │ │ │ +
70 out.resize(size());
│ │ │ │ +
71
│ │ │ │ +
72 out[0][0] = sign_[0]*(-2*in[0]*in[1] + in[0]*in[0]);
│ │ │ │ +
73 out[0][1] = sign_[0]*(-1 + 6*in[1] -2*in[0]*in[1] - 5*in[1]*in[1]);
│ │ │ │ +
74
│ │ │ │ +
75 out[1][0] = 1.5*in[0] + 3*in[0]*in[1] - 4.5*in[0]*in[0];
│ │ │ │ +
76 out[1][1] = -3 + 6*in[0] + 10.5*in[1] - 15*in[0]*in[1] - 7.5*in[1]*in[1];
│ │ │ │ +
77
│ │ │ │ +
78 out[2][0] = sign_[0]*(-7.5*in[0] + 5*in[0]*in[1] + 12.5*in[0]*in[0]);
│ │ │ │ +
79 out[2][1] = sign_[0]*(-5 + 30*in[0] + 7.5*in[1] - 25*in[0]*in[1] - 30*in[0]*in[0] - 2.5*in[1]*in[1]);
│ │ │ │ +
80
│ │ │ │ +
81
│ │ │ │ +
82
│ │ │ │ +
83 out[3][0] = sign_[1]*(-1 + 6*in[0] - 2*in[0]*in[1] - 5*in[0]*in[0]);
│ │ │ │ +
84 out[3][1] = sign_[1]*(-2*in[0]*in[1] + in[1]*in[1]);
│ │ │ │ +
85
│ │ │ │ +
86 out[4][0] = 3 - 10.5*in[0] - 6*in[1] + 15*in[0]*in[1] + 7.5*in[0]*in[0];
│ │ │ │ +
87 out[4][1] = -1.5*in[1] - 3*in[0]*in[1] + 4.5*in[1]*in[1];
│ │ │ │ +
88
│ │ │ │ +
89 out[5][0] = sign_[1]*(-5 + 7.5*in[0] + 30*in[1] - 25*in[0]*in[1] - 2.5*in[0]*in[0] - 30*in[1]*in[1]);
│ │ │ │ +
90 out[5][1] = sign_[1]*(-7.5*in[1] + 5*in[0]*in[1] + 12.5*in[1]*in[1]);
│ │ │ │ +
91
│ │ │ │ +
92
│ │ │ │ +
93
│ │ │ │ +
94 out[6][0] = sign_[2]*(-3*in[0] + 4*in[0]*in[1] + 4*in[0]*in[0]);
│ │ │ │ +
95 out[6][1] = sign_[2]*(-3*in[1] + 4*in[0]*in[1] + 4*in[1]*in[1]);
│ │ │ │ +
96
│ │ │ │ +
97 out[7][0] = -3*in[0] + 6*in[0]*in[0];
│ │ │ │ +
98 out[7][1] = 3*in[1] - 6*in[1]*in[1];
│ │ │ │ +
99
│ │ │ │ +
100 out[8][0] = sign_[2]*(-10*in[0]*in[1] + 5*in[0]*in[0]);
│ │ │ │ +
101 out[8][1] = sign_[2]*(-10*in[0]*in[1] + 5*in[1]*in[1]);
│ │ │ │ +
102
│ │ │ │ +
103
│ │ │ │ +
104
│ │ │ │ +
105 out[9][0] = 18*in[0] - 12*in[0]*in[1] - 18*in[0]*in[0];
│ │ │ │ +
106 out[9][1] = 6*in[1] - 12*in[0]*in[1] - 6*in[1]*in[1];
│ │ │ │ +
107
│ │ │ │ +
108 out[10][0] = 6*in[0] - 12*in[0]*in[1] - 6*in[0]*in[0];
│ │ │ │ +
109 out[10][1] = 18*in[1] - 12*in[0]*in[1] - 18*in[1]*in[1];
│ │ │ │ +
110
│ │ │ │ +
111 out[11][0] = 90*in[0] - 180*in[0]*in[1] - 90*in[0]*in[0];
│ │ │ │ +
112 out[11][1] = -90*in[1] + 180*in[0]*in[1] + 90*in[1]*in[1];
│ │ │ │ +
113 }
│ │ │ │ +
│ │ │ │ +
114
│ │ │ │ +
│ │ │ │ +
121 inline void evaluateJacobian(const typename Traits::DomainType& in,
│ │ │ │ +
122 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
123 {
│ │ │ │ +
124 out.resize(size());
│ │ │ │ +
125
│ │ │ │ +
126 out[0][0][0] = sign_[0]*(-2*in[1] + 2*in[0]);
│ │ │ │ +
127 out[0][0][1] = sign_[0]*(-2*in[0]);
│ │ │ │ +
128
│ │ │ │ +
129 out[0][1][0] = sign_[0]*(-2*in[1]);
│ │ │ │ +
130 out[0][1][1] = sign_[0]*(6 -2*in[0] - 10*in[1]);
│ │ │ │ +
131
│ │ │ │ +
132
│ │ │ │ +
133 out[1][0][0] = 1.5 + 3*in[1] - 9*in[0];
│ │ │ │ +
134 out[1][0][1] = 3*in[0];
│ │ │ │ +
135
│ │ │ │ +
136 out[1][1][0] = 6 - 15*in[1];
│ │ │ │ +
137 out[1][1][1] = 10.5 - 15*in[0] - 15*in[1];
│ │ │ │ +
138
│ │ │ │ +
139
│ │ │ │ +
140 out[2][0][0] = sign_[0]*(-7.5 + 5*in[1] + 25*in[0]);
│ │ │ │ +
141 out[2][0][1] = sign_[0]*(5*in[0]);
│ │ │ │ +
142
│ │ │ │ +
143 out[2][1][0] = sign_[0]*(30 - 25*in[1] - 60*in[0]);
│ │ │ │ +
144 out[2][1][1] = sign_[0]*(7.5 - 25*in[0] - 5*in[1]);
│ │ │ │ +
145
│ │ │ │ +
146
│ │ │ │ +
147
│ │ │ │ +
148 out[3][0][0] = sign_[1]*(6 - 2*in[1] - 10*in[0]);
│ │ │ │ +
149 out[3][0][1] = sign_[1]*(-2*in[0]);
│ │ │ │ +
150
│ │ │ │ +
151 out[3][1][0] = sign_[1]*(-2*in[1]);
│ │ │ │ +
152 out[3][1][1] = sign_[1]*(-2*in[0] + 2*in[1]);
│ │ │ │ +
153
│ │ │ │ +
154
│ │ │ │ +
155 out[4][0][0] = -10.5 + 15*in[1] + 15*in[0];
│ │ │ │ +
156 out[4][0][1] = -6 + 15*in[0];
│ │ │ │ +
157
│ │ │ │ +
158 out[4][1][0] = -3*in[1];
│ │ │ │ +
159 out[4][1][1] = -1.5 - 3*in[0] + 9*in[1];
│ │ │ │ +
160
│ │ │ │ +
161
│ │ │ │ +
162 out[5][0][0] = sign_[1]*(7.5 - 25*in[1] - 5*in[0]);
│ │ │ │ +
163 out[5][0][1] = sign_[1]*(30 - 25*in[0] - 60*in[1]);
│ │ │ │ +
164
│ │ │ │ +
165 out[5][1][0] = sign_[1]*(5*in[1]);
│ │ │ │ +
166 out[5][1][1] = sign_[1]*(-7.5 + 5*in[0] + 25*in[1]);
│ │ │ │ +
167
│ │ │ │ +
168
│ │ │ │ +
169
│ │ │ │ +
170 out[6][0][0] = sign_[2]*(-3 + 4*in[1] + 8*in[0]);
│ │ │ │ +
171 out[6][0][1] = sign_[2]*(4*in[0]);
│ │ │ │ +
172
│ │ │ │ +
173 out[6][1][0] = sign_[2]*(4*in[1]);
│ │ │ │ +
174 out[6][1][1] = sign_[2]*(-3 + 4*in[0] + 8*in[1]);
│ │ │ │ +
175
│ │ │ │ +
176
│ │ │ │ +
177 out[7][0][0] = -3 + 12*in[0];
│ │ │ │ +
178 out[7][0][1] = 0;
│ │ │ │ +
179
│ │ │ │ +
180 out[7][1][0] = 0;
│ │ │ │ +
181 out[7][1][1] = 3 - 12*in[1];
│ │ │ │ +
182
│ │ │ │ +
183
│ │ │ │ +
184 out[8][0][0] = sign_[2]*(-10*in[1] + 10*in[0]);
│ │ │ │ +
185 out[8][0][1] = sign_[2]*(-10*in[0]);
│ │ │ │ +
186
│ │ │ │ +
187 out[8][1][0] = sign_[2]*(-10*in[1]);
│ │ │ │ +
188 out[8][1][1] = sign_[2]*(-10*in[0] + 10*in[1]);
│ │ │ │ +
189
│ │ │ │ +
190
│ │ │ │ +
191 out[9][0][0] = 18 - 12*in[1] - 36*in[0];
│ │ │ │ +
192 out[9][0][1] = -12*in[0];
│ │ │ │ +
193
│ │ │ │ +
194 out[9][1][0] = -12*in[1];
│ │ │ │ +
195 out[9][1][1] = 6 - 12*in[0] - 12*in[1];
│ │ │ │ +
196
│ │ │ │ +
197 out[10][0][0] = 6 - 12*in[1] - 12*in[0];
│ │ │ │ +
198 out[10][0][1] = -12*in[0];
│ │ │ │ +
199
│ │ │ │ +
200 out[10][1][0] = -12*in[1];
│ │ │ │ +
201 out[10][1][1] = 18 - 12*in[0] - 36*in[1];
│ │ │ │ +
202
│ │ │ │ +
203 out[11][0][0] = 90 - 180*in[1] - 180*in[0];
│ │ │ │ +
204 out[11][0][1] = -180*in[0];
│ │ │ │ +
205
│ │ │ │ +
206 out[11][1][0] = 180*in[1];
│ │ │ │ +
207 out[11][1][1] = -90 + 180*in[0] + 180*in[1];
│ │ │ │ +
208 }
│ │ │ │ +
│ │ │ │ +
209
│ │ │ │ +
│ │ │ │ +
211 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
212 const typename Traits::DomainType& in, // position
│ │ │ │ +
213 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
214 {
│ │ │ │ +
215 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
216 if (totalOrder == 0) {
│ │ │ │ +
217 evaluateFunction(in, out);
│ │ │ │ +
218 } else if (totalOrder == 1) {
│ │ │ │ +
219 out.resize(size());
│ │ │ │ +
220 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
221
│ │ │ │ +
222 switch (direction) {
│ │ │ │ +
223 case 0:
│ │ │ │ +
224 out[0][0] = sign_[0]*(-2*in[1] + 2*in[0]);
│ │ │ │ +
225 out[0][1] = sign_[0]*(-2*in[1]);
│ │ │ │ +
226
│ │ │ │ +
227 out[1][0] = 1.5 + 3*in[1] - 9*in[0];
│ │ │ │ +
228 out[1][1] = 6 - 15*in[1];
│ │ │ │ +
229
│ │ │ │ +
230 out[2][0] = sign_[0]*(-7.5 + 5*in[1] + 25*in[0]);
│ │ │ │ +
231 out[2][1] = sign_[0]*(30 - 25*in[1] - 60*in[0]);
│ │ │ │ +
232
│ │ │ │ +
233 out[3][0] = sign_[1]*(6 - 2*in[1] - 10*in[0]);
│ │ │ │ +
234 out[3][1] = sign_[1]*(-2*in[1]);
│ │ │ │ +
235
│ │ │ │ +
236 out[4][0] = -10.5 + 15*in[1] + 15*in[0];
│ │ │ │ +
237 out[4][1] = -3*in[1];
│ │ │ │ +
238
│ │ │ │ +
239 out[5][0] = sign_[1]*(7.5 - 25*in[1] - 5*in[0]);
│ │ │ │ +
240 out[5][1] = sign_[1]*(5*in[1]);
│ │ │ │ +
241
│ │ │ │ +
242 out[6][0] = sign_[2]*(-3 + 4*in[1] + 8*in[0]);
│ │ │ │ +
243 out[6][1] = sign_[2]*(4*in[1]);
│ │ │ │ +
244
│ │ │ │ +
245 out[7][0] = -3 + 12*in[0];
│ │ │ │ +
246 out[7][1] = 0;
│ │ │ │ +
247
│ │ │ │ +
248 out[8][0] = sign_[2]*(-10*in[1] + 10*in[0]);
│ │ │ │ +
249 out[8][1] = sign_[2]*(-10*in[1]);
│ │ │ │ +
250
│ │ │ │ +
251 out[9][0] = 18 - 12*in[1] - 36*in[0];
│ │ │ │ +
252 out[9][1] = -12*in[1];
│ │ │ │ +
253
│ │ │ │ +
254 out[10][0] = 6 - 12*in[1] - 12*in[0];
│ │ │ │ +
255 out[10][1] = -12*in[1];
│ │ │ │ +
256
│ │ │ │ +
257 out[11][0] = 90 - 180*in[1] - 180*in[0];
│ │ │ │ +
258 out[11][1] = 180*in[1];
│ │ │ │ +
259 break;
│ │ │ │ +
260 case 1:
│ │ │ │ +
261 out[0][0] = sign_[0]*(-2*in[0]);
│ │ │ │ +
262 out[0][1] = sign_[0]*(6 -2*in[0] - 10*in[1]);
│ │ │ │ +
263
│ │ │ │ +
264 out[1][0] = 3*in[0];
│ │ │ │ +
265 out[1][1] = 10.5 - 15*in[0] - 15*in[1];
│ │ │ │ +
266
│ │ │ │ +
267 out[2][0] = sign_[0]*(5*in[0]);
│ │ │ │ +
268 out[2][1] = sign_[0]*(7.5 - 25*in[0] - 5*in[1]);
│ │ │ │ +
269
│ │ │ │ +
270 out[3][0] = sign_[1]*(-2*in[0]);
│ │ │ │ +
271 out[3][1] = sign_[1]*(-2*in[0] + 2*in[1]);
│ │ │ │ +
272
│ │ │ │ +
273 out[4][0] = -6 + 15*in[0];
│ │ │ │ +
274 out[4][1] = -1.5 - 3*in[0] + 9*in[1];
│ │ │ │ +
275
│ │ │ │ +
276 out[5][0] = sign_[1]*(30 - 25*in[0] - 60*in[1]);
│ │ │ │ +
277 out[5][1] = sign_[1]*(-7.5 + 5*in[0] + 25*in[1]);
│ │ │ │ +
278
│ │ │ │ +
279 out[6][0] = sign_[2]*(4*in[0]);
│ │ │ │ +
280 out[6][1] = sign_[2]*(-3 + 4*in[0] + 8*in[1]);
│ │ │ │ +
281
│ │ │ │ +
282 out[7][0] = 0;
│ │ │ │ +
283 out[7][1] = 3 - 12*in[1];
│ │ │ │ +
284
│ │ │ │ +
285 out[8][0] = sign_[2]*(-10*in[0]);
│ │ │ │ +
286 out[8][1] = sign_[2]*(-10*in[0] + 10*in[1]);
│ │ │ │ +
287
│ │ │ │ +
288 out[9][0] = -12*in[0];
│ │ │ │ +
289 out[9][1] = 6 - 12*in[0] - 12*in[1];
│ │ │ │ +
290
│ │ │ │ +
291 out[10][0] = -12*in[0];
│ │ │ │ +
292 out[10][1] = 18 - 12*in[0] - 36*in[1];
│ │ │ │ +
293
│ │ │ │ +
294 out[11][0] = -180*in[0];
│ │ │ │ +
295 out[11][1] = -90 + 180*in[0] + 180*in[1];
│ │ │ │ +
296 break;
│ │ │ │ +
297 default:
│ │ │ │ +
298 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
299 }
│ │ │ │ +
300 } else {
│ │ │ │ +
301 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
302 }
│ │ │ │ +
303 }
│ │ │ │ +
│ │ │ │ +
304
│ │ │ │ +
│ │ │ │ +
306 unsigned int order() const
│ │ │ │ +
307 {
│ │ │ │ +
308 return 2; // TODO: check whether this is not order 3
│ │ │ │ +
309 }
│ │ │ │ +
│ │ │ │ +
310
│ │ │ │ +
311 private:
│ │ │ │ +
312 std::array<R,3> sign_;
│ │ │ │ +
313 };
│ │ │ │ +
│ │ │ │ +
314} // end namespace Dune
│ │ │ │ +
315#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALBASIS_HH
│ │ │ │ +
Definition bdfmcube.hh:18
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:30
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:121
│ │ │ │ +
BDM2Simplex2DLocalBasis(std::bitset< 3 > s)
Make set number s, where 0 <= s < 8.
Definition brezzidouglasmarini2simplex2dlocalbasis.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 brezzidouglasmarini2simplex2dlocalbasis.hh:211
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:56
│ │ │ │ +
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:35
│ │ │ │ +
BDM2Simplex2DLocalBasis()
Standard constructor.
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:38
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:67
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:306
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,22 +7,350 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -refined.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini2simplex2d │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalbasis.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 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ -refinedp0.hh │ │ │ │ │ -Piecewise P0 finite element. │ │ │ │ │ -refinedp1.hh │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALBASIS_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15#include "../../common/localbasis.hh" │ │ │ │ │ + 16 │ │ │ │ │ + 17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ + 28 template │ │ │ │ │ +29 class BDM2Simplex2DLocalBasis │ │ │ │ │ + 30 { │ │ │ │ │ + 31 │ │ │ │ │ + 32 public: │ │ │ │ │ + 33 typedef LocalBasisTraits, │ │ │ │ │ + 34 R,2,Dune::FieldVector, │ │ │ │ │ +35 Dune::FieldMatrix > Traits; │ │ │ │ │ + 36 │ │ │ │ │ +38 BDM2Simplex2DLocalBasis() │ │ │ │ │ + 39 { │ │ │ │ │ + 40 for (size_t i=0; i<3; i++) │ │ │ │ │ + 41 sign_[i] = 1.0; │ │ │ │ │ + 42 } │ │ │ │ │ + 43 │ │ │ │ │ +49 BDM2Simplex2DLocalBasis(std::bitset<3> s) │ │ │ │ │ + 50 { │ │ │ │ │ + 51 for (size_t i=0; i<3; i++) │ │ │ │ │ + 52 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ + 53 } │ │ │ │ │ + 54 │ │ │ │ │ +56 unsigned int size() const │ │ │ │ │ + 57 { │ │ │ │ │ + 58 return 12; │ │ │ │ │ + 59 } │ │ │ │ │ + 60 │ │ │ │ │ +67 inline void evaluateFunction(const typename Traits::DomainType& in, │ │ │ │ │ + 68 std::vector& out) const │ │ │ │ │ + 69 { │ │ │ │ │ + 70 out.resize(size()); │ │ │ │ │ + 71 │ │ │ │ │ + 72 out[0][0] = sign_[0]*(-2*in[0]*in[1] + in[0]*in[0]); │ │ │ │ │ + 73 out[0][1] = sign_[0]*(-1 + 6*in[1] -2*in[0]*in[1] - 5*in[1]*in[1]); │ │ │ │ │ + 74 │ │ │ │ │ + 75 out[1][0] = 1.5*in[0] + 3*in[0]*in[1] - 4.5*in[0]*in[0]; │ │ │ │ │ + 76 out[1][1] = -3 + 6*in[0] + 10.5*in[1] - 15*in[0]*in[1] - 7.5*in[1]*in[1]; │ │ │ │ │ + 77 │ │ │ │ │ + 78 out[2][0] = sign_[0]*(-7.5*in[0] + 5*in[0]*in[1] + 12.5*in[0]*in[0]); │ │ │ │ │ + 79 out[2][1] = sign_[0]*(-5 + 30*in[0] + 7.5*in[1] - 25*in[0]*in[1] - 30*in │ │ │ │ │ +[0]*in[0] - 2.5*in[1]*in[1]); │ │ │ │ │ + 80 │ │ │ │ │ + 81 │ │ │ │ │ + 82 │ │ │ │ │ + 83 out[3][0] = sign_[1]*(-1 + 6*in[0] - 2*in[0]*in[1] - 5*in[0]*in[0]); │ │ │ │ │ + 84 out[3][1] = sign_[1]*(-2*in[0]*in[1] + in[1]*in[1]); │ │ │ │ │ + 85 │ │ │ │ │ + 86 out[4][0] = 3 - 10.5*in[0] - 6*in[1] + 15*in[0]*in[1] + 7.5*in[0]*in[0]; │ │ │ │ │ + 87 out[4][1] = -1.5*in[1] - 3*in[0]*in[1] + 4.5*in[1]*in[1]; │ │ │ │ │ + 88 │ │ │ │ │ + 89 out[5][0] = sign_[1]*(-5 + 7.5*in[0] + 30*in[1] - 25*in[0]*in[1] - 2.5*in │ │ │ │ │ +[0]*in[0] - 30*in[1]*in[1]); │ │ │ │ │ + 90 out[5][1] = sign_[1]*(-7.5*in[1] + 5*in[0]*in[1] + 12.5*in[1]*in[1]); │ │ │ │ │ + 91 │ │ │ │ │ + 92 │ │ │ │ │ + 93 │ │ │ │ │ + 94 out[6][0] = sign_[2]*(-3*in[0] + 4*in[0]*in[1] + 4*in[0]*in[0]); │ │ │ │ │ + 95 out[6][1] = sign_[2]*(-3*in[1] + 4*in[0]*in[1] + 4*in[1]*in[1]); │ │ │ │ │ + 96 │ │ │ │ │ + 97 out[7][0] = -3*in[0] + 6*in[0]*in[0]; │ │ │ │ │ + 98 out[7][1] = 3*in[1] - 6*in[1]*in[1]; │ │ │ │ │ + 99 │ │ │ │ │ + 100 out[8][0] = sign_[2]*(-10*in[0]*in[1] + 5*in[0]*in[0]); │ │ │ │ │ + 101 out[8][1] = sign_[2]*(-10*in[0]*in[1] + 5*in[1]*in[1]); │ │ │ │ │ + 102 │ │ │ │ │ + 103 │ │ │ │ │ + 104 │ │ │ │ │ + 105 out[9][0] = 18*in[0] - 12*in[0]*in[1] - 18*in[0]*in[0]; │ │ │ │ │ + 106 out[9][1] = 6*in[1] - 12*in[0]*in[1] - 6*in[1]*in[1]; │ │ │ │ │ + 107 │ │ │ │ │ + 108 out[10][0] = 6*in[0] - 12*in[0]*in[1] - 6*in[0]*in[0]; │ │ │ │ │ + 109 out[10][1] = 18*in[1] - 12*in[0]*in[1] - 18*in[1]*in[1]; │ │ │ │ │ + 110 │ │ │ │ │ + 111 out[11][0] = 90*in[0] - 180*in[0]*in[1] - 90*in[0]*in[0]; │ │ │ │ │ + 112 out[11][1] = -90*in[1] + 180*in[0]*in[1] + 90*in[1]*in[1]; │ │ │ │ │ + 113 } │ │ │ │ │ + 114 │ │ │ │ │ +121 inline void evaluateJacobian(const typename Traits::DomainType& in, │ │ │ │ │ + 122 std::vector& out) const │ │ │ │ │ + 123 { │ │ │ │ │ + 124 out.resize(size()); │ │ │ │ │ + 125 │ │ │ │ │ + 126 out[0][0][0] = sign_[0]*(-2*in[1] + 2*in[0]); │ │ │ │ │ + 127 out[0][0][1] = sign_[0]*(-2*in[0]); │ │ │ │ │ + 128 │ │ │ │ │ + 129 out[0][1][0] = sign_[0]*(-2*in[1]); │ │ │ │ │ + 130 out[0][1][1] = sign_[0]*(6 -2*in[0] - 10*in[1]); │ │ │ │ │ + 131 │ │ │ │ │ + 132 │ │ │ │ │ + 133 out[1][0][0] = 1.5 + 3*in[1] - 9*in[0]; │ │ │ │ │ + 134 out[1][0][1] = 3*in[0]; │ │ │ │ │ + 135 │ │ │ │ │ + 136 out[1][1][0] = 6 - 15*in[1]; │ │ │ │ │ + 137 out[1][1][1] = 10.5 - 15*in[0] - 15*in[1]; │ │ │ │ │ + 138 │ │ │ │ │ + 139 │ │ │ │ │ + 140 out[2][0][0] = sign_[0]*(-7.5 + 5*in[1] + 25*in[0]); │ │ │ │ │ + 141 out[2][0][1] = sign_[0]*(5*in[0]); │ │ │ │ │ + 142 │ │ │ │ │ + 143 out[2][1][0] = sign_[0]*(30 - 25*in[1] - 60*in[0]); │ │ │ │ │ + 144 out[2][1][1] = sign_[0]*(7.5 - 25*in[0] - 5*in[1]); │ │ │ │ │ + 145 │ │ │ │ │ + 146 │ │ │ │ │ + 147 │ │ │ │ │ + 148 out[3][0][0] = sign_[1]*(6 - 2*in[1] - 10*in[0]); │ │ │ │ │ + 149 out[3][0][1] = sign_[1]*(-2*in[0]); │ │ │ │ │ + 150 │ │ │ │ │ + 151 out[3][1][0] = sign_[1]*(-2*in[1]); │ │ │ │ │ + 152 out[3][1][1] = sign_[1]*(-2*in[0] + 2*in[1]); │ │ │ │ │ + 153 │ │ │ │ │ + 154 │ │ │ │ │ + 155 out[4][0][0] = -10.5 + 15*in[1] + 15*in[0]; │ │ │ │ │ + 156 out[4][0][1] = -6 + 15*in[0]; │ │ │ │ │ + 157 │ │ │ │ │ + 158 out[4][1][0] = -3*in[1]; │ │ │ │ │ + 159 out[4][1][1] = -1.5 - 3*in[0] + 9*in[1]; │ │ │ │ │ + 160 │ │ │ │ │ + 161 │ │ │ │ │ + 162 out[5][0][0] = sign_[1]*(7.5 - 25*in[1] - 5*in[0]); │ │ │ │ │ + 163 out[5][0][1] = sign_[1]*(30 - 25*in[0] - 60*in[1]); │ │ │ │ │ + 164 │ │ │ │ │ + 165 out[5][1][0] = sign_[1]*(5*in[1]); │ │ │ │ │ + 166 out[5][1][1] = sign_[1]*(-7.5 + 5*in[0] + 25*in[1]); │ │ │ │ │ + 167 │ │ │ │ │ + 168 │ │ │ │ │ + 169 │ │ │ │ │ + 170 out[6][0][0] = sign_[2]*(-3 + 4*in[1] + 8*in[0]); │ │ │ │ │ + 171 out[6][0][1] = sign_[2]*(4*in[0]); │ │ │ │ │ + 172 │ │ │ │ │ + 173 out[6][1][0] = sign_[2]*(4*in[1]); │ │ │ │ │ + 174 out[6][1][1] = sign_[2]*(-3 + 4*in[0] + 8*in[1]); │ │ │ │ │ + 175 │ │ │ │ │ + 176 │ │ │ │ │ + 177 out[7][0][0] = -3 + 12*in[0]; │ │ │ │ │ + 178 out[7][0][1] = 0; │ │ │ │ │ + 179 │ │ │ │ │ + 180 out[7][1][0] = 0; │ │ │ │ │ + 181 out[7][1][1] = 3 - 12*in[1]; │ │ │ │ │ + 182 │ │ │ │ │ + 183 │ │ │ │ │ + 184 out[8][0][0] = sign_[2]*(-10*in[1] + 10*in[0]); │ │ │ │ │ + 185 out[8][0][1] = sign_[2]*(-10*in[0]); │ │ │ │ │ + 186 │ │ │ │ │ + 187 out[8][1][0] = sign_[2]*(-10*in[1]); │ │ │ │ │ + 188 out[8][1][1] = sign_[2]*(-10*in[0] + 10*in[1]); │ │ │ │ │ + 189 │ │ │ │ │ + 190 │ │ │ │ │ + 191 out[9][0][0] = 18 - 12*in[1] - 36*in[0]; │ │ │ │ │ + 192 out[9][0][1] = -12*in[0]; │ │ │ │ │ + 193 │ │ │ │ │ + 194 out[9][1][0] = -12*in[1]; │ │ │ │ │ + 195 out[9][1][1] = 6 - 12*in[0] - 12*in[1]; │ │ │ │ │ + 196 │ │ │ │ │ + 197 out[10][0][0] = 6 - 12*in[1] - 12*in[0]; │ │ │ │ │ + 198 out[10][0][1] = -12*in[0]; │ │ │ │ │ + 199 │ │ │ │ │ + 200 out[10][1][0] = -12*in[1]; │ │ │ │ │ + 201 out[10][1][1] = 18 - 12*in[0] - 36*in[1]; │ │ │ │ │ + 202 │ │ │ │ │ + 203 out[11][0][0] = 90 - 180*in[1] - 180*in[0]; │ │ │ │ │ + 204 out[11][0][1] = -180*in[0]; │ │ │ │ │ + 205 │ │ │ │ │ + 206 out[11][1][0] = 180*in[1]; │ │ │ │ │ + 207 out[11][1][1] = -90 + 180*in[0] + 180*in[1]; │ │ │ │ │ + 208 } │ │ │ │ │ + 209 │ │ │ │ │ +211 void partial (const std::array& order, │ │ │ │ │ + 212 const typename Traits::DomainType& in, // position │ │ │ │ │ + 213 std::vector& out) const // return value │ │ │ │ │ + 214 { │ │ │ │ │ + 215 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ + 216 if (totalOrder == 0) { │ │ │ │ │ + 217 evaluateFunction(in, out); │ │ │ │ │ + 218 } else if (totalOrder == 1) { │ │ │ │ │ + 219 out.resize(size()); │ │ │ │ │ + 220 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ +(), order.end(), 1)); │ │ │ │ │ + 221 │ │ │ │ │ + 222 switch (direction) { │ │ │ │ │ + 223 case 0: │ │ │ │ │ + 224 out[0][0] = sign_[0]*(-2*in[1] + 2*in[0]); │ │ │ │ │ + 225 out[0][1] = sign_[0]*(-2*in[1]); │ │ │ │ │ + 226 │ │ │ │ │ + 227 out[1][0] = 1.5 + 3*in[1] - 9*in[0]; │ │ │ │ │ + 228 out[1][1] = 6 - 15*in[1]; │ │ │ │ │ + 229 │ │ │ │ │ + 230 out[2][0] = sign_[0]*(-7.5 + 5*in[1] + 25*in[0]); │ │ │ │ │ + 231 out[2][1] = sign_[0]*(30 - 25*in[1] - 60*in[0]); │ │ │ │ │ + 232 │ │ │ │ │ + 233 out[3][0] = sign_[1]*(6 - 2*in[1] - 10*in[0]); │ │ │ │ │ + 234 out[3][1] = sign_[1]*(-2*in[1]); │ │ │ │ │ + 235 │ │ │ │ │ + 236 out[4][0] = -10.5 + 15*in[1] + 15*in[0]; │ │ │ │ │ + 237 out[4][1] = -3*in[1]; │ │ │ │ │ + 238 │ │ │ │ │ + 239 out[5][0] = sign_[1]*(7.5 - 25*in[1] - 5*in[0]); │ │ │ │ │ + 240 out[5][1] = sign_[1]*(5*in[1]); │ │ │ │ │ + 241 │ │ │ │ │ + 242 out[6][0] = sign_[2]*(-3 + 4*in[1] + 8*in[0]); │ │ │ │ │ + 243 out[6][1] = sign_[2]*(4*in[1]); │ │ │ │ │ + 244 │ │ │ │ │ + 245 out[7][0] = -3 + 12*in[0]; │ │ │ │ │ + 246 out[7][1] = 0; │ │ │ │ │ + 247 │ │ │ │ │ + 248 out[8][0] = sign_[2]*(-10*in[1] + 10*in[0]); │ │ │ │ │ + 249 out[8][1] = sign_[2]*(-10*in[1]); │ │ │ │ │ + 250 │ │ │ │ │ + 251 out[9][0] = 18 - 12*in[1] - 36*in[0]; │ │ │ │ │ + 252 out[9][1] = -12*in[1]; │ │ │ │ │ + 253 │ │ │ │ │ + 254 out[10][0] = 6 - 12*in[1] - 12*in[0]; │ │ │ │ │ + 255 out[10][1] = -12*in[1]; │ │ │ │ │ + 256 │ │ │ │ │ + 257 out[11][0] = 90 - 180*in[1] - 180*in[0]; │ │ │ │ │ + 258 out[11][1] = 180*in[1]; │ │ │ │ │ + 259 break; │ │ │ │ │ + 260 case 1: │ │ │ │ │ + 261 out[0][0] = sign_[0]*(-2*in[0]); │ │ │ │ │ + 262 out[0][1] = sign_[0]*(6 -2*in[0] - 10*in[1]); │ │ │ │ │ + 263 │ │ │ │ │ + 264 out[1][0] = 3*in[0]; │ │ │ │ │ + 265 out[1][1] = 10.5 - 15*in[0] - 15*in[1]; │ │ │ │ │ + 266 │ │ │ │ │ + 267 out[2][0] = sign_[0]*(5*in[0]); │ │ │ │ │ + 268 out[2][1] = sign_[0]*(7.5 - 25*in[0] - 5*in[1]); │ │ │ │ │ + 269 │ │ │ │ │ + 270 out[3][0] = sign_[1]*(-2*in[0]); │ │ │ │ │ + 271 out[3][1] = sign_[1]*(-2*in[0] + 2*in[1]); │ │ │ │ │ + 272 │ │ │ │ │ + 273 out[4][0] = -6 + 15*in[0]; │ │ │ │ │ + 274 out[4][1] = -1.5 - 3*in[0] + 9*in[1]; │ │ │ │ │ + 275 │ │ │ │ │ + 276 out[5][0] = sign_[1]*(30 - 25*in[0] - 60*in[1]); │ │ │ │ │ + 277 out[5][1] = sign_[1]*(-7.5 + 5*in[0] + 25*in[1]); │ │ │ │ │ + 278 │ │ │ │ │ + 279 out[6][0] = sign_[2]*(4*in[0]); │ │ │ │ │ + 280 out[6][1] = sign_[2]*(-3 + 4*in[0] + 8*in[1]); │ │ │ │ │ + 281 │ │ │ │ │ + 282 out[7][0] = 0; │ │ │ │ │ + 283 out[7][1] = 3 - 12*in[1]; │ │ │ │ │ + 284 │ │ │ │ │ + 285 out[8][0] = sign_[2]*(-10*in[0]); │ │ │ │ │ + 286 out[8][1] = sign_[2]*(-10*in[0] + 10*in[1]); │ │ │ │ │ + 287 │ │ │ │ │ + 288 out[9][0] = -12*in[0]; │ │ │ │ │ + 289 out[9][1] = 6 - 12*in[0] - 12*in[1]; │ │ │ │ │ + 290 │ │ │ │ │ + 291 out[10][0] = -12*in[0]; │ │ │ │ │ + 292 out[10][1] = 18 - 12*in[0] - 36*in[1]; │ │ │ │ │ + 293 │ │ │ │ │ + 294 out[11][0] = -180*in[0]; │ │ │ │ │ + 295 out[11][1] = -90 + 180*in[0] + 180*in[1]; │ │ │ │ │ + 296 break; │ │ │ │ │ + 297 default: │ │ │ │ │ + 298 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ + 299 } │ │ │ │ │ + 300 } else { │ │ │ │ │ + 301 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ + 302 } │ │ │ │ │ + 303 } │ │ │ │ │ + 304 │ │ │ │ │ +306 unsigned int order() const │ │ │ │ │ + 307 { │ │ │ │ │ + 308 return 2; // TODO: check whether this is not order 3 │ │ │ │ │ + 309 } │ │ │ │ │ + 310 │ │ │ │ │ + 311 private: │ │ │ │ │ + 312 std::array sign_; │ │ │ │ │ + 313 }; │ │ │ │ │ + 314} // end namespace Dune │ │ │ │ │ + 315#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALBASIS_HH │ │ │ │ │ +Dune │ │ │ │ │ +Definition bdfmcube.hh:18 │ │ │ │ │ +Dune::BDM2Simplex2DLocalBasis │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalbasis.hh:30 │ │ │ │ │ +Dune::BDM2Simplex2DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalbasis.hh:121 │ │ │ │ │ +Dune::BDM2Simplex2DLocalBasis::BDM2Simplex2DLocalBasis │ │ │ │ │ +BDM2Simplex2DLocalBasis(std::bitset< 3 > s) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalbasis.hh:49 │ │ │ │ │ +Dune::BDM2Simplex2DLocalBasis::partial │ │ │ │ │ +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 brezzidouglasmarini2simplex2dlocalbasis.hh:211 │ │ │ │ │ +Dune::BDM2Simplex2DLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalbasis.hh:56 │ │ │ │ │ +Dune::BDM2Simplex2DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalbasis.hh:35 │ │ │ │ │ +Dune::BDM2Simplex2DLocalBasis::BDM2Simplex2DLocalBasis │ │ │ │ │ +BDM2Simplex2DLocalBasis() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalbasis.hh:38 │ │ │ │ │ +Dune::BDM2Simplex2DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalbasis.hh:67 │ │ │ │ │ +Dune::BDM2Simplex2DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalbasis.hh:306 │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00449.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: crouzeixraviart.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini2simplex2dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
crouzeixraviart.hh File Reference
│ │ │ │ +
brezzidouglasmarini2simplex2dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#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 <vector>
│ │ │ │ +#include <dune/geometry/quadraturerules.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::BDM2Simplex2DLocalInterpolation< LB >
 First order Brezzi-Douglas-Marini shape functions on triangles. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,30 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini2simplex2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -crouzeixraviart.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::CrouzeixRaviartLocalFiniteElement<_D,_R,_dim_> │ │ │ │ │ -  Crouzeix-Raviart finite element. More... │ │ │ │ │ +class  Dune::BDM2Simplex2DLocalInterpolation<_LB_> │ │ │ │ │ +  First order Brezzi-Douglas-Marini shape functions on triangles. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00449_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: crouzeixraviart.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini2simplex2dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,233 +70,158 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
crouzeixraviart.hh
│ │ │ │ +
brezzidouglasmarini2simplex2dlocalinterpolation.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <numeric>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/fmatrix.hh>
│ │ │ │ -
12#include <dune/common/fvector.hh>
│ │ │ │ -
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;
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
24 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27
│ │ │ │ +
28 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
31 {
│ │ │ │ +
32 sign0 = sign1 = sign2 = 1.0;
│ │ │ │ +
33 }
│ │ │ │ +
│ │ │ │ +
34
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
41 {
│ │ │ │ +
42 sign0 = sign1 = sign2 = 1.0;
│ │ │ │ +
43 if (s & 1)
│ │ │ │ +
44 {
│ │ │ │ +
45 sign0 = -1.0;
│ │ │ │ +
46 }
│ │ │ │ +
47 if (s & 2)
│ │ │ │ +
48 {
│ │ │ │ +
49 sign1 = -1.0;
│ │ │ │ +
50 }
│ │ │ │ +
51 if (s & 4)
│ │ │ │ +
52 {
│ │ │ │ +
53 sign2 = -1.0;
│ │ │ │ +
54 }
│ │ │ │ +
55
│ │ │ │ +
56 m0[0] = 0.5;
│ │ │ │ +
57 m0[1] = 0.0;
│ │ │ │ +
58 m1[0] = 0.0;
│ │ │ │ +
59 m1[1] = 0.5;
│ │ │ │ +
60 m2[0] = 0.5;
│ │ │ │ +
61 m2[1] = 0.5;
│ │ │ │ +
62 n0[0] = 0.0;
│ │ │ │ +
63 n0[1] = -1.0;
│ │ │ │ +
64 n1[0] = -1.0;
│ │ │ │ +
65 n1[1] = 0.0;
│ │ │ │ +
66 n2[0] = 1.0/sqrt(2.0);
│ │ │ │ +
67 n2[1] = 1.0/sqrt(2.0);
│ │ │ │ +
68 c0 = 0.5*n0[0] - 1.0*n0[1];
│ │ │ │ +
69 c1 = -1.0*n1[0] + 0.5*n1[1];
│ │ │ │ +
70 c2 = 0.5*n2[0] + 0.5*n2[1];
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │
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);
│ │ │ │ +
81 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
82 void interpolate(const F& ff, std::vector<C>& out) const
│ │ │ │ +
83 {
│ │ │ │ +
84 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
85 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
86 typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │
87
│ │ │ │ -
88 out.resize(size());
│ │ │ │ +
88 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │
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();
│ │ │ │ -
98
│ │ │ │ -
99 for (unsigned int i=0; i<dim; i++)
│ │ │ │ -
100 out[i] = (i==(dim-1-direction)) ? -(double)dim : 0.0;
│ │ │ │ +
90 out.resize(12);
│ │ │ │ +
91 fill(out.begin(), out.end(), 0.0);
│ │ │ │ +
92
│ │ │ │ +
93 const int qOrder = 4;
│ │ │ │ +
94 const Dune::QuadratureRule<Scalar,1>& rule = Dune::QuadratureRules<Scalar,1>::rule(Dune::GeometryTypes::simplex(1), qOrder);
│ │ │ │ +
95
│ │ │ │ +
96 for (typename Dune::QuadratureRule<Scalar,1>::const_iterator it=rule.begin(); it!=rule.end(); ++it)
│ │ │ │ +
97 {
│ │ │ │ +
98 Scalar qPos = it->position();
│ │ │ │ +
99
│ │ │ │ +
100 typename LB::Traits::DomainType localPos;
│ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
102 localPos[0] = qPos;
│ │ │ │ +
103 localPos[1] = 0.0;
│ │ │ │ +
104 auto y = f(localPos);
│ │ │ │ +
105 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0/c0;
│ │ │ │ +
106 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(1.0 - 2.0*qPos)*it->weight()/c0;
│ │ │ │ +
107 out[2] += (y[0]*n0[0] + y[1]*n0[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it->weight()*sign0/c0;
│ │ │ │ +
108
│ │ │ │ +
109 localPos[0] = 0.0;
│ │ │ │ +
110 localPos[1] = qPos;
│ │ │ │ +
111 y = f(localPos);
│ │ │ │ +
112 out[3] += (y[0]*n1[0]+y[1]*n1[1])*it->weight()*sign1/c1;
│ │ │ │ +
113 out[4] += (y[0]*n1[0]+y[1]*n1[1])*(2.0*qPos-1.0)*it->weight()/c1;
│ │ │ │ +
114 out[5] += (y[0]*n1[0]+y[1]*n1[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it->weight()*sign1/c1;
│ │ │ │ +
115
│ │ │ │ +
116 localPos[0] = 1.0 - qPos;
│ │ │ │ +
117 localPos[1] = qPos;
│ │ │ │ +
118 y = f(localPos);
│ │ │ │ +
119 out[6] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2/c2;
│ │ │ │ +
120 out[7] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight()/c2;
│ │ │ │ +
121 out[8] += (y[0]*n2[0] + y[1]*n2[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it->weight()*sign2/c2;
│ │ │ │ +
122 }
│ │ │ │ +
123
│ │ │ │ +
124 // a volume part is needed here for dofs: 9 10 11
│ │ │ │ +
125 const QuadratureRule<Vector,2>& rule2 = QuadratureRules<Vector,2>::rule(GeometryTypes::simplex(2), qOrder);
│ │ │ │ +
126
│ │ │ │ +
127 for (typename QuadratureRule<Vector,2>::const_iterator it=rule2.begin(); it!=rule2.end(); ++it)
│ │ │ │ +
128 {
│ │ │ │ +
129 typename LB::Traits::DomainType localPos = it->position();
│ │ │ │ +
130 auto y = f(localPos);
│ │ │ │ +
131
│ │ │ │ +
132 out[9] += y[0]*it->weight();
│ │ │ │ +
133 out[10] += y[1]*it->weight();
│ │ │ │ +
134 out[11] += (y[0]*(localPos[0]-2.0*localPos[0]*localPos[1]-localPos[0]*localPos[0])
│ │ │ │ +
135 +y[1]*(-localPos[1]+2.0*localPos[0]*localPos[1]+localPos[1]*localPos[1]))*it->weight();
│ │ │ │ +
136 }
│ │ │ │ +
137 }
│ │ │ │ +
│ │ │ │ +
138
│ │ │ │ +
139 private:
│ │ │ │ +
140 typename LB::Traits::RangeFieldType sign0, sign1, sign2;
│ │ │ │ +
141 typename LB::Traits::DomainType m0, m1, m2;
│ │ │ │ +
142 typename LB::Traits::DomainType n0, n1, n2;
│ │ │ │ +
143 typename LB::Traits::RangeFieldType c0, c1, c2;
│ │ │ │ +
144 };
│ │ │ │ +
│ │ │ │ +
145} // end namespace Dune
│ │ │ │ +
146#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALINTERPOLATION_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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on triangles.
Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:26
│ │ │ │ +
BDM2Simplex2DLocalInterpolation()
Standard constructor.
Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:30
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:82
│ │ │ │ +
BDM2Simplex2DLocalInterpolation(unsigned int s)
Make set number s, where 0 <= s < 8.
Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:40
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,250 +7,170 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -crouzeixraviart.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini2simplex2d │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalinterpolation.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16 │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include │ │ │ │ │ - 20#include │ │ │ │ │ - 21 │ │ │ │ │ - 22namespace Dune { 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 Traits::DomainType& 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 │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ + 24 template │ │ │ │ │ +25 class BDM2Simplex2DLocalInterpolation │ │ │ │ │ + 26 { │ │ │ │ │ + 27 │ │ │ │ │ + 28 public: │ │ │ │ │ +30 BDM2Simplex2DLocalInterpolation() │ │ │ │ │ + 31 { │ │ │ │ │ + 32 sign0 = sign1 = sign2 = 1.0; │ │ │ │ │ + 33 } │ │ │ │ │ + 34 │ │ │ │ │ +40 BDM2Simplex2DLocalInterpolation(unsigned int s) │ │ │ │ │ + 41 { │ │ │ │ │ + 42 sign0 = sign1 = sign2 = 1.0; │ │ │ │ │ + 43 if (s & 1) │ │ │ │ │ + 44 { │ │ │ │ │ + 45 sign0 = -1.0; │ │ │ │ │ + 46 } │ │ │ │ │ + 47 if (s & 2) │ │ │ │ │ + 48 { │ │ │ │ │ + 49 sign1 = -1.0; │ │ │ │ │ + 50 } │ │ │ │ │ + 51 if (s & 4) │ │ │ │ │ + 52 { │ │ │ │ │ + 53 sign2 = -1.0; │ │ │ │ │ + 54 } │ │ │ │ │ + 55 │ │ │ │ │ + 56 m0[0] = 0.5; │ │ │ │ │ + 57 m0[1] = 0.0; │ │ │ │ │ + 58 m1[0] = 0.0; │ │ │ │ │ + 59 m1[1] = 0.5; │ │ │ │ │ + 60 m2[0] = 0.5; │ │ │ │ │ + 61 m2[1] = 0.5; │ │ │ │ │ + 62 n0[0] = 0.0; │ │ │ │ │ + 63 n0[1] = -1.0; │ │ │ │ │ + 64 n1[0] = -1.0; │ │ │ │ │ + 65 n1[1] = 0.0; │ │ │ │ │ + 66 n2[0] = 1.0/sqrt(2.0); │ │ │ │ │ + 67 n2[1] = 1.0/sqrt(2.0); │ │ │ │ │ + 68 c0 = 0.5*n0[0] - 1.0*n0[1]; │ │ │ │ │ + 69 c1 = -1.0*n1[0] + 0.5*n1[1]; │ │ │ │ │ + 70 c2 = 0.5*n2[0] + 0.5*n2[1]; │ │ │ │ │ + 71 } │ │ │ │ │ 72 │ │ │ │ │ - 73 std::fill(out.back()[0].begin(), out.back()[0].end(), dim); │ │ │ │ │ - 74 } │ │ │ │ │ - 75 │ │ │ │ │ - 82 void partial(const std::array& order, │ │ │ │ │ - 83 const typename Traits::DomainType& in, │ │ │ │ │ - 84 std::vector& out) const │ │ │ │ │ - 85 { │ │ │ │ │ - 86 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ + 81 template │ │ │ │ │ +82 void interpolate(const F& ff, std::vector& out) const │ │ │ │ │ + 83 { │ │ │ │ │ + 84 // f gives v*outer normal at a point on the edge! │ │ │ │ │ + 85 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ + 86 typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ 87 │ │ │ │ │ - 88 out.resize(size()); │ │ │ │ │ + 88 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ 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(); │ │ │ │ │ - 98 │ │ │ │ │ - 99 for (unsigned int i=0; i& rule = Dune:: │ │ │ │ │ +QuadratureRules::rule(Dune::GeometryTypes::simplex(1), qOrder); │ │ │ │ │ + 95 │ │ │ │ │ + 96 for (typename Dune::QuadratureRule::const_iterator it=rule.begin │ │ │ │ │ +(); it!=rule.end(); ++it) │ │ │ │ │ + 97 { │ │ │ │ │ + 98 Scalar qPos = it->position(); │ │ │ │ │ + 99 │ │ │ │ │ + 100 typename LB::Traits::DomainType localPos; │ │ │ │ │ 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 │ │ │ │ │ - 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 Dune │ │ │ │ │ - 182{ │ │ │ │ │ - 189 template │ │ │ │ │ -190 class CrouzeixRaviartLocalFiniteElement │ │ │ │ │ - 191 { │ │ │ │ │ - 192 public: │ │ │ │ │ -195 using Traits = LocalFiniteElementTraits, │ │ │ │ │ - 196 Impl::CrouzeixRaviartLocalCoefficients, │ │ │ │ │ - 197 Impl::CrouzeixRaviartLocalInterpolation > >; │ │ │ │ │ - 198 │ │ │ │ │ -201 const typename Traits::LocalBasisType& localBasis() const │ │ │ │ │ - 202 { │ │ │ │ │ - 203 return basis_; │ │ │ │ │ - 204 } │ │ │ │ │ - 205 │ │ │ │ │ -208 const typename Traits::LocalCoefficientsType& localCoefficients() const │ │ │ │ │ - 209 { │ │ │ │ │ - 210 return coefficients_; │ │ │ │ │ - 211 } │ │ │ │ │ - 212 │ │ │ │ │ -215 const typename Traits::LocalInterpolationType& localInterpolation() const │ │ │ │ │ - 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 basis_; │ │ │ │ │ - 235 Impl::CrouzeixRaviartLocalCoefficients coefficients_; │ │ │ │ │ - 236 Impl::CrouzeixRaviartLocalInterpolation > interpolation_; │ │ │ │ │ - 237 }; │ │ │ │ │ - 238 │ │ │ │ │ - 239} // namespace Dune │ │ │ │ │ - 240 │ │ │ │ │ - 241#endif // DUNE_LOCALFUNCTIONS_CROUZEIXRAVIART_HH │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -localkey.hh │ │ │ │ │ + 102 localPos[0] = qPos; │ │ │ │ │ + 103 localPos[1] = 0.0; │ │ │ │ │ + 104 auto y = f(localPos); │ │ │ │ │ + 105 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0/c0; │ │ │ │ │ + 106 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(1.0 - 2.0*qPos)*it->weight()/c0; │ │ │ │ │ + 107 out[2] += (y[0]*n0[0] + y[1]*n0[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it- │ │ │ │ │ +>weight()*sign0/c0; │ │ │ │ │ + 108 │ │ │ │ │ + 109 localPos[0] = 0.0; │ │ │ │ │ + 110 localPos[1] = qPos; │ │ │ │ │ + 111 y = f(localPos); │ │ │ │ │ + 112 out[3] += (y[0]*n1[0]+y[1]*n1[1])*it->weight()*sign1/c1; │ │ │ │ │ + 113 out[4] += (y[0]*n1[0]+y[1]*n1[1])*(2.0*qPos-1.0)*it->weight()/c1; │ │ │ │ │ + 114 out[5] += (y[0]*n1[0]+y[1]*n1[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it- │ │ │ │ │ +>weight()*sign1/c1; │ │ │ │ │ + 115 │ │ │ │ │ + 116 localPos[0] = 1.0 - qPos; │ │ │ │ │ + 117 localPos[1] = qPos; │ │ │ │ │ + 118 y = f(localPos); │ │ │ │ │ + 119 out[6] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2/c2; │ │ │ │ │ + 120 out[7] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight()/c2; │ │ │ │ │ + 121 out[8] += (y[0]*n2[0] + y[1]*n2[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it- │ │ │ │ │ +>weight()*sign2/c2; │ │ │ │ │ + 122 } │ │ │ │ │ + 123 │ │ │ │ │ + 124 // a volume part is needed here for dofs: 9 10 11 │ │ │ │ │ + 125 const QuadratureRule& rule2 = QuadratureRules::rule │ │ │ │ │ +(GeometryTypes::simplex(2), qOrder); │ │ │ │ │ + 126 │ │ │ │ │ + 127 for (typename QuadratureRule::const_iterator it=rule2.begin(); │ │ │ │ │ +it!=rule2.end(); ++it) │ │ │ │ │ + 128 { │ │ │ │ │ + 129 typename LB::Traits::DomainType localPos = it->position(); │ │ │ │ │ + 130 auto y = f(localPos); │ │ │ │ │ + 131 │ │ │ │ │ + 132 out[9] += y[0]*it->weight(); │ │ │ │ │ + 133 out[10] += y[1]*it->weight(); │ │ │ │ │ + 134 out[11] += (y[0]*(localPos[0]-2.0*localPos[0]*localPos[1]-localPos │ │ │ │ │ +[0]*localPos[0]) │ │ │ │ │ + 135 +y[1]*(-localPos[1]+2.0*localPos[0]*localPos[1]+localPos[1]*localPos │ │ │ │ │ +[1]))*it->weight(); │ │ │ │ │ + 136 } │ │ │ │ │ + 137 } │ │ │ │ │ + 138 │ │ │ │ │ + 139 private: │ │ │ │ │ + 140 typename LB::Traits::RangeFieldType sign0, sign1, sign2; │ │ │ │ │ + 141 typename LB::Traits::DomainType m0, m1, m2; │ │ │ │ │ + 142 typename LB::Traits::DomainType n0, n1, n2; │ │ │ │ │ + 143 typename LB::Traits::RangeFieldType c0, c1, c2; │ │ │ │ │ + 144 }; │ │ │ │ │ + 145} // end namespace Dune │ │ │ │ │ + 146#endif / │ │ │ │ │ +/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALINTERPOLATION_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::CrouzeixRaviartLocalFiniteElement │ │ │ │ │ -Crouzeix-Raviart finite element. │ │ │ │ │ -Definition crouzeixraviart.hh:191 │ │ │ │ │ -Dune::CrouzeixRaviartLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -The reference element that the local finite element is defined on. │ │ │ │ │ -Definition crouzeixraviart.hh:228 │ │ │ │ │ -Dune::CrouzeixRaviartLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ -Definition crouzeixraviart.hh:208 │ │ │ │ │ -Dune::CrouzeixRaviartLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Returns object that evaluates degrees of freedom. │ │ │ │ │ -Definition crouzeixraviart.hh:215 │ │ │ │ │ -Dune::CrouzeixRaviartLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ -Definition crouzeixraviart.hh:201 │ │ │ │ │ -Dune::CrouzeixRaviartLocalFiniteElement::size │ │ │ │ │ -static constexpr std::size_t size() │ │ │ │ │ -The number of shape functions. │ │ │ │ │ -Definition crouzeixraviart.hh:221 │ │ │ │ │ -localbasis.hh │ │ │ │ │ +Dune::BDM2Simplex2DLocalInterpolation │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:26 │ │ │ │ │ +Dune::BDM2Simplex2DLocalInterpolation::BDM2Simplex2DLocalInterpolation │ │ │ │ │ +BDM2Simplex2DLocalInterpolation() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:30 │ │ │ │ │ +Dune::BDM2Simplex2DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:82 │ │ │ │ │ +Dune::BDM2Simplex2DLocalInterpolation::BDM2Simplex2DLocalInterpolation │ │ │ │ │ +BDM2Simplex2DLocalInterpolation(unsigned int s) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:40 │ │ │ │ │ localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00452.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannacherturek.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini2simplex2dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,29 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
rannacherturek.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
brezzidouglasmarini2simplex2dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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

│ │ │ │ -
#include <dune/localfunctions/rannacherturek/rannacherturek.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ -

Detailed Description

│ │ │ │ -

Convenience header that includes all available Rannacher-Turek LocalFiniteElements.

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

│ │ │ │ +Classes

class  Dune::BDM2Simplex2DLocalCoefficients
 Layout map for Brezzi-Douglas-Marini-2 elements on triangles. More...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,18 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -rannacherturek.hh File Reference │ │ │ │ │ -Convenience header that includes all available Rannacher-Turek │ │ │ │ │ -LocalFiniteElements. More... │ │ │ │ │ -#include │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini2simplex2d │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localkey.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ -***** Detailed Description ***** │ │ │ │ │ -Convenience header that includes all available Rannacher-Turek │ │ │ │ │ -LocalFiniteElements. │ │ │ │ │ + Classes │ │ │ │ │ +class  Dune::BDM2Simplex2DLocalCoefficients │ │ │ │ │ +  Layout map for Brezzi-Douglas-Marini-2 elements on triangles. More... │ │ │ │ │ +  │ │ │ │ │ + Namespaces │ │ │ │ │ +namespace  Dune │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00452_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannacherturek.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini2simplex2dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,27 +70,84 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
rannacherturek.hh
│ │ │ │ +
brezzidouglasmarini2simplex2dlocalcoefficients.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_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25
│ │ │ │ +
26 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30 for (std::size_t i = 0; i < 3; ++i)
│ │ │ │ +
31 {
│ │ │ │ +
32 li[3 * i] = LocalKey(i,1,0);
│ │ │ │ +
33 li[3 * i + 1] = LocalKey(i,1,1);
│ │ │ │ +
34 li[3 * i + 2] = LocalKey(i,1,2);
│ │ │ │ +
35 }
│ │ │ │ +
36
│ │ │ │ +
37 // last DOFs are associated with the cell (codim=0)
│ │ │ │ +
38 li[9] = LocalKey(0,0,0);
│ │ │ │ +
39 li[10] = LocalKey(0,0,1);
│ │ │ │ +
40 li[11] = LocalKey(0,0,2);
│ │ │ │ +
41 }
│ │ │ │ +
│ │ │ │ +
42
│ │ │ │ +
│ │ │ │ +
44 std::size_t size() const
│ │ │ │ +
45 {
│ │ │ │ +
46 return 12;
│ │ │ │ +
47 }
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
│ │ │ │ +
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} // end namespace Dune
│ │ │ │ +
59#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
Definition bdfmcube.hh:18
│ │ │ │ +
Layout map for Brezzi-Douglas-Marini-2 elements on triangles.
Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:24
│ │ │ │ +
BDM2Simplex2DLocalCoefficients()
Standard constructor.
Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:28
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:50
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:44
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,19 +7,87 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -rannacherturek.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini2simplex2d │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalcoefficients.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 │ │ │ │ │ - 9#include │ │ │ │ │ -rannacherturek.hh │ │ │ │ │ + 5#ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include "../../common/localkey.hh" │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ +23 class BDM2Simplex2DLocalCoefficients │ │ │ │ │ + 24 { │ │ │ │ │ + 25 │ │ │ │ │ + 26 public: │ │ │ │ │ +28 BDM2Simplex2DLocalCoefficients() : li(12) │ │ │ │ │ + 29 { │ │ │ │ │ + 30 for (std::size_t i = 0; i < 3; ++i) │ │ │ │ │ + 31 { │ │ │ │ │ + 32 li[3 * i] = LocalKey(i,1,0); │ │ │ │ │ + 33 li[3 * i + 1] = LocalKey(i,1,1); │ │ │ │ │ + 34 li[3 * i + 2] = LocalKey(i,1,2); │ │ │ │ │ + 35 } │ │ │ │ │ + 36 │ │ │ │ │ + 37 // last DOFs are associated with the cell (codim=0) │ │ │ │ │ + 38 li[9] = LocalKey(0,0,0); │ │ │ │ │ + 39 li[10] = LocalKey(0,0,1); │ │ │ │ │ + 40 li[11] = LocalKey(0,0,2); │ │ │ │ │ + 41 } │ │ │ │ │ + 42 │ │ │ │ │ +44 std::size_t size() const │ │ │ │ │ + 45 { │ │ │ │ │ + 46 return 12; │ │ │ │ │ + 47 } │ │ │ │ │ + 48 │ │ │ │ │ +50 const LocalKey& localKey(std::size_t i) const │ │ │ │ │ + 51 { │ │ │ │ │ + 52 return li[i]; │ │ │ │ │ + 53 } │ │ │ │ │ + 54 │ │ │ │ │ + 55 private: │ │ │ │ │ + 56 std::vector li; │ │ │ │ │ + 57 }; │ │ │ │ │ + 58} // end namespace Dune │ │ │ │ │ + 59#endif / │ │ │ │ │ +/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ +Dune │ │ │ │ │ +Definition bdfmcube.hh:18 │ │ │ │ │ +Dune::BDM2Simplex2DLocalCoefficients │ │ │ │ │ +Layout map for Brezzi-Douglas-Marini-2 elements on triangles. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::BDM2Simplex2DLocalCoefficients::BDM2Simplex2DLocalCoefficients │ │ │ │ │ +BDM2Simplex2DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:28 │ │ │ │ │ +Dune::BDM2Simplex2DLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:50 │ │ │ │ │ +Dune::BDM2Simplex2DLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:44 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00461.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: power.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini1cube2dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
power.hh File Reference
│ │ │ │ +
brezzidouglasmarini1cube2dlocalinterpolation.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>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.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...
class  Dune::BDM1Cube2DLocalInterpolation< LB >
 First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,35 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * meta │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -power.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +brezzidouglasmarini1cube2dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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... │ │ │ │ │ +class  Dune::BDM1Cube2DLocalInterpolation<_LB_> │ │ │ │ │ +  First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ + quadrilateral. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00461_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: power.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini1cube2dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,144 +70,143 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
power.hh
│ │ │ │ +
brezzidouglasmarini1cube2dlocalinterpolation.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>
│ │ │ │ -
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 { }
│ │ │ │ -
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
24 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27
│ │ │ │ +
28 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
31 {
│ │ │ │ +
32 sign0 = sign1 = sign2 = sign3 = 1.0;
│ │ │ │ +
33 }
│ │ │ │ +
│ │ │ │ +
34
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
41 {
│ │ │ │ +
42 sign0 = sign1 = sign2 = sign3 = 1.0;
│ │ │ │ +
43 if (s & 1)
│ │ │ │ +
44 {
│ │ │ │ +
45 sign0 = -1.0;
│ │ │ │ +
46 }
│ │ │ │ +
47 if (s & 2)
│ │ │ │ +
48 {
│ │ │ │ +
49 sign1 = -1.0;
│ │ │ │ +
50 }
│ │ │ │ +
51 if (s & 4)
│ │ │ │ +
52 {
│ │ │ │ +
53 sign2 = -1.0;
│ │ │ │ +
54 }
│ │ │ │ +
55 if (s & 8)
│ │ │ │ +
56 {
│ │ │ │ +
57 sign3 = -1.0;
│ │ │ │ +
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_; }
│ │ │ │ -
│ │ │ │ +
60 n0[0] = -1.0;
│ │ │ │ +
61 n0[1] = 0.0;
│ │ │ │ +
62 n1[0] = 1.0;
│ │ │ │ +
63 n1[1] = 0.0;
│ │ │ │ +
64 n2[0] = 0.0;
│ │ │ │ +
65 n2[1] = -1.0;
│ │ │ │ +
66 n3[0] = 0.0;
│ │ │ │ +
67 n3[1] = 1.0;
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
78 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
79 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
80 {
│ │ │ │ +
81 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
82 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
83 //typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │ +
84
│ │ │ │ +
85 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │
86
│ │ │ │ -
│ │ │ │ -
90 const typename Traits::Interpolation& interpolation() const
│ │ │ │ -
91 { return interpolation_; }
│ │ │ │ -
│ │ │ │ -
93 GeometryType type() const { return backend->type(); }
│ │ │ │ -
94 };
│ │ │ │ -
│ │ │ │ -
95
│ │ │ │ +
87 out.resize(8);
│ │ │ │ +
88 fill(out.begin(), out.end(), 0.0);
│ │ │ │ +
89
│ │ │ │ +
90 const int qOrder = 4;
│ │ │ │ +
91 const QuadratureRule<Scalar,1>& rule = QuadratureRules<Scalar,1>::rule(GeometryTypes::cube(1), qOrder);
│ │ │ │ +
92
│ │ │ │ +
93 for (typename QuadratureRule<Scalar,1>::const_iterator it = rule.begin();
│ │ │ │ +
94 it != rule.end(); ++it)
│ │ │ │ +
95 {
│ │ │ │ +
96 Scalar qPos = it->position();
│ │ │ │ +
97 typename LB::Traits::DomainType localPos;
│ │ │ │
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
│ │ │ │ +
99 localPos[0] = 0.0;
│ │ │ │ +
100 localPos[1] = qPos;
│ │ │ │ +
101 auto y = f(localPos);
│ │ │ │ +
102 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0;
│ │ │ │ +
103 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight();
│ │ │ │ +
104
│ │ │ │ +
105 localPos[0] = 1.0;
│ │ │ │ +
106 localPos[1] = qPos;
│ │ │ │ +
107 y = f(localPos);
│ │ │ │ +
108 out[2] += (y[0]*n1[0] + y[1]*n1[1])*it->weight()*sign1;
│ │ │ │ +
109 out[3] += (y[0]*n1[0] + y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight();
│ │ │ │ +
110
│ │ │ │ +
111 localPos[0] = qPos;
│ │ │ │ +
112 localPos[1] = 0.0;
│ │ │ │ +
113 y = f(localPos);
│ │ │ │ +
114 out[4] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2;
│ │ │ │ +
115 out[5] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight();
│ │ │ │ +
116
│ │ │ │ +
117 localPos[0] = qPos;
│ │ │ │ +
118 localPos[1] = 1.0;
│ │ │ │ +
119 y = f(localPos);
│ │ │ │ +
120 out[6] += (y[0]*n3[0] + y[1]*n3[1])*it->weight()*sign3;
│ │ │ │ +
121 out[7] += (y[0]*n3[0] + y[1]*n3[1])*(2.0*qPos - 1.0)*it->weight();
│ │ │ │ +
122 }
│ │ │ │ +
123 }
│ │ │ │ +
│ │ │ │ +
124
│ │ │ │ +
125 private:
│ │ │ │ +
126 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3;
│ │ │ │ +
127 typename LB::Traits::DomainType n0, n1, n2, n3;
│ │ │ │
128 };
│ │ │ │
│ │ │ │ -
129
│ │ │ │ -
130} // namespace Dune
│ │ │ │ -
131
│ │ │ │ -
132#endif // DUNE_LOCALFUNCTIONS_META_POWER_HH
│ │ │ │ +
129}
│ │ │ │ +
130#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral.
Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:26
│ │ │ │ +
BDM1Cube2DLocalInterpolation(unsigned int s)
Make set number s, where 0 <= s < 16.
Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:40
│ │ │ │ +
BDM1Cube2DLocalInterpolation()
Standard constructor.
Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:30
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:79
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,173 +7,145 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * meta │ │ │ │ │ -power.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1cube2d │ │ │ │ │ +brezzidouglasmarini1cube2dlocalinterpolation.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 │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ - 17 │ │ │ │ │ - 18namespace Dune { │ │ │ │ │ - 19 │ │ │ │ │ - 22 │ │ │ │ │ - 28 template │ │ │ │ │ -29 class PowerFiniteElement { │ │ │ │ │ - 30 public: │ │ │ │ │ -32 struct Traits { │ │ │ │ │ -34 typedef PowerBasis Basis; │ │ │ │ │ -36 typedef PowerCoefficients Coefficients; │ │ │ │ │ - 38 typedef PowerInterpolation Interpolation; │ │ │ │ │ - 40 }; │ │ │ │ │ - 41 private: │ │ │ │ │ - 42 std::shared_ptr 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 { } │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ + 24 template │ │ │ │ │ +25 class BDM1Cube2DLocalInterpolation │ │ │ │ │ + 26 { │ │ │ │ │ + 27 │ │ │ │ │ + 28 public: │ │ │ │ │ +30 BDM1Cube2DLocalInterpolation () │ │ │ │ │ + 31 { │ │ │ │ │ + 32 sign0 = sign1 = sign2 = sign3 = 1.0; │ │ │ │ │ + 33 } │ │ │ │ │ + 34 │ │ │ │ │ +40 BDM1Cube2DLocalInterpolation (unsigned int s) │ │ │ │ │ + 41 { │ │ │ │ │ + 42 sign0 = sign1 = sign2 = sign3 = 1.0; │ │ │ │ │ + 43 if (s & 1) │ │ │ │ │ + 44 { │ │ │ │ │ + 45 sign0 = -1.0; │ │ │ │ │ + 46 } │ │ │ │ │ + 47 if (s & 2) │ │ │ │ │ + 48 { │ │ │ │ │ + 49 sign1 = -1.0; │ │ │ │ │ + 50 } │ │ │ │ │ + 51 if (s & 4) │ │ │ │ │ + 52 { │ │ │ │ │ + 53 sign2 = -1.0; │ │ │ │ │ + 54 } │ │ │ │ │ + 55 if (s & 8) │ │ │ │ │ + 56 { │ │ │ │ │ + 57 sign3 = -1.0; │ │ │ │ │ + 58 } │ │ │ │ │ 59 │ │ │ │ │ - 61 │ │ │ │ │ -65 PowerFiniteElement(const std::shared_ptr &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_; } │ │ │ │ │ + 60 n0[0] = -1.0; │ │ │ │ │ + 61 n0[1] = 0.0; │ │ │ │ │ + 62 n1[0] = 1.0; │ │ │ │ │ + 63 n1[1] = 0.0; │ │ │ │ │ + 64 n2[0] = 0.0; │ │ │ │ │ + 65 n2[1] = -1.0; │ │ │ │ │ + 66 n3[0] = 0.0; │ │ │ │ │ + 67 n3[1] = 1.0; │ │ │ │ │ + 68 } │ │ │ │ │ + 69 │ │ │ │ │ + 78 template │ │ │ │ │ +79 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ + 80 { │ │ │ │ │ + 81 // f gives v*outer normal at a point on the edge! │ │ │ │ │ + 82 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ + 83 //typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ + 84 │ │ │ │ │ + 85 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ 86 │ │ │ │ │ -90 const typename Traits::Interpolation& interpolation() const │ │ │ │ │ - 91 { return interpolation_; } │ │ │ │ │ -93 GeometryType type() const { return backend->type(); } │ │ │ │ │ - 94 }; │ │ │ │ │ - 95 │ │ │ │ │ + 87 out.resize(8); │ │ │ │ │ + 88 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ + 89 │ │ │ │ │ + 90 const int qOrder = 4; │ │ │ │ │ + 91 const QuadratureRule& rule = QuadratureRules::rule │ │ │ │ │ +(GeometryTypes::cube(1), qOrder); │ │ │ │ │ + 92 │ │ │ │ │ + 93 for (typename QuadratureRule::const_iterator it = rule.begin(); │ │ │ │ │ + 94 it != rule.end(); ++it) │ │ │ │ │ + 95 { │ │ │ │ │ + 96 Scalar qPos = it->position(); │ │ │ │ │ + 97 typename LB::Traits::DomainType localPos; │ │ │ │ │ 98 │ │ │ │ │ - 105 template │ │ │ │ │ -106 class PowerFiniteElementFactory │ │ │ │ │ - 107 { │ │ │ │ │ - 108 public: │ │ │ │ │ -110 typedef PowerFiniteElement FiniteElement; │ │ │ │ │ - 111 │ │ │ │ │ - 113 │ │ │ │ │ -117 const FiniteElement make(const BackendFiniteElement &backend) const │ │ │ │ │ - 118 { return FiniteElement(backend); } │ │ │ │ │ - 120 │ │ │ │ │ - 124 const FiniteElement │ │ │ │ │ -125 make(const std::shared_ptr &backendSPtr) const │ │ │ │ │ - 126 { return FiniteElement(backendSPtr); } │ │ │ │ │ - 127 │ │ │ │ │ + 99 localPos[0] = 0.0; │ │ │ │ │ + 100 localPos[1] = qPos; │ │ │ │ │ + 101 auto y = f(localPos); │ │ │ │ │ + 102 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0; │ │ │ │ │ + 103 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight(); │ │ │ │ │ + 104 │ │ │ │ │ + 105 localPos[0] = 1.0; │ │ │ │ │ + 106 localPos[1] = qPos; │ │ │ │ │ + 107 y = f(localPos); │ │ │ │ │ + 108 out[2] += (y[0]*n1[0] + y[1]*n1[1])*it->weight()*sign1; │ │ │ │ │ + 109 out[3] += (y[0]*n1[0] + y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight(); │ │ │ │ │ + 110 │ │ │ │ │ + 111 localPos[0] = qPos; │ │ │ │ │ + 112 localPos[1] = 0.0; │ │ │ │ │ + 113 y = f(localPos); │ │ │ │ │ + 114 out[4] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2; │ │ │ │ │ + 115 out[5] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight(); │ │ │ │ │ + 116 │ │ │ │ │ + 117 localPos[0] = qPos; │ │ │ │ │ + 118 localPos[1] = 1.0; │ │ │ │ │ + 119 y = f(localPos); │ │ │ │ │ + 120 out[6] += (y[0]*n3[0] + y[1]*n3[1])*it->weight()*sign3; │ │ │ │ │ + 121 out[7] += (y[0]*n3[0] + y[1]*n3[1])*(2.0*qPos - 1.0)*it->weight(); │ │ │ │ │ + 122 } │ │ │ │ │ + 123 } │ │ │ │ │ + 124 │ │ │ │ │ + 125 private: │ │ │ │ │ + 126 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3; │ │ │ │ │ + 127 typename LB::Traits::DomainType n0, n1, n2, n3; │ │ │ │ │ 128 }; │ │ │ │ │ - 129 │ │ │ │ │ - 130} // namespace Dune │ │ │ │ │ - 131 │ │ │ │ │ - 132#endif // DUNE_LOCALFUNCTIONS_META_POWER_HH │ │ │ │ │ + 129} │ │ │ │ │ + 130#endif / │ │ │ │ │ +/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::PowerFiniteElement │ │ │ │ │ -Meta-finite element turning a scalar finite element into vector-valued one. │ │ │ │ │ -Definition power.hh:29 │ │ │ │ │ -Dune::PowerFiniteElement::basis │ │ │ │ │ -const Traits::Basis & basis() const │ │ │ │ │ -Extract basis of this finite element. │ │ │ │ │ -Definition power.hh:77 │ │ │ │ │ -Dune::PowerFiniteElement::type │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -Extract geometry type of this finite element. │ │ │ │ │ -Definition power.hh:93 │ │ │ │ │ -Dune::PowerFiniteElement::interpolation │ │ │ │ │ -const Traits::Interpolation & interpolation() const │ │ │ │ │ -Extract interpolation of this finite element. │ │ │ │ │ -Definition power.hh:90 │ │ │ │ │ -Dune::PowerFiniteElement::PowerFiniteElement │ │ │ │ │ -PowerFiniteElement(const Backend &backend_) │ │ │ │ │ -Construct a finite element. │ │ │ │ │ -Definition power.hh:53 │ │ │ │ │ -Dune::PowerFiniteElement::PowerFiniteElement │ │ │ │ │ -PowerFiniteElement(const std::shared_ptr< const Backend > &backendSPtr) │ │ │ │ │ -Construct a finite element. │ │ │ │ │ -Definition power.hh:65 │ │ │ │ │ -Dune::PowerFiniteElement::coefficients │ │ │ │ │ -const Traits::Coefficients & coefficients() const │ │ │ │ │ -Extract coefficients of this finite element. │ │ │ │ │ -Definition power.hh:83 │ │ │ │ │ -Dune::PowerFiniteElement::Traits │ │ │ │ │ -types of component objects │ │ │ │ │ -Definition power.hh:32 │ │ │ │ │ -Dune::PowerFiniteElement::Traits::Basis │ │ │ │ │ -PowerBasis< typename Backend::Traits::Basis, dimR > Basis │ │ │ │ │ -type of the Basis │ │ │ │ │ -Definition power.hh:34 │ │ │ │ │ -Dune::PowerFiniteElement::Traits::Coefficients │ │ │ │ │ -PowerCoefficients Coefficients │ │ │ │ │ -type of the Coefficients │ │ │ │ │ -Definition power.hh:36 │ │ │ │ │ -Dune::PowerFiniteElement::Traits::Interpolation │ │ │ │ │ -PowerInterpolation< typename Backend::Traits::Interpolation, typename Basis:: │ │ │ │ │ -Traits > Interpolation │ │ │ │ │ -type of the Interpolation │ │ │ │ │ -Definition power.hh:39 │ │ │ │ │ -Dune::PowerFiniteElementFactory │ │ │ │ │ -Factory for meta-finite elements turning scalar finite elements into vector- │ │ │ │ │ -valued ones. │ │ │ │ │ -Definition power.hh:107 │ │ │ │ │ -Dune::PowerFiniteElementFactory::make │ │ │ │ │ -const FiniteElement make(const std::shared_ptr< const BackendFiniteElement > │ │ │ │ │ -&backendSPtr) const │ │ │ │ │ -create a finite element │ │ │ │ │ -Definition power.hh:125 │ │ │ │ │ -Dune::PowerFiniteElementFactory::make │ │ │ │ │ -const FiniteElement make(const BackendFiniteElement &backend) const │ │ │ │ │ -create a finite element │ │ │ │ │ -Definition power.hh:117 │ │ │ │ │ -Dune::PowerFiniteElementFactory::FiniteElement │ │ │ │ │ -PowerFiniteElement< BackendFiniteElement, dimR > FiniteElement │ │ │ │ │ -Type of the finite element. │ │ │ │ │ -Definition power.hh:110 │ │ │ │ │ -Dune::PowerBasis │ │ │ │ │ -Meta-basis turning a scalar basis into vector-valued basis. │ │ │ │ │ -Definition meta/power/basis.hh:26 │ │ │ │ │ -Dune::PowerCoefficients │ │ │ │ │ -Meta-coefficients turning a scalar coefficients into vector-valued │ │ │ │ │ -coefficients. │ │ │ │ │ -Definition meta/power/coefficients.hh:22 │ │ │ │ │ -Dune::PowerInterpolation │ │ │ │ │ -Meta-interpolation turning a scalar interpolation into vector-valued │ │ │ │ │ -interpolation. │ │ │ │ │ -Definition meta/power/interpolation.hh:26 │ │ │ │ │ -interpolation.hh │ │ │ │ │ -basis.hh │ │ │ │ │ -coefficients.hh │ │ │ │ │ +Dune::BDM1Cube2DLocalInterpolation │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ +quadrilateral. │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:26 │ │ │ │ │ +Dune::BDM1Cube2DLocalInterpolation::BDM1Cube2DLocalInterpolation │ │ │ │ │ +BDM1Cube2DLocalInterpolation(unsigned int s) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:40 │ │ │ │ │ +Dune::BDM1Cube2DLocalInterpolation::BDM1Cube2DLocalInterpolation │ │ │ │ │ +BDM1Cube2DLocalInterpolation() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:30 │ │ │ │ │ +Dune::BDM1Cube2DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:79 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00464.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelec.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini1cube2dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,25 +65,44 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
nedelec.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
brezzidouglasmarini1cube2dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/localfunctions/nedelec/nedelec1stkindsimplex.hh>
│ │ │ │ -#include <dune/localfunctions/nedelec/nedelec1stkindcube.hh>
│ │ │ │ +
#include <array>
│ │ │ │ +#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::BDM1Cube2DLocalBasis< D, R >
 First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral. More...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,14 +6,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -nedelec.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1cube2d │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +brezzidouglasmarini1cube2dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ + Classes │ │ │ │ │ +class  Dune::BDM1Cube2DLocalBasis<_D,_R_> │ │ │ │ │ +  First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ + quadrilateral. More... │ │ │ │ │ +  │ │ │ │ │ + Namespaces │ │ │ │ │ +namespace  Dune │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00464_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelec.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini1cube2dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,38 +70,241 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
nedelec.hh
│ │ │ │ +
brezzidouglasmarini1cube2dlocalbasis.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_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_NEDELEC_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8// Nedelec element implementations with run-time order
│ │ │ │ -
9// [include them here once they exist]
│ │ │ │ -
10
│ │ │ │ -
11// Nedelec element implementations with compile-time order
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <bitset>
│ │ │ │ +
10#include <numeric>
│ │ │ │ +
11#include <vector>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/common/fmatrix.hh>
│ │ │ │
14
│ │ │ │ -
15#endif // #ifndef DUNE_LOCALFUNCTIONS_NEDELEC_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
15#include "../../common/localbasis.hh"
│ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
28 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 {
│ │ │ │ +
31
│ │ │ │ +
32 public:
│ │ │ │ +
33 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,2,Dune::FieldVector<R,2>,
│ │ │ │ +
34 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ +
35
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 {
│ │ │ │ +
39 for (size_t i=0; i<4; i++)
│ │ │ │ +
40 sign_[i] = 1.0;
│ │ │ │ +
41 }
│ │ │ │ +
│ │ │ │ +
42
│ │ │ │ +
│ │ │ │ +
48 BDM1Cube2DLocalBasis (std::bitset<4> s)
│ │ │ │ +
49 {
│ │ │ │ +
50 for (size_t i=0; i<4; i++)
│ │ │ │ +
51 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ +
55 unsigned int size () const
│ │ │ │ +
56 {
│ │ │ │ +
57 return 8;
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
│ │ │ │ +
66 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
67 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
68 {
│ │ │ │ +
69 out.resize(8);
│ │ │ │ +
70
│ │ │ │ +
71 out[0][0] = sign_[0]*(in[0] - 1.0);
│ │ │ │ +
72 out[0][1] = 0.0;
│ │ │ │ +
73 out[1][0] = 6.0*in[0]*in[1] - 3.0*in[0]-6*in[1] + 3.0;
│ │ │ │ +
74 out[1][1] = -3.0*in[1]*in[1] + 3.0*in[1];
│ │ │ │ +
75 out[2][0] = sign_[1]*(in[0]);
│ │ │ │ +
76 out[2][1] = 0.0;
│ │ │ │ +
77 out[3][0] = -6.0*in[0]*in[1] + 3.0*in[0];
│ │ │ │ +
78 out[3][1] = 3.0*in[1]*in[1] - 3.0*in[1];
│ │ │ │ +
79 out[4][0] = 0.0;
│ │ │ │ +
80 out[4][1] = sign_[2]*(in[1] - 1.0);
│ │ │ │ +
81 out[5][0] = 3.0*in[0]*in[0] - 3.0*in[0];
│ │ │ │ +
82 out[5][1] = -6.0*in[0]*in[1] + 6.0*in[0] + 3.0*in[1] - 3.0;
│ │ │ │ +
83 out[6][0] = 0.0;
│ │ │ │ +
84 out[6][1] = sign_[3]*(in[1]);
│ │ │ │ +
85 out[7][0] = -3.0*in[0]*in[0] + 3.0*in[0];
│ │ │ │ +
86 out[7][1] = 6.0*in[0]*in[1] - 3.0*in[1];
│ │ │ │ +
87 }
│ │ │ │ +
│ │ │ │ +
88
│ │ │ │ +
│ │ │ │ +
95 inline void evaluateJacobian (const typename Traits::DomainType& in,
│ │ │ │ +
96 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
97 {
│ │ │ │ +
98 out.resize(8);
│ │ │ │ +
99
│ │ │ │ +
100 out[0][0][0] = sign_[0];
│ │ │ │ +
101 out[0][0][1] = 0.0;
│ │ │ │ +
102 out[0][1][0] = 0.0;
│ │ │ │ +
103 out[0][1][1] = 0.0;
│ │ │ │ +
104
│ │ │ │ +
105 out[1][0][0] = 6.0*in[1] - 3.0;
│ │ │ │ +
106 out[1][0][1] = 6.0*in[0] - 6.0;
│ │ │ │ +
107 out[1][1][0] = 0.0;
│ │ │ │ +
108 out[1][1][1] = -6.0*in[1] + 3.0;
│ │ │ │ +
109
│ │ │ │ +
110 out[2][0][0] = sign_[1];
│ │ │ │ +
111 out[2][0][1] = 0.0;
│ │ │ │ +
112 out[2][1][0] = 0.0;
│ │ │ │ +
113 out[2][1][1] = 0.0;
│ │ │ │ +
114
│ │ │ │ +
115 out[3][0][0] = -6.0*in[1] + 3.0;
│ │ │ │ +
116 out[3][0][1] = -6.0*in[0];
│ │ │ │ +
117 out[3][1][0] = 0.0;
│ │ │ │ +
118 out[3][1][1] = 6.0*in[1] - 3.0;
│ │ │ │ +
119
│ │ │ │ +
120 out[4][0][0] = 0.0;
│ │ │ │ +
121 out[4][0][1] = 0.0;
│ │ │ │ +
122 out[4][1][0] = 0.0;
│ │ │ │ +
123 out[4][1][1] = sign_[2];
│ │ │ │ +
124
│ │ │ │ +
125 out[5][0][0] = 6.0*in[0] - 3.0;
│ │ │ │ +
126 out[5][0][1] = 0.0;
│ │ │ │ +
127 out[5][1][0] = -6.0*in[1] + 6.0;
│ │ │ │ +
128 out[5][1][1] = -6.0*in[0] + 3.0;
│ │ │ │ +
129
│ │ │ │ +
130 out[6][0][0] = 0.0;
│ │ │ │ +
131 out[6][0][1] = 0.0;
│ │ │ │ +
132 out[6][1][0] = 0.0;
│ │ │ │ +
133 out[6][1][1] = sign_[3];
│ │ │ │ +
134
│ │ │ │ +
135 out[7][0][0] = -6.0*in[0] + 3.0;
│ │ │ │ +
136 out[7][0][1] = 0.0;
│ │ │ │ +
137 out[7][1][0] = 6.0*in[1];
│ │ │ │ +
138 out[7][1][1] = 6.0*in[0] - 3.0;
│ │ │ │ +
139 }
│ │ │ │ +
│ │ │ │ +
140
│ │ │ │ +
│ │ │ │ +
142 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
143 const typename Traits::DomainType& in, // position
│ │ │ │ +
144 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
145 {
│ │ │ │ +
146 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
147 if (totalOrder == 0) {
│ │ │ │ +
148 evaluateFunction(in, out);
│ │ │ │ +
149 } else if (totalOrder == 1) {
│ │ │ │ +
150 out.resize(size());
│ │ │ │ +
151 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
152
│ │ │ │ +
153 switch (direction) {
│ │ │ │ +
154 case 0:
│ │ │ │ +
155 out[0][0] = sign_[0];
│ │ │ │ +
156 out[0][1] = 0.0;
│ │ │ │ +
157
│ │ │ │ +
158 out[1][0] = 6.0*in[1] - 3.0;
│ │ │ │ +
159 out[1][1] = 0.0;
│ │ │ │ +
160
│ │ │ │ +
161 out[2][0] = sign_[1];
│ │ │ │ +
162 out[2][1] = 0.0;
│ │ │ │ +
163
│ │ │ │ +
164 out[3][0] = -6.0*in[1] + 3.0;
│ │ │ │ +
165 out[3][1] = 0.0;
│ │ │ │ +
166
│ │ │ │ +
167 out[4][0] = 0.0;
│ │ │ │ +
168 out[4][1] = 0.0;
│ │ │ │ +
169
│ │ │ │ +
170 out[5][0] = 6.0*in[0] - 3.0;
│ │ │ │ +
171 out[5][1] = -6.0*in[1] + 6.0;
│ │ │ │ +
172
│ │ │ │ +
173 out[6][0] = 0.0;
│ │ │ │ +
174 out[6][1] = 0.0;
│ │ │ │ +
175
│ │ │ │ +
176 out[7][0] = -6.0*in[0] + 3.0;
│ │ │ │ +
177 out[7][1] = 6.0*in[1];
│ │ │ │ +
178 break;
│ │ │ │ +
179 case 1:
│ │ │ │ +
180 out[0][0] = 0.0;
│ │ │ │ +
181 out[0][1] = 0.0;
│ │ │ │ +
182
│ │ │ │ +
183 out[1][0] = 6.0*in[0] - 6.0;
│ │ │ │ +
184 out[1][1] = -6.0*in[1] + 3.0;
│ │ │ │ +
185
│ │ │ │ +
186 out[2][0] = 0.0;
│ │ │ │ +
187 out[2][1] = 0.0;
│ │ │ │ +
188
│ │ │ │ +
189 out[3][0] = -6.0*in[0];
│ │ │ │ +
190 out[3][1] = 6.0*in[1] - 3.0;
│ │ │ │ +
191
│ │ │ │ +
192 out[4][0] = 0.0;
│ │ │ │ +
193 out[4][1] = sign_[2];
│ │ │ │ +
194
│ │ │ │ +
195 out[5][0] = 0.0;
│ │ │ │ +
196 out[5][1] = -6.0*in[0] + 3.0;
│ │ │ │ +
197
│ │ │ │ +
198 out[6][0] = 0.0;
│ │ │ │ +
199 out[6][1] = sign_[3];
│ │ │ │ +
200
│ │ │ │ +
201 out[7][0] = 0.0;
│ │ │ │ +
202 out[7][1] = 6.0*in[0] - 3.0;
│ │ │ │ +
203 break;
│ │ │ │ +
204 default:
│ │ │ │ +
205 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
206 }
│ │ │ │ +
207 } else {
│ │ │ │ +
208 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
209 }
│ │ │ │ +
210 }
│ │ │ │ +
│ │ │ │ +
211
│ │ │ │ +
│ │ │ │ +
213 unsigned int order () const
│ │ │ │ +
214 {
│ │ │ │ +
215 return 2;
│ │ │ │ +
216 }
│ │ │ │ +
│ │ │ │ +
217
│ │ │ │ +
218 private:
│ │ │ │ +
219 std::array<R,4> sign_;
│ │ │ │ +
220 };
│ │ │ │ +
│ │ │ │ +
221}
│ │ │ │ +
222#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
Definition bdfmcube.hh:18
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:30
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:95
│ │ │ │ +
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 brezzidouglasmarini1cube2dlocalbasis.hh:142
│ │ │ │ +
BDM1Cube2DLocalBasis()
Standard constructor.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:37
│ │ │ │ +
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition brezzidouglasmarini1cube2dlocalbasis.hh:34
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition brezzidouglasmarini1cube2dlocalbasis.hh:55
│ │ │ │ +
BDM1Cube2DLocalBasis(std::bitset< 4 > s)
Make set number s, where 0 <= s < 16.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:48
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:213
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:66
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,30 +7,257 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -nedelec.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1cube2d │ │ │ │ │ +brezzidouglasmarini1cube2dlocalbasis.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_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_NEDELEC_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8// Nedelec element implementations with run-time order │ │ │ │ │ - 9// [include them here once they exist] │ │ │ │ │ - 10 │ │ │ │ │ - 11// Nedelec element implementations with compile-time order │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ 14 │ │ │ │ │ - 15#endif // #ifndef DUNE_LOCALFUNCTIONS_NEDELEC_HH │ │ │ │ │ -nedelec1stkindcube.hh │ │ │ │ │ -nedelec1stkindsimplex.hh │ │ │ │ │ + 15#include "../../common/localbasis.hh" │ │ │ │ │ + 16 │ │ │ │ │ + 17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ + 28 template │ │ │ │ │ +29 class BDM1Cube2DLocalBasis │ │ │ │ │ + 30 { │ │ │ │ │ + 31 │ │ │ │ │ + 32 public: │ │ │ │ │ + 33 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +34 Dune::FieldMatrix > Traits; │ │ │ │ │ + 35 │ │ │ │ │ +37 BDM1Cube2DLocalBasis () │ │ │ │ │ + 38 { │ │ │ │ │ + 39 for (size_t i=0; i<4; i++) │ │ │ │ │ + 40 sign_[i] = 1.0; │ │ │ │ │ + 41 } │ │ │ │ │ + 42 │ │ │ │ │ +48 BDM1Cube2DLocalBasis (std::bitset<4> s) │ │ │ │ │ + 49 { │ │ │ │ │ + 50 for (size_t i=0; i<4; i++) │ │ │ │ │ + 51 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ + 52 } │ │ │ │ │ + 53 │ │ │ │ │ +55 unsigned int size () const │ │ │ │ │ + 56 { │ │ │ │ │ + 57 return 8; │ │ │ │ │ + 58 } │ │ │ │ │ + 59 │ │ │ │ │ +66 inline void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ + 67 std::vector& out) const │ │ │ │ │ + 68 { │ │ │ │ │ + 69 out.resize(8); │ │ │ │ │ + 70 │ │ │ │ │ + 71 out[0][0] = sign_[0]*(in[0] - 1.0); │ │ │ │ │ + 72 out[0][1] = 0.0; │ │ │ │ │ + 73 out[1][0] = 6.0*in[0]*in[1] - 3.0*in[0]-6*in[1] + 3.0; │ │ │ │ │ + 74 out[1][1] = -3.0*in[1]*in[1] + 3.0*in[1]; │ │ │ │ │ + 75 out[2][0] = sign_[1]*(in[0]); │ │ │ │ │ + 76 out[2][1] = 0.0; │ │ │ │ │ + 77 out[3][0] = -6.0*in[0]*in[1] + 3.0*in[0]; │ │ │ │ │ + 78 out[3][1] = 3.0*in[1]*in[1] - 3.0*in[1]; │ │ │ │ │ + 79 out[4][0] = 0.0; │ │ │ │ │ + 80 out[4][1] = sign_[2]*(in[1] - 1.0); │ │ │ │ │ + 81 out[5][0] = 3.0*in[0]*in[0] - 3.0*in[0]; │ │ │ │ │ + 82 out[5][1] = -6.0*in[0]*in[1] + 6.0*in[0] + 3.0*in[1] - 3.0; │ │ │ │ │ + 83 out[6][0] = 0.0; │ │ │ │ │ + 84 out[6][1] = sign_[3]*(in[1]); │ │ │ │ │ + 85 out[7][0] = -3.0*in[0]*in[0] + 3.0*in[0]; │ │ │ │ │ + 86 out[7][1] = 6.0*in[0]*in[1] - 3.0*in[1]; │ │ │ │ │ + 87 } │ │ │ │ │ + 88 │ │ │ │ │ +95 inline void evaluateJacobian (const typename Traits::DomainType& in, │ │ │ │ │ + 96 std::vector& out) const │ │ │ │ │ + 97 { │ │ │ │ │ + 98 out.resize(8); │ │ │ │ │ + 99 │ │ │ │ │ + 100 out[0][0][0] = sign_[0]; │ │ │ │ │ + 101 out[0][0][1] = 0.0; │ │ │ │ │ + 102 out[0][1][0] = 0.0; │ │ │ │ │ + 103 out[0][1][1] = 0.0; │ │ │ │ │ + 104 │ │ │ │ │ + 105 out[1][0][0] = 6.0*in[1] - 3.0; │ │ │ │ │ + 106 out[1][0][1] = 6.0*in[0] - 6.0; │ │ │ │ │ + 107 out[1][1][0] = 0.0; │ │ │ │ │ + 108 out[1][1][1] = -6.0*in[1] + 3.0; │ │ │ │ │ + 109 │ │ │ │ │ + 110 out[2][0][0] = sign_[1]; │ │ │ │ │ + 111 out[2][0][1] = 0.0; │ │ │ │ │ + 112 out[2][1][0] = 0.0; │ │ │ │ │ + 113 out[2][1][1] = 0.0; │ │ │ │ │ + 114 │ │ │ │ │ + 115 out[3][0][0] = -6.0*in[1] + 3.0; │ │ │ │ │ + 116 out[3][0][1] = -6.0*in[0]; │ │ │ │ │ + 117 out[3][1][0] = 0.0; │ │ │ │ │ + 118 out[3][1][1] = 6.0*in[1] - 3.0; │ │ │ │ │ + 119 │ │ │ │ │ + 120 out[4][0][0] = 0.0; │ │ │ │ │ + 121 out[4][0][1] = 0.0; │ │ │ │ │ + 122 out[4][1][0] = 0.0; │ │ │ │ │ + 123 out[4][1][1] = sign_[2]; │ │ │ │ │ + 124 │ │ │ │ │ + 125 out[5][0][0] = 6.0*in[0] - 3.0; │ │ │ │ │ + 126 out[5][0][1] = 0.0; │ │ │ │ │ + 127 out[5][1][0] = -6.0*in[1] + 6.0; │ │ │ │ │ + 128 out[5][1][1] = -6.0*in[0] + 3.0; │ │ │ │ │ + 129 │ │ │ │ │ + 130 out[6][0][0] = 0.0; │ │ │ │ │ + 131 out[6][0][1] = 0.0; │ │ │ │ │ + 132 out[6][1][0] = 0.0; │ │ │ │ │ + 133 out[6][1][1] = sign_[3]; │ │ │ │ │ + 134 │ │ │ │ │ + 135 out[7][0][0] = -6.0*in[0] + 3.0; │ │ │ │ │ + 136 out[7][0][1] = 0.0; │ │ │ │ │ + 137 out[7][1][0] = 6.0*in[1]; │ │ │ │ │ + 138 out[7][1][1] = 6.0*in[0] - 3.0; │ │ │ │ │ + 139 } │ │ │ │ │ + 140 │ │ │ │ │ +142 void partial (const std::array& order, │ │ │ │ │ + 143 const typename Traits::DomainType& in, // position │ │ │ │ │ + 144 std::vector& out) const // return value │ │ │ │ │ + 145 { │ │ │ │ │ + 146 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ + 147 if (totalOrder == 0) { │ │ │ │ │ + 148 evaluateFunction(in, out); │ │ │ │ │ + 149 } else if (totalOrder == 1) { │ │ │ │ │ + 150 out.resize(size()); │ │ │ │ │ + 151 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ +(), order.end(), 1)); │ │ │ │ │ + 152 │ │ │ │ │ + 153 switch (direction) { │ │ │ │ │ + 154 case 0: │ │ │ │ │ + 155 out[0][0] = sign_[0]; │ │ │ │ │ + 156 out[0][1] = 0.0; │ │ │ │ │ + 157 │ │ │ │ │ + 158 out[1][0] = 6.0*in[1] - 3.0; │ │ │ │ │ + 159 out[1][1] = 0.0; │ │ │ │ │ + 160 │ │ │ │ │ + 161 out[2][0] = sign_[1]; │ │ │ │ │ + 162 out[2][1] = 0.0; │ │ │ │ │ + 163 │ │ │ │ │ + 164 out[3][0] = -6.0*in[1] + 3.0; │ │ │ │ │ + 165 out[3][1] = 0.0; │ │ │ │ │ + 166 │ │ │ │ │ + 167 out[4][0] = 0.0; │ │ │ │ │ + 168 out[4][1] = 0.0; │ │ │ │ │ + 169 │ │ │ │ │ + 170 out[5][0] = 6.0*in[0] - 3.0; │ │ │ │ │ + 171 out[5][1] = -6.0*in[1] + 6.0; │ │ │ │ │ + 172 │ │ │ │ │ + 173 out[6][0] = 0.0; │ │ │ │ │ + 174 out[6][1] = 0.0; │ │ │ │ │ + 175 │ │ │ │ │ + 176 out[7][0] = -6.0*in[0] + 3.0; │ │ │ │ │ + 177 out[7][1] = 6.0*in[1]; │ │ │ │ │ + 178 break; │ │ │ │ │ + 179 case 1: │ │ │ │ │ + 180 out[0][0] = 0.0; │ │ │ │ │ + 181 out[0][1] = 0.0; │ │ │ │ │ + 182 │ │ │ │ │ + 183 out[1][0] = 6.0*in[0] - 6.0; │ │ │ │ │ + 184 out[1][1] = -6.0*in[1] + 3.0; │ │ │ │ │ + 185 │ │ │ │ │ + 186 out[2][0] = 0.0; │ │ │ │ │ + 187 out[2][1] = 0.0; │ │ │ │ │ + 188 │ │ │ │ │ + 189 out[3][0] = -6.0*in[0]; │ │ │ │ │ + 190 out[3][1] = 6.0*in[1] - 3.0; │ │ │ │ │ + 191 │ │ │ │ │ + 192 out[4][0] = 0.0; │ │ │ │ │ + 193 out[4][1] = sign_[2]; │ │ │ │ │ + 194 │ │ │ │ │ + 195 out[5][0] = 0.0; │ │ │ │ │ + 196 out[5][1] = -6.0*in[0] + 3.0; │ │ │ │ │ + 197 │ │ │ │ │ + 198 out[6][0] = 0.0; │ │ │ │ │ + 199 out[6][1] = sign_[3]; │ │ │ │ │ + 200 │ │ │ │ │ + 201 out[7][0] = 0.0; │ │ │ │ │ + 202 out[7][1] = 6.0*in[0] - 3.0; │ │ │ │ │ + 203 break; │ │ │ │ │ + 204 default: │ │ │ │ │ + 205 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ + 206 } │ │ │ │ │ + 207 } else { │ │ │ │ │ + 208 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ + 209 } │ │ │ │ │ + 210 } │ │ │ │ │ + 211 │ │ │ │ │ +213 unsigned int order () const │ │ │ │ │ + 214 { │ │ │ │ │ + 215 return 2; │ │ │ │ │ + 216 } │ │ │ │ │ + 217 │ │ │ │ │ + 218 private: │ │ │ │ │ + 219 std::array sign_; │ │ │ │ │ + 220 }; │ │ │ │ │ + 221} │ │ │ │ │ + 222#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ +Dune │ │ │ │ │ +Definition bdfmcube.hh:18 │ │ │ │ │ +Dune::BDM1Cube2DLocalBasis │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ +quadrilateral. │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalbasis.hh:30 │ │ │ │ │ +Dune::BDM1Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalbasis.hh:95 │ │ │ │ │ +Dune::BDM1Cube2DLocalBasis::partial │ │ │ │ │ +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 brezzidouglasmarini1cube2dlocalbasis.hh:142 │ │ │ │ │ +Dune::BDM1Cube2DLocalBasis::BDM1Cube2DLocalBasis │ │ │ │ │ +BDM1Cube2DLocalBasis() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalbasis.hh:37 │ │ │ │ │ +Dune::BDM1Cube2DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalbasis.hh:34 │ │ │ │ │ +Dune::BDM1Cube2DLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalbasis.hh:55 │ │ │ │ │ +Dune::BDM1Cube2DLocalBasis::BDM1Cube2DLocalBasis │ │ │ │ │ +BDM1Cube2DLocalBasis(std::bitset< 4 > s) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalbasis.hh:48 │ │ │ │ │ +Dune::BDM1Cube2DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalbasis.hh:213 │ │ │ │ │ +Dune::BDM1Cube2DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalbasis.hh:66 │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00467.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrange.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini2cube2dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,54 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
lagrange.hh File Reference
│ │ │ │ +
brezzidouglasmarini2cube2dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Convenience header that includes all implementations of Lagrange finite elements. │ │ │ │ -More...

│ │ │ │ -
#include <dune/localfunctions/utility/localfiniteelement.hh>
│ │ │ │ -#include <dune/localfunctions/utility/dglocalcoefficients.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangecoefficients.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/interpolation.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangebasis.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangepyramid.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangeprism.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/p0.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/pq22d.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::LagrangeLocalFiniteElement< LP, dimDomain, D, R, SF, CF >
 Lagrange local finite elements for a given set of interpolation points. More...
class  Dune::BDM2Cube2DLocalCoefficients
 Layout map for Brezzi-Douglas-Marini-2 elements on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Convenience header that includes all implementations of Lagrange finite elements.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,37 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini2cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -lagrange.hh File Reference │ │ │ │ │ -Convenience header that includes all implementations of Lagrange finite │ │ │ │ │ -elements. More... │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +brezzidouglasmarini2cube2dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localkey.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::LagrangeLocalFiniteElement<_LP,_dimDomain,_D,_R,_SF,_CF_> │ │ │ │ │ -  Lagrange local finite elements for a given set of interpolation points. │ │ │ │ │ +class  Dune::BDM2Cube2DLocalCoefficients │ │ │ │ │ +  Layout map for Brezzi-Douglas-Marini-2 elements on quadrilaterals. │ │ │ │ │ More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ -***** Detailed Description ***** │ │ │ │ │ -Convenience header that includes all implementations of Lagrange finite │ │ │ │ │ -elements. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00467_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrange.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini2cube2dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,90 +70,81 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrange.hh
│ │ │ │ +
brezzidouglasmarini2cube2dlocalcoefficients.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_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
12// Headers for Lagrange elements with run-time order
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │
15
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
19
│ │ │ │ -
20// Headers for Lagrange elements with compile-time order
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
27
│ │ │ │ -
28namespace Dune
│ │ │ │ -
29{
│ │ │ │ -
59 template< template <class,unsigned int> class LP,
│ │ │ │ -
60 unsigned int dimDomain, class D, class R,
│ │ │ │ -
61 class SF=R, class CF=SF >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
63 : public GenericLocalFiniteElement< LagrangeBasisFactory< LP, dimDomain, SF, CF >,
│ │ │ │ -
64 LagrangeCoefficientsFactory<LP, dimDomain, SF >,
│ │ │ │ -
65 LagrangeInterpolationFactory< LP, dimDomain, SF > >
│ │ │ │ -
66 {
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
70 public:
│ │ │ │ -
71 typedef typename Base::Traits Traits;
│ │ │ │ -
72
│ │ │ │ -
│ │ │ │ -
75 LagrangeLocalFiniteElement ( const GeometryType &gt, unsigned int order )
│ │ │ │ -
76 : Base( gt, order )
│ │ │ │ -
77 {}
│ │ │ │ -
│ │ │ │ -
78 };
│ │ │ │ -
│ │ │ │ -
79}
│ │ │ │ -
80
│ │ │ │ -
81#endif // #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25
│ │ │ │ +
26 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30 for (std::size_t i = 0; i < 4; ++i)
│ │ │ │ +
31 {
│ │ │ │ +
32 li[3 * i] = LocalKey(i,1,0);
│ │ │ │ +
33 li[3 * i + 1] = LocalKey(i,1,1);
│ │ │ │ +
34 li[3 * i + 2] = LocalKey(i,1,2);
│ │ │ │ +
35 }
│ │ │ │ +
36 li[12] = LocalKey(0,0,0);
│ │ │ │ +
37 li[13] = LocalKey(0,0,1);
│ │ │ │ +
38 }
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ +
41 std::size_t size() const
│ │ │ │ +
42 {
│ │ │ │ +
43 return 14;
│ │ │ │ +
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} // end namespace Dune
│ │ │ │ +
56#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
Lagrange local finite elements for a given set of interpolation points.
Definition lagrange.hh:66
│ │ │ │ -
LagrangeLocalFiniteElement(const GeometryType &gt, unsigned int order)
Definition lagrange.hh:75
│ │ │ │ -
Base::Traits Traits
Definition lagrange.hh:71
│ │ │ │ -
Definition lagrange/interpolation.hh:100
│ │ │ │ -
Definition lagrangecoefficients.hh:23
│ │ │ │ -
A LocalFiniteElement implementation based on three TopologyFactories providing the LocalBasis,...
Definition localfunctions/utility/localfiniteelement.hh:25
│ │ │ │ - │ │ │ │ - │ │ │ │ +
Layout map for Brezzi-Douglas-Marini-2 elements on quadrilaterals.
Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:24
│ │ │ │ +
BDM2Cube2DLocalCoefficients()
Standard constructor.
Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:28
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:47
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:41
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,94 +7,82 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -lagrange.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini2cube2d │ │ │ │ │ +brezzidouglasmarini2cube2dlocalcoefficients.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_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_LAGRANGE_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 12// Headers for Lagrange elements with run-time order │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include "../../common/localkey.hh" │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ 15 │ │ │ │ │ - 16#include │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ - 19 │ │ │ │ │ - 20// Headers for Lagrange elements with compile-time order │ │ │ │ │ - 21#include │ │ │ │ │ - 22#include │ │ │ │ │ - 23#include │ │ │ │ │ - 24#include │ │ │ │ │ - 25#include │ │ │ │ │ - 26#include │ │ │ │ │ - 27 │ │ │ │ │ - 28namespace Dune │ │ │ │ │ - 29{ │ │ │ │ │ - 59 template< template class LP, │ │ │ │ │ - 60 unsigned int dimDomain, class D, class R, │ │ │ │ │ - 61 class SF=R, class CF=SF > │ │ │ │ │ -62 class LagrangeLocalFiniteElement │ │ │ │ │ - 63 : public GenericLocalFiniteElement< LagrangeBasisFactory< LP, dimDomain, │ │ │ │ │ -SF, CF >, │ │ │ │ │ - 64 LagrangeCoefficientsFactory, │ │ │ │ │ - 65 LagrangeInterpolationFactory< LP, dimDomain, SF > > │ │ │ │ │ - 66 { │ │ │ │ │ - 67 typedef GenericLocalFiniteElement<_LagrangeBasisFactory<_LP,_dimDomain,_SF, │ │ │ │ │ -CF_>, │ │ │ │ │ - 68 LagrangeCoefficientsFactory, │ │ │ │ │ - 69 LagrangeInterpolationFactory<_LP,_dimDomain,_SF_> > Base; │ │ │ │ │ - 70 public: │ │ │ │ │ -71 typedef typename Base::Traits Traits; │ │ │ │ │ - 72 │ │ │ │ │ -75 LagrangeLocalFiniteElement ( const GeometryType >, unsigned int order ) │ │ │ │ │ - 76 : Base( gt, order ) │ │ │ │ │ - 77 {} │ │ │ │ │ - 78 }; │ │ │ │ │ - 79} │ │ │ │ │ - 80 │ │ │ │ │ - 81#endif // #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_HH │ │ │ │ │ -dglocalcoefficients.hh │ │ │ │ │ -lagrangebasis.hh │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ -lagrangeprism.hh │ │ │ │ │ -pq22d.hh │ │ │ │ │ -p0.hh │ │ │ │ │ -lagrangepyramid.hh │ │ │ │ │ -lagrangecube.hh │ │ │ │ │ -lagrangecoefficients.hh │ │ │ │ │ +23 class BDM2Cube2DLocalCoefficients │ │ │ │ │ + 24 { │ │ │ │ │ + 25 │ │ │ │ │ + 26 public: │ │ │ │ │ +28 BDM2Cube2DLocalCoefficients() : li(14) │ │ │ │ │ + 29 { │ │ │ │ │ + 30 for (std::size_t i = 0; i < 4; ++i) │ │ │ │ │ + 31 { │ │ │ │ │ + 32 li[3 * i] = LocalKey(i,1,0); │ │ │ │ │ + 33 li[3 * i + 1] = LocalKey(i,1,1); │ │ │ │ │ + 34 li[3 * i + 2] = LocalKey(i,1,2); │ │ │ │ │ + 35 } │ │ │ │ │ + 36 li[12] = LocalKey(0,0,0); │ │ │ │ │ + 37 li[13] = LocalKey(0,0,1); │ │ │ │ │ + 38 } │ │ │ │ │ + 39 │ │ │ │ │ +41 std::size_t size() const │ │ │ │ │ + 42 { │ │ │ │ │ + 43 return 14; │ │ │ │ │ + 44 } │ │ │ │ │ + 45 │ │ │ │ │ +47 const LocalKey& localKey(std::size_t i) const │ │ │ │ │ + 48 { │ │ │ │ │ + 49 return li[i]; │ │ │ │ │ + 50 } │ │ │ │ │ + 51 │ │ │ │ │ + 52 private: │ │ │ │ │ + 53 std::vector li; │ │ │ │ │ + 54 }; │ │ │ │ │ + 55} // end namespace Dune │ │ │ │ │ + 56#endif / │ │ │ │ │ +/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LagrangeLocalFiniteElement │ │ │ │ │ -Lagrange local finite elements for a given set of interpolation points. │ │ │ │ │ -Definition lagrange.hh:66 │ │ │ │ │ -Dune::LagrangeLocalFiniteElement::LagrangeLocalFiniteElement │ │ │ │ │ -LagrangeLocalFiniteElement(const GeometryType >, unsigned int order) │ │ │ │ │ -Definition lagrange.hh:75 │ │ │ │ │ -Dune::LagrangeLocalFiniteElement::Traits │ │ │ │ │ -Base::Traits Traits │ │ │ │ │ -Definition lagrange.hh:71 │ │ │ │ │ -Dune::LagrangeInterpolationFactory │ │ │ │ │ -Definition lagrange/interpolation.hh:100 │ │ │ │ │ -Dune::LagrangeCoefficientsFactory │ │ │ │ │ -Definition lagrangecoefficients.hh:23 │ │ │ │ │ -Dune::GenericLocalFiniteElement │ │ │ │ │ -A LocalFiniteElement implementation based on three TopologyFactories providing │ │ │ │ │ -the LocalBasis,... │ │ │ │ │ -Definition localfunctions/utility/localfiniteelement.hh:25 │ │ │ │ │ -interpolation.hh │ │ │ │ │ -localfiniteelement.hh │ │ │ │ │ +Dune::BDM2Cube2DLocalCoefficients │ │ │ │ │ +Layout map for Brezzi-Douglas-Marini-2 elements on quadrilaterals. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::BDM2Cube2DLocalCoefficients::BDM2Cube2DLocalCoefficients │ │ │ │ │ +BDM2Cube2DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:28 │ │ │ │ │ +Dune::BDM2Cube2DLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:47 │ │ │ │ │ +Dune::BDM2Cube2DLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:41 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00470.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualpq1factory.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini2cube2dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualpq1factory.hh File Reference
│ │ │ │ +
brezzidouglasmarini2cube2dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <map>
│ │ │ │ -#include <dune/localfunctions/common/virtualinterface.hh>
│ │ │ │ -#include <dune/localfunctions/common/virtualwrappers.hh>
│ │ │ │ -#include <dune/localfunctions/dualmortarbasis.hh>
│ │ │ │ +
#include <array>
│ │ │ │ +#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::DualPQ1LocalFiniteElementCache< D, R, dim, faceDual >
class  Dune::BDM2Cube2DLocalBasis< D, R >
 First order Brezzi-Douglas-Marini shape functions on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,24 +6,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini2cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -dualpq1factory.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +brezzidouglasmarini2cube2dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::DualPQ1LocalFiniteElementCache<_D,_R,_dim,_faceDual_> │ │ │ │ │ +class  Dune::BDM2Cube2DLocalBasis<_D,_R_> │ │ │ │ │ +  First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00470_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualpq1factory.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini2cube2dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,118 +70,320 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualpq1factory.hh
│ │ │ │ +
brezzidouglasmarini2cube2dlocalbasis.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
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <map>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <bitset>
│ │ │ │ +
10#include <numeric>
│ │ │ │ +
11#include <vector>
│ │ │ │
12
│ │ │ │ - │ │ │ │ +
13#include <dune/common/fmatrix.hh>
│ │ │ │
14
│ │ │ │ -
15namespace Dune {
│ │ │ │ +
15#include "../../common/localbasis.hh"
│ │ │ │
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
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
28 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 {
│ │ │ │ +
31
│ │ │ │ +
32 public:
│ │ │ │ + │ │ │ │ +
34 R,2,Dune::FieldVector<R,2>,
│ │ │ │ +
35 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ +
36
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
39 {
│ │ │ │ +
40 for (size_t i=0; i<4; i++)
│ │ │ │ +
41 sign_[i] = 1.0;
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
│ │ │ │ +
49 BDM2Cube2DLocalBasis(std::bitset<4> s)
│ │ │ │ +
50 {
│ │ │ │ +
51 for (size_t i=0; i<4; i++)
│ │ │ │ +
52 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ +
56 unsigned int size() const
│ │ │ │ +
57 {
│ │ │ │ +
58 return 14;
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ +
67 inline void evaluateFunction(const typename Traits::DomainType& in,
│ │ │ │ +
68 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
69 {
│ │ │ │ +
70 out.resize(size());
│ │ │ │
71
│ │ │ │ -
72#endif // DUNE_LOCALFUNCTIONS_DUAL_P1_Q1_FACTORY_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
72 out[0][0] = sign_[0]*(-2.25 + 5.25*in[0] + 7.5*in[1] - 7.5*in[0]*in[1] - 3.0*in[0]*in[0] - 7.5*in[1]*in[1] + 7.5*in[0]*in[1]*in[1]);
│ │ │ │ +
73 out[0][1] = sign_[0]*(-1.25*in[1] + 3.75*in[1]*in[1] - 2.5*in[1]*in[1]*in[1]);
│ │ │ │ +
74 out[1][0] = 3.0 - 3.0*in[0]-6.0*in[1] + 6.0*in[0]*in[1];
│ │ │ │ +
75 out[1][1] = 0.0;
│ │ │ │ +
76 out[2][0] = sign_[0]*(-3.75 + 3.75*in[0] + 22.5*in[1] - 22.5*in[0]*in[1] - 22.5*in[1]*in[1] + 22.5*in[0]*in[1]*in[1]);
│ │ │ │ +
77 out[2][1] = sign_[0]*(-3.75*in[1] + 11.25*in[1]*in[1] - 7.5*in[1]*in[1]*in[1]);
│ │ │ │ +
78 out[3][0] = sign_[1]*(-0.75*in[0] - 7.5*in[0]*in[1] + 3.0*in[0]*in[0] + 7.5*in[0]*in[1]*in[1]);
│ │ │ │ +
79 out[3][1] = sign_[1]*(-1.25*in[1] + 3.75*in[1]*in[1] - 2.5*in[1]*in[1]*in[1]);
│ │ │ │ +
80 out[4][0] = 3.0*in[0] - 6.0*in[0]*in[1];
│ │ │ │ +
81 out[4][1] = 0.0;
│ │ │ │ +
82 out[5][0] = sign_[1]*(+3.75*in[0] - 22.5*in[0]*in[1] + 22.5*in[0]*in[1]*in[1]);
│ │ │ │ +
83 out[5][1] = sign_[1]*(-3.75*in[1] + 11.25*in[1]*in[1] - 7.5*in[1]*in[1]*in[1]);
│ │ │ │ +
84 out[6][0] = sign_[2]*(-1.25*in[0] + 3.75*in[0]*in[0] - 2.5*in[0]*in[0]*in[0]);
│ │ │ │ +
85 out[6][1] = sign_[2]*(-2.25 + 7.5*in[0] + 5.25*in[1] - 7.5*in[0]*in[1] - 7.5*in[0]*in[0] - 3.0*in[1]*in[1] + 7.5*in[0]*in[0]*in[1]);
│ │ │ │ +
86 out[7][0] = 0.0;
│ │ │ │ +
87 out[7][1] = -3.0 + 6.0*in[0] + 3.0*in[1] - 6.0*in[0]*in[1];
│ │ │ │ +
88 out[8][0] = sign_[2]*(-3.75*in[0] + 11.25*in[0]*in[0] - 7.5*in[0]*in[0]*in[0]);
│ │ │ │ +
89 out[8][1] = sign_[2]*(-3.75 + 22.5*in[0] + 3.75*in[1] - 22.5*in[0]*in[1] - 22.5*in[0]*in[0] + 22.5*in[0]*in[0]*in[1]);
│ │ │ │ +
90 out[9][0] = sign_[3]*(-1.25*in[0] + 3.75*in[0]*in[0] - 2.5*in[0]*in[0]*in[0]);
│ │ │ │ +
91 out[9][1] = sign_[3]*(-0.75*in[1] - 7.5*in[0]*in[1] + 3.0*in[1]*in[1] + 7.5*in[0]*in[0]*in[1]);
│ │ │ │ +
92 out[10][0] = 0.0;
│ │ │ │ +
93 out[10][1] = -3.0*in[1] + 6.0*in[0]*in[1];
│ │ │ │ +
94 out[11][0] = sign_[3]*(-3.75*in[0] + 11.25*in[0]*in[0] - 7.5*in[0]*in[0]*in[0]);
│ │ │ │ +
95 out[11][1] = sign_[3]*(3.75*in[1] - 22.5*in[0]*in[1] + 22.5*in[0]*in[0]*in[1]);
│ │ │ │ +
96 out[12][0] = 6.0*in[0] - 6.0*in[0]*in[0];
│ │ │ │ +
97 out[12][1] = 0.0;
│ │ │ │ +
98 out[13][0] = 0.0;
│ │ │ │ +
99 out[13][1] = 6.0*in[1] - 6.0*in[1]*in[1];
│ │ │ │ +
100 }
│ │ │ │ +
│ │ │ │ +
101
│ │ │ │ +
│ │ │ │ +
108 inline void evaluateJacobian(const typename Traits::DomainType& in,
│ │ │ │ +
109 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
110 {
│ │ │ │ +
111 out.resize(size());
│ │ │ │ +
112
│ │ │ │ +
113 out[0][0][0] = sign_[0]*(5.25 - 7.5*in[1] - 6.0*in[0] + 7.5*in[1]*in[1]);
│ │ │ │ +
114 out[0][0][1] = sign_[0]*(7.5 - 7.5*in[0] - 15.0*in[1] + 15.0*in[0]*in[1]);
│ │ │ │ +
115 out[0][1][0] = 0.0;
│ │ │ │ +
116 out[0][1][1] = sign_[0]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]);
│ │ │ │ +
117
│ │ │ │ +
118 out[1][0][0] = -3.0 + 6.0*in[1];
│ │ │ │ +
119 out[1][0][1] = -6.0 + 6.0*in[0];
│ │ │ │ +
120 out[1][1][0] = 0.0;
│ │ │ │ +
121 out[1][1][1] = 0.0;
│ │ │ │ +
122
│ │ │ │ +
123 out[2][0][0] = sign_[0]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]);
│ │ │ │ +
124 out[2][0][1] = sign_[0]*(22.5 - 22.5*in[0] - 45.0*in[1] + 45.0*in[0]*in[1]);
│ │ │ │ +
125 out[2][1][0] = 0.0;
│ │ │ │ +
126 out[2][1][1] = sign_[0]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]);
│ │ │ │ +
127
│ │ │ │ +
128 out[3][0][0] = sign_[1]*(-0.75 - 7.5*in[1] + 6.0*in[0] + 7.5*in[1]*in[1]);
│ │ │ │ +
129 out[3][0][1] = sign_[1]*(-7.5*in[0] + 15.0*in[0]*in[1]);
│ │ │ │ +
130 out[3][1][0] = 0.0;
│ │ │ │ +
131 out[3][1][1] = sign_[1]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]);
│ │ │ │ +
132
│ │ │ │ +
133 out[4][0][0] = 3.0 - 6.0*in[1];
│ │ │ │ +
134 out[4][0][1] = -6.0*in[0];
│ │ │ │ +
135 out[4][1][0] = 0.0;
│ │ │ │ +
136 out[4][1][1] = 0.0;
│ │ │ │ +
137
│ │ │ │ +
138 out[5][0][0] = sign_[1]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]);
│ │ │ │ +
139 out[5][0][1] = sign_[1]*(-22.5*in[0] + 45.0*in[0]*in[1]);
│ │ │ │ +
140 out[5][1][0] = 0.0;
│ │ │ │ +
141 out[5][1][1] = sign_[1]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]);
│ │ │ │ +
142
│ │ │ │ +
143 out[6][0][0] = sign_[2]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]);
│ │ │ │ +
144 out[6][0][1] = 0.0;
│ │ │ │ +
145 out[6][1][0] = sign_[2]*(7.5 - 7.5*in[1] - 15.0*in[0] + 15.0*in[0]*in[1]);
│ │ │ │ +
146 out[6][1][1] = sign_[2]*(5.25 - 7.5*in[0]- 6.0*in[1] + 7.5*in[0]*in[0]);
│ │ │ │ +
147
│ │ │ │ +
148 out[7][0][0] = 0.0;
│ │ │ │ +
149 out[7][0][1] = 0.0;
│ │ │ │ +
150 out[7][1][0] = 6.0 - 6.0*in[1];
│ │ │ │ +
151 out[7][1][1] = 3.0 - 6.0*in[0];
│ │ │ │ +
152
│ │ │ │ +
153 out[8][0][0] = sign_[2]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]);
│ │ │ │ +
154 out[8][0][1] = 0.0;
│ │ │ │ +
155 out[8][1][0] = sign_[2]*(22.5 - 22.5*in[1] - 45.0*in[0] + 45.0*in[0]*in[1]);
│ │ │ │ +
156 out[8][1][1] = sign_[2]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]);
│ │ │ │ +
157
│ │ │ │ +
158 out[9][0][0] = sign_[3]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]);
│ │ │ │ +
159 out[9][0][1] = 0.0;
│ │ │ │ +
160 out[9][1][0] = sign_[3]*(-7.5*in[1] + 15.0*in[0]*in[1]);
│ │ │ │ +
161 out[9][1][1] = sign_[3]*(-0.75 - 7.5*in[0] + 6.0*in[1] + 7.5*in[0]*in[0]);
│ │ │ │ +
162
│ │ │ │ +
163 out[10][0][0] = 0.0;
│ │ │ │ +
164 out[10][0][1] = 0.0;
│ │ │ │ +
165 out[10][1][0] = 6.0*in[1];
│ │ │ │ +
166 out[10][1][1] = -3.0 + 6.0*in[0];
│ │ │ │ +
167
│ │ │ │ +
168 out[11][0][0] = sign_[3]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]);
│ │ │ │ +
169 out[11][0][1] = 0.0;
│ │ │ │ +
170 out[11][1][0] = sign_[3]*(-22.5*in[1] + 45*in[0]*in[1]);
│ │ │ │ +
171 out[11][1][1] = sign_[3]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]);
│ │ │ │ +
172
│ │ │ │ +
173 out[12][0][0] = 6.0 - 12.0*in[0];
│ │ │ │ +
174 out[12][0][1] = 0.0;
│ │ │ │ +
175 out[12][1][0] = 0.0;
│ │ │ │ +
176 out[12][1][1] = 0.0;
│ │ │ │ +
177
│ │ │ │ +
178 out[13][0][0] = 0.0;
│ │ │ │ +
179 out[13][0][1] = 0.0;
│ │ │ │ +
180 out[13][1][0] = 0.0;
│ │ │ │ +
181 out[13][1][1] = 6.0 - 12.0*in[1];
│ │ │ │ +
182 }
│ │ │ │ +
│ │ │ │ +
183
│ │ │ │ +
│ │ │ │ +
185 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
186 const typename Traits::DomainType& in, // position
│ │ │ │ +
187 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
188 {
│ │ │ │ +
189 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
190 if (totalOrder == 0) {
│ │ │ │ +
191 evaluateFunction(in, out);
│ │ │ │ +
192 } else if (totalOrder == 1) {
│ │ │ │ +
193 out.resize(size());
│ │ │ │ +
194 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
195
│ │ │ │ +
196 switch (direction) {
│ │ │ │ +
197 case 0:
│ │ │ │ +
198 out[0][0] = sign_[0]*(5.25 - 7.5*in[1] - 6.0*in[0] + 7.5*in[1]*in[1]);
│ │ │ │ +
199 out[0][1] = 0.0;
│ │ │ │ +
200
│ │ │ │ +
201 out[1][0] = -3.0 + 6.0*in[1];
│ │ │ │ +
202 out[1][1] = 0.0;
│ │ │ │ +
203
│ │ │ │ +
204 out[2][0] = sign_[0]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]);
│ │ │ │ +
205 out[2][1] = 0.0;
│ │ │ │ +
206
│ │ │ │ +
207 out[3][0] = sign_[1]*(-0.75 - 7.5*in[1] + 6.0*in[0] + 7.5*in[1]*in[1]);
│ │ │ │ +
208 out[3][1] = 0.0;
│ │ │ │ +
209
│ │ │ │ +
210 out[4][0] = 3.0 - 6.0*in[1];
│ │ │ │ +
211 out[4][1] = 0.0;
│ │ │ │ +
212
│ │ │ │ +
213 out[5][0] = sign_[1]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]);
│ │ │ │ +
214 out[5][1] = 0.0;
│ │ │ │ +
215
│ │ │ │ +
216 out[6][0] = sign_[2]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]);
│ │ │ │ +
217 out[6][1] = sign_[2]*(7.5 - 7.5*in[1] - 15.0*in[0] + 15.0*in[0]*in[1]);
│ │ │ │ +
218
│ │ │ │ +
219 out[7][0] = 0.0;
│ │ │ │ +
220 out[7][1] = 6.0 - 6.0*in[1];
│ │ │ │ +
221
│ │ │ │ +
222 out[8][0] = sign_[2]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]);
│ │ │ │ +
223 out[8][1] = sign_[2]*(22.5 - 22.5*in[1] - 45.0*in[0] + 45.0*in[0]*in[1]);
│ │ │ │ +
224
│ │ │ │ +
225 out[9][0] = sign_[3]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]);
│ │ │ │ +
226 out[9][1] = sign_[3]*(-7.5*in[1] + 15.0*in[0]*in[1]);
│ │ │ │ +
227
│ │ │ │ +
228 out[10][0] = 0.0;
│ │ │ │ +
229 out[10][1] = 6.0*in[1];
│ │ │ │ +
230
│ │ │ │ +
231 out[11][0] = sign_[3]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]);
│ │ │ │ +
232 out[11][1] = sign_[3]*(-22.5*in[1] + 45*in[0]*in[1]);
│ │ │ │ +
233
│ │ │ │ +
234 out[12][0] = 6.0 - 12.0*in[0];
│ │ │ │ +
235 out[12][1] = 0.0;
│ │ │ │ +
236
│ │ │ │ +
237 out[13][0] = 0.0;
│ │ │ │ +
238 out[13][1] = 0.0;
│ │ │ │ +
239 break;
│ │ │ │ +
240 case 1:
│ │ │ │ +
241 out[0][0] = sign_[0]*(7.5 - 7.5*in[0] - 15.0*in[1] + 15.0*in[0]*in[1]);
│ │ │ │ +
242 out[0][1] = sign_[0]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]);
│ │ │ │ +
243
│ │ │ │ +
244 out[1][0] = -6.0 + 6.0*in[0];
│ │ │ │ +
245 out[1][1] = 0.0;
│ │ │ │ +
246
│ │ │ │ +
247 out[2][0] = sign_[0]*(22.5 - 22.5*in[0] - 45.0*in[1] + 45.0*in[0]*in[1]);
│ │ │ │ +
248 out[2][1] = sign_[0]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]);
│ │ │ │ +
249
│ │ │ │ +
250 out[3][0] = sign_[1]*(-7.5*in[0] + 15.0*in[0]*in[1]);
│ │ │ │ +
251 out[3][1] = sign_[1]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]);
│ │ │ │ +
252
│ │ │ │ +
253 out[4][0] = -6.0*in[0];
│ │ │ │ +
254 out[4][1] = 0.0;
│ │ │ │ +
255
│ │ │ │ +
256 out[5][0] = sign_[1]*(-22.5*in[0] + 45.0*in[0]*in[1]);
│ │ │ │ +
257 out[5][1] = sign_[1]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]);
│ │ │ │ +
258
│ │ │ │ +
259 out[6][0] = 0.0;
│ │ │ │ +
260 out[6][1] = sign_[2]*(5.25 - 7.5*in[0]- 6.0*in[1] + 7.5*in[0]*in[0]);
│ │ │ │ +
261
│ │ │ │ +
262 out[7][0] = 0.0;
│ │ │ │ +
263 out[7][1] = 3.0 - 6.0*in[0];
│ │ │ │ +
264
│ │ │ │ +
265 out[8][0] = 0.0;
│ │ │ │ +
266 out[8][1] = sign_[2]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]);
│ │ │ │ +
267
│ │ │ │ +
268 out[9][0] = 0.0;
│ │ │ │ +
269 out[9][1] = sign_[3]*(-0.75 - 7.5*in[0] + 6.0*in[1] + 7.5*in[0]*in[0]);
│ │ │ │ +
270
│ │ │ │ +
271 out[10][0] = 0.0;
│ │ │ │ +
272 out[10][1] = -3.0 + 6.0*in[0];
│ │ │ │ +
273
│ │ │ │ +
274 out[11][0] = 0.0;
│ │ │ │ +
275 out[11][1] = sign_[3]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]);
│ │ │ │ +
276
│ │ │ │ +
277 out[12][0] = 0.0;
│ │ │ │ +
278 out[12][1] = 0.0;
│ │ │ │ +
279
│ │ │ │ +
280 out[13][0] = 0.0;
│ │ │ │ +
281 out[13][1] = 6.0 - 12.0*in[1];
│ │ │ │ +
282 break;
│ │ │ │ +
283 default:
│ │ │ │ +
284 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
285 }
│ │ │ │ +
286 } else {
│ │ │ │ +
287 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
288 }
│ │ │ │ +
289 }
│ │ │ │ +
│ │ │ │ +
290
│ │ │ │ +
│ │ │ │ +
292 unsigned int order() const
│ │ │ │ +
293 {
│ │ │ │ +
294 return 3;
│ │ │ │ +
295 }
│ │ │ │ +
│ │ │ │ +
296
│ │ │ │ +
297 private:
│ │ │ │ +
298 std::array<R,4> sign_;
│ │ │ │ +
299 };
│ │ │ │ +
│ │ │ │ +
300} // end namespace Dune
│ │ │ │ +
301#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALBASIS_HH
│ │ │ │
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
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:30
│ │ │ │ +
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 brezzidouglasmarini2cube2dlocalbasis.hh:185
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:292
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:67
│ │ │ │ +
BDM2Cube2DLocalBasis()
Standard constructor.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:38
│ │ │ │ +
BDM2Cube2DLocalBasis(std::bitset< 4 > s)
Make set number s, where 0 <= s < 16.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:49
│ │ │ │ +
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition brezzidouglasmarini2cube2dlocalbasis.hh:35
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition brezzidouglasmarini2cube2dlocalbasis.hh:56
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:108
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,139 +7,352 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ -dualpq1factory.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini2cube2d │ │ │ │ │ +brezzidouglasmarini2cube2dlocalbasis.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 │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13#include │ │ │ │ │ + 13#include │ │ │ │ │ 14 │ │ │ │ │ - 15namespace Dune { │ │ │ │ │ + 15#include "../../common/localbasis.hh" │ │ │ │ │ 16 │ │ │ │ │ - 17template │ │ │ │ │ -18class DualPQ1LocalFiniteElementCache │ │ │ │ │ - 19{ │ │ │ │ │ - 20protected: │ │ │ │ │ -21 typedef Dune::DualP1LocalFiniteElement DualP1; │ │ │ │ │ -22 typedef Dune::DualQ1LocalFiniteElement DualQ1; │ │ │ │ │ -23 typedef typename DualP1::Traits::LocalBasisType::Traits T; │ │ │ │ │ -24 typedef Dune::LocalFiniteElementVirtualInterface FE; │ │ │ │ │ -25 typedef std::map FEMap; │ │ │ │ │ - 26 │ │ │ │ │ - 27public: │ │ │ │ │ -29 typedef FE FiniteElementType; │ │ │ │ │ - 30 │ │ │ │ │ -31 ~DualPQ1LocalFiniteElementCache() │ │ │ │ │ - 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()) │ │ │ │ │ - 43 return new Dune::LocalFiniteElementVirtualImp(DualP1()); │ │ │ │ │ - 44 if (gt.isCube()) │ │ │ │ │ - 45 return new Dune::LocalFiniteElementVirtualImp(DualQ1()); │ │ │ │ │ - 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 │ │ │ │ │ + 17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ + 28 template │ │ │ │ │ +29 class BDM2Cube2DLocalBasis │ │ │ │ │ + 30 { │ │ │ │ │ + 31 │ │ │ │ │ + 32 public: │ │ │ │ │ + 33 typedef LocalBasisTraits, │ │ │ │ │ + 34 R,2,Dune::FieldVector, │ │ │ │ │ +35 Dune::FieldMatrix > Traits; │ │ │ │ │ + 36 │ │ │ │ │ +38 BDM2Cube2DLocalBasis() │ │ │ │ │ + 39 { │ │ │ │ │ + 40 for (size_t i=0; i<4; i++) │ │ │ │ │ + 41 sign_[i] = 1.0; │ │ │ │ │ + 42 } │ │ │ │ │ + 43 │ │ │ │ │ +49 BDM2Cube2DLocalBasis(std::bitset<4> s) │ │ │ │ │ + 50 { │ │ │ │ │ + 51 for (size_t i=0; i<4; i++) │ │ │ │ │ + 52 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ + 53 } │ │ │ │ │ + 54 │ │ │ │ │ +56 unsigned int size() const │ │ │ │ │ + 57 { │ │ │ │ │ + 58 return 14; │ │ │ │ │ + 59 } │ │ │ │ │ + 60 │ │ │ │ │ +67 inline void evaluateFunction(const typename Traits::DomainType& in, │ │ │ │ │ + 68 std::vector& out) const │ │ │ │ │ + 69 { │ │ │ │ │ + 70 out.resize(size()); │ │ │ │ │ 71 │ │ │ │ │ - 72#endif // DUNE_LOCALFUNCTIONS_DUAL_P1_Q1_FACTORY_HH │ │ │ │ │ -dualmortarbasis.hh │ │ │ │ │ -virtualwrappers.hh │ │ │ │ │ -virtualinterface.hh │ │ │ │ │ + 72 out[0][0] = sign_[0]*(-2.25 + 5.25*in[0] + 7.5*in[1] - 7.5*in[0]*in[1] - │ │ │ │ │ +3.0*in[0]*in[0] - 7.5*in[1]*in[1] + 7.5*in[0]*in[1]*in[1]); │ │ │ │ │ + 73 out[0][1] = sign_[0]*(-1.25*in[1] + 3.75*in[1]*in[1] - 2.5*in[1]*in[1]*in │ │ │ │ │ +[1]); │ │ │ │ │ + 74 out[1][0] = 3.0 - 3.0*in[0]-6.0*in[1] + 6.0*in[0]*in[1]; │ │ │ │ │ + 75 out[1][1] = 0.0; │ │ │ │ │ + 76 out[2][0] = sign_[0]*(-3.75 + 3.75*in[0] + 22.5*in[1] - 22.5*in[0]*in[1] - │ │ │ │ │ +22.5*in[1]*in[1] + 22.5*in[0]*in[1]*in[1]); │ │ │ │ │ + 77 out[2][1] = sign_[0]*(-3.75*in[1] + 11.25*in[1]*in[1] - 7.5*in[1]*in[1]*in │ │ │ │ │ +[1]); │ │ │ │ │ + 78 out[3][0] = sign_[1]*(-0.75*in[0] - 7.5*in[0]*in[1] + 3.0*in[0]*in[0] + │ │ │ │ │ +7.5*in[0]*in[1]*in[1]); │ │ │ │ │ + 79 out[3][1] = sign_[1]*(-1.25*in[1] + 3.75*in[1]*in[1] - 2.5*in[1]*in[1]*in │ │ │ │ │ +[1]); │ │ │ │ │ + 80 out[4][0] = 3.0*in[0] - 6.0*in[0]*in[1]; │ │ │ │ │ + 81 out[4][1] = 0.0; │ │ │ │ │ + 82 out[5][0] = sign_[1]*(+3.75*in[0] - 22.5*in[0]*in[1] + 22.5*in[0]*in[1]*in │ │ │ │ │ +[1]); │ │ │ │ │ + 83 out[5][1] = sign_[1]*(-3.75*in[1] + 11.25*in[1]*in[1] - 7.5*in[1]*in[1]*in │ │ │ │ │ +[1]); │ │ │ │ │ + 84 out[6][0] = sign_[2]*(-1.25*in[0] + 3.75*in[0]*in[0] - 2.5*in[0]*in[0]*in │ │ │ │ │ +[0]); │ │ │ │ │ + 85 out[6][1] = sign_[2]*(-2.25 + 7.5*in[0] + 5.25*in[1] - 7.5*in[0]*in[1] - │ │ │ │ │ +7.5*in[0]*in[0] - 3.0*in[1]*in[1] + 7.5*in[0]*in[0]*in[1]); │ │ │ │ │ + 86 out[7][0] = 0.0; │ │ │ │ │ + 87 out[7][1] = -3.0 + 6.0*in[0] + 3.0*in[1] - 6.0*in[0]*in[1]; │ │ │ │ │ + 88 out[8][0] = sign_[2]*(-3.75*in[0] + 11.25*in[0]*in[0] - 7.5*in[0]*in[0]*in │ │ │ │ │ +[0]); │ │ │ │ │ + 89 out[8][1] = sign_[2]*(-3.75 + 22.5*in[0] + 3.75*in[1] - 22.5*in[0]*in[1] - │ │ │ │ │ +22.5*in[0]*in[0] + 22.5*in[0]*in[0]*in[1]); │ │ │ │ │ + 90 out[9][0] = sign_[3]*(-1.25*in[0] + 3.75*in[0]*in[0] - 2.5*in[0]*in[0]*in │ │ │ │ │ +[0]); │ │ │ │ │ + 91 out[9][1] = sign_[3]*(-0.75*in[1] - 7.5*in[0]*in[1] + 3.0*in[1]*in[1] + │ │ │ │ │ +7.5*in[0]*in[0]*in[1]); │ │ │ │ │ + 92 out[10][0] = 0.0; │ │ │ │ │ + 93 out[10][1] = -3.0*in[1] + 6.0*in[0]*in[1]; │ │ │ │ │ + 94 out[11][0] = sign_[3]*(-3.75*in[0] + 11.25*in[0]*in[0] - 7.5*in[0]*in[0]*in │ │ │ │ │ +[0]); │ │ │ │ │ + 95 out[11][1] = sign_[3]*(3.75*in[1] - 22.5*in[0]*in[1] + 22.5*in[0]*in[0]*in │ │ │ │ │ +[1]); │ │ │ │ │ + 96 out[12][0] = 6.0*in[0] - 6.0*in[0]*in[0]; │ │ │ │ │ + 97 out[12][1] = 0.0; │ │ │ │ │ + 98 out[13][0] = 0.0; │ │ │ │ │ + 99 out[13][1] = 6.0*in[1] - 6.0*in[1]*in[1]; │ │ │ │ │ + 100 } │ │ │ │ │ + 101 │ │ │ │ │ +108 inline void evaluateJacobian(const typename Traits::DomainType& in, │ │ │ │ │ + 109 std::vector& out) const │ │ │ │ │ + 110 { │ │ │ │ │ + 111 out.resize(size()); │ │ │ │ │ + 112 │ │ │ │ │ + 113 out[0][0][0] = sign_[0]*(5.25 - 7.5*in[1] - 6.0*in[0] + 7.5*in[1]*in[1]); │ │ │ │ │ + 114 out[0][0][1] = sign_[0]*(7.5 - 7.5*in[0] - 15.0*in[1] + 15.0*in[0]*in[1]); │ │ │ │ │ + 115 out[0][1][0] = 0.0; │ │ │ │ │ + 116 out[0][1][1] = sign_[0]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]); │ │ │ │ │ + 117 │ │ │ │ │ + 118 out[1][0][0] = -3.0 + 6.0*in[1]; │ │ │ │ │ + 119 out[1][0][1] = -6.0 + 6.0*in[0]; │ │ │ │ │ + 120 out[1][1][0] = 0.0; │ │ │ │ │ + 121 out[1][1][1] = 0.0; │ │ │ │ │ + 122 │ │ │ │ │ + 123 out[2][0][0] = sign_[0]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]); │ │ │ │ │ + 124 out[2][0][1] = sign_[0]*(22.5 - 22.5*in[0] - 45.0*in[1] + 45.0*in[0]*in │ │ │ │ │ +[1]); │ │ │ │ │ + 125 out[2][1][0] = 0.0; │ │ │ │ │ + 126 out[2][1][1] = sign_[0]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]); │ │ │ │ │ + 127 │ │ │ │ │ + 128 out[3][0][0] = sign_[1]*(-0.75 - 7.5*in[1] + 6.0*in[0] + 7.5*in[1]*in[1]); │ │ │ │ │ + 129 out[3][0][1] = sign_[1]*(-7.5*in[0] + 15.0*in[0]*in[1]); │ │ │ │ │ + 130 out[3][1][0] = 0.0; │ │ │ │ │ + 131 out[3][1][1] = sign_[1]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]); │ │ │ │ │ + 132 │ │ │ │ │ + 133 out[4][0][0] = 3.0 - 6.0*in[1]; │ │ │ │ │ + 134 out[4][0][1] = -6.0*in[0]; │ │ │ │ │ + 135 out[4][1][0] = 0.0; │ │ │ │ │ + 136 out[4][1][1] = 0.0; │ │ │ │ │ + 137 │ │ │ │ │ + 138 out[5][0][0] = sign_[1]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]); │ │ │ │ │ + 139 out[5][0][1] = sign_[1]*(-22.5*in[0] + 45.0*in[0]*in[1]); │ │ │ │ │ + 140 out[5][1][0] = 0.0; │ │ │ │ │ + 141 out[5][1][1] = sign_[1]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]); │ │ │ │ │ + 142 │ │ │ │ │ + 143 out[6][0][0] = sign_[2]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]); │ │ │ │ │ + 144 out[6][0][1] = 0.0; │ │ │ │ │ + 145 out[6][1][0] = sign_[2]*(7.5 - 7.5*in[1] - 15.0*in[0] + 15.0*in[0]*in[1]); │ │ │ │ │ + 146 out[6][1][1] = sign_[2]*(5.25 - 7.5*in[0]- 6.0*in[1] + 7.5*in[0]*in[0]); │ │ │ │ │ + 147 │ │ │ │ │ + 148 out[7][0][0] = 0.0; │ │ │ │ │ + 149 out[7][0][1] = 0.0; │ │ │ │ │ + 150 out[7][1][0] = 6.0 - 6.0*in[1]; │ │ │ │ │ + 151 out[7][1][1] = 3.0 - 6.0*in[0]; │ │ │ │ │ + 152 │ │ │ │ │ + 153 out[8][0][0] = sign_[2]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]); │ │ │ │ │ + 154 out[8][0][1] = 0.0; │ │ │ │ │ + 155 out[8][1][0] = sign_[2]*(22.5 - 22.5*in[1] - 45.0*in[0] + 45.0*in[0]*in │ │ │ │ │ +[1]); │ │ │ │ │ + 156 out[8][1][1] = sign_[2]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]); │ │ │ │ │ + 157 │ │ │ │ │ + 158 out[9][0][0] = sign_[3]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]); │ │ │ │ │ + 159 out[9][0][1] = 0.0; │ │ │ │ │ + 160 out[9][1][0] = sign_[3]*(-7.5*in[1] + 15.0*in[0]*in[1]); │ │ │ │ │ + 161 out[9][1][1] = sign_[3]*(-0.75 - 7.5*in[0] + 6.0*in[1] + 7.5*in[0]*in[0]); │ │ │ │ │ + 162 │ │ │ │ │ + 163 out[10][0][0] = 0.0; │ │ │ │ │ + 164 out[10][0][1] = 0.0; │ │ │ │ │ + 165 out[10][1][0] = 6.0*in[1]; │ │ │ │ │ + 166 out[10][1][1] = -3.0 + 6.0*in[0]; │ │ │ │ │ + 167 │ │ │ │ │ + 168 out[11][0][0] = sign_[3]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]); │ │ │ │ │ + 169 out[11][0][1] = 0.0; │ │ │ │ │ + 170 out[11][1][0] = sign_[3]*(-22.5*in[1] + 45*in[0]*in[1]); │ │ │ │ │ + 171 out[11][1][1] = sign_[3]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]); │ │ │ │ │ + 172 │ │ │ │ │ + 173 out[12][0][0] = 6.0 - 12.0*in[0]; │ │ │ │ │ + 174 out[12][0][1] = 0.0; │ │ │ │ │ + 175 out[12][1][0] = 0.0; │ │ │ │ │ + 176 out[12][1][1] = 0.0; │ │ │ │ │ + 177 │ │ │ │ │ + 178 out[13][0][0] = 0.0; │ │ │ │ │ + 179 out[13][0][1] = 0.0; │ │ │ │ │ + 180 out[13][1][0] = 0.0; │ │ │ │ │ + 181 out[13][1][1] = 6.0 - 12.0*in[1]; │ │ │ │ │ + 182 } │ │ │ │ │ + 183 │ │ │ │ │ +185 void partial (const std::array& order, │ │ │ │ │ + 186 const typename Traits::DomainType& in, // position │ │ │ │ │ + 187 std::vector& out) const // return value │ │ │ │ │ + 188 { │ │ │ │ │ + 189 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ + 190 if (totalOrder == 0) { │ │ │ │ │ + 191 evaluateFunction(in, out); │ │ │ │ │ + 192 } else if (totalOrder == 1) { │ │ │ │ │ + 193 out.resize(size()); │ │ │ │ │ + 194 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ +(), order.end(), 1)); │ │ │ │ │ + 195 │ │ │ │ │ + 196 switch (direction) { │ │ │ │ │ + 197 case 0: │ │ │ │ │ + 198 out[0][0] = sign_[0]*(5.25 - 7.5*in[1] - 6.0*in[0] + 7.5*in[1]*in[1]); │ │ │ │ │ + 199 out[0][1] = 0.0; │ │ │ │ │ + 200 │ │ │ │ │ + 201 out[1][0] = -3.0 + 6.0*in[1]; │ │ │ │ │ + 202 out[1][1] = 0.0; │ │ │ │ │ + 203 │ │ │ │ │ + 204 out[2][0] = sign_[0]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]); │ │ │ │ │ + 205 out[2][1] = 0.0; │ │ │ │ │ + 206 │ │ │ │ │ + 207 out[3][0] = sign_[1]*(-0.75 - 7.5*in[1] + 6.0*in[0] + 7.5*in[1]*in[1]); │ │ │ │ │ + 208 out[3][1] = 0.0; │ │ │ │ │ + 209 │ │ │ │ │ + 210 out[4][0] = 3.0 - 6.0*in[1]; │ │ │ │ │ + 211 out[4][1] = 0.0; │ │ │ │ │ + 212 │ │ │ │ │ + 213 out[5][0] = sign_[1]*(3.75 - 22.5*in[1] + 22.5*in[1]*in[1]); │ │ │ │ │ + 214 out[5][1] = 0.0; │ │ │ │ │ + 215 │ │ │ │ │ + 216 out[6][0] = sign_[2]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]); │ │ │ │ │ + 217 out[6][1] = sign_[2]*(7.5 - 7.5*in[1] - 15.0*in[0] + 15.0*in[0]*in[1]); │ │ │ │ │ + 218 │ │ │ │ │ + 219 out[7][0] = 0.0; │ │ │ │ │ + 220 out[7][1] = 6.0 - 6.0*in[1]; │ │ │ │ │ + 221 │ │ │ │ │ + 222 out[8][0] = sign_[2]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]); │ │ │ │ │ + 223 out[8][1] = sign_[2]*(22.5 - 22.5*in[1] - 45.0*in[0] + 45.0*in[0]*in[1]); │ │ │ │ │ + 224 │ │ │ │ │ + 225 out[9][0] = sign_[3]*(-1.25 + 7.5*in[0] - 7.5*in[0]*in[0]); │ │ │ │ │ + 226 out[9][1] = sign_[3]*(-7.5*in[1] + 15.0*in[0]*in[1]); │ │ │ │ │ + 227 │ │ │ │ │ + 228 out[10][0] = 0.0; │ │ │ │ │ + 229 out[10][1] = 6.0*in[1]; │ │ │ │ │ + 230 │ │ │ │ │ + 231 out[11][0] = sign_[3]*(-3.75 + 22.5*in[0] - 22.5*in[0]*in[0]); │ │ │ │ │ + 232 out[11][1] = sign_[3]*(-22.5*in[1] + 45*in[0]*in[1]); │ │ │ │ │ + 233 │ │ │ │ │ + 234 out[12][0] = 6.0 - 12.0*in[0]; │ │ │ │ │ + 235 out[12][1] = 0.0; │ │ │ │ │ + 236 │ │ │ │ │ + 237 out[13][0] = 0.0; │ │ │ │ │ + 238 out[13][1] = 0.0; │ │ │ │ │ + 239 break; │ │ │ │ │ + 240 case 1: │ │ │ │ │ + 241 out[0][0] = sign_[0]*(7.5 - 7.5*in[0] - 15.0*in[1] + 15.0*in[0]*in[1]); │ │ │ │ │ + 242 out[0][1] = sign_[0]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]); │ │ │ │ │ + 243 │ │ │ │ │ + 244 out[1][0] = -6.0 + 6.0*in[0]; │ │ │ │ │ + 245 out[1][1] = 0.0; │ │ │ │ │ + 246 │ │ │ │ │ + 247 out[2][0] = sign_[0]*(22.5 - 22.5*in[0] - 45.0*in[1] + 45.0*in[0]*in[1]); │ │ │ │ │ + 248 out[2][1] = sign_[0]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]); │ │ │ │ │ + 249 │ │ │ │ │ + 250 out[3][0] = sign_[1]*(-7.5*in[0] + 15.0*in[0]*in[1]); │ │ │ │ │ + 251 out[3][1] = sign_[1]*(-1.25 + 7.5*in[1] - 7.5*in[1]*in[1]); │ │ │ │ │ + 252 │ │ │ │ │ + 253 out[4][0] = -6.0*in[0]; │ │ │ │ │ + 254 out[4][1] = 0.0; │ │ │ │ │ + 255 │ │ │ │ │ + 256 out[5][0] = sign_[1]*(-22.5*in[0] + 45.0*in[0]*in[1]); │ │ │ │ │ + 257 out[5][1] = sign_[1]*(-3.75 + 22.5*in[1] - 22.5*in[1]*in[1]); │ │ │ │ │ + 258 │ │ │ │ │ + 259 out[6][0] = 0.0; │ │ │ │ │ + 260 out[6][1] = sign_[2]*(5.25 - 7.5*in[0]- 6.0*in[1] + 7.5*in[0]*in[0]); │ │ │ │ │ + 261 │ │ │ │ │ + 262 out[7][0] = 0.0; │ │ │ │ │ + 263 out[7][1] = 3.0 - 6.0*in[0]; │ │ │ │ │ + 264 │ │ │ │ │ + 265 out[8][0] = 0.0; │ │ │ │ │ + 266 out[8][1] = sign_[2]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]); │ │ │ │ │ + 267 │ │ │ │ │ + 268 out[9][0] = 0.0; │ │ │ │ │ + 269 out[9][1] = sign_[3]*(-0.75 - 7.5*in[0] + 6.0*in[1] + 7.5*in[0]*in[0]); │ │ │ │ │ + 270 │ │ │ │ │ + 271 out[10][0] = 0.0; │ │ │ │ │ + 272 out[10][1] = -3.0 + 6.0*in[0]; │ │ │ │ │ + 273 │ │ │ │ │ + 274 out[11][0] = 0.0; │ │ │ │ │ + 275 out[11][1] = sign_[3]*(3.75 - 22.5*in[0] + 22.5*in[0]*in[0]); │ │ │ │ │ + 276 │ │ │ │ │ + 277 out[12][0] = 0.0; │ │ │ │ │ + 278 out[12][1] = 0.0; │ │ │ │ │ + 279 │ │ │ │ │ + 280 out[13][0] = 0.0; │ │ │ │ │ + 281 out[13][1] = 6.0 - 12.0*in[1]; │ │ │ │ │ + 282 break; │ │ │ │ │ + 283 default: │ │ │ │ │ + 284 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ + 285 } │ │ │ │ │ + 286 } else { │ │ │ │ │ + 287 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ + 288 } │ │ │ │ │ + 289 } │ │ │ │ │ + 290 │ │ │ │ │ +292 unsigned int order() const │ │ │ │ │ + 293 { │ │ │ │ │ + 294 return 3; │ │ │ │ │ + 295 } │ │ │ │ │ + 296 │ │ │ │ │ + 297 private: │ │ │ │ │ + 298 std::array sign_; │ │ │ │ │ + 299 }; │ │ │ │ │ + 300} // end namespace Dune │ │ │ │ │ + 301#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALBASIS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface │ │ │ │ │ -virtual base class for local finite elements with functions │ │ │ │ │ -Definition virtualinterface.hh:286 │ │ │ │ │ -Dune::LocalFiniteElementVirtualImp │ │ │ │ │ -class for wrapping a finite element using the virtual interface │ │ │ │ │ -Definition virtualwrappers.hh:240 │ │ │ │ │ -Dune::DualP1LocalFiniteElement │ │ │ │ │ -The local dual p1 finite element on simplices. │ │ │ │ │ -Definition dualp1.hh:35 │ │ │ │ │ -Dune::DualPQ1LocalFiniteElementCache │ │ │ │ │ -Definition dualpq1factory.hh:19 │ │ │ │ │ -Dune::DualPQ1LocalFiniteElementCache::DualP1 │ │ │ │ │ -Dune::DualP1LocalFiniteElement< D, R, dim, faceDual > DualP1 │ │ │ │ │ -Definition dualpq1factory.hh:21 │ │ │ │ │ -Dune::DualPQ1LocalFiniteElementCache::~DualPQ1LocalFiniteElementCache │ │ │ │ │ -~DualPQ1LocalFiniteElementCache() │ │ │ │ │ -Definition dualpq1factory.hh:31 │ │ │ │ │ -Dune::DualPQ1LocalFiniteElementCache::cache_ │ │ │ │ │ -FEMap cache_ │ │ │ │ │ -Definition dualpq1factory.hh:67 │ │ │ │ │ -Dune::DualPQ1LocalFiniteElementCache::T │ │ │ │ │ -DualP1::Traits::LocalBasisType::Traits T │ │ │ │ │ -Definition dualpq1factory.hh:23 │ │ │ │ │ -Dune::DualPQ1LocalFiniteElementCache::create │ │ │ │ │ -static FE * create(const Dune::GeometryType >) │ │ │ │ │ -create finite element for given GeometryType │ │ │ │ │ -Definition dualpq1factory.hh:40 │ │ │ │ │ -Dune::DualPQ1LocalFiniteElementCache::FiniteElementType │ │ │ │ │ -FE FiniteElementType │ │ │ │ │ -Type of the finite elements stored in this cache. │ │ │ │ │ -Definition dualpq1factory.hh:29 │ │ │ │ │ -Dune::DualPQ1LocalFiniteElementCache::get │ │ │ │ │ -const FiniteElementType & get(const Dune::GeometryType >) const │ │ │ │ │ -Get local finite element for given GeometryType. │ │ │ │ │ -Definition dualpq1factory.hh:50 │ │ │ │ │ -Dune::DualPQ1LocalFiniteElementCache::FE │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface< T > FE │ │ │ │ │ -Definition dualpq1factory.hh:24 │ │ │ │ │ -Dune::DualPQ1LocalFiniteElementCache::FEMap │ │ │ │ │ -std::map< Dune::GeometryType, FE * > FEMap │ │ │ │ │ -Definition dualpq1factory.hh:25 │ │ │ │ │ -Dune::DualPQ1LocalFiniteElementCache::DualQ1 │ │ │ │ │ -Dune::DualQ1LocalFiniteElement< D, R, dim, faceDual > DualQ1 │ │ │ │ │ -Definition dualpq1factory.hh:22 │ │ │ │ │ -Dune::DualQ1LocalFiniteElement │ │ │ │ │ -The local dual Q1 finite element on cubes. │ │ │ │ │ -Definition dualq1.hh:42 │ │ │ │ │ +Dune::BDM2Cube2DLocalBasis │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalbasis.hh:30 │ │ │ │ │ +Dune::BDM2Cube2DLocalBasis::partial │ │ │ │ │ +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 brezzidouglasmarini2cube2dlocalbasis.hh:185 │ │ │ │ │ +Dune::BDM2Cube2DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalbasis.hh:292 │ │ │ │ │ +Dune::BDM2Cube2DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalbasis.hh:67 │ │ │ │ │ +Dune::BDM2Cube2DLocalBasis::BDM2Cube2DLocalBasis │ │ │ │ │ +BDM2Cube2DLocalBasis() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalbasis.hh:38 │ │ │ │ │ +Dune::BDM2Cube2DLocalBasis::BDM2Cube2DLocalBasis │ │ │ │ │ +BDM2Cube2DLocalBasis(std::bitset< 4 > s) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalbasis.hh:49 │ │ │ │ │ +Dune::BDM2Cube2DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalbasis.hh:35 │ │ │ │ │ +Dune::BDM2Cube2DLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalbasis.hh:56 │ │ │ │ │ +Dune::BDM2Cube2DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalbasis.hh:108 │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00473.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini2cube2dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualp1.hh File Reference
│ │ │ │ +
brezzidouglasmarini2cube2dlocalinterpolation.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 <vector>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.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::BDM2Cube2DLocalInterpolation< LB >
 First order Brezzi-Douglas-Marini shape functions on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini2cube2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -dualp1.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "dualp1/dualp1localbasis.hh" │ │ │ │ │ -#include "dualp1/dualp1localcoefficients.hh" │ │ │ │ │ -#include "dualp1/dualp1localinterpolation.hh" │ │ │ │ │ +brezzidouglasmarini2cube2dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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::BDM2Cube2DLocalInterpolation<_LB_> │ │ │ │ │ +  First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00473_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini2cube2dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,118 +70,157 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualp1.hh
│ │ │ │ +
brezzidouglasmarini2cube2dlocalinterpolation.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
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ +
8#include <vector>
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
24 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27
│ │ │ │ +
28 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
31 {
│ │ │ │ +
32 sign0 = sign1 = sign2 = sign3 = 1.0;
│ │ │ │ +
33 }
│ │ │ │ +
│ │ │ │ +
34
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
41 {
│ │ │ │ +
42 sign0 = sign1 = sign2 = sign3 = 1.0;
│ │ │ │ +
43 if (s & 1)
│ │ │ │ +
44 {
│ │ │ │ +
45 sign0 = -1.0;
│ │ │ │ +
46 }
│ │ │ │ +
47 if (s & 2)
│ │ │ │ +
48 {
│ │ │ │ +
49 sign1 = -1.0;
│ │ │ │ +
50 }
│ │ │ │ +
51 if (s & 4)
│ │ │ │ +
52 {
│ │ │ │ +
53 sign2 = -1.0;
│ │ │ │ +
54 }
│ │ │ │ +
55 if (s & 8)
│ │ │ │ +
56 {
│ │ │ │ +
57 sign3 = -1.0;
│ │ │ │ +
58 }
│ │ │ │ +
59
│ │ │ │ +
60 n0[0] = -1.0;
│ │ │ │ +
61 n0[1] = 0.0;
│ │ │ │ +
62 n1[0] = 1.0;
│ │ │ │ +
63 n1[1] = 0.0;
│ │ │ │ +
64 n2[0] = 0.0;
│ │ │ │ +
65 n2[1] = -1.0;
│ │ │ │ +
66 n3[0] = 0.0;
│ │ │ │ +
67 n3[1] = 1.0;
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
78 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
79 void interpolate(const F& ff, std::vector<C>& out) const
│ │ │ │ +
80 {
│ │ │ │ +
81 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
82 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
83 typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │ +
84
│ │ │ │ +
85 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │
86
│ │ │ │ -
87
│ │ │ │ -
88
│ │ │ │ -
89}
│ │ │ │ -
90
│ │ │ │ -
91#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
87 out.resize(14);
│ │ │ │ +
88 fill(out.begin(), out.end(), 0.0);
│ │ │ │ +
89
│ │ │ │ +
90 const int qOrder = 4;
│ │ │ │ +
91 const QuadratureRule<Scalar,1>& rule = QuadratureRules<Scalar,1>::rule(GeometryTypes::cube(1), qOrder);
│ │ │ │ +
92
│ │ │ │ +
93 for (typename QuadratureRule<Scalar,1>::const_iterator it = rule.begin();
│ │ │ │ +
94 it != rule.end(); ++it)
│ │ │ │ +
95 {
│ │ │ │ +
96 Scalar qPos = it->position();
│ │ │ │ +
97
│ │ │ │ +
98 typename LB::Traits::DomainType localPos;
│ │ │ │ +
99
│ │ │ │ +
100 localPos[0] = 0.0;
│ │ │ │ +
101 localPos[1] = qPos;
│ │ │ │ +
102 auto y = f(localPos);
│ │ │ │ +
103 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0;
│ │ │ │ +
104 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight();
│ │ │ │ +
105 out[2] += (y[0]*n0[0] + y[1]*n0[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it->weight()*sign0;
│ │ │ │ +
106
│ │ │ │ +
107 localPos[0] = 1.0;
│ │ │ │ +
108 localPos[1] = qPos;
│ │ │ │ +
109 y = f(localPos);
│ │ │ │ +
110 out[3] += (y[0]*n1[0]+y[1]*n1[1])*it->weight()*sign1;
│ │ │ │ +
111 out[4] += (y[0]*n1[0]+y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight();
│ │ │ │ +
112 out[5] += (y[0]*n1[0]+y[1]*n1[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it->weight()*sign1;
│ │ │ │ +
113
│ │ │ │ +
114 localPos[0] = qPos;
│ │ │ │ +
115 localPos[1] = 0.0;
│ │ │ │ +
116 y = f(localPos);
│ │ │ │ +
117 out[6] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2;
│ │ │ │ +
118 out[7] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight();
│ │ │ │ +
119 out[8] += (y[0]*n2[0] + y[1]*n2[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it->weight()*sign2;
│ │ │ │ +
120
│ │ │ │ +
121 localPos[0] = qPos;
│ │ │ │ +
122 localPos[1] = 1.0;
│ │ │ │ +
123 y = f(localPos);
│ │ │ │ +
124 out[9] += (y[0]*n3[0] + y[1]*n3[1])*it->weight()*sign3;
│ │ │ │ +
125 out[10] += (y[0]*n3[0] + y[1]*n3[1])*(2.0*qPos - 1.0)*it->weight();
│ │ │ │ +
126 out[11] += (y[0]*n3[0] + y[1]*n3[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it->weight()*sign3;
│ │ │ │ +
127 }
│ │ │ │ +
128
│ │ │ │ +
129 const QuadratureRule<Vector,2>& rule2 = QuadratureRules<Vector,2>::rule(GeometryTypes::cube(2), qOrder);
│ │ │ │ +
130
│ │ │ │ +
131 for (typename QuadratureRule<Vector,2>::const_iterator it=rule2.begin(); it!=rule2.end(); ++it)
│ │ │ │ +
132 {
│ │ │ │ +
133 auto y = f(it->position());
│ │ │ │ +
134 out[12] += y[0]*it->weight();
│ │ │ │ +
135 out[13] += y[1]*it->weight();
│ │ │ │ +
136 }
│ │ │ │ +
137 }
│ │ │ │ +
│ │ │ │ +
138
│ │ │ │ +
139 private:
│ │ │ │ +
140 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3;
│ │ │ │ +
141 typename LB::Traits::DomainType n0, n1, n2, n3;
│ │ │ │ +
142 };
│ │ │ │ +
│ │ │ │ +
143} // end namespace Dune
│ │ │ │ +
144#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALINTERPOLATION_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
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:26
│ │ │ │ +
BDM2Cube2DLocalInterpolation(unsigned int s)
Make set number s, where 0 <= s < 16.
Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:40
│ │ │ │ +
BDM2Cube2DLocalInterpolation()
Standard constructor.
Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:30
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:79
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,132 +7,164 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ -dualp1.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini2cube2d │ │ │ │ │ +brezzidouglasmarini2cube2dlocalinterpolation.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 │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include "dualp1/dualp1localbasis.hh" │ │ │ │ │ - 12#include "dualp1/dualp1localcoefficients.hh" │ │ │ │ │ - 13#include "dualp1/dualp1localinterpolation.hh" │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 17 │ │ │ │ │ - 33 template │ │ │ │ │ -34 class DualP1LocalFiniteElement │ │ │ │ │ - 35 { │ │ │ │ │ - 36 public: │ │ │ │ │ - 39 typedef │ │ │ │ │ -LocalFiniteElementTraits,DualP1LocalCoefficients, │ │ │ │ │ -40 DualP1LocalInterpolation > > Traits; │ │ │ │ │ - 41 │ │ │ │ │ -44 DualP1LocalFiniteElement () │ │ │ │ │ - 45 {} │ │ │ │ │ - 46 │ │ │ │ │ -49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 50 { │ │ │ │ │ - 51 return basis; │ │ │ │ │ - 52 } │ │ │ │ │ - 53 │ │ │ │ │ -56 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 57 { │ │ │ │ │ - 58 return coefficients; │ │ │ │ │ - 59 } │ │ │ │ │ - 60 │ │ │ │ │ -63 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 82 DualP1LocalBasis basis; │ │ │ │ │ - 83 DualP1LocalCoefficients coefficients; │ │ │ │ │ - 84 DualP1LocalInterpolation > │ │ │ │ │ -interpolation; │ │ │ │ │ - 85 }; │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ + 24 template │ │ │ │ │ +25 class BDM2Cube2DLocalInterpolation │ │ │ │ │ + 26 { │ │ │ │ │ + 27 │ │ │ │ │ + 28 public: │ │ │ │ │ +30 BDM2Cube2DLocalInterpolation() │ │ │ │ │ + 31 { │ │ │ │ │ + 32 sign0 = sign1 = sign2 = sign3 = 1.0; │ │ │ │ │ + 33 } │ │ │ │ │ + 34 │ │ │ │ │ +40 BDM2Cube2DLocalInterpolation(unsigned int s) │ │ │ │ │ + 41 { │ │ │ │ │ + 42 sign0 = sign1 = sign2 = sign3 = 1.0; │ │ │ │ │ + 43 if (s & 1) │ │ │ │ │ + 44 { │ │ │ │ │ + 45 sign0 = -1.0; │ │ │ │ │ + 46 } │ │ │ │ │ + 47 if (s & 2) │ │ │ │ │ + 48 { │ │ │ │ │ + 49 sign1 = -1.0; │ │ │ │ │ + 50 } │ │ │ │ │ + 51 if (s & 4) │ │ │ │ │ + 52 { │ │ │ │ │ + 53 sign2 = -1.0; │ │ │ │ │ + 54 } │ │ │ │ │ + 55 if (s & 8) │ │ │ │ │ + 56 { │ │ │ │ │ + 57 sign3 = -1.0; │ │ │ │ │ + 58 } │ │ │ │ │ + 59 │ │ │ │ │ + 60 n0[0] = -1.0; │ │ │ │ │ + 61 n0[1] = 0.0; │ │ │ │ │ + 62 n1[0] = 1.0; │ │ │ │ │ + 63 n1[1] = 0.0; │ │ │ │ │ + 64 n2[0] = 0.0; │ │ │ │ │ + 65 n2[1] = -1.0; │ │ │ │ │ + 66 n3[0] = 0.0; │ │ │ │ │ + 67 n3[1] = 1.0; │ │ │ │ │ + 68 } │ │ │ │ │ + 69 │ │ │ │ │ + 78 template │ │ │ │ │ +79 void interpolate(const F& ff, std::vector& out) const │ │ │ │ │ + 80 { │ │ │ │ │ + 81 // f gives v*outer normal at a point on the edge! │ │ │ │ │ + 82 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ + 83 typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ + 84 │ │ │ │ │ + 85 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ 86 │ │ │ │ │ - 87 │ │ │ │ │ - 88 │ │ │ │ │ - 89} │ │ │ │ │ - 90 │ │ │ │ │ - 91#endif │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -dualp1localcoefficients.hh │ │ │ │ │ -dualp1localinterpolation.hh │ │ │ │ │ -dualp1localbasis.hh │ │ │ │ │ + 87 out.resize(14); │ │ │ │ │ + 88 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ + 89 │ │ │ │ │ + 90 const int qOrder = 4; │ │ │ │ │ + 91 const QuadratureRule& rule = QuadratureRules::rule │ │ │ │ │ +(GeometryTypes::cube(1), qOrder); │ │ │ │ │ + 92 │ │ │ │ │ + 93 for (typename QuadratureRule::const_iterator it = rule.begin(); │ │ │ │ │ + 94 it != rule.end(); ++it) │ │ │ │ │ + 95 { │ │ │ │ │ + 96 Scalar qPos = it->position(); │ │ │ │ │ + 97 │ │ │ │ │ + 98 typename LB::Traits::DomainType localPos; │ │ │ │ │ + 99 │ │ │ │ │ + 100 localPos[0] = 0.0; │ │ │ │ │ + 101 localPos[1] = qPos; │ │ │ │ │ + 102 auto y = f(localPos); │ │ │ │ │ + 103 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0; │ │ │ │ │ + 104 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight(); │ │ │ │ │ + 105 out[2] += (y[0]*n0[0] + y[1]*n0[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it- │ │ │ │ │ +>weight()*sign0; │ │ │ │ │ + 106 │ │ │ │ │ + 107 localPos[0] = 1.0; │ │ │ │ │ + 108 localPos[1] = qPos; │ │ │ │ │ + 109 y = f(localPos); │ │ │ │ │ + 110 out[3] += (y[0]*n1[0]+y[1]*n1[1])*it->weight()*sign1; │ │ │ │ │ + 111 out[4] += (y[0]*n1[0]+y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight(); │ │ │ │ │ + 112 out[5] += (y[0]*n1[0]+y[1]*n1[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it- │ │ │ │ │ +>weight()*sign1; │ │ │ │ │ + 113 │ │ │ │ │ + 114 localPos[0] = qPos; │ │ │ │ │ + 115 localPos[1] = 0.0; │ │ │ │ │ + 116 y = f(localPos); │ │ │ │ │ + 117 out[6] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2; │ │ │ │ │ + 118 out[7] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight(); │ │ │ │ │ + 119 out[8] += (y[0]*n2[0] + y[1]*n2[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it- │ │ │ │ │ +>weight()*sign2; │ │ │ │ │ + 120 │ │ │ │ │ + 121 localPos[0] = qPos; │ │ │ │ │ + 122 localPos[1] = 1.0; │ │ │ │ │ + 123 y = f(localPos); │ │ │ │ │ + 124 out[9] += (y[0]*n3[0] + y[1]*n3[1])*it->weight()*sign3; │ │ │ │ │ + 125 out[10] += (y[0]*n3[0] + y[1]*n3[1])*(2.0*qPos - 1.0)*it->weight(); │ │ │ │ │ + 126 out[11] += (y[0]*n3[0] + y[1]*n3[1])*(8.0*qPos*qPos - 8.0*qPos + 1.0)*it- │ │ │ │ │ +>weight()*sign3; │ │ │ │ │ + 127 } │ │ │ │ │ + 128 │ │ │ │ │ + 129 const QuadratureRule& rule2 = QuadratureRules::rule │ │ │ │ │ +(GeometryTypes::cube(2), qOrder); │ │ │ │ │ + 130 │ │ │ │ │ + 131 for (typename QuadratureRule::const_iterator it=rule2.begin(); │ │ │ │ │ +it!=rule2.end(); ++it) │ │ │ │ │ + 132 { │ │ │ │ │ + 133 auto y = f(it->position()); │ │ │ │ │ + 134 out[12] += y[0]*it->weight(); │ │ │ │ │ + 135 out[13] += y[1]*it->weight(); │ │ │ │ │ + 136 } │ │ │ │ │ + 137 } │ │ │ │ │ + 138 │ │ │ │ │ + 139 private: │ │ │ │ │ + 140 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3; │ │ │ │ │ + 141 typename LB::Traits::DomainType n0, n1, n2, n3; │ │ │ │ │ + 142 }; │ │ │ │ │ + 143} // end namespace Dune │ │ │ │ │ + 144#endif / │ │ │ │ │ +/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::DualP1LocalFiniteElement │ │ │ │ │ -The local dual p1 finite element on simplices. │ │ │ │ │ -Definition dualp1.hh:35 │ │ │ │ │ -Dune::DualP1LocalFiniteElement::DualP1LocalFiniteElement │ │ │ │ │ -DualP1LocalFiniteElement() │ │ │ │ │ -Definition dualp1.hh:44 │ │ │ │ │ -Dune::DualP1LocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition dualp1.hh:69 │ │ │ │ │ -Dune::DualP1LocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< DualP1LocalBasis< D, R, dim, faceDual >, │ │ │ │ │ -DualP1LocalCoefficients< dim >, DualP1LocalInterpolation< dim, │ │ │ │ │ -DualP1LocalBasis< D, R, dim, faceDual > > > Traits │ │ │ │ │ -Definition dualp1.hh:40 │ │ │ │ │ -Dune::DualP1LocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition dualp1.hh:63 │ │ │ │ │ -Dune::DualP1LocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition dualp1.hh:49 │ │ │ │ │ -Dune::DualP1LocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition dualp1.hh:56 │ │ │ │ │ -Dune::DualP1LocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition dualp1.hh:76 │ │ │ │ │ -Dune::DualP1LocalBasis │ │ │ │ │ -Dual Lagrange shape functions on the simplex. │ │ │ │ │ -Definition dualp1localbasis.hh:34 │ │ │ │ │ -Dune::DualP1LocalCoefficients │ │ │ │ │ -Local coefficients for dual simplex P1 elements. │ │ │ │ │ -Definition dualp1localcoefficients.hh:23 │ │ │ │ │ -Dune::DualP1LocalInterpolation │ │ │ │ │ -Definition dualp1localinterpolation.hh:15 │ │ │ │ │ +Dune::BDM2Cube2DLocalInterpolation │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:26 │ │ │ │ │ +Dune::BDM2Cube2DLocalInterpolation::BDM2Cube2DLocalInterpolation │ │ │ │ │ +BDM2Cube2DLocalInterpolation(unsigned int s) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:40 │ │ │ │ │ +Dune::BDM2Cube2DLocalInterpolation::BDM2Cube2DLocalInterpolation │ │ │ │ │ +BDM2Cube2DLocalInterpolation() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:30 │ │ │ │ │ +Dune::BDM2Cube2DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:79 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00476.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1localinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini1cube2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualq1localinterpolation.hh File Reference
│ │ │ │ +
brezzidouglasmarini1cube2d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::DualQ1LocalInterpolation< dim, LB >
class  Dune::BDM1Cube2DLocalFiniteElement< D, R >
 First order Brezzi-Douglas-Marini shape functions on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ - * dualq1 │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -dualq1localinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +brezzidouglasmarini1cube2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ +#include "brezzidouglasmarini1cube2d/brezzidouglasmarini1cube2dlocalbasis.hh" │ │ │ │ │ +#include "brezzidouglasmarini1cube2d/ │ │ │ │ │ +brezzidouglasmarini1cube2dlocalcoefficients.hh" │ │ │ │ │ +#include "brezzidouglasmarini1cube2d/ │ │ │ │ │ +brezzidouglasmarini1cube2dlocalinterpolation.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::DualQ1LocalInterpolation<_dim,_LB_> │ │ │ │ │ +class  Dune::BDM1Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ +  First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00476_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1localinterpolation.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini1cube2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,110 +70,123 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualq1localinterpolation.hh
│ │ │ │ +
brezzidouglasmarini1cube2d.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ -
12#include <dune/common/fmatrix.hh>
│ │ │ │ - │ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ +
10#include "../common/localfiniteelementtraits.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 }
│ │ │ │ -
│ │ │ │ +
25 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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;
│ │ │ │ -
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;
│ │ │ │ -
59
│ │ │ │ -
60 for (int i=0; i<size; i++)
│ │ │ │ -
61 for (int j=0; j<size; j++)
│ │ │ │ -
62 mat[i][j] = coefficients_[j][i];
│ │ │ │ +
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
│ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ -
77
│ │ │ │ -
78}
│ │ │ │ -
79
│ │ │ │ -
80#endif
│ │ │ │ +
│ │ │ │ +
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 BDM1Cube2DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
79 };
│ │ │ │ +
│ │ │ │ +
80}
│ │ │ │ +
81#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini1cube2d.hh:27
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition brezzidouglasmarini1cube2d.hh:49
│ │ │ │ +
LocalFiniteElementTraits< BDM1Cube2DLocalBasis< D, R >, BDM1Cube2DLocalCoefficients, BDM1Cube2DLocalInterpolation< BDM1Cube2DLocalBasis< D, R > > > Traits
Definition brezzidouglasmarini1cube2d.hh:33
│ │ │ │ +
static constexpr GeometryType type()
Definition brezzidouglasmarini1cube2d.hh:70
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition brezzidouglasmarini1cube2d.hh:54
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition brezzidouglasmarini1cube2d.hh:65
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition brezzidouglasmarini1cube2d.hh:59
│ │ │ │ +
BDM1Cube2DLocalFiniteElement()
Standard constructor.
Definition brezzidouglasmarini1cube2d.hh:36
│ │ │ │ +
BDM1Cube2DLocalFiniteElement(int s)
Make set number s, where 0 <= s < 16.
Definition brezzidouglasmarini1cube2d.hh:44
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral.
Definition brezzidouglasmarini1cube2dlocalbasis.hh:30
│ │ │ │ +
Layout map for Brezzi-Douglas-Marini-1 elements on quadrilaterals.
Definition brezzidouglasmarini1cube2dlocalcoefficients.hh:24
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral.
Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:26
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,108 +7,144 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ - * dualq1 │ │ │ │ │ -dualq1localinterpolation.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ +brezzidouglasmarini1cube2d.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ + 11#include "brezzidouglasmarini1cube2d/ │ │ │ │ │ +brezzidouglasmarini1cube2dlocalbasis.hh" │ │ │ │ │ + 12#include "brezzidouglasmarini1cube2d/ │ │ │ │ │ +brezzidouglasmarini1cube2dlocalcoefficients.hh" │ │ │ │ │ + 13#include "brezzidouglasmarini1cube2d/ │ │ │ │ │ +brezzidouglasmarini1cube2dlocalinterpolation.hh" │ │ │ │ │ 14 │ │ │ │ │ 15namespace Dune │ │ │ │ │ 16{ │ │ │ │ │ - 17 │ │ │ │ │ - 19 template │ │ │ │ │ -20 class DualQ1LocalInterpolation │ │ │ │ │ - 21 { │ │ │ │ │ - 22 public: │ │ │ │ │ - 23 │ │ │ │ │ -24 void setCoefficients(const std::array ,(1<& coefficients) │ │ │ │ │ - 25 { │ │ │ │ │ - 26 coefficients_ = coefficients; │ │ │ │ │ - 27 } │ │ │ │ │ + 25 template │ │ │ │ │ +26 class BDM1Cube2DLocalFiniteElement │ │ │ │ │ + 27 { │ │ │ │ │ 28 │ │ │ │ │ - 29 │ │ │ │ │ - 31 template │ │ │ │ │ -32 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ - 33 { │ │ │ │ │ - 34 typename LB::Traits::DomainType x; │ │ │ │ │ - 35 │ │ │ │ │ - 36 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ - 37 │ │ │ │ │ - 38 const int size = 1< q1Coefficients; │ │ │ │ │ - 42 │ │ │ │ │ - 43 for (int i=0; i< (1< mat; │ │ │ │ │ - 59 │ │ │ │ │ - 60 for (int i=0; i, │ │ │ │ │ + 32 BDM1Cube2DLocalCoefficients, │ │ │ │ │ +33 BDM1Cube2DLocalInterpolation > > Traits; │ │ │ │ │ + 34 │ │ │ │ │ +36 BDM1Cube2DLocalFiniteElement () │ │ │ │ │ + 37 {} │ │ │ │ │ + 38 │ │ │ │ │ +44 BDM1Cube2DLocalFiniteElement (int s) : │ │ │ │ │ + 45 basis(s), │ │ │ │ │ + 46 interpolation(s) │ │ │ │ │ + 47 {} │ │ │ │ │ + 48 │ │ │ │ │ +49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 50 { │ │ │ │ │ + 51 return basis; │ │ │ │ │ + 52 } │ │ │ │ │ + 53 │ │ │ │ │ +54 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 55 { │ │ │ │ │ + 56 return coefficients; │ │ │ │ │ + 57 } │ │ │ │ │ + 58 │ │ │ │ │ +59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 60 { │ │ │ │ │ + 61 return interpolation; │ │ │ │ │ + 62 } │ │ │ │ │ 63 │ │ │ │ │ - 64 // now solve for the weights │ │ │ │ │ - 65 Dune::FieldVector sol(0); │ │ │ │ │ - 66 │ │ │ │ │ - 67 mat.solve(sol,q1Coefficients); │ │ │ │ │ - 68 │ │ │ │ │ - 69 // write result in out vector │ │ │ │ │ - 70 for (int i=0; i │ │ │ │ │ -,(1< coefficients_; │ │ │ │ │ - 76 }; │ │ │ │ │ - 77 │ │ │ │ │ - 78} │ │ │ │ │ - 79 │ │ │ │ │ - 80#endif │ │ │ │ │ +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: │ │ │ │ │ + 76 BDM1Cube2DLocalBasis basis; │ │ │ │ │ + 77 BDM1Cube2DLocalCoefficients coefficients; │ │ │ │ │ + 78 BDM1Cube2DLocalInterpolation > interpolation; │ │ │ │ │ + 79 }; │ │ │ │ │ + 80} │ │ │ │ │ + 81#endif / │ │ │ │ │ +/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_QUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +brezzidouglasmarini1cube2dlocalcoefficients.hh │ │ │ │ │ +brezzidouglasmarini1cube2dlocalinterpolation.hh │ │ │ │ │ +brezzidouglasmarini1cube2dlocalbasis.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::DualQ1LocalInterpolation │ │ │ │ │ -Definition dualq1localinterpolation.hh:21 │ │ │ │ │ -Dune::DualQ1LocalInterpolation::setCoefficients │ │ │ │ │ -void setCoefficients(const std::array< Dune::FieldVector< typename LB::Traits:: │ │ │ │ │ -RangeFieldType,(1<< dim)>,(1<< dim)> &coefficients) │ │ │ │ │ -Definition dualq1localinterpolation.hh:24 │ │ │ │ │ -Dune::DualQ1LocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Local interpolation of a function. │ │ │ │ │ -Definition dualq1localinterpolation.hh:32 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::BDM1Cube2DLocalFiniteElement │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ +Definition brezzidouglasmarini1cube2d.hh:27 │ │ │ │ │ +Dune::BDM1Cube2DLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition brezzidouglasmarini1cube2d.hh:49 │ │ │ │ │ +Dune::BDM1Cube2DLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< BDM1Cube2DLocalBasis< D, R >, │ │ │ │ │ +BDM1Cube2DLocalCoefficients, BDM1Cube2DLocalInterpolation< │ │ │ │ │ +BDM1Cube2DLocalBasis< D, R > > > Traits │ │ │ │ │ +Definition brezzidouglasmarini1cube2d.hh:33 │ │ │ │ │ +Dune::BDM1Cube2DLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition brezzidouglasmarini1cube2d.hh:70 │ │ │ │ │ +Dune::BDM1Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition brezzidouglasmarini1cube2d.hh:54 │ │ │ │ │ +Dune::BDM1Cube2DLocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition brezzidouglasmarini1cube2d.hh:65 │ │ │ │ │ +Dune::BDM1Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition brezzidouglasmarini1cube2d.hh:59 │ │ │ │ │ +Dune::BDM1Cube2DLocalFiniteElement::BDM1Cube2DLocalFiniteElement │ │ │ │ │ +BDM1Cube2DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini1cube2d.hh:36 │ │ │ │ │ +Dune::BDM1Cube2DLocalFiniteElement::BDM1Cube2DLocalFiniteElement │ │ │ │ │ +BDM1Cube2DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +Definition brezzidouglasmarini1cube2d.hh:44 │ │ │ │ │ +Dune::BDM1Cube2DLocalBasis │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ +quadrilateral. │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalbasis.hh:30 │ │ │ │ │ +Dune::BDM1Cube2DLocalCoefficients │ │ │ │ │ +Layout map for Brezzi-Douglas-Marini-1 elements on quadrilaterals. │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::BDM1Cube2DLocalInterpolation │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ +quadrilateral. │ │ │ │ │ +Definition brezzidouglasmarini1cube2dlocalinterpolation.hh:26 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00479.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1localbasis.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarinicube.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualq1localbasis.hh File Reference
│ │ │ │ +
brezzidouglasmarinicube.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#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::DualQ1LocalBasis< D, R, dim >
 Dual Lagrange shape functions of order 1 on the reference cube. More...
class  Dune::BrezziDouglasMariniCubeLocalFiniteElement< D, R, 2, 1 >
 Brezzi-Douglas-Marini local finite elements for cubes with dimension 2 and order 1. More...
 
class  Dune::BrezziDouglasMariniCubeLocalFiniteElement< D, R, 2, 2 >
 Brezzi-Douglas-Marini local finite elements for cubes with dimension 2 and order 2. More...
 
class  Dune::BrezziDouglasMariniCubeLocalFiniteElement< D, R, 3, 1 >
 Brezzi-Douglas-Marini local finite elements for cubes with dimension 3 and order 1. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,27 +6,36 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ - * dualq1 │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -dualq1localbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +brezzidouglasmarinicube.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_2,_1_> │ │ │ │ │ +  Brezzi-Douglas-Marini local finite elements for cubes with dimension 2 │ │ │ │ │ + and order 1. More... │ │ │ │ │ +  │ │ │ │ │ +class  Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_2,_2_> │ │ │ │ │ +  Brezzi-Douglas-Marini local finite elements for cubes with dimension 2 │ │ │ │ │ + and order 2. More... │ │ │ │ │ +  │ │ │ │ │ +class  Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_3,_1_> │ │ │ │ │ +  Brezzi-Douglas-Marini local finite elements for cubes with dimension 3 │ │ │ │ │ + and order 1. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00479_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1localbasis.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarinicube.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,171 +70,112 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualq1localbasis.hh
│ │ │ │ +
brezzidouglasmarinicube.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINICUBE_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINICUBE_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <numeric>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ -
12#include <dune/common/fmatrix.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ -
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;
│ │ │ │ -
37 }
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ -
40 unsigned int size () const
│ │ │ │ -
41 {
│ │ │ │ -
42 return 1<<dim;
│ │ │ │ -
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];
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
23 template<class D, class R, unsigned int dim, unsigned int order>
│ │ │ │ + │ │ │ │ +
25
│ │ │ │ +
29 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
31 : public BDM1Cube2DLocalFiniteElement<D, R>
│ │ │ │ +
32 {
│ │ │ │ +
33 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 {}
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
45 {}
│ │ │ │ +
│ │ │ │ +
46 };
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
51 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
53 : public BDM2Cube2DLocalFiniteElement<D, R>
│ │ │ │ +
54 {
│ │ │ │ +
55 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
58 {}
│ │ │ │ +
│ │ │ │
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());
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
67 {}
│ │ │ │ +
│ │ │ │ +
68 };
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
73 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
75 : public BDM1Cube3DLocalFiniteElement<D, R>
│ │ │ │ +
76 {
│ │ │ │ +
77 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
80 {}
│ │ │ │ +
│ │ │ │
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;
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
89 {}
│ │ │ │ +
│ │ │ │ +
90 };
│ │ │ │ +
│ │ │ │
91
│ │ │ │ -
92 for (int k=0; k<dim; k++) {
│ │ │ │ +
92} // namespace Dune
│ │ │ │
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
│ │ │ │ +
94#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINICUBE_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini1cube2d.hh:27
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on hexahedron.
Definition brezzidouglasmarini1cube3d.hh:27
│ │ │ │ +
Second order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2cube2d.hh:27
│ │ │ │ +
Brezzi-Douglas-Marini local finite element for cubes.
Definition brezzidouglasmarinicube.hh:24
│ │ │ │ +
BrezziDouglasMariniCubeLocalFiniteElement(int s)
Constructor with a set of edge orientations.
Definition brezzidouglasmarinicube.hh:43
│ │ │ │ +
BrezziDouglasMariniCubeLocalFiniteElement()
Default constructor.
Definition brezzidouglasmarinicube.hh:35
│ │ │ │ +
BrezziDouglasMariniCubeLocalFiniteElement()
Default constructor.
Definition brezzidouglasmarinicube.hh:57
│ │ │ │ +
BrezziDouglasMariniCubeLocalFiniteElement(int s)
Constructor with a set of edge orientations.
Definition brezzidouglasmarinicube.hh:65
│ │ │ │ +
BrezziDouglasMariniCubeLocalFiniteElement()
Default constructor.
Definition brezzidouglasmarinicube.hh:79
│ │ │ │ +
BrezziDouglasMariniCubeLocalFiniteElement(int s)
Constructor with a set of edge orientations.
Definition brezzidouglasmarinicube.hh:87
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,187 +7,124 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ - * dualq1 │ │ │ │ │ -dualq1localbasis.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ +brezzidouglasmarinicube.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINICUBE_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINICUBE_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15 │ │ │ │ │ - 16namespace Dune │ │ │ │ │ - 17{ │ │ │ │ │ - 27 template │ │ │ │ │ -28 class DualQ1LocalBasis │ │ │ │ │ - 29 { │ │ │ │ │ - 30 public: │ │ │ │ │ - 31 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -32 Dune::FieldMatrix > Traits; │ │ │ │ │ - 33 │ │ │ │ │ -34 void setCoefficients(const std::array , │ │ │ │ │ -(1<& coefficients) │ │ │ │ │ - 35 { │ │ │ │ │ - 36 coefficients_ = coefficients; │ │ │ │ │ - 37 } │ │ │ │ │ - 38 │ │ │ │ │ -40 unsigned int size () const │ │ │ │ │ - 41 { │ │ │ │ │ - 42 return 1<& out) const │ │ │ │ │ - 48 { │ │ │ │ │ - 49 // compute q1 values │ │ │ │ │ - 50 std::vector q1Values(size()); │ │ │ │ │ - 51 │ │ │ │ │ - 52 for (size_t i=0; i │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 23 template │ │ │ │ │ +24 class BrezziDouglasMariniCubeLocalFiniteElement; │ │ │ │ │ + 25 │ │ │ │ │ + 29 template │ │ │ │ │ +30 class BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ + 31 : public BDM1Cube2DLocalFiniteElement │ │ │ │ │ + 32 { │ │ │ │ │ + 33 public: │ │ │ │ │ +35 BrezziDouglasMariniCubeLocalFiniteElement() │ │ │ │ │ + 36 {} │ │ │ │ │ + 37 │ │ │ │ │ +43 BrezziDouglasMariniCubeLocalFiniteElement(int s) │ │ │ │ │ + 44 : BDM1Cube2DLocalFiniteElement::BDM1Cube2DLocalFiniteElement(s) │ │ │ │ │ + 45 {} │ │ │ │ │ + 46 }; │ │ │ │ │ + 47 │ │ │ │ │ + 51 template │ │ │ │ │ +52 class BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ + 53 : public BDM2Cube2DLocalFiniteElement │ │ │ │ │ + 54 { │ │ │ │ │ + 55 public: │ │ │ │ │ +57 BrezziDouglasMariniCubeLocalFiniteElement() │ │ │ │ │ + 58 {} │ │ │ │ │ 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& out) const // return value │ │ │ │ │ - 78 { │ │ │ │ │ - 79 // compute q1 jacobians │ │ │ │ │ - 80 std::vector q1Jacs(size()); │ │ │ │ │ +65 BrezziDouglasMariniCubeLocalFiniteElement(int s) │ │ │ │ │ + 66 : BDM2Cube2DLocalFiniteElement::BDM2Cube2DLocalFiniteElement(s) │ │ │ │ │ + 67 {} │ │ │ │ │ + 68 }; │ │ │ │ │ + 69 │ │ │ │ │ + 73 template │ │ │ │ │ +74 class BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ + 75 : public BDM1Cube3DLocalFiniteElement │ │ │ │ │ + 76 { │ │ │ │ │ + 77 public: │ │ │ │ │ +79 BrezziDouglasMariniCubeLocalFiniteElement() │ │ │ │ │ + 80 {} │ │ │ │ │ 81 │ │ │ │ │ - 82 // Loop over all shape functions │ │ │ │ │ - 83 for (size_t i=0; i::BDM1Cube3DLocalFiniteElement(s) │ │ │ │ │ + 89 {} │ │ │ │ │ + 90 }; │ │ │ │ │ 91 │ │ │ │ │ - 92 for (int k=0; k& order, │ │ │ │ │ - 117 const typename Traits::DomainType& in, // position │ │ │ │ │ - 118 std::vector& 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 ,(1< coefficients_; │ │ │ │ │ - 136 }; │ │ │ │ │ - 137} │ │ │ │ │ - 138#endif │ │ │ │ │ + 94#endif // #ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINICUBE_HH │ │ │ │ │ +brezzidouglasmarini1cube3d.hh │ │ │ │ │ +brezzidouglasmarini1cube2d.hh │ │ │ │ │ +brezzidouglasmarini2cube2d.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::DualQ1LocalBasis │ │ │ │ │ -Dual Lagrange shape functions of order 1 on the reference cube. │ │ │ │ │ -Definition dualq1localbasis.hh:29 │ │ │ │ │ -Dune::DualQ1LocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition dualq1localbasis.hh:40 │ │ │ │ │ -Dune::DualQ1LocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition dualq1localbasis.hh:129 │ │ │ │ │ -Dune::DualQ1LocalBasis::setCoefficients │ │ │ │ │ -void setCoefficients(const std::array< Dune::FieldVector< R,(1<< dim)>,(1<< │ │ │ │ │ -dim)> &coefficients) │ │ │ │ │ -Definition dualq1localbasis.hh:34 │ │ │ │ │ -Dune::DualQ1LocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition dualq1localbasis.hh:46 │ │ │ │ │ -Dune::DualQ1LocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune::FieldVector< │ │ │ │ │ -R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits │ │ │ │ │ -Definition dualq1localbasis.hh:32 │ │ │ │ │ -Dune::DualQ1LocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition dualq1localbasis.hh:76 │ │ │ │ │ -Dune::DualQ1LocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -localbasis.hh │ │ │ │ │ +Dune::BDM1Cube2DLocalFiniteElement │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ +Definition brezzidouglasmarini1cube2d.hh:27 │ │ │ │ │ +Dune::BDM1Cube3DLocalFiniteElement │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on hexahedron. │ │ │ │ │ +Definition brezzidouglasmarini1cube3d.hh:27 │ │ │ │ │ +Dune::BDM2Cube2DLocalFiniteElement │ │ │ │ │ +Second order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ +Definition brezzidouglasmarini2cube2d.hh:27 │ │ │ │ │ +Dune::BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ +Brezzi-Douglas-Marini local finite element for cubes. │ │ │ │ │ +Definition brezzidouglasmarinicube.hh:24 │ │ │ │ │ +Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_2,_1_>:: │ │ │ │ │ +BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ +BrezziDouglasMariniCubeLocalFiniteElement(int s) │ │ │ │ │ +Constructor with a set of edge orientations. │ │ │ │ │ +Definition brezzidouglasmarinicube.hh:43 │ │ │ │ │ +Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_2,_1_>:: │ │ │ │ │ +BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ +BrezziDouglasMariniCubeLocalFiniteElement() │ │ │ │ │ +Default constructor. │ │ │ │ │ +Definition brezzidouglasmarinicube.hh:35 │ │ │ │ │ +Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_2,_2_>:: │ │ │ │ │ +BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ +BrezziDouglasMariniCubeLocalFiniteElement() │ │ │ │ │ +Default constructor. │ │ │ │ │ +Definition brezzidouglasmarinicube.hh:57 │ │ │ │ │ +Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_2,_2_>:: │ │ │ │ │ +BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ +BrezziDouglasMariniCubeLocalFiniteElement(int s) │ │ │ │ │ +Constructor with a set of edge orientations. │ │ │ │ │ +Definition brezzidouglasmarinicube.hh:65 │ │ │ │ │ +Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_3,_1_>:: │ │ │ │ │ +BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ +BrezziDouglasMariniCubeLocalFiniteElement() │ │ │ │ │ +Default constructor. │ │ │ │ │ +Definition brezzidouglasmarinicube.hh:79 │ │ │ │ │ +Dune::BrezziDouglasMariniCubeLocalFiniteElement<_D,_R,_3,_1_>:: │ │ │ │ │ +BrezziDouglasMariniCubeLocalFiniteElement │ │ │ │ │ +BrezziDouglasMariniCubeLocalFiniteElement(int s) │ │ │ │ │ +Constructor with a set of edge orientations. │ │ │ │ │ +Definition brezzidouglasmarinicube.hh:87 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00482.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1localcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini1cube3dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualq1localcoefficients.hh File Reference
│ │ │ │ +
brezzidouglasmarini1cube3dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <iostream>
│ │ │ │ +
#include <array>
│ │ │ │ +#include <bitset>
│ │ │ │ +#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::DualQ1LocalCoefficients< dim >
 Layout map for dual Q1 elements. More...
class  Dune::BDM1Cube3DLocalBasis< D, R >
 First order Brezzi-Douglas-Marini shape functions on the reference hexahedron. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ - * dualq1 │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1cube3d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -dualq1localcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +brezzidouglasmarini1cube3dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::DualQ1LocalCoefficients<_dim_> │ │ │ │ │ -  Layout map for dual Q1 elements. More... │ │ │ │ │ +class  Dune::BDM1Cube3DLocalBasis<_D,_R_> │ │ │ │ │ +  First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ + hexahedron. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00482_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1localcoefficients.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini1cube3dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,79 +70,322 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualq1localcoefficients.hh
│ │ │ │ +
brezzidouglasmarini1cube3dlocalbasis.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <iostream>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <bitset>
│ │ │ │ +
10#include <numeric>
│ │ │ │ +
11#include <vector>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/common/fmatrix.hh>
│ │ │ │ +
14
│ │ │ │ +
15#include "../../common/localbasis.hh"
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
46 private:
│ │ │ │ -
47 std::vector<LocalKey> li;
│ │ │ │ -
48 };
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ -
50}
│ │ │ │ -
51
│ │ │ │ -
52#endif
│ │ │ │ - │ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
29 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
31 {
│ │ │ │ +
32
│ │ │ │ +
33 public:
│ │ │ │ + │ │ │ │ +
35 R,3,Dune::FieldVector<R,3>,
│ │ │ │ +
36 Dune::FieldMatrix<R,3,3> > Traits;
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
40 {
│ │ │ │ +
41 for (size_t i=0; i<6; i++)
│ │ │ │ +
42 sign_[i] = 1.0;
│ │ │ │ +
43 }
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ +
50 BDM1Cube3DLocalBasis(std::bitset<6> s)
│ │ │ │ +
51 {
│ │ │ │ +
52 for (size_t i=0; i<6; i++)
│ │ │ │ +
53 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
│ │ │ │ +
57 unsigned int size() const
│ │ │ │ +
58 {
│ │ │ │ +
59 return 18;
│ │ │ │ +
60 }
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
│ │ │ │ +
68 inline void evaluateFunction(const typename Traits::DomainType& in,
│ │ │ │ +
69 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
70 {
│ │ │ │ +
71 out.resize(size());
│ │ │ │ +
72
│ │ │ │ +
73 out[0][0] = sign_[0] * (in[0] - 1.0);
│ │ │ │ +
74 out[0][1] = 0;
│ │ │ │ +
75 out[0][2] = 0;
│ │ │ │ +
76 out[1][0] = sign_[1] * in[0];
│ │ │ │ +
77 out[1][1] = 0;
│ │ │ │ +
78 out[1][2] = 0;
│ │ │ │ +
79 out[2][0] = 0;
│ │ │ │ +
80 out[2][1] = sign_[2] * (in[1] - 1.0);
│ │ │ │ +
81 out[2][2] = 0;
│ │ │ │ +
82 out[3][0] = 0;
│ │ │ │ +
83 out[3][1] = sign_[3] * in[1];
│ │ │ │ +
84 out[3][2] = 0;
│ │ │ │ +
85 out[4][0] = 0;
│ │ │ │ +
86 out[4][1] = 0;
│ │ │ │ +
87 out[4][2] = sign_[4] * (in[2] - 1.0);
│ │ │ │ +
88 out[5][0] = 0;
│ │ │ │ +
89 out[5][1] = 0;
│ │ │ │ +
90 out[5][2] = sign_[5] * in[2];
│ │ │ │ +
91 out[6][0] = 6.0 * in[0] * in[1] - 3 * in[0]-6 * in[1] + 3.0;
│ │ │ │ +
92 out[6][1] = -3.0 * in[1] * in[1] + 3 * in[1];
│ │ │ │ +
93 out[6][2] = 0;
│ │ │ │ +
94 out[7][0] = -6.0 * in[0] * in[1] + 3 * in[0];
│ │ │ │ +
95 out[7][1] = 3.0 * in[1] * in[1] - 3 * in[1];
│ │ │ │ +
96 out[7][2] = 0;
│ │ │ │ +
97 out[8][0] = 3.0 * in[0] * in[0] - 3 * in[0];
│ │ │ │ +
98 out[8][1] = -6.0 * in[0] * in[1] + 3 * in[1]+6 * in[0]-3.0;
│ │ │ │ +
99 out[8][2] = 0;
│ │ │ │ +
100 out[9][0] = -3.0 * in[0] * in[0] + 3 * in[0];
│ │ │ │ +
101 out[9][1] = 6.0 * in[0] * in[1] - 3 * in[1];
│ │ │ │ +
102 out[9][2] = 0;
│ │ │ │ +
103 out[10][0] = -3.0 * in[0] * in[0] + 3 * in[0];
│ │ │ │ +
104 out[10][1] = 0;
│ │ │ │ +
105 out[10][2] = 6.0 * in[0] * in[2]-6 * in[0]-3 * in[2] + 3.0;
│ │ │ │ +
106 out[11][0] = 3.0 * in[0] * in[0]-3 * in[0];
│ │ │ │ +
107 out[11][1] = 0;
│ │ │ │ +
108 out[11][2] = -6.0 * in[0] * in[2] + 3 * in[2];
│ │ │ │ +
109 out[12][0] = -6.0 * in[0] * in[2]+6 * in[2] + 3 * in[0]-3.0;
│ │ │ │ +
110 out[12][1] = 0;
│ │ │ │ +
111 out[12][2] = 3.0 * in[2] * in[2]-3 * in[2];
│ │ │ │ +
112 out[13][0] = -3 * in[0]+6 * in[0] * in[2];
│ │ │ │ +
113 out[13][1] = 0;
│ │ │ │ +
114 out[13][2] = -3.0 * in[2] * in[2] + 3 * in[2];
│ │ │ │ +
115 out[14][0] = 0;
│ │ │ │ +
116 out[14][1] = 6.0 * in[1] * in[2]-3 * in[1]-6 * in[2] + 3.0;
│ │ │ │ +
117 out[14][2] = -3 * in[2] * in[2] + 3 * in[2];
│ │ │ │ +
118 out[15][0] = 0;
│ │ │ │ +
119 out[15][1] = -6.0 * in[1] * in[2] + 3 * in[1];
│ │ │ │ +
120 out[15][2] = 3.0 * in[2] * in[2]-3 * in[2];
│ │ │ │ +
121 out[16][0] = 0;
│ │ │ │ +
122 out[16][1] = 3.0 * in[1] * in[1]-3 * in[1];
│ │ │ │ +
123 out[16][2] = -6.0 * in[1] * in[2] + 3 * in[2]+6 * in[1]-3.0;
│ │ │ │ +
124 out[17][0] = 0;
│ │ │ │ +
125 out[17][1] = -3.0 * in[1] * in[1] + 3 * in[1];
│ │ │ │ +
126 out[17][2] = 6.0 * in[1] * in[2] - 3.0 * in[2];
│ │ │ │ +
127 }
│ │ │ │ +
│ │ │ │ +
128
│ │ │ │ +
│ │ │ │ +
135 inline void evaluateJacobian(const typename Traits::DomainType& in,
│ │ │ │ +
136 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
137 {
│ │ │ │ +
138 out.resize(size());
│ │ │ │ +
139
│ │ │ │ +
140 out[0][0] = { sign_[0], 0, 0};
│ │ │ │ +
141 out[0][1] = { 0, 0, 0};
│ │ │ │ +
142 out[0][2] = { 0, 0, 0};
│ │ │ │ +
143
│ │ │ │ +
144 out[1][0] = { sign_[1], 0, 0};
│ │ │ │ +
145 out[1][1] = { 0, 0, 0};
│ │ │ │ +
146 out[1][2] = { 0, 0, 0};
│ │ │ │ +
147
│ │ │ │ +
148 out[2][0] = { 0, 0, 0};
│ │ │ │ +
149 out[2][1] = { 0, sign_[2], 0};
│ │ │ │ +
150 out[2][2] = { 0, 0, 0};
│ │ │ │ +
151
│ │ │ │ +
152 out[3][0] = { 0, 0, 0};
│ │ │ │ +
153 out[3][1] = { 0, sign_[3], 0};
│ │ │ │ +
154 out[3][2] = { 0, 0, 0};
│ │ │ │ +
155
│ │ │ │ +
156 out[4][0] = { 0, 0, 0};
│ │ │ │ +
157 out[4][1] = { 0, 0, 0};
│ │ │ │ +
158 out[4][2] = { 0, 0, sign_[4]};
│ │ │ │ +
159
│ │ │ │ +
160 out[5][0] = { 0, 0, 0};
│ │ │ │ +
161 out[5][1] = { 0, 0, 0};
│ │ │ │ +
162 out[5][2] = { 0, 0, sign_[5]};
│ │ │ │ +
163
│ │ │ │ +
164 out[6][0] = { 6*in[1]-3, 6*in[0]-6, 0};
│ │ │ │ +
165 out[6][1] = { 0, -6*in[1]+3, 0};
│ │ │ │ +
166 out[6][2] = { 0, 0, 0};
│ │ │ │ +
167
│ │ │ │ +
168 out[7][0] = {-6*in[1]+3, -6*in[0], 0};
│ │ │ │ +
169 out[7][1] = { 0, 6*in[1]-3, 0};
│ │ │ │ +
170 out[7][2] = { 0, 0, 0};
│ │ │ │ +
171
│ │ │ │ +
172 out[8][0] = { 6*in[0]-3, 0, 0};
│ │ │ │ +
173 out[8][1] = {-6*in[1]+6, -6*in[0]+3, 0};
│ │ │ │ +
174 out[8][2] = { 0, 0, 0};
│ │ │ │ +
175
│ │ │ │ +
176 out[9][0] = {-6*in[0]+3, 0, 0};
│ │ │ │ +
177 out[9][1] = { 6*in[1], 6*in[0]-3, 0};
│ │ │ │ +
178 out[9][2] = { 0, 0, 0};
│ │ │ │ +
179
│ │ │ │ +
180 out[10][0] = {-6*in[0]+3, 0, 0};
│ │ │ │ +
181 out[10][1] = { 0, 0, 0};
│ │ │ │ +
182 out[10][2] = { 6*in[2]-6, 0, 6*in[0]-3};
│ │ │ │ +
183
│ │ │ │ +
184 out[11][0] = { 6*in[0]-3, 0, 0};
│ │ │ │ +
185 out[11][1] = { 0, 0, 0};
│ │ │ │ +
186 out[11][2] = { -6*in[2], 0, -6*in[0]+3};
│ │ │ │ +
187
│ │ │ │ +
188 out[12][0] = {-6*in[2]+3, 0, -6*in[0]+6};
│ │ │ │ +
189 out[12][1] = { 0, 0, 0};
│ │ │ │ +
190 out[12][2] = { 0, 0, 6*in[2]-3};
│ │ │ │ +
191
│ │ │ │ +
192 out[13][0] = { 6*in[2]-3, 0, 6*in[0]};
│ │ │ │ +
193 out[13][1] = { 0, 0, 0};
│ │ │ │ +
194 out[13][2] = { 0, 0, -6*in[2]+3};
│ │ │ │ +
195
│ │ │ │ +
196 out[14][0] = { 0, 0, 0};
│ │ │ │ +
197 out[14][1] = { 0, 6*in[2]-3, 6*in[1]-6};
│ │ │ │ +
198 out[14][2] = { 0, 0, -6*in[2]+3};
│ │ │ │ +
199
│ │ │ │ +
200 out[15][0] = { 0, 0, 0};
│ │ │ │ +
201 out[15][1] = { 0, -6*in[2]+3, -6*in[1]};
│ │ │ │ +
202 out[15][2] = { 0, 0, 6*in[2]-3};
│ │ │ │ +
203
│ │ │ │ +
204 out[16][0] = { 0, 0, 0};
│ │ │ │ +
205 out[16][1] = { 0, 6*in[1]-3, 0};
│ │ │ │ +
206 out[16][2] = { 0, -6*in[2]+6, -6*in[1]+3};
│ │ │ │ +
207
│ │ │ │ +
208 out[17][0] = { 0, 0, 0};
│ │ │ │ +
209 out[17][1] = { 0, -6*in[1]+3, 0};
│ │ │ │ +
210 out[17][2] = { 0, 6*in[2], 6*in[1]-3};
│ │ │ │ +
211 }
│ │ │ │ +
│ │ │ │ +
212
│ │ │ │ +
│ │ │ │ +
214 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ +
215 const typename Traits::DomainType& in, // position
│ │ │ │ +
216 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
217 {
│ │ │ │ +
218 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
219 if (totalOrder == 0) {
│ │ │ │ +
220 evaluateFunction(in, out);
│ │ │ │ +
221 } else if (totalOrder == 1) {
│ │ │ │ +
222 out.resize(size());
│ │ │ │ +
223 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
224
│ │ │ │ +
225 switch (direction) {
│ │ │ │ +
226 case 0:
│ │ │ │ +
227 out[0] = { sign_[0], 0, 0};
│ │ │ │ +
228 out[1] = { sign_[1], 0, 0};
│ │ │ │ +
229 out[2] = { 0, 0, 0};
│ │ │ │ +
230 out[3] = { 0, 0, 0};
│ │ │ │ +
231 out[4] = { 0, 0, 0};
│ │ │ │ +
232 out[5] = { 0, 0, 0};
│ │ │ │ +
233 out[6] = { 6*in[1]-3, 0, 0};
│ │ │ │ +
234 out[7] = {-6*in[1]+3, 0, 0};
│ │ │ │ +
235 out[8] = { 6*in[0]-3, -6*in[1]+6, 0};
│ │ │ │ +
236 out[9] = {-6*in[0]+3, 6*in[1], 0};
│ │ │ │ +
237 out[10] = {-6*in[0]+3, 0, 6*in[2]-6};
│ │ │ │ +
238 out[11] = { 6*in[0]-3, 0, -6*in[2]};
│ │ │ │ +
239 out[12] = {-6*in[2]+3, 0, 0};
│ │ │ │ +
240 out[13] = { 6*in[2]-3, 0, 0};
│ │ │ │ +
241 out[14] = { 0, 0, 0};
│ │ │ │ +
242 out[15] = { 0, 0, 0};
│ │ │ │ +
243 out[16] = { 0, 0, 0};
│ │ │ │ +
244 out[17] = { 0, 0, 0};
│ │ │ │ +
245 break;
│ │ │ │ +
246 case 1:
│ │ │ │ +
247 out[0] = { 0, 0, 0};
│ │ │ │ +
248 out[1] = { 0, 0, 0};
│ │ │ │ +
249 out[2] = { 0, sign_[2], 0};
│ │ │ │ +
250 out[3] = { 0, sign_[3], 0};
│ │ │ │ +
251 out[4] = { 0, 0, 0};
│ │ │ │ +
252 out[5] = { 0, 0, 0};
│ │ │ │ +
253 out[6] = { 6*in[0]-6, -6*in[1]+3, 0};
│ │ │ │ +
254 out[7] = { -6*in[0], 6*in[1]-3, 0};
│ │ │ │ +
255 out[8] = { 0, -6*in[0]+3, 0};
│ │ │ │ +
256 out[9] = { 0, 6*in[0]-3, 0};
│ │ │ │ +
257 out[10] = { 0, 0, 0};
│ │ │ │ +
258 out[11] = { 0, 0, 0};
│ │ │ │ +
259 out[12] = { 0, 0, 0};
│ │ │ │ +
260 out[13] = { 0, 0, 0};
│ │ │ │ +
261 out[14] = { 0, 6*in[2]-3, 0};
│ │ │ │ +
262 out[15] = { 0, -6*in[2]+3, 0};
│ │ │ │ +
263 out[16] = { 0, 6*in[1]-3, -6*in[2]+6};
│ │ │ │ +
264 out[17] = { 0, -6*in[1]+3, 6*in[2]};
│ │ │ │ +
265 break;
│ │ │ │ +
266 case 2:
│ │ │ │ +
267 out[0] = { 0, 0, 0};
│ │ │ │ +
268 out[1] = { 0, 0, 0};
│ │ │ │ +
269 out[2] = { 0, 0, 0};
│ │ │ │ +
270 out[3] = { 0, 0, 0};
│ │ │ │ +
271 out[4] = { 0, 0, sign_[4]};
│ │ │ │ +
272 out[5] = { 0, 0, sign_[5]};
│ │ │ │ +
273 out[6] = { 0, 0, 0};
│ │ │ │ +
274 out[7] = { 0, 0, 0};
│ │ │ │ +
275 out[8] = { 0, 0, 0};
│ │ │ │ +
276 out[9] = { 0, 0, 0};
│ │ │ │ +
277 out[10] = { 0, 0, 6*in[0]-3};
│ │ │ │ +
278 out[11] = { 0, 0, -6*in[0]+3};
│ │ │ │ +
279 out[12] = {-6*in[0]+6, 0, 6*in[2]-3};
│ │ │ │ +
280 out[13] = { 6*in[0], 0, -6*in[2]+3};
│ │ │ │ +
281 out[14] = { 0, 6*in[1]-6, -6*in[2]+3};
│ │ │ │ +
282 out[15] = { 0, -6*in[1], 6*in[2]-3};
│ │ │ │ +
283 out[16] = { 0, 0, -6*in[1]+3};
│ │ │ │ +
284 out[17] = { 0, 0, 6*in[1]-3};
│ │ │ │ +
285 break;
│ │ │ │ +
286 default:
│ │ │ │ +
287 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
288 }
│ │ │ │ +
289 } else {
│ │ │ │ +
290 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
291 }
│ │ │ │ +
292 }
│ │ │ │ +
│ │ │ │ +
293
│ │ │ │ +
│ │ │ │ +
295 unsigned int order() const
│ │ │ │ +
296 {
│ │ │ │ +
297 return 2;
│ │ │ │ +
298 }
│ │ │ │ +
│ │ │ │ +
299
│ │ │ │ +
300 private:
│ │ │ │ +
301 std::array<R,6> sign_;
│ │ │ │ +
302 };
│ │ │ │ +
│ │ │ │ +
303} // end namespace Dune
│ │ │ │ +
304#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALBASIS_HH
│ │ │ │
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
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on the reference hexahedron.
Definition brezzidouglasmarini1cube3dlocalbasis.hh:31
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition brezzidouglasmarini1cube3dlocalbasis.hh:135
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition brezzidouglasmarini1cube3dlocalbasis.hh:68
│ │ │ │ +
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
Definition brezzidouglasmarini1cube3dlocalbasis.hh:36
│ │ │ │ +
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 brezzidouglasmarini1cube3dlocalbasis.hh:214
│ │ │ │ +
BDM1Cube3DLocalBasis(std::bitset< 6 > s)
Make set number s, where 0 <= s < 64.
Definition brezzidouglasmarini1cube3dlocalbasis.hh:50
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition brezzidouglasmarini1cube3dlocalbasis.hh:295
│ │ │ │ +
BDM1Cube3DLocalBasis()
Standard constructor.
Definition brezzidouglasmarini1cube3dlocalbasis.hh:39
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition brezzidouglasmarini1cube3dlocalbasis.hh:57
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,79 +7,336 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ - * dualq1 │ │ │ │ │ -dualq1localcoefficients.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1cube3d │ │ │ │ │ +brezzidouglasmarini1cube3dlocalbasis.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14namespace Dune │ │ │ │ │ - 15{ │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15#include "../../common/localbasis.hh" │ │ │ │ │ 16 │ │ │ │ │ - 23 template │ │ │ │ │ -24 class DualQ1LocalCoefficients │ │ │ │ │ - 25 { │ │ │ │ │ - 26 public: │ │ │ │ │ -28 DualQ1LocalCoefficients () : li(1< li; │ │ │ │ │ - 48 }; │ │ │ │ │ - 49 │ │ │ │ │ - 50} │ │ │ │ │ - 51 │ │ │ │ │ - 52#endif │ │ │ │ │ -localkey.hh │ │ │ │ │ + 17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ + 29 template │ │ │ │ │ +30 class BDM1Cube3DLocalBasis │ │ │ │ │ + 31 { │ │ │ │ │ + 32 │ │ │ │ │ + 33 public: │ │ │ │ │ + 34 typedef LocalBasisTraits, │ │ │ │ │ + 35 R,3,Dune::FieldVector, │ │ │ │ │ +36 Dune::FieldMatrix > Traits; │ │ │ │ │ + 37 │ │ │ │ │ +39 BDM1Cube3DLocalBasis() │ │ │ │ │ + 40 { │ │ │ │ │ + 41 for (size_t i=0; i<6; i++) │ │ │ │ │ + 42 sign_[i] = 1.0; │ │ │ │ │ + 43 } │ │ │ │ │ + 44 │ │ │ │ │ +50 BDM1Cube3DLocalBasis(std::bitset<6> s) │ │ │ │ │ + 51 { │ │ │ │ │ + 52 for (size_t i=0; i<6; i++) │ │ │ │ │ + 53 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ + 54 } │ │ │ │ │ + 55 │ │ │ │ │ +57 unsigned int size() const │ │ │ │ │ + 58 { │ │ │ │ │ + 59 return 18; │ │ │ │ │ + 60 } │ │ │ │ │ + 61 │ │ │ │ │ +68 inline void evaluateFunction(const typename Traits::DomainType& in, │ │ │ │ │ + 69 std::vector& out) const │ │ │ │ │ + 70 { │ │ │ │ │ + 71 out.resize(size()); │ │ │ │ │ + 72 │ │ │ │ │ + 73 out[0][0] = sign_[0] * (in[0] - 1.0); │ │ │ │ │ + 74 out[0][1] = 0; │ │ │ │ │ + 75 out[0][2] = 0; │ │ │ │ │ + 76 out[1][0] = sign_[1] * in[0]; │ │ │ │ │ + 77 out[1][1] = 0; │ │ │ │ │ + 78 out[1][2] = 0; │ │ │ │ │ + 79 out[2][0] = 0; │ │ │ │ │ + 80 out[2][1] = sign_[2] * (in[1] - 1.0); │ │ │ │ │ + 81 out[2][2] = 0; │ │ │ │ │ + 82 out[3][0] = 0; │ │ │ │ │ + 83 out[3][1] = sign_[3] * in[1]; │ │ │ │ │ + 84 out[3][2] = 0; │ │ │ │ │ + 85 out[4][0] = 0; │ │ │ │ │ + 86 out[4][1] = 0; │ │ │ │ │ + 87 out[4][2] = sign_[4] * (in[2] - 1.0); │ │ │ │ │ + 88 out[5][0] = 0; │ │ │ │ │ + 89 out[5][1] = 0; │ │ │ │ │ + 90 out[5][2] = sign_[5] * in[2]; │ │ │ │ │ + 91 out[6][0] = 6.0 * in[0] * in[1] - 3 * in[0]-6 * in[1] + 3.0; │ │ │ │ │ + 92 out[6][1] = -3.0 * in[1] * in[1] + 3 * in[1]; │ │ │ │ │ + 93 out[6][2] = 0; │ │ │ │ │ + 94 out[7][0] = -6.0 * in[0] * in[1] + 3 * in[0]; │ │ │ │ │ + 95 out[7][1] = 3.0 * in[1] * in[1] - 3 * in[1]; │ │ │ │ │ + 96 out[7][2] = 0; │ │ │ │ │ + 97 out[8][0] = 3.0 * in[0] * in[0] - 3 * in[0]; │ │ │ │ │ + 98 out[8][1] = -6.0 * in[0] * in[1] + 3 * in[1]+6 * in[0]-3.0; │ │ │ │ │ + 99 out[8][2] = 0; │ │ │ │ │ + 100 out[9][0] = -3.0 * in[0] * in[0] + 3 * in[0]; │ │ │ │ │ + 101 out[9][1] = 6.0 * in[0] * in[1] - 3 * in[1]; │ │ │ │ │ + 102 out[9][2] = 0; │ │ │ │ │ + 103 out[10][0] = -3.0 * in[0] * in[0] + 3 * in[0]; │ │ │ │ │ + 104 out[10][1] = 0; │ │ │ │ │ + 105 out[10][2] = 6.0 * in[0] * in[2]-6 * in[0]-3 * in[2] + 3.0; │ │ │ │ │ + 106 out[11][0] = 3.0 * in[0] * in[0]-3 * in[0]; │ │ │ │ │ + 107 out[11][1] = 0; │ │ │ │ │ + 108 out[11][2] = -6.0 * in[0] * in[2] + 3 * in[2]; │ │ │ │ │ + 109 out[12][0] = -6.0 * in[0] * in[2]+6 * in[2] + 3 * in[0]-3.0; │ │ │ │ │ + 110 out[12][1] = 0; │ │ │ │ │ + 111 out[12][2] = 3.0 * in[2] * in[2]-3 * in[2]; │ │ │ │ │ + 112 out[13][0] = -3 * in[0]+6 * in[0] * in[2]; │ │ │ │ │ + 113 out[13][1] = 0; │ │ │ │ │ + 114 out[13][2] = -3.0 * in[2] * in[2] + 3 * in[2]; │ │ │ │ │ + 115 out[14][0] = 0; │ │ │ │ │ + 116 out[14][1] = 6.0 * in[1] * in[2]-3 * in[1]-6 * in[2] + 3.0; │ │ │ │ │ + 117 out[14][2] = -3 * in[2] * in[2] + 3 * in[2]; │ │ │ │ │ + 118 out[15][0] = 0; │ │ │ │ │ + 119 out[15][1] = -6.0 * in[1] * in[2] + 3 * in[1]; │ │ │ │ │ + 120 out[15][2] = 3.0 * in[2] * in[2]-3 * in[2]; │ │ │ │ │ + 121 out[16][0] = 0; │ │ │ │ │ + 122 out[16][1] = 3.0 * in[1] * in[1]-3 * in[1]; │ │ │ │ │ + 123 out[16][2] = -6.0 * in[1] * in[2] + 3 * in[2]+6 * in[1]-3.0; │ │ │ │ │ + 124 out[17][0] = 0; │ │ │ │ │ + 125 out[17][1] = -3.0 * in[1] * in[1] + 3 * in[1]; │ │ │ │ │ + 126 out[17][2] = 6.0 * in[1] * in[2] - 3.0 * in[2]; │ │ │ │ │ + 127 } │ │ │ │ │ + 128 │ │ │ │ │ +135 inline void evaluateJacobian(const typename Traits::DomainType& in, │ │ │ │ │ + 136 std::vector& out) const │ │ │ │ │ + 137 { │ │ │ │ │ + 138 out.resize(size()); │ │ │ │ │ + 139 │ │ │ │ │ + 140 out[0][0] = { sign_[0], 0, 0}; │ │ │ │ │ + 141 out[0][1] = { 0, 0, 0}; │ │ │ │ │ + 142 out[0][2] = { 0, 0, 0}; │ │ │ │ │ + 143 │ │ │ │ │ + 144 out[1][0] = { sign_[1], 0, 0}; │ │ │ │ │ + 145 out[1][1] = { 0, 0, 0}; │ │ │ │ │ + 146 out[1][2] = { 0, 0, 0}; │ │ │ │ │ + 147 │ │ │ │ │ + 148 out[2][0] = { 0, 0, 0}; │ │ │ │ │ + 149 out[2][1] = { 0, sign_[2], 0}; │ │ │ │ │ + 150 out[2][2] = { 0, 0, 0}; │ │ │ │ │ + 151 │ │ │ │ │ + 152 out[3][0] = { 0, 0, 0}; │ │ │ │ │ + 153 out[3][1] = { 0, sign_[3], 0}; │ │ │ │ │ + 154 out[3][2] = { 0, 0, 0}; │ │ │ │ │ + 155 │ │ │ │ │ + 156 out[4][0] = { 0, 0, 0}; │ │ │ │ │ + 157 out[4][1] = { 0, 0, 0}; │ │ │ │ │ + 158 out[4][2] = { 0, 0, sign_[4]}; │ │ │ │ │ + 159 │ │ │ │ │ + 160 out[5][0] = { 0, 0, 0}; │ │ │ │ │ + 161 out[5][1] = { 0, 0, 0}; │ │ │ │ │ + 162 out[5][2] = { 0, 0, sign_[5]}; │ │ │ │ │ + 163 │ │ │ │ │ + 164 out[6][0] = { 6*in[1]-3, 6*in[0]-6, 0}; │ │ │ │ │ + 165 out[6][1] = { 0, -6*in[1]+3, 0}; │ │ │ │ │ + 166 out[6][2] = { 0, 0, 0}; │ │ │ │ │ + 167 │ │ │ │ │ + 168 out[7][0] = {-6*in[1]+3, -6*in[0], 0}; │ │ │ │ │ + 169 out[7][1] = { 0, 6*in[1]-3, 0}; │ │ │ │ │ + 170 out[7][2] = { 0, 0, 0}; │ │ │ │ │ + 171 │ │ │ │ │ + 172 out[8][0] = { 6*in[0]-3, 0, 0}; │ │ │ │ │ + 173 out[8][1] = {-6*in[1]+6, -6*in[0]+3, 0}; │ │ │ │ │ + 174 out[8][2] = { 0, 0, 0}; │ │ │ │ │ + 175 │ │ │ │ │ + 176 out[9][0] = {-6*in[0]+3, 0, 0}; │ │ │ │ │ + 177 out[9][1] = { 6*in[1], 6*in[0]-3, 0}; │ │ │ │ │ + 178 out[9][2] = { 0, 0, 0}; │ │ │ │ │ + 179 │ │ │ │ │ + 180 out[10][0] = {-6*in[0]+3, 0, 0}; │ │ │ │ │ + 181 out[10][1] = { 0, 0, 0}; │ │ │ │ │ + 182 out[10][2] = { 6*in[2]-6, 0, 6*in[0]-3}; │ │ │ │ │ + 183 │ │ │ │ │ + 184 out[11][0] = { 6*in[0]-3, 0, 0}; │ │ │ │ │ + 185 out[11][1] = { 0, 0, 0}; │ │ │ │ │ + 186 out[11][2] = { -6*in[2], 0, -6*in[0]+3}; │ │ │ │ │ + 187 │ │ │ │ │ + 188 out[12][0] = {-6*in[2]+3, 0, -6*in[0]+6}; │ │ │ │ │ + 189 out[12][1] = { 0, 0, 0}; │ │ │ │ │ + 190 out[12][2] = { 0, 0, 6*in[2]-3}; │ │ │ │ │ + 191 │ │ │ │ │ + 192 out[13][0] = { 6*in[2]-3, 0, 6*in[0]}; │ │ │ │ │ + 193 out[13][1] = { 0, 0, 0}; │ │ │ │ │ + 194 out[13][2] = { 0, 0, -6*in[2]+3}; │ │ │ │ │ + 195 │ │ │ │ │ + 196 out[14][0] = { 0, 0, 0}; │ │ │ │ │ + 197 out[14][1] = { 0, 6*in[2]-3, 6*in[1]-6}; │ │ │ │ │ + 198 out[14][2] = { 0, 0, -6*in[2]+3}; │ │ │ │ │ + 199 │ │ │ │ │ + 200 out[15][0] = { 0, 0, 0}; │ │ │ │ │ + 201 out[15][1] = { 0, -6*in[2]+3, -6*in[1]}; │ │ │ │ │ + 202 out[15][2] = { 0, 0, 6*in[2]-3}; │ │ │ │ │ + 203 │ │ │ │ │ + 204 out[16][0] = { 0, 0, 0}; │ │ │ │ │ + 205 out[16][1] = { 0, 6*in[1]-3, 0}; │ │ │ │ │ + 206 out[16][2] = { 0, -6*in[2]+6, -6*in[1]+3}; │ │ │ │ │ + 207 │ │ │ │ │ + 208 out[17][0] = { 0, 0, 0}; │ │ │ │ │ + 209 out[17][1] = { 0, -6*in[1]+3, 0}; │ │ │ │ │ + 210 out[17][2] = { 0, 6*in[2], 6*in[1]-3}; │ │ │ │ │ + 211 } │ │ │ │ │ + 212 │ │ │ │ │ +214 void partial (const std::array& order, │ │ │ │ │ + 215 const typename Traits::DomainType& in, // position │ │ │ │ │ + 216 std::vector& out) const // return value │ │ │ │ │ + 217 { │ │ │ │ │ + 218 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ + 219 if (totalOrder == 0) { │ │ │ │ │ + 220 evaluateFunction(in, out); │ │ │ │ │ + 221 } else if (totalOrder == 1) { │ │ │ │ │ + 222 out.resize(size()); │ │ │ │ │ + 223 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ +(), order.end(), 1)); │ │ │ │ │ + 224 │ │ │ │ │ + 225 switch (direction) { │ │ │ │ │ + 226 case 0: │ │ │ │ │ + 227 out[0] = { sign_[0], 0, 0}; │ │ │ │ │ + 228 out[1] = { sign_[1], 0, 0}; │ │ │ │ │ + 229 out[2] = { 0, 0, 0}; │ │ │ │ │ + 230 out[3] = { 0, 0, 0}; │ │ │ │ │ + 231 out[4] = { 0, 0, 0}; │ │ │ │ │ + 232 out[5] = { 0, 0, 0}; │ │ │ │ │ + 233 out[6] = { 6*in[1]-3, 0, 0}; │ │ │ │ │ + 234 out[7] = {-6*in[1]+3, 0, 0}; │ │ │ │ │ + 235 out[8] = { 6*in[0]-3, -6*in[1]+6, 0}; │ │ │ │ │ + 236 out[9] = {-6*in[0]+3, 6*in[1], 0}; │ │ │ │ │ + 237 out[10] = {-6*in[0]+3, 0, 6*in[2]-6}; │ │ │ │ │ + 238 out[11] = { 6*in[0]-3, 0, -6*in[2]}; │ │ │ │ │ + 239 out[12] = {-6*in[2]+3, 0, 0}; │ │ │ │ │ + 240 out[13] = { 6*in[2]-3, 0, 0}; │ │ │ │ │ + 241 out[14] = { 0, 0, 0}; │ │ │ │ │ + 242 out[15] = { 0, 0, 0}; │ │ │ │ │ + 243 out[16] = { 0, 0, 0}; │ │ │ │ │ + 244 out[17] = { 0, 0, 0}; │ │ │ │ │ + 245 break; │ │ │ │ │ + 246 case 1: │ │ │ │ │ + 247 out[0] = { 0, 0, 0}; │ │ │ │ │ + 248 out[1] = { 0, 0, 0}; │ │ │ │ │ + 249 out[2] = { 0, sign_[2], 0}; │ │ │ │ │ + 250 out[3] = { 0, sign_[3], 0}; │ │ │ │ │ + 251 out[4] = { 0, 0, 0}; │ │ │ │ │ + 252 out[5] = { 0, 0, 0}; │ │ │ │ │ + 253 out[6] = { 6*in[0]-6, -6*in[1]+3, 0}; │ │ │ │ │ + 254 out[7] = { -6*in[0], 6*in[1]-3, 0}; │ │ │ │ │ + 255 out[8] = { 0, -6*in[0]+3, 0}; │ │ │ │ │ + 256 out[9] = { 0, 6*in[0]-3, 0}; │ │ │ │ │ + 257 out[10] = { 0, 0, 0}; │ │ │ │ │ + 258 out[11] = { 0, 0, 0}; │ │ │ │ │ + 259 out[12] = { 0, 0, 0}; │ │ │ │ │ + 260 out[13] = { 0, 0, 0}; │ │ │ │ │ + 261 out[14] = { 0, 6*in[2]-3, 0}; │ │ │ │ │ + 262 out[15] = { 0, -6*in[2]+3, 0}; │ │ │ │ │ + 263 out[16] = { 0, 6*in[1]-3, -6*in[2]+6}; │ │ │ │ │ + 264 out[17] = { 0, -6*in[1]+3, 6*in[2]}; │ │ │ │ │ + 265 break; │ │ │ │ │ + 266 case 2: │ │ │ │ │ + 267 out[0] = { 0, 0, 0}; │ │ │ │ │ + 268 out[1] = { 0, 0, 0}; │ │ │ │ │ + 269 out[2] = { 0, 0, 0}; │ │ │ │ │ + 270 out[3] = { 0, 0, 0}; │ │ │ │ │ + 271 out[4] = { 0, 0, sign_[4]}; │ │ │ │ │ + 272 out[5] = { 0, 0, sign_[5]}; │ │ │ │ │ + 273 out[6] = { 0, 0, 0}; │ │ │ │ │ + 274 out[7] = { 0, 0, 0}; │ │ │ │ │ + 275 out[8] = { 0, 0, 0}; │ │ │ │ │ + 276 out[9] = { 0, 0, 0}; │ │ │ │ │ + 277 out[10] = { 0, 0, 6*in[0]-3}; │ │ │ │ │ + 278 out[11] = { 0, 0, -6*in[0]+3}; │ │ │ │ │ + 279 out[12] = {-6*in[0]+6, 0, 6*in[2]-3}; │ │ │ │ │ + 280 out[13] = { 6*in[0], 0, -6*in[2]+3}; │ │ │ │ │ + 281 out[14] = { 0, 6*in[1]-6, -6*in[2]+3}; │ │ │ │ │ + 282 out[15] = { 0, -6*in[1], 6*in[2]-3}; │ │ │ │ │ + 283 out[16] = { 0, 0, -6*in[1]+3}; │ │ │ │ │ + 284 out[17] = { 0, 0, 6*in[1]-3}; │ │ │ │ │ + 285 break; │ │ │ │ │ + 286 default: │ │ │ │ │ + 287 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ + 288 } │ │ │ │ │ + 289 } else { │ │ │ │ │ + 290 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ + 291 } │ │ │ │ │ + 292 } │ │ │ │ │ + 293 │ │ │ │ │ +295 unsigned int order() const │ │ │ │ │ + 296 { │ │ │ │ │ + 297 return 2; │ │ │ │ │ + 298 } │ │ │ │ │ + 299 │ │ │ │ │ + 300 private: │ │ │ │ │ + 301 std::array sign_; │ │ │ │ │ + 302 }; │ │ │ │ │ + 303} // end namespace Dune │ │ │ │ │ + 304#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALBASIS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::DualQ1LocalCoefficients │ │ │ │ │ -Layout map for dual Q1 elements. │ │ │ │ │ -Definition dualq1localcoefficients.hh:25 │ │ │ │ │ -Dune::DualQ1LocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition dualq1localcoefficients.hh:35 │ │ │ │ │ -Dune::DualQ1LocalCoefficients::DualQ1LocalCoefficients │ │ │ │ │ -DualQ1LocalCoefficients() │ │ │ │ │ +Dune::BDM1Cube3DLocalBasis │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on the reference hexahedron. │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalbasis.hh:31 │ │ │ │ │ +Dune::BDM1Cube3DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalbasis.hh:135 │ │ │ │ │ +Dune::BDM1Cube3DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalbasis.hh:68 │ │ │ │ │ +Dune::BDM1Cube3DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ +3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalbasis.hh:36 │ │ │ │ │ +Dune::BDM1Cube3DLocalBasis::partial │ │ │ │ │ +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 brezzidouglasmarini1cube3dlocalbasis.hh:214 │ │ │ │ │ +Dune::BDM1Cube3DLocalBasis::BDM1Cube3DLocalBasis │ │ │ │ │ +BDM1Cube3DLocalBasis(std::bitset< 6 > s) │ │ │ │ │ +Make set number s, where 0 <= s < 64. │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalbasis.hh:50 │ │ │ │ │ +Dune::BDM1Cube3DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalbasis.hh:295 │ │ │ │ │ +Dune::BDM1Cube3DLocalBasis::BDM1Cube3DLocalBasis │ │ │ │ │ +BDM1Cube3DLocalBasis() │ │ │ │ │ Standard constructor. │ │ │ │ │ -Definition dualq1localcoefficients.hh:28 │ │ │ │ │ -Dune::DualQ1LocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition dualq1localcoefficients.hh:41 │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalbasis.hh:39 │ │ │ │ │ +Dune::BDM1Cube3DLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalbasis.hh:57 │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00485.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1localcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini1cube3dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualp1localcoefficients.hh File Reference
│ │ │ │ +
brezzidouglasmarini1cube3dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::DualP1LocalCoefficients< dim >
 Local coefficients for dual simplex P1 elements. More...
class  Dune::BDM1Cube3DLocalInterpolation< LB >
 First order Brezzi-Douglas-Marini shape functions on the reference hexahedron. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,25 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ - * dualp1 │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1cube3d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -dualp1localcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +brezzidouglasmarini1cube3dlocalinterpolation.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::DualP1LocalCoefficients<_dim_> │ │ │ │ │ -  Local coefficients for dual simplex P1 elements. More... │ │ │ │ │ +class  Dune::BDM1Cube3DLocalInterpolation<_LB_> │ │ │ │ │ +  First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ + hexahedron. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00485_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1localcoefficients.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini1cube3dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,78 +70,134 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualp1localcoefficients.hh
│ │ │ │ +
brezzidouglasmarini1cube3dlocalinterpolation.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
24 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27
│ │ │ │ +
28 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
31 {
│ │ │ │ +
32 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0;
│ │ │ │ +
33 }
│ │ │ │ +
│ │ │ │ +
34
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
41 {
│ │ │ │ +
42 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0;
│ │ │ │ +
43 if (s & 1)
│ │ │ │ +
44 {
│ │ │ │ +
45 sign0 = -1.0;
│ │ │ │ +
46 }
│ │ │ │ +
47 if (s & 2)
│ │ │ │ +
48 {
│ │ │ │ +
49 sign1 = -1.0;
│ │ │ │ +
50 }
│ │ │ │ +
51 if (s & 4)
│ │ │ │ +
52 {
│ │ │ │ +
53 sign2 = -1.0;
│ │ │ │ +
54 }
│ │ │ │ +
55 if (s & 8)
│ │ │ │ +
56 {
│ │ │ │ +
57 sign3 = -1.0;
│ │ │ │ +
58 }
│ │ │ │ +
59 if (s & 16)
│ │ │ │ +
60 {
│ │ │ │ +
61 sign4 = -1.0;
│ │ │ │ +
62 }
│ │ │ │ +
63 if (s & 32)
│ │ │ │ +
64 {
│ │ │ │ +
65 sign5 = -1.0;
│ │ │ │ +
66 }
│ │ │ │ +
67
│ │ │ │ +
68 n0[0] = -1.0;
│ │ │ │ +
69 n0[1] = 0.0;
│ │ │ │ +
70 n0[2] = 0.0;
│ │ │ │ +
71 n1[0] = 1.0;
│ │ │ │ +
72 n1[1] = 0.0;
│ │ │ │ +
73 n1[2] = 0.0;
│ │ │ │ +
74 n2[0] = 0.0;
│ │ │ │ +
75 n2[1] = -1.0;
│ │ │ │ +
76 n2[2] = 0.0;
│ │ │ │ +
77 n3[0] = 0.0;
│ │ │ │ +
78 n3[1] = 1.0;
│ │ │ │ +
79 n3[2] = 0.0;
│ │ │ │ +
80 n4[0] = 0.0;
│ │ │ │ +
81 n4[1] = 0.0;
│ │ │ │ +
82 n4[2] = -1.0;
│ │ │ │ +
83 n5[0] = 0.0;
│ │ │ │ +
84 n5[1] = 0.0;
│ │ │ │ +
85 n5[2] = 1.0;
│ │ │ │ +
86 }
│ │ │ │ +
│ │ │ │ +
87
│ │ │ │ +
96 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
97 void interpolate(const F& f, std::vector<C>& out) const
│ │ │ │ +
98 {
│ │ │ │ +
99 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
100 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
101 //typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │ +
102
│ │ │ │ +
103 DUNE_THROW( NotImplemented, "Interpolation for BDM1Cube3D finite elements is not implemented." );
│ │ │ │ +
104
│ │ │ │ +
105 out.resize(18);
│ │ │ │ +
106 fill(out.begin(), out.end(), 0.0);
│ │ │ │ +
107
│ │ │ │ +
108 const int qOrder = 4;
│ │ │ │ +
109 const QuadratureRule<Scalar,1>& rule = QuadratureRules<Scalar,1>::rule(GeometryTypes::cube(1), qOrder);
│ │ │ │ +
110
│ │ │ │ +
111 for (typename QuadratureRule<Scalar,1>::const_iterator it = rule.begin();
│ │ │ │ +
112 it != rule.end(); ++it)
│ │ │ │ +
113 {
│ │ │ │ +
114 // TODO: write interpolation
│ │ │ │ +
115 }
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
118 private:
│ │ │ │ +
119 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3, sign4, sign5;
│ │ │ │ +
120 typename LB::Traits::DomainType n0, n1, n2, n3, n4, n5;
│ │ │ │ +
121 };
│ │ │ │ +
│ │ │ │ +
122} // end namespace Dune
│ │ │ │ +
123#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALINTERPOLATION_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
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on the reference hexahedron.
Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:26
│ │ │ │ +
BDM1Cube3DLocalInterpolation()
Standard constructor.
Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:30
│ │ │ │ +
void interpolate(const F &f, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:97
│ │ │ │ +
BDM1Cube3DLocalInterpolation(unsigned int s)
Make set number s, where 0 <= s < 64.
Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:40
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,78 +7,136 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ - * dualp1 │ │ │ │ │ -dualp1localcoefficients.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1cube3d │ │ │ │ │ +brezzidouglasmarini1cube3dlocalinterpolation.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 15 │ │ │ │ │ - 21 template │ │ │ │ │ -22 class DualP1LocalCoefficients │ │ │ │ │ - 23 { │ │ │ │ │ - 24 public: │ │ │ │ │ -26 DualP1LocalCoefficients () : li(size()) │ │ │ │ │ - 27 { │ │ │ │ │ - 28 for (std::size_t i=0; i li; │ │ │ │ │ - 46 }; │ │ │ │ │ - 47 │ │ │ │ │ - 48} │ │ │ │ │ - 49 │ │ │ │ │ - 50#endif │ │ │ │ │ -localkey.hh │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12namespace Dune │ │ │ │ │ + 13{ │ │ │ │ │ + 14 │ │ │ │ │ + 24 template │ │ │ │ │ +25 class BDM1Cube3DLocalInterpolation │ │ │ │ │ + 26 { │ │ │ │ │ + 27 │ │ │ │ │ + 28 public: │ │ │ │ │ +30 BDM1Cube3DLocalInterpolation() │ │ │ │ │ + 31 { │ │ │ │ │ + 32 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0; │ │ │ │ │ + 33 } │ │ │ │ │ + 34 │ │ │ │ │ +40 BDM1Cube3DLocalInterpolation(unsigned int s) │ │ │ │ │ + 41 { │ │ │ │ │ + 42 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0; │ │ │ │ │ + 43 if (s & 1) │ │ │ │ │ + 44 { │ │ │ │ │ + 45 sign0 = -1.0; │ │ │ │ │ + 46 } │ │ │ │ │ + 47 if (s & 2) │ │ │ │ │ + 48 { │ │ │ │ │ + 49 sign1 = -1.0; │ │ │ │ │ + 50 } │ │ │ │ │ + 51 if (s & 4) │ │ │ │ │ + 52 { │ │ │ │ │ + 53 sign2 = -1.0; │ │ │ │ │ + 54 } │ │ │ │ │ + 55 if (s & 8) │ │ │ │ │ + 56 { │ │ │ │ │ + 57 sign3 = -1.0; │ │ │ │ │ + 58 } │ │ │ │ │ + 59 if (s & 16) │ │ │ │ │ + 60 { │ │ │ │ │ + 61 sign4 = -1.0; │ │ │ │ │ + 62 } │ │ │ │ │ + 63 if (s & 32) │ │ │ │ │ + 64 { │ │ │ │ │ + 65 sign5 = -1.0; │ │ │ │ │ + 66 } │ │ │ │ │ + 67 │ │ │ │ │ + 68 n0[0] = -1.0; │ │ │ │ │ + 69 n0[1] = 0.0; │ │ │ │ │ + 70 n0[2] = 0.0; │ │ │ │ │ + 71 n1[0] = 1.0; │ │ │ │ │ + 72 n1[1] = 0.0; │ │ │ │ │ + 73 n1[2] = 0.0; │ │ │ │ │ + 74 n2[0] = 0.0; │ │ │ │ │ + 75 n2[1] = -1.0; │ │ │ │ │ + 76 n2[2] = 0.0; │ │ │ │ │ + 77 n3[0] = 0.0; │ │ │ │ │ + 78 n3[1] = 1.0; │ │ │ │ │ + 79 n3[2] = 0.0; │ │ │ │ │ + 80 n4[0] = 0.0; │ │ │ │ │ + 81 n4[1] = 0.0; │ │ │ │ │ + 82 n4[2] = -1.0; │ │ │ │ │ + 83 n5[0] = 0.0; │ │ │ │ │ + 84 n5[1] = 0.0; │ │ │ │ │ + 85 n5[2] = 1.0; │ │ │ │ │ + 86 } │ │ │ │ │ + 87 │ │ │ │ │ + 96 template │ │ │ │ │ +97 void interpolate(const F& f, std::vector& out) const │ │ │ │ │ + 98 { │ │ │ │ │ + 99 // f gives v*outer normal at a point on the edge! │ │ │ │ │ + 100 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ + 101 //typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ + 102 │ │ │ │ │ + 103 DUNE_THROW( NotImplemented, "Interpolation for BDM1Cube3D finite elements │ │ │ │ │ +is not implemented." ); │ │ │ │ │ + 104 │ │ │ │ │ + 105 out.resize(18); │ │ │ │ │ + 106 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ + 107 │ │ │ │ │ + 108 const int qOrder = 4; │ │ │ │ │ + 109 const QuadratureRule& rule = QuadratureRules::rule │ │ │ │ │ +(GeometryTypes::cube(1), qOrder); │ │ │ │ │ + 110 │ │ │ │ │ + 111 for (typename QuadratureRule::const_iterator it = rule.begin(); │ │ │ │ │ + 112 it != rule.end(); ++it) │ │ │ │ │ + 113 { │ │ │ │ │ + 114 // TODO: write interpolation │ │ │ │ │ + 115 } │ │ │ │ │ + 116 } │ │ │ │ │ + 117 │ │ │ │ │ + 118 private: │ │ │ │ │ + 119 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3, sign4, │ │ │ │ │ +sign5; │ │ │ │ │ + 120 typename LB::Traits::DomainType n0, n1, n2, n3, n4, n5; │ │ │ │ │ + 121 }; │ │ │ │ │ + 122} // end namespace Dune │ │ │ │ │ + 123#endif / │ │ │ │ │ +/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALINTERPOLATION_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::DualP1LocalCoefficients │ │ │ │ │ -Local coefficients for dual simplex P1 elements. │ │ │ │ │ -Definition dualp1localcoefficients.hh:23 │ │ │ │ │ -Dune::DualP1LocalCoefficients::DualP1LocalCoefficients │ │ │ │ │ -DualP1LocalCoefficients() │ │ │ │ │ +Dune::BDM1Cube3DLocalInterpolation │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on the reference hexahedron. │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:26 │ │ │ │ │ +Dune::BDM1Cube3DLocalInterpolation::BDM1Cube3DLocalInterpolation │ │ │ │ │ +BDM1Cube3DLocalInterpolation() │ │ │ │ │ Standard constructor. │ │ │ │ │ -Definition dualp1localcoefficients.hh:26 │ │ │ │ │ -Dune::DualP1LocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition dualp1localcoefficients.hh:39 │ │ │ │ │ -Dune::DualP1LocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition dualp1localcoefficients.hh:33 │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:30 │ │ │ │ │ +Dune::BDM1Cube3DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &f, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:97 │ │ │ │ │ +Dune::BDM1Cube3DLocalInterpolation::BDM1Cube3DLocalInterpolation │ │ │ │ │ +BDM1Cube3DLocalInterpolation(unsigned int s) │ │ │ │ │ +Make set number s, where 0 <= s < 64. │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalinterpolation.hh:40 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00488.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1localinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini1cube3dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,32 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualp1localinterpolation.hh File Reference
│ │ │ │ +
brezzidouglasmarini1cube3dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::DualP1LocalInterpolation< dim, LB >
class  Dune::BDM1Cube3DLocalCoefficients
 Layout map for Brezzi-Douglas-Marini-1 elements on hexahedra. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,23 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ - * dualp1 │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1cube3d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -dualp1localinterpolation.hh File Reference │ │ │ │ │ +brezzidouglasmarini1cube3dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include "../../common/localkey.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::DualP1LocalInterpolation<_dim,_LB_> │ │ │ │ │ +class  Dune::BDM1Cube3DLocalCoefficients │ │ │ │ │ +  Layout map for Brezzi-Douglas-Marini-1 elements on hexahedra. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00488_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1localinterpolation.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini1cube3dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,89 +70,79 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualp1localinterpolation.hh
│ │ │ │ +
brezzidouglasmarini1cube3dlocalcoefficients.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ - │ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#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);
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │
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);
│ │ │ │ -
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);
│ │ │ │ +
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 }
│ │ │ │ +
36 }
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ +
39 std::size_t size() const
│ │ │ │ +
40 {
│ │ │ │ +
41 return 18;
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
│ │ │ │ +
45 const LocalKey& localKey(std::size_t i) const
│ │ │ │ +
46 {
│ │ │ │ +
47 return li[i];
│ │ │ │ +
48 }
│ │ │ │ +
│ │ │ │
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
│ │ │ │ +
50 private:
│ │ │ │ +
51 std::vector<LocalKey> li;
│ │ │ │ +
52 };
│ │ │ │ +
│ │ │ │ +
53} // end namespace Dune
│ │ │ │ +
54#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALCOEFFICIENTS_HH
│ │ │ │
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
│ │ │ │ - │ │ │ │ +
Layout map for Brezzi-Douglas-Marini-1 elements on hexahedra.
Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:24
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:39
│ │ │ │ +
BDM1Cube3DLocalCoefficients()
Standard constructor.
Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:28
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:45
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,84 +7,80 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ - * dualp1 │ │ │ │ │ -dualp1localinterpolation.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1cube3d │ │ │ │ │ +brezzidouglasmarini1cube3dlocalcoefficients.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ 10 │ │ │ │ │ - 11namespace Dune │ │ │ │ │ - 12{ │ │ │ │ │ - 13 template │ │ │ │ │ -14 class DualP1LocalInterpolation │ │ │ │ │ - 15 { │ │ │ │ │ - 16 public: │ │ │ │ │ - 18 template │ │ │ │ │ -19 void interpolate (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); │ │ │ │ │ + 11#include "../../common/localkey.hh" │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ +23 class BDM1Cube3DLocalCoefficients │ │ │ │ │ + 24 { │ │ │ │ │ 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 li; │ │ │ │ │ + 52 }; │ │ │ │ │ + 53} // end namespace Dune │ │ │ │ │ + 54#endif / │ │ │ │ │ +/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::DualP1LocalInterpolation │ │ │ │ │ -Definition dualp1localinterpolation.hh:15 │ │ │ │ │ -Dune::DualP1LocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Local interpolation of a function. │ │ │ │ │ -Definition dualp1localinterpolation.hh:19 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::BDM1Cube3DLocalCoefficients │ │ │ │ │ +Layout map for Brezzi-Douglas-Marini-1 elements on hexahedra. │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::BDM1Cube3DLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:39 │ │ │ │ │ +Dune::BDM1Cube3DLocalCoefficients::BDM1Cube3DLocalCoefficients │ │ │ │ │ +BDM1Cube3DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:28 │ │ │ │ │ +Dune::BDM1Cube3DLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition brezzidouglasmarini1cube3dlocalcoefficients.hh:45 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00491.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1localbasis.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini1simplex2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualp1localbasis.hh File Reference
│ │ │ │ +
brezzidouglasmarini1simplex2d.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...
class  Dune::BDM1Simplex2DLocalFiniteElement< D, R >
 First order Brezzi-Douglas-Marini shape functions on triangles. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ - * dualp1 │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -dualp1localbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +brezzidouglasmarini1simplex2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ +#include "brezzidouglasmarini1simplex2d/ │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalbasis.hh" │ │ │ │ │ +#include "brezzidouglasmarini1simplex2d/ │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalcoefficients.hh" │ │ │ │ │ +#include "brezzidouglasmarini1simplex2d/ │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalinterpolation.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... │ │ │ │ │ +class  Dune::BDM1Simplex2DLocalFiniteElement<_D,_R_> │ │ │ │ │ +  First order Brezzi-Douglas-Marini shape functions on triangles. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00491_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1localbasis.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini1simplex2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,147 +70,124 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualp1localbasis.hh
│ │ │ │ +
brezzidouglasmarini1simplex2d.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │
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
│ │ │ │ +
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 // 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 }
│ │ │ │ +
52 return basis;
│ │ │ │ +
53 }
│ │ │ │
│ │ │ │ -
123 };
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
56 {
│ │ │ │ +
57 return coefficients;
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
61 {
│ │ │ │ +
62 return interpolation;
│ │ │ │ +
63 }
│ │ │ │
│ │ │ │ -
124}
│ │ │ │ -
125#endif
│ │ │ │ +
64
│ │ │ │ +
│ │ │ │ +
66 unsigned int size () const
│ │ │ │ +
67 {
│ │ │ │ +
68 return basis.size();
│ │ │ │ +
69 }
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
│ │ │ │ +
71 static constexpr GeometryType type ()
│ │ │ │ +
72 {
│ │ │ │ +
73 return GeometryTypes::triangle;
│ │ │ │ +
74 }
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
76 private:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
80 };
│ │ │ │ +
│ │ │ │ +
81}
│ │ │ │ +
82#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALFINITEELEMENT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on triangles.
Definition brezzidouglasmarini1simplex2d.hh:28
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition brezzidouglasmarini1simplex2d.hh:50
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition brezzidouglasmarini1simplex2d.hh:55
│ │ │ │ +
static constexpr GeometryType type()
Definition brezzidouglasmarini1simplex2d.hh:71
│ │ │ │ +
BDM1Simplex2DLocalFiniteElement()
Standard constructor.
Definition brezzidouglasmarini1simplex2d.hh:37
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition brezzidouglasmarini1simplex2d.hh:60
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition brezzidouglasmarini1simplex2d.hh:66
│ │ │ │ +
BDM1Simplex2DLocalFiniteElement(int s)
Make set number s, where 0 <= s < 8.
Definition brezzidouglasmarini1simplex2d.hh:45
│ │ │ │ +
LocalFiniteElementTraits< BDM1Simplex2DLocalBasis< D, R >, BDM1Simplex2DLocalCoefficients, BDM1Simplex2DLocalInterpolation< BDM1Simplex2DLocalBasis< D, R > > > Traits
Definition brezzidouglasmarini1simplex2d.hh:34
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on the reference triangle.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:30
│ │ │ │ +
Layout map for Brezzi-Douglas-Marini-1 elements on triangles.
Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:24
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on the reference triangle.
Definition brezzidouglasmarini1simplex2dlocalinterpolation.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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,165 +7,146 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ - * dualp1 │ │ │ │ │ -dualp1localbasis.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ +brezzidouglasmarini1simplex2d.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ + 8#include │ │ │ │ │ 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14namespace Dune │ │ │ │ │ - 15{ │ │ │ │ │ - 32 template │ │ │ │ │ -33 class DualP1LocalBasis │ │ │ │ │ - 34 { │ │ │ │ │ - 35 public: │ │ │ │ │ -37 static const bool faceDual = faceDualT; │ │ │ │ │ - 39 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -40 Dune::FieldMatrix > 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& out) const │ │ │ │ │ + 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ + 11#include "brezzidouglasmarini1simplex2d/ │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalbasis.hh" │ │ │ │ │ + 12#include "brezzidouglasmarini1simplex2d/ │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalcoefficients.hh" │ │ │ │ │ + 13#include "brezzidouglasmarini1simplex2d/ │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalinterpolation.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 17 │ │ │ │ │ + 26 template │ │ │ │ │ +27 class BDM1Simplex2DLocalFiniteElement │ │ │ │ │ + 28 { │ │ │ │ │ + 29 │ │ │ │ │ + 30 public: │ │ │ │ │ + 31 typedef LocalFiniteElementTraits< │ │ │ │ │ + 32 BDM1Simplex2DLocalBasis, │ │ │ │ │ + 33 BDM1Simplex2DLocalCoefficients, │ │ │ │ │ +34 BDM1Simplex2DLocalInterpolation > > Traits; │ │ │ │ │ + 35 │ │ │ │ │ +37 BDM1Simplex2DLocalFiniteElement () │ │ │ │ │ + 38 {} │ │ │ │ │ + 39 │ │ │ │ │ +45 BDM1Simplex2DLocalFiniteElement (int s) : │ │ │ │ │ + 46 basis(s), │ │ │ │ │ + 47 interpolation(s) │ │ │ │ │ + 48 {} │ │ │ │ │ + 49 │ │ │ │ │ +50 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ 51 { │ │ │ │ │ - 52 // evaluate P1 basis functions │ │ │ │ │ - 53 std::vector p1Values(size()); │ │ │ │ │ + 52 return basis; │ │ │ │ │ + 53 } │ │ │ │ │ 54 │ │ │ │ │ - 55 p1Values[0] = 1.0; │ │ │ │ │ - 56 │ │ │ │ │ - 57 for (int i=0; i& out) const │ │ │ │ │ - 79 { │ │ │ │ │ - 80 // evaluate P1 jacobians │ │ │ │ │ - 81 std::vector p1Jacs(size()); │ │ │ │ │ - 82 │ │ │ │ │ - 83 for (int i=0; i& order, │ │ │ │ │ - 107 const typename Traits::DomainType& in, // position │ │ │ │ │ - 108 std::vector& 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 │ │ │ │ │ +66 unsigned int size () const │ │ │ │ │ + 67 { │ │ │ │ │ + 68 return basis.size(); │ │ │ │ │ + 69 } │ │ │ │ │ + 70 │ │ │ │ │ +71 static constexpr GeometryType type () │ │ │ │ │ + 72 { │ │ │ │ │ + 73 return GeometryTypes::triangle; │ │ │ │ │ + 74 } │ │ │ │ │ + 75 │ │ │ │ │ + 76 private: │ │ │ │ │ + 77 BDM1Simplex2DLocalBasis basis; │ │ │ │ │ + 78 BDM1Simplex2DLocalCoefficients coefficients; │ │ │ │ │ + 79 BDM1Simplex2DLocalInterpolation > │ │ │ │ │ +interpolation; │ │ │ │ │ + 80 }; │ │ │ │ │ + 81} │ │ │ │ │ + 82#endif / │ │ │ │ │ +/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalinterpolation.hh │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalcoefficients.hh │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalbasis.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::DualP1LocalBasis │ │ │ │ │ -Dual Lagrange shape functions on the simplex. │ │ │ │ │ -Definition dualp1localbasis.hh:34 │ │ │ │ │ -Dune::DualP1LocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition dualp1localbasis.hh:119 │ │ │ │ │ -Dune::DualP1LocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition dualp1localbasis.hh:49 │ │ │ │ │ -Dune::DualP1LocalBasis::faceDual │ │ │ │ │ -static const bool faceDual │ │ │ │ │ -Determines if the basis is only biorthogonal on adjacent faces. │ │ │ │ │ -Definition dualp1localbasis.hh:37 │ │ │ │ │ -Dune::DualP1LocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::DualP1LocalBasis::size │ │ │ │ │ +Dune::BDM1Simplex2DLocalFiniteElement │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2d.hh:28 │ │ │ │ │ +Dune::BDM1Simplex2DLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition brezzidouglasmarini1simplex2d.hh:50 │ │ │ │ │ +Dune::BDM1Simplex2DLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition brezzidouglasmarini1simplex2d.hh:55 │ │ │ │ │ +Dune::BDM1Simplex2DLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition brezzidouglasmarini1simplex2d.hh:71 │ │ │ │ │ +Dune::BDM1Simplex2DLocalFiniteElement::BDM1Simplex2DLocalFiniteElement │ │ │ │ │ +BDM1Simplex2DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2d.hh:37 │ │ │ │ │ +Dune::BDM1Simplex2DLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition brezzidouglasmarini1simplex2d.hh:60 │ │ │ │ │ +Dune::BDM1Simplex2DLocalFiniteElement::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition dualp1localbasis.hh:43 │ │ │ │ │ -Dune::DualP1LocalBasis::Traits │ │ │ │ │ -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 │ │ │ │ │ -Dune::DualP1LocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition dualp1localbasis.hh:77 │ │ │ │ │ -localbasis.hh │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2d.hh:66 │ │ │ │ │ +Dune::BDM1Simplex2DLocalFiniteElement::BDM1Simplex2DLocalFiniteElement │ │ │ │ │ +BDM1Simplex2DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2d.hh:45 │ │ │ │ │ +Dune::BDM1Simplex2DLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< BDM1Simplex2DLocalBasis< D, R >, │ │ │ │ │ +BDM1Simplex2DLocalCoefficients, BDM1Simplex2DLocalInterpolation< │ │ │ │ │ +BDM1Simplex2DLocalBasis< D, R > > > Traits │ │ │ │ │ +Definition brezzidouglasmarini1simplex2d.hh:34 │ │ │ │ │ +Dune::BDM1Simplex2DLocalBasis │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on the reference triangle. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalbasis.hh:30 │ │ │ │ │ +Dune::BDM1Simplex2DLocalCoefficients │ │ │ │ │ +Layout map for Brezzi-Douglas-Marini-1 elements on triangles. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::BDM1Simplex2DLocalInterpolation │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on the reference triangle. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:25 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00494.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarinisimplex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,36 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualq1.hh File Reference
│ │ │ │ +
brezzidouglasmarinisimplex.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#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"
│ │ │ │ + │ │ │ │

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...
class  Dune::BrezziDouglasMariniSimplexLocalFiniteElement< D, R, 2, 1 >
 Brezzi-Douglas-Marini local finite elements for simplices with dimension 2 and order 1. More...
 
class  Dune::BrezziDouglasMariniSimplexLocalFiniteElement< D, R, 2, 2 >
 Brezzi-Douglas-Marini local finite elements for simplices with dimension 2 and order 2. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,32 +6,30 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -dualq1.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "dualq1/dualq1localbasis.hh" │ │ │ │ │ -#include "dualq1/dualq1localcoefficients.hh" │ │ │ │ │ -#include "dualq1/dualq1localinterpolation.hh" │ │ │ │ │ +brezzidouglasmarinisimplex.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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... │ │ │ │ │ +class  Dune::BrezziDouglasMariniSimplexLocalFiniteElement<_D,_R,_2,_1_> │ │ │ │ │ +  Brezzi-Douglas-Marini local finite elements for simplices with │ │ │ │ │ + dimension 2 and order 1. More... │ │ │ │ │ +  │ │ │ │ │ +class  Dune::BrezziDouglasMariniSimplexLocalFiniteElement<_D,_R,_2,_2_> │ │ │ │ │ +  Brezzi-Douglas-Marini local finite elements for simplices with │ │ │ │ │ + dimension 2 and order 2. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00494_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarinisimplex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,264 +70,88 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualq1.hh
│ │ │ │ +
brezzidouglasmarinisimplex.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINISIMPLEX_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINISIMPLEX_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
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>
│ │ │ │ -
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 }
│ │ │ │ + │ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
22 template<class D, class R, unsigned int dim, unsigned int order>
│ │ │ │ + │ │ │ │ +
24
│ │ │ │ +
28 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
31 {
│ │ │ │ +
32 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
35 {}
│ │ │ │ +
│ │ │ │ +
36
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
44 {}
│ │ │ │ +
│ │ │ │ +
45 };
│ │ │ │ +
│ │ │ │ +
46
│ │ │ │ +
50 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
53 {
│ │ │ │ +
54 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
66 {}
│ │ │ │ +
│ │ │ │ +
67 };
│ │ │ │ +
│ │ │ │ +
68
│ │ │ │ +
69} // namespace Dune
│ │ │ │ +
70
│ │ │ │ +
71#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINISIMPLEX_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
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on triangles.
Definition brezzidouglasmarini1simplex2d.hh:28
│ │ │ │ +
Second order Brezzi-Douglas-Marini shape functions on triangles.
Definition brezzidouglasmarini2simplex2d.hh:27
│ │ │ │ +
Brezzi-Douglas-Marini local finite element for simplices.
Definition brezzidouglasmarinisimplex.hh:23
│ │ │ │ +
BrezziDouglasMariniSimplexLocalFiniteElement(int s)
Constructor with a set of edge orientations.
Definition brezzidouglasmarinisimplex.hh:42
│ │ │ │ +
BrezziDouglasMariniSimplexLocalFiniteElement()
Default constructor.
Definition brezzidouglasmarinisimplex.hh:34
│ │ │ │ +
BrezziDouglasMariniSimplexLocalFiniteElement(int s)
Constructor with a set of edge orientations.
Definition brezzidouglasmarinisimplex.hh:64
│ │ │ │ +
BrezziDouglasMariniSimplexLocalFiniteElement()
Default constructor.
Definition brezzidouglasmarinisimplex.hh:56
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,280 +7,95 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * dualmortarbasis │ │ │ │ │ -dualq1.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ +brezzidouglasmarinisimplex.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINISIMPLEX_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINISIMPLEX_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16 │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include "dualq1/dualq1localbasis.hh" │ │ │ │ │ - 20#include "dualq1/dualq1localcoefficients.hh" │ │ │ │ │ - 21#include "dualq1/dualq1localinterpolation.hh" │ │ │ │ │ - 22 │ │ │ │ │ - 23namespace Dune │ │ │ │ │ - 24{ │ │ │ │ │ - 40 template │ │ │ │ │ -41 class DualQ1LocalFiniteElement │ │ │ │ │ - 42 { │ │ │ │ │ - 43 public: │ │ │ │ │ - 46 typedef │ │ │ │ │ -LocalFiniteElementTraits,DualQ1LocalCoefficients, │ │ │ │ │ -47 DualQ1LocalInterpolation > > Traits; │ │ │ │ │ - 48 │ │ │ │ │ -51 DualQ1LocalFiniteElement () │ │ │ │ │ - 52 { │ │ │ │ │ - 53 if (faceDual) │ │ │ │ │ - 54 setupFaceDualCoefficients(); │ │ │ │ │ - 55 else │ │ │ │ │ - 56 setupDualCoefficients(); │ │ │ │ │ - 57 } │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11 │ │ │ │ │ + 12namespace Dune │ │ │ │ │ + 13{ │ │ │ │ │ + 22 template │ │ │ │ │ +23 class BrezziDouglasMariniSimplexLocalFiniteElement; │ │ │ │ │ + 24 │ │ │ │ │ + 28 template │ │ │ │ │ +29 class BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ + 30 : public BDM1Simplex2DLocalFiniteElement │ │ │ │ │ + 31 { │ │ │ │ │ + 32 public: │ │ │ │ │ +34 BrezziDouglasMariniSimplexLocalFiniteElement() │ │ │ │ │ + 35 {} │ │ │ │ │ + 36 │ │ │ │ │ +42 BrezziDouglasMariniSimplexLocalFiniteElement(int s) │ │ │ │ │ + 43 : BDM1Simplex2DLocalFiniteElement::BDM1Simplex2DLocalFiniteElement(s) │ │ │ │ │ + 44 {} │ │ │ │ │ + 45 }; │ │ │ │ │ + 46 │ │ │ │ │ + 50 template │ │ │ │ │ +51 class BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ + 52 : public BDM2Simplex2DLocalFiniteElement │ │ │ │ │ + 53 { │ │ │ │ │ + 54 public: │ │ │ │ │ +56 BrezziDouglasMariniSimplexLocalFiniteElement() │ │ │ │ │ + 57 {} │ │ │ │ │ 58 │ │ │ │ │ -61 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 62 { │ │ │ │ │ - 63 return basis; │ │ │ │ │ - 64 } │ │ │ │ │ - 65 │ │ │ │ │ -68 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 69 { │ │ │ │ │ - 70 return coefficients; │ │ │ │ │ - 71 } │ │ │ │ │ - 72 │ │ │ │ │ -75 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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 │ │ │ │ │ - 100 DualQ1LocalBasis basis; │ │ │ │ │ - 101 DualQ1LocalCoefficients coefficients; │ │ │ │ │ - 102 DualQ1LocalInterpolation > 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::BDM2Simplex2DLocalFiniteElement(s) │ │ │ │ │ + 66 {} │ │ │ │ │ + 67 }; │ │ │ │ │ + 68 │ │ │ │ │ + 69} // namespace Dune │ │ │ │ │ + 70 │ │ │ │ │ + 71#endif // #ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_BREZZIDOUGLASMARINISIMPLEX_HH │ │ │ │ │ +brezzidouglasmarini1simplex2d.hh │ │ │ │ │ +brezzidouglasmarini2simplex2d.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::DualQ1LocalFiniteElement │ │ │ │ │ -The local dual Q1 finite element on cubes. │ │ │ │ │ -Definition dualq1.hh:42 │ │ │ │ │ -Dune::DualQ1LocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< DualQ1LocalBasis< D, R, dim >, │ │ │ │ │ -DualQ1LocalCoefficients< dim >, DualQ1LocalInterpolation< dim, │ │ │ │ │ -DualQ1LocalBasis< D, R, dim > > > Traits │ │ │ │ │ -Definition dualq1.hh:47 │ │ │ │ │ -Dune::DualQ1LocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition dualq1.hh:81 │ │ │ │ │ -Dune::DualQ1LocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition dualq1.hh:75 │ │ │ │ │ -Dune::DualQ1LocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition dualq1.hh:61 │ │ │ │ │ -Dune::DualQ1LocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition dualq1.hh:68 │ │ │ │ │ -Dune::DualQ1LocalFiniteElement::DualQ1LocalFiniteElement │ │ │ │ │ -DualQ1LocalFiniteElement() │ │ │ │ │ -Definition dualq1.hh:51 │ │ │ │ │ -Dune::DualQ1LocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition dualq1.hh:88 │ │ │ │ │ -Dune::DualQ1LocalBasis │ │ │ │ │ -Dual Lagrange shape functions of order 1 on the reference cube. │ │ │ │ │ -Definition dualq1localbasis.hh:29 │ │ │ │ │ -Dune::DualQ1LocalCoefficients │ │ │ │ │ -Layout map for dual Q1 elements. │ │ │ │ │ -Definition dualq1localcoefficients.hh:25 │ │ │ │ │ -Dune::DualQ1LocalInterpolation │ │ │ │ │ -Definition dualq1localinterpolation.hh:21 │ │ │ │ │ +Dune::BDM1Simplex2DLocalFiniteElement │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2d.hh:28 │ │ │ │ │ +Dune::BDM2Simplex2DLocalFiniteElement │ │ │ │ │ +Second order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2d.hh:27 │ │ │ │ │ +Dune::BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ +Brezzi-Douglas-Marini local finite element for simplices. │ │ │ │ │ +Definition brezzidouglasmarinisimplex.hh:23 │ │ │ │ │ +Dune::BrezziDouglasMariniSimplexLocalFiniteElement<_D,_R,_2,_1_>:: │ │ │ │ │ +BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ +BrezziDouglasMariniSimplexLocalFiniteElement(int s) │ │ │ │ │ +Constructor with a set of edge orientations. │ │ │ │ │ +Definition brezzidouglasmarinisimplex.hh:42 │ │ │ │ │ +Dune::BrezziDouglasMariniSimplexLocalFiniteElement<_D,_R,_2,_1_>:: │ │ │ │ │ +BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ +BrezziDouglasMariniSimplexLocalFiniteElement() │ │ │ │ │ +Default constructor. │ │ │ │ │ +Definition brezzidouglasmarinisimplex.hh:34 │ │ │ │ │ +Dune::BrezziDouglasMariniSimplexLocalFiniteElement<_D,_R,_2,_2_>:: │ │ │ │ │ +BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ +BrezziDouglasMariniSimplexLocalFiniteElement(int s) │ │ │ │ │ +Constructor with a set of edge orientations. │ │ │ │ │ +Definition brezzidouglasmarinisimplex.hh:64 │ │ │ │ │ +Dune::BrezziDouglasMariniSimplexLocalFiniteElement<_D,_R,_2,_2_>:: │ │ │ │ │ +BrezziDouglasMariniSimplexLocalFiniteElement │ │ │ │ │ +BrezziDouglasMariniSimplexLocalFiniteElement() │ │ │ │ │ +Default constructor. │ │ │ │ │ +Definition brezzidouglasmarinisimplex.hh:56 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00497.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: edges0.5.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini1simplex2dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,34 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
edges0.5.hh File Reference
│ │ │ │ +
brezzidouglasmarini1simplex2dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#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>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

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...
class  Dune::BDM1Simplex2DLocalInterpolation< LB >
 First order Brezzi-Douglas-Marini shape functions on the reference triangle. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,30 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * whitney │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1simplex2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -edges0.5.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ - 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... │ │ │ │ │ +class  Dune::BDM1Simplex2DLocalInterpolation<_LB_> │ │ │ │ │ +  First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ + triangle. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00497_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: edges0.5.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini1simplex2dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,132 +70,134 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
edges0.5.hh
│ │ │ │ +
brezzidouglasmarini1simplex2dlocalinterpolation.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_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <dune/geometry/type.hh>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune {
│ │ │ │ -
16
│ │ │ │ -
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_; }
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALINTERPOLATION_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
23 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
25 {
│ │ │ │ +
26
│ │ │ │ +
27 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 {
│ │ │ │ +
31 sign0 = sign1 = sign2 = 1.0;
│ │ │ │ +
32 }
│ │ │ │ +
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
40 {
│ │ │ │ +
41 using std::sqrt;
│ │ │ │ +
42 sign0 = sign1 = sign2 = 1.0;
│ │ │ │ +
43 if (s & 1)
│ │ │ │ +
44 {
│ │ │ │ +
45 sign0 = -1.0;
│ │ │ │ +
46 }
│ │ │ │ +
47 if (s & 2)
│ │ │ │ +
48 {
│ │ │ │ +
49 sign1 = -1.0;
│ │ │ │ +
50 }
│ │ │ │ +
51 if (s & 4)
│ │ │ │ +
52 {
│ │ │ │ +
53 sign2 = -1.0;
│ │ │ │ +
54 }
│ │ │ │ +
55
│ │ │ │ +
56 n0[0] = 0.0;
│ │ │ │ +
57 n0[1] = -1.0;
│ │ │ │ +
58 n1[0] = -1.0;
│ │ │ │ +
59 n1[1] = 0.0;
│ │ │ │ +
60 n2[0] = 1.0/sqrt(2.0);
│ │ │ │ +
61 n2[1] = 1.0/sqrt(2.0);
│ │ │ │ +
62 c0 = 0.5*n0[0] - 1.0*n0[1];
│ │ │ │ +
63 c1 = -1.0*n1[0] + 0.5*n1[1];
│ │ │ │ +
64 c2 = 0.5*n2[0] + 0.5*n2[1];
│ │ │ │ +
65 }
│ │ │ │
│ │ │ │ +
66
│ │ │ │ +
75 template<typename F, typename C>
│ │ │ │
│ │ │ │ -
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
│ │ │ │ +
76 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
77 {
│ │ │ │ +
78 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
79 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
80
│ │ │ │ +
81 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
82
│ │ │ │ +
83 out.resize(6);
│ │ │ │ +
84 fill(out.begin(), out.end(), 0.0);
│ │ │ │ +
85
│ │ │ │ +
86 const int qOrder = 4;
│ │ │ │ +
87 const Dune::QuadratureRule<Scalar,1>& rule = Dune::QuadratureRules<Scalar,1>::rule(Dune::GeometryTypes::simplex(1), qOrder);
│ │ │ │ +
88
│ │ │ │ +
89 for (typename Dune::QuadratureRule<Scalar,1>::const_iterator it=rule.begin(); it!=rule.end(); ++it)
│ │ │ │ +
90 {
│ │ │ │ +
91 Scalar qPos = it->position();
│ │ │ │ +
92 typename LB::Traits::DomainType localPos;
│ │ │ │
93
│ │ │ │ -
102 template<class Geometry, class RF>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ +
94 localPos[0] = qPos;
│ │ │ │ +
95 localPos[1] = 0.0;
│ │ │ │ +
96 auto y = f(localPos);
│ │ │ │ +
97 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0/c0;
│ │ │ │ +
98 out[3] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight()/c0;
│ │ │ │ +
99
│ │ │ │ +
100 localPos[0] = 0.0;
│ │ │ │ +
101 localPos[1] = qPos;
│ │ │ │ +
102 y = f(localPos);
│ │ │ │ +
103 out[1] += (y[0]*n1[0] + y[1]*n1[1])*it->weight()*sign1/c1;
│ │ │ │ +
104 out[4] += (y[0]*n1[0] + y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight()/c1;
│ │ │ │
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
│ │ │ │ +
106 localPos[0] = 1.0 - qPos;
│ │ │ │ +
107 localPos[1] = qPos;
│ │ │ │ +
108 y = f(localPos);
│ │ │ │ +
109 out[2] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2/c2;
│ │ │ │ +
110 out[5] += (y[0]*n2[0] + y[1]*n2[1])*(2.0*qPos - 1.0)*it->weight()/c2;
│ │ │ │ +
111 }
│ │ │ │ +
112 }
│ │ │ │ +
│ │ │ │ +
113
│ │ │ │ +
114 private:
│ │ │ │ +
115 typename LB::Traits::RangeFieldType sign0,sign1,sign2;
│ │ │ │ +
116 typename LB::Traits::DomainType n0,n1,n2;
│ │ │ │ +
117 typename LB::Traits::RangeFieldType c0,c1,c2;
│ │ │ │ +
118 };
│ │ │ │ +
│ │ │ │ +
119}
│ │ │ │ +
120
│ │ │ │ +
121#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALINTERPOLATION_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on the reference triangle.
Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:25
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:76
│ │ │ │ +
BDM1Simplex2DLocalInterpolation(unsigned int s)
Make set number s, where 0 <= s < 8.
Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:39
│ │ │ │ +
BDM1Simplex2DLocalInterpolation()
Standard constructor.
Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:29
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,153 +7,138 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * whitney │ │ │ │ │ -edges0.5.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1simplex2d │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalinterpolation.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_HH │ │ │ │ │ - 7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH │ │ │ │ │ - 8 │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune { │ │ │ │ │ - 16 │ │ │ │ │ - 18 // │ │ │ │ │ - 19 // FiniteElement │ │ │ │ │ - 20 // │ │ │ │ │ - 21 │ │ │ │ │ - 23 │ │ │ │ │ - 41 template │ │ │ │ │ -42 class EdgeS0_5FiniteElement { │ │ │ │ │ - 43 public: │ │ │ │ │ -47 struct Traits { │ │ │ │ │ -48 typedef EdgeS0_5Basis Basis; │ │ │ │ │ - 49 typedef EdgeS0_5Interpolation Interpolation; │ │ │ │ │ -51 typedef EdgeS0_5Coefficients Coefficients; │ │ │ │ │ - 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 │ │ │ │ │ -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 │ │ │ │ │ - 83 const typename EdgeS0_5FiniteElement::Traits::Coefficients& │ │ │ │ │ - 84 EdgeS0_5FiniteElement::coefficients_ = │ │ │ │ │ - 85 typename Traits::Coefficients(); │ │ │ │ │ - 86 │ │ │ │ │ - 88 // │ │ │ │ │ - 89 // Factory │ │ │ │ │ - 90 // │ │ │ │ │ - 91 │ │ │ │ │ + 5#ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALINTERPOLATION_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 23 template │ │ │ │ │ +24 class BDM1Simplex2DLocalInterpolation │ │ │ │ │ + 25 { │ │ │ │ │ + 26 │ │ │ │ │ + 27 public: │ │ │ │ │ +29 BDM1Simplex2DLocalInterpolation () │ │ │ │ │ + 30 { │ │ │ │ │ + 31 sign0 = sign1 = sign2 = 1.0; │ │ │ │ │ + 32 } │ │ │ │ │ + 33 │ │ │ │ │ +39 BDM1Simplex2DLocalInterpolation (unsigned int s) │ │ │ │ │ + 40 { │ │ │ │ │ + 41 using std::sqrt; │ │ │ │ │ + 42 sign0 = sign1 = sign2 = 1.0; │ │ │ │ │ + 43 if (s & 1) │ │ │ │ │ + 44 { │ │ │ │ │ + 45 sign0 = -1.0; │ │ │ │ │ + 46 } │ │ │ │ │ + 47 if (s & 2) │ │ │ │ │ + 48 { │ │ │ │ │ + 49 sign1 = -1.0; │ │ │ │ │ + 50 } │ │ │ │ │ + 51 if (s & 4) │ │ │ │ │ + 52 { │ │ │ │ │ + 53 sign2 = -1.0; │ │ │ │ │ + 54 } │ │ │ │ │ + 55 │ │ │ │ │ + 56 n0[0] = 0.0; │ │ │ │ │ + 57 n0[1] = -1.0; │ │ │ │ │ + 58 n1[0] = -1.0; │ │ │ │ │ + 59 n1[1] = 0.0; │ │ │ │ │ + 60 n2[0] = 1.0/sqrt(2.0); │ │ │ │ │ + 61 n2[1] = 1.0/sqrt(2.0); │ │ │ │ │ + 62 c0 = 0.5*n0[0] - 1.0*n0[1]; │ │ │ │ │ + 63 c1 = -1.0*n1[0] + 0.5*n1[1]; │ │ │ │ │ + 64 c2 = 0.5*n2[0] + 0.5*n2[1]; │ │ │ │ │ + 65 } │ │ │ │ │ + 66 │ │ │ │ │ + 75 template │ │ │ │ │ +76 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ + 77 { │ │ │ │ │ + 78 // f gives v*outer normal at a point on the edge! │ │ │ │ │ + 79 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ + 80 │ │ │ │ │ + 81 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ + 82 │ │ │ │ │ + 83 out.resize(6); │ │ │ │ │ + 84 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ + 85 │ │ │ │ │ + 86 const int qOrder = 4; │ │ │ │ │ + 87 const Dune::QuadratureRule& rule = Dune:: │ │ │ │ │ +QuadratureRules::rule(Dune::GeometryTypes::simplex(1), qOrder); │ │ │ │ │ + 88 │ │ │ │ │ + 89 for (typename Dune::QuadratureRule::const_iterator it=rule.begin │ │ │ │ │ +(); it!=rule.end(); ++it) │ │ │ │ │ + 90 { │ │ │ │ │ + 91 Scalar qPos = it->position(); │ │ │ │ │ + 92 typename LB::Traits::DomainType localPos; │ │ │ │ │ 93 │ │ │ │ │ - 102 template │ │ │ │ │ -103 struct EdgeS0_5FiniteElementFactory { │ │ │ │ │ -104 typedef EdgeS0_5FiniteElement FiniteElement; │ │ │ │ │ + 94 localPos[0] = qPos; │ │ │ │ │ + 95 localPos[1] = 0.0; │ │ │ │ │ + 96 auto y = f(localPos); │ │ │ │ │ + 97 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0/c0; │ │ │ │ │ + 98 out[3] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight()/c0; │ │ │ │ │ + 99 │ │ │ │ │ + 100 localPos[0] = 0.0; │ │ │ │ │ + 101 localPos[1] = qPos; │ │ │ │ │ + 102 y = f(localPos); │ │ │ │ │ + 103 out[1] += (y[0]*n1[0] + y[1]*n1[1])*it->weight()*sign1/c1; │ │ │ │ │ + 104 out[4] += (y[0]*n1[0] + y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight()/c1; │ │ │ │ │ 105 │ │ │ │ │ - 107 │ │ │ │ │ - 121 template │ │ │ │ │ -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 │ │ │ │ │ + 106 localPos[0] = 1.0 - qPos; │ │ │ │ │ + 107 localPos[1] = qPos; │ │ │ │ │ + 108 y = f(localPos); │ │ │ │ │ + 109 out[2] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2/c2; │ │ │ │ │ + 110 out[5] += (y[0]*n2[0] + y[1]*n2[1])*(2.0*qPos - 1.0)*it->weight()/c2; │ │ │ │ │ + 111 } │ │ │ │ │ + 112 } │ │ │ │ │ + 113 │ │ │ │ │ + 114 private: │ │ │ │ │ + 115 typename LB::Traits::RangeFieldType sign0,sign1,sign2; │ │ │ │ │ + 116 typename LB::Traits::DomainType n0,n1,n2; │ │ │ │ │ + 117 typename LB::Traits::RangeFieldType c0,c1,c2; │ │ │ │ │ + 118 }; │ │ │ │ │ + 119} │ │ │ │ │ + 120 │ │ │ │ │ + 121#endif / │ │ │ │ │ +/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALINTERPOLATION_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::EdgeS0_5FiniteElement │ │ │ │ │ -FiniteElement for lowest order edge elements on simplices. │ │ │ │ │ -Definition edges0.5.hh:42 │ │ │ │ │ -Dune::EdgeS0_5FiniteElement::EdgeS0_5FiniteElement │ │ │ │ │ -EdgeS0_5FiniteElement(const Geometry &geo, const VertexOrder &vertexOrder) │ │ │ │ │ -Constructor. │ │ │ │ │ -Definition edges0.5.hh:65 │ │ │ │ │ -Dune::EdgeS0_5FiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -return geometry type of this element │ │ │ │ │ -Definition edges0.5.hh:79 │ │ │ │ │ -Dune::EdgeS0_5FiniteElement::basis │ │ │ │ │ -const Traits::Basis & basis() const │ │ │ │ │ -return reference to the basis object │ │ │ │ │ -Definition edges0.5.hh:71 │ │ │ │ │ -Dune::EdgeS0_5FiniteElement::interpolation │ │ │ │ │ -const Traits::Interpolation & interpolation() const │ │ │ │ │ -return reference to the interpolation object │ │ │ │ │ -Definition edges0.5.hh:73 │ │ │ │ │ -Dune::EdgeS0_5FiniteElement::coefficients │ │ │ │ │ -const Traits::Coefficients & coefficients() const │ │ │ │ │ -return reference to the coefficients object │ │ │ │ │ -Definition edges0.5.hh:76 │ │ │ │ │ -Dune::EdgeS0_5FiniteElement::Traits │ │ │ │ │ -Definition edges0.5.hh:47 │ │ │ │ │ -Dune::EdgeS0_5FiniteElement::Traits::Coefficients │ │ │ │ │ -EdgeS0_5Coefficients< Geometry::mydimension > Coefficients │ │ │ │ │ -Definition edges0.5.hh:51 │ │ │ │ │ -Dune::EdgeS0_5FiniteElement::Traits::Interpolation │ │ │ │ │ -EdgeS0_5Interpolation< Geometry, typename Basis::Traits > Interpolation │ │ │ │ │ -Definition edges0.5.hh:50 │ │ │ │ │ -Dune::EdgeS0_5FiniteElement::Traits::Basis │ │ │ │ │ -EdgeS0_5Basis< Geometry, RF > Basis │ │ │ │ │ -Definition edges0.5.hh:48 │ │ │ │ │ -Dune::EdgeS0_5FiniteElementFactory │ │ │ │ │ -Factory for EdgeS0_5FiniteElement objects. │ │ │ │ │ -Definition edges0.5.hh:103 │ │ │ │ │ -Dune::EdgeS0_5FiniteElementFactory::make │ │ │ │ │ -const FiniteElement make(const Geometry &geometry, const VertexOrder │ │ │ │ │ -&vertexOrder) │ │ │ │ │ -construct the factory │ │ │ │ │ -Definition edges0.5.hh:122 │ │ │ │ │ -Dune::EdgeS0_5FiniteElementFactory::FiniteElement │ │ │ │ │ -EdgeS0_5FiniteElement< Geometry, RF > FiniteElement │ │ │ │ │ -Definition edges0.5.hh:104 │ │ │ │ │ -Dune::EdgeS0_5Basis │ │ │ │ │ -Basis for order 0.5 (lowest order) edge elements on simplices. │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:38 │ │ │ │ │ -Dune::EdgeS0_5Basis::Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:41 │ │ │ │ │ -Dune::EdgeS0_5Coefficients │ │ │ │ │ -Coefficients for lowest order edge elements on simplices. │ │ │ │ │ -Definition whitney/edges0.5/coefficients.hh:30 │ │ │ │ │ -Dune::EdgeS0_5Interpolation │ │ │ │ │ -Interpolation for lowest order edge elements on simplices. │ │ │ │ │ -Definition whitney/edges0.5/interpolation.hh:33 │ │ │ │ │ -interpolation.hh │ │ │ │ │ -basis.hh │ │ │ │ │ -coefficients.hh │ │ │ │ │ +Dune::BDM1Simplex2DLocalInterpolation │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on the reference triangle. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:25 │ │ │ │ │ +Dune::BDM1Simplex2DLocalInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:76 │ │ │ │ │ +Dune::BDM1Simplex2DLocalInterpolation::BDM1Simplex2DLocalInterpolation │ │ │ │ │ +BDM1Simplex2DLocalInterpolation(unsigned int s) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:39 │ │ │ │ │ +Dune::BDM1Simplex2DLocalInterpolation::BDM1Simplex2DLocalInterpolation │ │ │ │ │ +BDM1Simplex2DLocalInterpolation() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalinterpolation.hh:29 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00500.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: common.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini1simplex2dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
common.hh File Reference
│ │ │ │ +
brezzidouglasmarini1simplex2dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <cstddef>
│ │ │ │ -#include <dune/geometry/dimension.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.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::BDM1Simplex2DLocalCoefficients
 Layout map for Brezzi-Douglas-Marini-1 elements on triangles. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * whitney │ │ │ │ │ - * edges0.5 │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1simplex2d │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -common.hh File Reference │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalcoefficients.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localkey.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::BDM1Simplex2DLocalCoefficients │ │ │ │ │ +  Layout map for Brezzi-Douglas-Marini-1 elements on triangles. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00500_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: common.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini1simplex2dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,60 +70,78 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
common.hh
│ │ │ │ +
brezzidouglasmarini1simplex2dlocalcoefficients.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
│ │ │ │ -
8
│ │ │ │ -
9#include <cstddef>
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │
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 };
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25
│ │ │ │ +
26 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30 for (std::size_t i=0; i<3; i++)
│ │ │ │ +
31 {
│ │ │ │ +
32 li[i] = LocalKey(i,1,0);
│ │ │ │ +
33 li[3 + i] = LocalKey(i,1,1);
│ │ │ │ +
34 }
│ │ │ │ +
35 }
│ │ │ │
│ │ │ │
36
│ │ │ │ -
37} // namespace Dune
│ │ │ │ -
38
│ │ │ │ -
39#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH
│ │ │ │ +
│ │ │ │ +
38 std::size_t size () const
│ │ │ │ +
39 {
│ │ │ │ +
40 return 6;
│ │ │ │ +
41 }
│ │ │ │ +
│ │ │ │ +
42
│ │ │ │ +
│ │ │ │ +
44 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
45 {
│ │ │ │ +
46 return li[i];
│ │ │ │ +
47 }
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
49 private:
│ │ │ │ +
50 std::vector<LocalKey> li;
│ │ │ │ +
51 };
│ │ │ │ +
│ │ │ │ +
52}
│ │ │ │ +
53#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALCOEFFICIENTS_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
│ │ │ │ +
Layout map for Brezzi-Douglas-Marini-1 elements on triangles.
Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:24
│ │ │ │ +
BDM1Simplex2DLocalCoefficients()
Standard constructor.
Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:28
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:44
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:38
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,65 +7,81 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * whitney │ │ │ │ │ - * edges0.5 │ │ │ │ │ -common.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1simplex2d │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalcoefficients.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 │ │ │ │ │ - 8 │ │ │ │ │ - 9#include │ │ │ │ │ + 5#ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune { │ │ │ │ │ - 16 │ │ │ │ │ - 18 template │ │ │ │ │ -19 struct EdgeS0_5Common { │ │ │ │ │ -21 using RefElem = │ │ │ │ │ - 22 decltype(referenceElement(DF{}, GeometryTypes::simplex(dim), │ │ │ │ │ - 23 Dim{})); │ │ │ │ │ - 24 │ │ │ │ │ -26 RefElem refelem = referenceElement(DF{}, GeometryTypes::simplex(dim), │ │ │ │ │ - 27 Dim{}); │ │ │ │ │ - 28 │ │ │ │ │ - 30 │ │ │ │ │ -34 std::size_t s = refelem.size(dim-1); │ │ │ │ │ - 35 }; │ │ │ │ │ + 11#include "../../common/localkey.hh" │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ +23 class BDM1Simplex2DLocalCoefficients │ │ │ │ │ + 24 { │ │ │ │ │ + 25 │ │ │ │ │ + 26 public: │ │ │ │ │ +28 BDM1Simplex2DLocalCoefficients () : li(6) │ │ │ │ │ + 29 { │ │ │ │ │ + 30 for (std::size_t i=0; i<3; i++) │ │ │ │ │ + 31 { │ │ │ │ │ + 32 li[i] = LocalKey(i,1,0); │ │ │ │ │ + 33 li[3 + i] = LocalKey(i,1,1); │ │ │ │ │ + 34 } │ │ │ │ │ + 35 } │ │ │ │ │ 36 │ │ │ │ │ - 37} // namespace Dune │ │ │ │ │ - 38 │ │ │ │ │ - 39#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH │ │ │ │ │ +38 std::size_t size () const │ │ │ │ │ + 39 { │ │ │ │ │ + 40 return 6; │ │ │ │ │ + 41 } │ │ │ │ │ + 42 │ │ │ │ │ +44 const LocalKey& localKey (std::size_t i) const │ │ │ │ │ + 45 { │ │ │ │ │ + 46 return li[i]; │ │ │ │ │ + 47 } │ │ │ │ │ + 48 │ │ │ │ │ + 49 private: │ │ │ │ │ + 50 std::vector li; │ │ │ │ │ + 51 }; │ │ │ │ │ + 52} │ │ │ │ │ + 53#endif / │ │ │ │ │ +/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::EdgeS0_5Common │ │ │ │ │ -Common base class for edge elements. │ │ │ │ │ -Definition common.hh:19 │ │ │ │ │ -Dune::EdgeS0_5Common::refelem │ │ │ │ │ -RefElem refelem │ │ │ │ │ -The reference element for this edge element. │ │ │ │ │ -Definition common.hh:26 │ │ │ │ │ -Dune::EdgeS0_5Common::RefElem │ │ │ │ │ -decltype(referenceElement(DF{}, GeometryTypes::simplex(dim), Dim< dim >{})) │ │ │ │ │ -RefElem │ │ │ │ │ -The type of the referenceElement. │ │ │ │ │ -Definition common.hh:23 │ │ │ │ │ -Dune::EdgeS0_5Common::s │ │ │ │ │ -std::size_t s │ │ │ │ │ -The number of base functions. │ │ │ │ │ -Definition common.hh:34 │ │ │ │ │ +Dune::BDM1Simplex2DLocalCoefficients │ │ │ │ │ +Layout map for Brezzi-Douglas-Marini-1 elements on triangles. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::BDM1Simplex2DLocalCoefficients::BDM1Simplex2DLocalCoefficients │ │ │ │ │ +BDM1Simplex2DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:28 │ │ │ │ │ +Dune::BDM1Simplex2DLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:44 │ │ │ │ │ +Dune::BDM1Simplex2DLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalcoefficients.hh:38 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00503.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini1simplex2dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,25 +65,44 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
brezzidouglasmarini1simplex2dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinicube.hh>
│ │ │ │ -#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinisimplex.hh>
│ │ │ │ +
#include <array>
│ │ │ │ +#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::BDM1Simplex2DLocalBasis< D, R >
 First order Brezzi-Douglas-Marini shape functions on the reference triangle. More...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,15 +6,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -brezzidouglasmarini.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1simplex2d │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "../../common/localbasis.hh" │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ + Classes │ │ │ │ │ +class  Dune::BDM1Simplex2DLocalBasis<_D,_R_> │ │ │ │ │ +  First order Brezzi-Douglas-Marini shape functions on the reference │ │ │ │ │ + triangle. More... │ │ │ │ │ +  │ │ │ │ │ + Namespaces │ │ │ │ │ +namespace  Dune │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00503_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini1simplex2dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,35 +70,215 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini.hh
│ │ │ │ +
brezzidouglasmarini1simplex2dlocalbasis.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8// BDM implementations with compile-time order
│ │ │ │ - │ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <bitset>
│ │ │ │ +
10#include <numeric>
│ │ │ │ +
11#include <vector>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/common/fmatrix.hh>
│ │ │ │ +
14
│ │ │ │ +
15#include "../../common/localbasis.hh"
│ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
28 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 {
│ │ │ │ +
31
│ │ │ │ +
32 public:
│ │ │ │ +
33 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,2,Dune::FieldVector<R,2>,
│ │ │ │ +
34 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ +
35
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 {
│ │ │ │ +
39 for (size_t i=0; i<3; i++)
│ │ │ │ +
40 sign_[i] = 1.0;
│ │ │ │ +
41 }
│ │ │ │ +
│ │ │ │ +
42
│ │ │ │ +
│ │ │ │ +
48 BDM1Simplex2DLocalBasis (std::bitset<3> s)
│ │ │ │ +
49 {
│ │ │ │ +
50 for (size_t i=0; i<3; i++)
│ │ │ │ +
51 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ +
55 unsigned int size () const
│ │ │ │ +
56 {
│ │ │ │ +
57 return 6;
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
│ │ │ │ +
66 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
67 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
68 {
│ │ │ │ +
69 out.resize(6);
│ │ │ │ +
70
│ │ │ │ +
71 out[0][0] = sign_[0]*in[0];
│ │ │ │ +
72 out[0][1] = sign_[0]*(in[1] - 1.0);
│ │ │ │ +
73 out[1][0] = sign_[1]*(in[0] - 1.0);
│ │ │ │ +
74 out[1][1] = sign_[1]*in[1];
│ │ │ │ +
75 out[2][0] = sign_[2]*in[0];
│ │ │ │ +
76 out[2][1] = sign_[2]*in[1];
│ │ │ │ +
77 out[3][0] = 3.0*in[0];
│ │ │ │ +
78 out[3][1] = 3.0 - 6.0*in[0] - 3.0*in[1];
│ │ │ │ +
79 out[4][0] = -3.0 + 3.0*in[0] + 6.0*in[1];
│ │ │ │ +
80 out[4][1] = -3.0*in[1];
│ │ │ │ +
81 out[5][0] = -3.0*in[0];
│ │ │ │ +
82 out[5][1] = 3.0*in[1];
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
│ │ │ │ +
91 inline void evaluateJacobian (const typename Traits::DomainType& in,
│ │ │ │ +
92 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
93 {
│ │ │ │ +
94 out.resize(6);
│ │ │ │ +
95
│ │ │ │ +
96 out[0][0][0] = sign_[0];
│ │ │ │ +
97 out[0][0][1] = 0.0;
│ │ │ │ +
98 out[0][1][0] = 0.0;
│ │ │ │ +
99 out[0][1][1] = sign_[0];
│ │ │ │ +
100
│ │ │ │ +
101 out[1][0][0] = sign_[1];
│ │ │ │ +
102 out[1][0][1] = 0.0;
│ │ │ │ +
103 out[1][1][0] = 0.0;
│ │ │ │ +
104 out[1][1][1] = sign_[1];
│ │ │ │ +
105
│ │ │ │ +
106 out[2][0][0] = sign_[2];
│ │ │ │ +
107 out[2][0][1] = 0.0;
│ │ │ │ +
108 out[2][1][0] = 0.0;
│ │ │ │ +
109 out[2][1][1] = sign_[2];
│ │ │ │ +
110
│ │ │ │ +
111 out[3][0][0] = 3.0;
│ │ │ │ +
112 out[3][0][1] = 0.0;
│ │ │ │ +
113 out[3][1][0] = -6.0;
│ │ │ │ +
114 out[3][1][1] = -3.0;
│ │ │ │ +
115
│ │ │ │ +
116 out[4][0][0] = 3.0;
│ │ │ │ +
117 out[4][0][1] = 6.0;
│ │ │ │ +
118 out[4][1][0] = 0.0;
│ │ │ │ +
119 out[4][1][1] = -3.0;
│ │ │ │ +
120
│ │ │ │ +
121 out[5][0][0] = -3.0;
│ │ │ │ +
122 out[5][0][1] = 0.0;
│ │ │ │ +
123 out[5][1][0] = 0.0;
│ │ │ │ +
124 out[5][1][1] = 3.0;
│ │ │ │ +
125 }
│ │ │ │ +
│ │ │ │ +
126
│ │ │ │ +
│ │ │ │ +
128 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
129 const typename Traits::DomainType& in, // position
│ │ │ │ +
130 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
131 {
│ │ │ │ +
132 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
133 if (totalOrder == 0) {
│ │ │ │ +
134 evaluateFunction(in, out);
│ │ │ │ +
135 } else if (totalOrder == 1) {
│ │ │ │ +
136 out.resize(size());
│ │ │ │ +
137 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
138
│ │ │ │ +
139 switch (direction) {
│ │ │ │ +
140 case 0:
│ │ │ │ +
141 out[0][0] = sign_[0];
│ │ │ │ +
142 out[0][1] = 0.0;
│ │ │ │ +
143
│ │ │ │ +
144 out[1][0] = sign_[1];
│ │ │ │ +
145 out[1][1] = 0.0;
│ │ │ │ +
146
│ │ │ │ +
147 out[2][0] = sign_[2];
│ │ │ │ +
148 out[2][1] = 0.0;
│ │ │ │ +
149
│ │ │ │ +
150 out[3][0] = 3.0;
│ │ │ │ +
151 out[3][1] = -6.0;
│ │ │ │ +
152
│ │ │ │ +
153 out[4][0] = 3.0;
│ │ │ │ +
154 out[4][1] = 0.0;
│ │ │ │ +
155
│ │ │ │ +
156 out[5][0] = -3.0;
│ │ │ │ +
157 out[5][1] = 0.0;
│ │ │ │ +
158 break;
│ │ │ │ +
159 case 1:
│ │ │ │ +
160 out[0][0] = 0.0;
│ │ │ │ +
161 out[0][1] = sign_[0];
│ │ │ │ +
162
│ │ │ │ +
163 out[1][0] = 0.0;
│ │ │ │ +
164 out[1][1] = sign_[1];
│ │ │ │ +
165
│ │ │ │ +
166 out[2][0] = 0.0;
│ │ │ │ +
167 out[2][1] = sign_[2];
│ │ │ │ +
168
│ │ │ │ +
169 out[3][0] = 0.0;
│ │ │ │ +
170 out[3][1] = -3.0;
│ │ │ │ +
171
│ │ │ │ +
172 out[4][0] = 6.0;
│ │ │ │ +
173 out[4][1] = -3.0;
│ │ │ │ +
174
│ │ │ │ +
175 out[5][0] = 0.0;
│ │ │ │ +
176 out[5][1] = 3.0;
│ │ │ │ +
177 break;
│ │ │ │ +
178 default:
│ │ │ │ +
179 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
180 }
│ │ │ │ +
181 } else {
│ │ │ │ +
182 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
183 }
│ │ │ │ +
184 }
│ │ │ │ +
│ │ │ │ +
185
│ │ │ │ +
│ │ │ │ +
187 unsigned int order () const
│ │ │ │ +
188 {
│ │ │ │ +
189 return 1;
│ │ │ │ +
190 }
│ │ │ │ +
│ │ │ │ +
191
│ │ │ │ +
192 private:
│ │ │ │ +
193 std::array<R,3> sign_;
│ │ │ │ +
194 };
│ │ │ │ +
│ │ │ │ +
195}
│ │ │ │ +
196#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALBASIS_HH
│ │ │ │ +
Definition bdfmcube.hh:18
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on the reference triangle.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:30
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:91
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:55
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:66
│ │ │ │ +
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:34
│ │ │ │ +
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 brezzidouglasmarini1simplex2dlocalbasis.hh:128
│ │ │ │ +
BDM1Simplex2DLocalBasis()
Standard constructor.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:37
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:187
│ │ │ │ +
BDM1Simplex2DLocalBasis(std::bitset< 3 > s)
Make set number s, where 0 <= s < 8.
Definition brezzidouglasmarini1simplex2dlocalbasis.hh:48
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,28 +7,230 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -brezzidouglasmarini.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ + * brezzidouglasmarini1simplex2d │ │ │ │ │ +brezzidouglasmarini1simplex2dlocalbasis.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALBASIS_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8// BDM implementations with compile-time order │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH │ │ │ │ │ -brezzidouglasmarinicube.hh │ │ │ │ │ -brezzidouglasmarinisimplex.hh │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15#include "../../common/localbasis.hh" │ │ │ │ │ + 16 │ │ │ │ │ + 17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ + 28 template │ │ │ │ │ +29 class BDM1Simplex2DLocalBasis │ │ │ │ │ + 30 { │ │ │ │ │ + 31 │ │ │ │ │ + 32 public: │ │ │ │ │ + 33 typedef LocalBasisTraits,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +34 Dune::FieldMatrix > Traits; │ │ │ │ │ + 35 │ │ │ │ │ +37 BDM1Simplex2DLocalBasis () │ │ │ │ │ + 38 { │ │ │ │ │ + 39 for (size_t i=0; i<3; i++) │ │ │ │ │ + 40 sign_[i] = 1.0; │ │ │ │ │ + 41 } │ │ │ │ │ + 42 │ │ │ │ │ +48 BDM1Simplex2DLocalBasis (std::bitset<3> s) │ │ │ │ │ + 49 { │ │ │ │ │ + 50 for (size_t i=0; i<3; i++) │ │ │ │ │ + 51 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ + 52 } │ │ │ │ │ + 53 │ │ │ │ │ +55 unsigned int size () const │ │ │ │ │ + 56 { │ │ │ │ │ + 57 return 6; │ │ │ │ │ + 58 } │ │ │ │ │ + 59 │ │ │ │ │ +66 inline void evaluateFunction (const typename Traits::DomainType& in, │ │ │ │ │ + 67 std::vector& out) const │ │ │ │ │ + 68 { │ │ │ │ │ + 69 out.resize(6); │ │ │ │ │ + 70 │ │ │ │ │ + 71 out[0][0] = sign_[0]*in[0]; │ │ │ │ │ + 72 out[0][1] = sign_[0]*(in[1] - 1.0); │ │ │ │ │ + 73 out[1][0] = sign_[1]*(in[0] - 1.0); │ │ │ │ │ + 74 out[1][1] = sign_[1]*in[1]; │ │ │ │ │ + 75 out[2][0] = sign_[2]*in[0]; │ │ │ │ │ + 76 out[2][1] = sign_[2]*in[1]; │ │ │ │ │ + 77 out[3][0] = 3.0*in[0]; │ │ │ │ │ + 78 out[3][1] = 3.0 - 6.0*in[0] - 3.0*in[1]; │ │ │ │ │ + 79 out[4][0] = -3.0 + 3.0*in[0] + 6.0*in[1]; │ │ │ │ │ + 80 out[4][1] = -3.0*in[1]; │ │ │ │ │ + 81 out[5][0] = -3.0*in[0]; │ │ │ │ │ + 82 out[5][1] = 3.0*in[1]; │ │ │ │ │ + 83 } │ │ │ │ │ + 84 │ │ │ │ │ +91 inline void evaluateJacobian (const typename Traits::DomainType& in, │ │ │ │ │ + 92 std::vector& out) const │ │ │ │ │ + 93 { │ │ │ │ │ + 94 out.resize(6); │ │ │ │ │ + 95 │ │ │ │ │ + 96 out[0][0][0] = sign_[0]; │ │ │ │ │ + 97 out[0][0][1] = 0.0; │ │ │ │ │ + 98 out[0][1][0] = 0.0; │ │ │ │ │ + 99 out[0][1][1] = sign_[0]; │ │ │ │ │ + 100 │ │ │ │ │ + 101 out[1][0][0] = sign_[1]; │ │ │ │ │ + 102 out[1][0][1] = 0.0; │ │ │ │ │ + 103 out[1][1][0] = 0.0; │ │ │ │ │ + 104 out[1][1][1] = sign_[1]; │ │ │ │ │ + 105 │ │ │ │ │ + 106 out[2][0][0] = sign_[2]; │ │ │ │ │ + 107 out[2][0][1] = 0.0; │ │ │ │ │ + 108 out[2][1][0] = 0.0; │ │ │ │ │ + 109 out[2][1][1] = sign_[2]; │ │ │ │ │ + 110 │ │ │ │ │ + 111 out[3][0][0] = 3.0; │ │ │ │ │ + 112 out[3][0][1] = 0.0; │ │ │ │ │ + 113 out[3][1][0] = -6.0; │ │ │ │ │ + 114 out[3][1][1] = -3.0; │ │ │ │ │ + 115 │ │ │ │ │ + 116 out[4][0][0] = 3.0; │ │ │ │ │ + 117 out[4][0][1] = 6.0; │ │ │ │ │ + 118 out[4][1][0] = 0.0; │ │ │ │ │ + 119 out[4][1][1] = -3.0; │ │ │ │ │ + 120 │ │ │ │ │ + 121 out[5][0][0] = -3.0; │ │ │ │ │ + 122 out[5][0][1] = 0.0; │ │ │ │ │ + 123 out[5][1][0] = 0.0; │ │ │ │ │ + 124 out[5][1][1] = 3.0; │ │ │ │ │ + 125 } │ │ │ │ │ + 126 │ │ │ │ │ +128 void partial (const std::array& order, │ │ │ │ │ + 129 const typename Traits::DomainType& in, // position │ │ │ │ │ + 130 std::vector& out) const // return value │ │ │ │ │ + 131 { │ │ │ │ │ + 132 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ + 133 if (totalOrder == 0) { │ │ │ │ │ + 134 evaluateFunction(in, out); │ │ │ │ │ + 135 } else if (totalOrder == 1) { │ │ │ │ │ + 136 out.resize(size()); │ │ │ │ │ + 137 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ +(), order.end(), 1)); │ │ │ │ │ + 138 │ │ │ │ │ + 139 switch (direction) { │ │ │ │ │ + 140 case 0: │ │ │ │ │ + 141 out[0][0] = sign_[0]; │ │ │ │ │ + 142 out[0][1] = 0.0; │ │ │ │ │ + 143 │ │ │ │ │ + 144 out[1][0] = sign_[1]; │ │ │ │ │ + 145 out[1][1] = 0.0; │ │ │ │ │ + 146 │ │ │ │ │ + 147 out[2][0] = sign_[2]; │ │ │ │ │ + 148 out[2][1] = 0.0; │ │ │ │ │ + 149 │ │ │ │ │ + 150 out[3][0] = 3.0; │ │ │ │ │ + 151 out[3][1] = -6.0; │ │ │ │ │ + 152 │ │ │ │ │ + 153 out[4][0] = 3.0; │ │ │ │ │ + 154 out[4][1] = 0.0; │ │ │ │ │ + 155 │ │ │ │ │ + 156 out[5][0] = -3.0; │ │ │ │ │ + 157 out[5][1] = 0.0; │ │ │ │ │ + 158 break; │ │ │ │ │ + 159 case 1: │ │ │ │ │ + 160 out[0][0] = 0.0; │ │ │ │ │ + 161 out[0][1] = sign_[0]; │ │ │ │ │ + 162 │ │ │ │ │ + 163 out[1][0] = 0.0; │ │ │ │ │ + 164 out[1][1] = sign_[1]; │ │ │ │ │ + 165 │ │ │ │ │ + 166 out[2][0] = 0.0; │ │ │ │ │ + 167 out[2][1] = sign_[2]; │ │ │ │ │ + 168 │ │ │ │ │ + 169 out[3][0] = 0.0; │ │ │ │ │ + 170 out[3][1] = -3.0; │ │ │ │ │ + 171 │ │ │ │ │ + 172 out[4][0] = 6.0; │ │ │ │ │ + 173 out[4][1] = -3.0; │ │ │ │ │ + 174 │ │ │ │ │ + 175 out[5][0] = 0.0; │ │ │ │ │ + 176 out[5][1] = 3.0; │ │ │ │ │ + 177 break; │ │ │ │ │ + 178 default: │ │ │ │ │ + 179 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ + 180 } │ │ │ │ │ + 181 } else { │ │ │ │ │ + 182 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ + 183 } │ │ │ │ │ + 184 } │ │ │ │ │ + 185 │ │ │ │ │ +187 unsigned int order () const │ │ │ │ │ + 188 { │ │ │ │ │ + 189 return 1; │ │ │ │ │ + 190 } │ │ │ │ │ + 191 │ │ │ │ │ + 192 private: │ │ │ │ │ + 193 std::array sign_; │ │ │ │ │ + 194 }; │ │ │ │ │ + 195} │ │ │ │ │ + 196#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_SIMPLEX2D_LOCALBASIS_HH │ │ │ │ │ +Dune │ │ │ │ │ +Definition bdfmcube.hh:18 │ │ │ │ │ +Dune::BDM1Simplex2DLocalBasis │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on the reference triangle. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalbasis.hh:30 │ │ │ │ │ +Dune::BDM1Simplex2DLocalBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalbasis.hh:91 │ │ │ │ │ +Dune::BDM1Simplex2DLocalBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalbasis.hh:55 │ │ │ │ │ +Dune::BDM1Simplex2DLocalBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalbasis.hh:66 │ │ │ │ │ +Dune::BDM1Simplex2DLocalBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalbasis.hh:34 │ │ │ │ │ +Dune::BDM1Simplex2DLocalBasis::partial │ │ │ │ │ +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 brezzidouglasmarini1simplex2dlocalbasis.hh:128 │ │ │ │ │ +Dune::BDM1Simplex2DLocalBasis::BDM1Simplex2DLocalBasis │ │ │ │ │ +BDM1Simplex2DLocalBasis() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalbasis.hh:37 │ │ │ │ │ +Dune::BDM1Simplex2DLocalBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalbasis.hh:187 │ │ │ │ │ +Dune::BDM1Simplex2DLocalBasis::BDM1Simplex2DLocalBasis │ │ │ │ │ +BDM1Simplex2DLocalBasis(std::bitset< 3 > s) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +Definition brezzidouglasmarini1simplex2dlocalbasis.hh:48 │ │ │ │ │ +Dune::LocalBasisTraits │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +Definition common/localbasis.hh:34 │ │ │ │ │ +Dune::LocalBasisTraits::DomainType │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +Definition common/localbasis.hh:42 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00506.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: orthonormal.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini2cube2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
orthonormal.hh File Reference
│ │ │ │ +
brezzidouglasmarini2cube2d.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...
class  Dune::BDM2Cube2DLocalFiniteElement< D, R >
 Second order Brezzi-Douglas-Marini shape functions on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,24 +6,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -orthonormal.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +brezzidouglasmarini2cube2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ +#include "brezzidouglasmarini2cube2d/brezzidouglasmarini2cube2dlocalbasis.hh" │ │ │ │ │ +#include "brezzidouglasmarini2cube2d/ │ │ │ │ │ +brezzidouglasmarini2cube2dlocalcoefficients.hh" │ │ │ │ │ +#include "brezzidouglasmarini2cube2d/ │ │ │ │ │ +brezzidouglasmarini2cube2dlocalinterpolation.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... │ │ │ │ │ +class  Dune::BDM2Cube2DLocalFiniteElement<_D,_R_> │ │ │ │ │ +  Second order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00506_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: orthonormal.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini2cube2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,71 +70,123 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
orthonormal.hh
│ │ │ │ +
brezzidouglasmarini2cube2d.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
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_QUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_QUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
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 {}
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
50 };
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
52}
│ │ │ │
53
│ │ │ │ -
54#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 BDM2Cube2DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
79 };
│ │ │ │ +
│ │ │ │ +
80}
│ │ │ │ +
81#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_QUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ +
Second order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2cube2d.hh:27
│ │ │ │ +
BDM2Cube2DLocalFiniteElement()
Standard constructor.
Definition brezzidouglasmarini2cube2d.hh:36
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition brezzidouglasmarini2cube2d.hh:65
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition brezzidouglasmarini2cube2d.hh:49
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition brezzidouglasmarini2cube2d.hh:59
│ │ │ │ +
static constexpr GeometryType type()
Definition brezzidouglasmarini2cube2d.hh:70
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition brezzidouglasmarini2cube2d.hh:54
│ │ │ │ +
BDM2Cube2DLocalFiniteElement(int s)
Make set number s, where 0 <= s < ??
Definition brezzidouglasmarini2cube2d.hh:44
│ │ │ │ +
LocalFiniteElementTraits< BDM2Cube2DLocalBasis< D, R >, BDM2Cube2DLocalCoefficients, BDM2Cube2DLocalInterpolation< BDM2Cube2DLocalBasis< D, R > > > Traits
Definition brezzidouglasmarini2cube2d.hh:33
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2cube2dlocalbasis.hh:30
│ │ │ │ +
Layout map for Brezzi-Douglas-Marini-2 elements on quadrilaterals.
Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:24
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:26
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,78 +7,142 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -orthonormal.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ +brezzidouglasmarini2cube2d.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 │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_QUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_QUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 32 template< unsigned int dimDomain, class D, class R, │ │ │ │ │ - 33 class SF=R, class CF=SF > │ │ │ │ │ -34 class OrthonormalLocalFiniteElement │ │ │ │ │ - 35 : public GenericLocalFiniteElement< OrthonormalBasisFactory< dimDomain, SF, │ │ │ │ │ -CF >, │ │ │ │ │ - 36 DGLocalCoefficientsFactory< OrthonormalBasisFactory< dimDomain, SF, CF > >, │ │ │ │ │ - 37 LocalL2InterpolationFactory< OrthonormalBasisFactory< dimDomain, SF, CF │ │ │ │ │ ->,true > > │ │ │ │ │ - 38 { │ │ │ │ │ - 39 typedef GenericLocalFiniteElement<_OrthonormalBasisFactory<_dimDomain,_SF, │ │ │ │ │ -CF_>, │ │ │ │ │ - 40 DGLocalCoefficientsFactory<_OrthonormalBasisFactory<_dimDomain,_SF,_CF_> >, │ │ │ │ │ - 41 LocalL2InterpolationFactory<_OrthonormalBasisFactory<_dimDomain,_SF,_CF │ │ │ │ │ ->,true > > Base; │ │ │ │ │ - 42 public: │ │ │ │ │ - 43 using typename Base::Traits; │ │ │ │ │ - 44 │ │ │ │ │ -47 OrthonormalLocalFiniteElement ( const GeometryType >, unsigned int order ) │ │ │ │ │ - 48 : Base(gt, order) │ │ │ │ │ - 49 {} │ │ │ │ │ - 50 }; │ │ │ │ │ - 51 │ │ │ │ │ - 52} │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ + 11#include "brezzidouglasmarini2cube2d/ │ │ │ │ │ +brezzidouglasmarini2cube2dlocalbasis.hh" │ │ │ │ │ + 12#include "brezzidouglasmarini2cube2d/ │ │ │ │ │ +brezzidouglasmarini2cube2dlocalcoefficients.hh" │ │ │ │ │ + 13#include "brezzidouglasmarini2cube2d/ │ │ │ │ │ +brezzidouglasmarini2cube2dlocalinterpolation.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 25 template │ │ │ │ │ +26 class BDM2Cube2DLocalFiniteElement │ │ │ │ │ + 27 { │ │ │ │ │ + 28 │ │ │ │ │ + 29 public: │ │ │ │ │ + 30 typedef LocalFiniteElementTraits< │ │ │ │ │ + 31 BDM2Cube2DLocalBasis, │ │ │ │ │ + 32 BDM2Cube2DLocalCoefficients, │ │ │ │ │ +33 BDM2Cube2DLocalInterpolation > > Traits; │ │ │ │ │ + 34 │ │ │ │ │ +36 BDM2Cube2DLocalFiniteElement () │ │ │ │ │ + 37 {} │ │ │ │ │ + 38 │ │ │ │ │ +44 BDM2Cube2DLocalFiniteElement (int s) : │ │ │ │ │ + 45 basis(s), │ │ │ │ │ + 46 interpolation(s) │ │ │ │ │ + 47 {} │ │ │ │ │ + 48 │ │ │ │ │ +49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 50 { │ │ │ │ │ + 51 return basis; │ │ │ │ │ + 52 } │ │ │ │ │ 53 │ │ │ │ │ - 54#endif │ │ │ │ │ -l2interpolation.hh │ │ │ │ │ -dglocalcoefficients.hh │ │ │ │ │ -orthonormalbasis.hh │ │ │ │ │ +54 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ + 55 { │ │ │ │ │ + 56 return coefficients; │ │ │ │ │ + 57 } │ │ │ │ │ + 58 │ │ │ │ │ +59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 76 BDM2Cube2DLocalBasis basis; │ │ │ │ │ + 77 BDM2Cube2DLocalCoefficients coefficients; │ │ │ │ │ + 78 BDM2Cube2DLocalInterpolation > interpolation; │ │ │ │ │ + 79 }; │ │ │ │ │ + 80} │ │ │ │ │ + 81#endif / │ │ │ │ │ +/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_QUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +brezzidouglasmarini2cube2dlocalcoefficients.hh │ │ │ │ │ +brezzidouglasmarini2cube2dlocalbasis.hh │ │ │ │ │ +brezzidouglasmarini2cube2dlocalinterpolation.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::OrthonormalLocalFiniteElement │ │ │ │ │ -A class providing orthonormal basis functions. │ │ │ │ │ -Definition orthonormal.hh:38 │ │ │ │ │ -Dune::OrthonormalLocalFiniteElement::OrthonormalLocalFiniteElement │ │ │ │ │ -OrthonormalLocalFiniteElement(const GeometryType >, unsigned int order) │ │ │ │ │ -Definition orthonormal.hh:47 │ │ │ │ │ -Dune::DGLocalCoefficientsFactory │ │ │ │ │ -A factory class for the dg local coefficients. │ │ │ │ │ -Definition dglocalcoefficients.hh:59 │ │ │ │ │ -Dune::LocalL2InterpolationFactory │ │ │ │ │ -A factory class for the local l2 interpolations taking a basis factory. │ │ │ │ │ -Definition l2interpolation.hh:199 │ │ │ │ │ -Dune::GenericLocalFiniteElement │ │ │ │ │ -A LocalFiniteElement implementation based on three TopologyFactories providing │ │ │ │ │ -the LocalBasis,... │ │ │ │ │ -Definition localfunctions/utility/localfiniteelement.hh:25 │ │ │ │ │ -Dune::GenericLocalFiniteElement::Traits │ │ │ │ │ -LocalFiniteElementTraits< typename BasisF::Object, typename CoeffF::Object, │ │ │ │ │ -typename InterpolF::Object > Traits │ │ │ │ │ -Definition localfunctions/utility/localfiniteelement.hh:29 │ │ │ │ │ -localfiniteelement.hh │ │ │ │ │ +Dune::BDM2Cube2DLocalFiniteElement │ │ │ │ │ +Second order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ +Definition brezzidouglasmarini2cube2d.hh:27 │ │ │ │ │ +Dune::BDM2Cube2DLocalFiniteElement::BDM2Cube2DLocalFiniteElement │ │ │ │ │ +BDM2Cube2DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini2cube2d.hh:36 │ │ │ │ │ +Dune::BDM2Cube2DLocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition brezzidouglasmarini2cube2d.hh:65 │ │ │ │ │ +Dune::BDM2Cube2DLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition brezzidouglasmarini2cube2d.hh:49 │ │ │ │ │ +Dune::BDM2Cube2DLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition brezzidouglasmarini2cube2d.hh:59 │ │ │ │ │ +Dune::BDM2Cube2DLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition brezzidouglasmarini2cube2d.hh:70 │ │ │ │ │ +Dune::BDM2Cube2DLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition brezzidouglasmarini2cube2d.hh:54 │ │ │ │ │ +Dune::BDM2Cube2DLocalFiniteElement::BDM2Cube2DLocalFiniteElement │ │ │ │ │ +BDM2Cube2DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < ?? │ │ │ │ │ +Definition brezzidouglasmarini2cube2d.hh:44 │ │ │ │ │ +Dune::BDM2Cube2DLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< BDM2Cube2DLocalBasis< D, R >, │ │ │ │ │ +BDM2Cube2DLocalCoefficients, BDM2Cube2DLocalInterpolation< │ │ │ │ │ +BDM2Cube2DLocalBasis< D, R > > > Traits │ │ │ │ │ +Definition brezzidouglasmarini2cube2d.hh:33 │ │ │ │ │ +Dune::BDM2Cube2DLocalBasis │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalbasis.hh:30 │ │ │ │ │ +Dune::BDM2Cube2DLocalCoefficients │ │ │ │ │ +Layout map for Brezzi-Douglas-Marini-2 elements on quadrilaterals. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::BDM2Cube2DLocalInterpolation │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ +Definition brezzidouglasmarini2cube2dlocalinterpolation.hh:26 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00509.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp1localbasis.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini2simplex2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,54 +65,43 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
refinedp1localbasis.hh File Reference
│ │ │ │ +
brezzidouglasmarini2simplex2d.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...
class  Dune::BDM2Simplex2DLocalFiniteElement< D, R >
 Second order Brezzi-Douglas-Marini shape functions on triangles. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Linear Lagrange shape functions on a uniformly refined reference element.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,39 +6,30 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ - * refinedp1 │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -refinedp1localbasis.hh File Reference │ │ │ │ │ -Linear Lagrange shape functions on a uniformly refined reference element. │ │ │ │ │ -More... │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +brezzidouglasmarini2simplex2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ +#include "brezzidouglasmarini2simplex2d/ │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalbasis.hh" │ │ │ │ │ +#include "brezzidouglasmarini2simplex2d/ │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalcoefficients.hh" │ │ │ │ │ +#include "brezzidouglasmarini2simplex2d/ │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalinterpolation.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. │ │ │ │ │ +class  Dune::BDM2Simplex2DLocalFiniteElement<_D,_R_> │ │ │ │ │ +  Second order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ More... │ │ │ │ │   │ │ │ │ │ -class  Dune::RefinedP1LocalBasis<_D,_R,_3_> │ │ │ │ │ -  Uniformly refined linear Lagrange shape functions on the 3D-simplex │ │ │ │ │ - (tetrahedron). More... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ -***** Detailed Description ***** │ │ │ │ │ -Linear Lagrange shape functions on a uniformly refined reference element. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00509_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp1localbasis.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini2simplex2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,831 +70,123 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedp1localbasis.hh
│ │ │ │ +
brezzidouglasmarini2simplex2d.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
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
12#include <numeric>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/common/fmatrix.hh>
│ │ │ │ -
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.
│ │ │ │ +
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::triangle;
│ │ │ │ +
73 }
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
75 private:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
79 };
│ │ │ │ +
│ │ │ │ +
80}
│ │ │ │ +
81#endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALFINITEELEMENT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ +
Second order Brezzi-Douglas-Marini shape functions on triangles.
Definition brezzidouglasmarini2simplex2d.hh:27
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition brezzidouglasmarini2simplex2d.hh:54
│ │ │ │ +
LocalFiniteElementTraits< BDM2Simplex2DLocalBasis< D, R >, BDM2Simplex2DLocalCoefficients, BDM2Simplex2DLocalInterpolation< BDM2Simplex2DLocalBasis< D, R > > > Traits
Definition brezzidouglasmarini2simplex2d.hh:33
│ │ │ │ +
BDM2Simplex2DLocalFiniteElement()
Standard constructor.
Definition brezzidouglasmarini2simplex2d.hh:36
│ │ │ │ +
static constexpr GeometryType type()
Definition brezzidouglasmarini2simplex2d.hh:70
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition brezzidouglasmarini2simplex2d.hh:49
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition brezzidouglasmarini2simplex2d.hh:59
│ │ │ │ +
BDM2Simplex2DLocalFiniteElement(int s)
Make set number s, where 0 <= s < 8.
Definition brezzidouglasmarini2simplex2d.hh:44
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition brezzidouglasmarini2simplex2d.hh:65
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on quadrilaterals.
Definition brezzidouglasmarini2simplex2dlocalbasis.hh:30
│ │ │ │ +
Layout map for Brezzi-Douglas-Marini-2 elements on triangles.
Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:24
│ │ │ │ +
First order Brezzi-Douglas-Marini shape functions on triangles.
Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:26
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,871 +7,145 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ - * refinedp1 │ │ │ │ │ -refinedp1localbasis.hh │ │ │ │ │ + * brezzidouglasmarini │ │ │ │ │ +brezzidouglasmarini2simplex2d.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 │ │ │ │ │ + 5#ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALFINITEELEMENT_HH │ │ │ │ │ + 6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15 │ │ │ │ │ - 16#include │ │ │ │ │ - 17 │ │ │ │ │ - 18namespace Dune │ │ │ │ │ - 19{ │ │ │ │ │ - 20 template │ │ │ │ │ -21 class RefinedP1LocalBasis │ │ │ │ │ - 22 : public RefinedSimplexLocalBasis │ │ │ │ │ - 23 { │ │ │ │ │ - 24 public: │ │ │ │ │ -25 RefinedP1LocalBasis() │ │ │ │ │ - 26 { │ │ │ │ │ - 27 DUNE_THROW(Dune::NotImplemented,"RefinedP1LocalBasis not implemented for │ │ │ │ │ -dim > 3."); │ │ │ │ │ - 28 } │ │ │ │ │ - 29 }; │ │ │ │ │ - 30 │ │ │ │ │ - 52 template │ │ │ │ │ -53 class RefinedP1LocalBasis │ │ │ │ │ - 54 : public RefinedSimplexLocalBasis │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ + 11#include "brezzidouglasmarini2simplex2d/ │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalbasis.hh" │ │ │ │ │ + 12#include "brezzidouglasmarini2simplex2d/ │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalcoefficients.hh" │ │ │ │ │ + 13#include "brezzidouglasmarini2simplex2d/ │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalinterpolation.hh" │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 25 template │ │ │ │ │ +26 class BDM2Simplex2DLocalFiniteElement │ │ │ │ │ + 27 { │ │ │ │ │ + 28 │ │ │ │ │ + 29 public: │ │ │ │ │ + 30 typedef LocalFiniteElementTraits< │ │ │ │ │ + 31 BDM2Simplex2DLocalBasis, │ │ │ │ │ + 32 BDM2Simplex2DLocalCoefficients, │ │ │ │ │ +33 BDM2Simplex2DLocalInterpolation > > Traits; │ │ │ │ │ + 34 │ │ │ │ │ +36 BDM2Simplex2DLocalFiniteElement () │ │ │ │ │ + 37 {} │ │ │ │ │ + 38 │ │ │ │ │ +44 BDM2Simplex2DLocalFiniteElement (int s) : │ │ │ │ │ + 45 basis(s), │ │ │ │ │ + 46 interpolation(s) │ │ │ │ │ + 47 {} │ │ │ │ │ + 48 │ │ │ │ │ +49 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ + 50 { │ │ │ │ │ + 51 return basis; │ │ │ │ │ + 52 } │ │ │ │ │ + 53 │ │ │ │ │ +54 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ 55 { │ │ │ │ │ - 56 public: │ │ │ │ │ - 58 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -59 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ - 127 const typename Traits::DomainType& 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 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 │ │ │ │ │ -194 class RefinedP1LocalBasis │ │ │ │ │ - 195 : public RefinedSimplexLocalBasis │ │ │ │ │ - 196 { │ │ │ │ │ - 197 public: │ │ │ │ │ - 199 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -200 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ - 314 const typename Traits::DomainType& 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 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 │ │ │ │ │ -423 class RefinedP1LocalBasis │ │ │ │ │ - 424 : public RefinedSimplexLocalBasis │ │ │ │ │ - 425 { │ │ │ │ │ - 426 public: │ │ │ │ │ - 428 typedef LocalBasisTraits,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -429 Dune::FieldMatrix > 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& 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& 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& order, │ │ │ │ │ - 691 const typename Traits::DomainType& 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 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 │ │ │ │ │ -refinedsimplexlocalbasis.hh │ │ │ │ │ -Contains a base class for LocalBasis classes based on uniform refinement. │ │ │ │ │ + 56 return coefficients; │ │ │ │ │ + 57 } │ │ │ │ │ + 58 │ │ │ │ │ +59 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ + 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: │ │ │ │ │ + 76 BDM2Simplex2DLocalBasis basis; │ │ │ │ │ + 77 BDM2Simplex2DLocalCoefficients coefficients; │ │ │ │ │ + 78 BDM2Simplex2DLocalInterpolation > │ │ │ │ │ +interpolation; │ │ │ │ │ + 79 }; │ │ │ │ │ + 80} │ │ │ │ │ + 81#endif / │ │ │ │ │ +/ DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalbasis.hh │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalinterpolation.hh │ │ │ │ │ +brezzidouglasmarini2simplex2dlocalcoefficients.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::RefinedSimplexLocalBasis │ │ │ │ │ -Definition refinedsimplexlocalbasis.hh:20 │ │ │ │ │ -Dune::RefinedP1LocalBasis │ │ │ │ │ -Definition refinedp1localbasis.hh:23 │ │ │ │ │ -Dune::RefinedP1LocalBasis::RefinedP1LocalBasis │ │ │ │ │ -RefinedP1LocalBasis() │ │ │ │ │ -Definition refinedp1localbasis.hh:25 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_1_>::Traits │ │ │ │ │ -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 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_1_>::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition refinedp1localbasis.hh:98 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_1_>::order │ │ │ │ │ -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 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_1_>::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition refinedp1localbasis.hh:68 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_1_>::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_1_>::size │ │ │ │ │ -static constexpr unsigned int size() │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition refinedp1localbasis.hh:62 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_2_>::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition refinedp1localbasis.hh:262 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_2_>::Traits │ │ │ │ │ -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 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_2_>::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition refinedp1localbasis.hh:209 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_2_>::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_2_>::order │ │ │ │ │ -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 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_2_>::size │ │ │ │ │ -static constexpr unsigned int size() │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition refinedp1localbasis.hh:203 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_3_>::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_3_>::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition refinedp1localbasis.hh:438 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_3_>::Traits │ │ │ │ │ -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 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_3_>::size │ │ │ │ │ -static constexpr unsigned int size() │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition refinedp1localbasis.hh:432 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_3_>::order │ │ │ │ │ -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 │ │ │ │ │ -Dune::RefinedP1LocalBasis<_D,_R,_3_>::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition refinedp1localbasis.hh:565 │ │ │ │ │ +Dune::BDM2Simplex2DLocalFiniteElement │ │ │ │ │ +Second order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2d.hh:27 │ │ │ │ │ +Dune::BDM2Simplex2DLocalFiniteElement::localCoefficients │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Definition brezzidouglasmarini2simplex2d.hh:54 │ │ │ │ │ +Dune::BDM2Simplex2DLocalFiniteElement::Traits │ │ │ │ │ +LocalFiniteElementTraits< BDM2Simplex2DLocalBasis< D, R >, │ │ │ │ │ +BDM2Simplex2DLocalCoefficients, BDM2Simplex2DLocalInterpolation< │ │ │ │ │ +BDM2Simplex2DLocalBasis< D, R > > > Traits │ │ │ │ │ +Definition brezzidouglasmarini2simplex2d.hh:33 │ │ │ │ │ +Dune::BDM2Simplex2DLocalFiniteElement::BDM2Simplex2DLocalFiniteElement │ │ │ │ │ +BDM2Simplex2DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2d.hh:36 │ │ │ │ │ +Dune::BDM2Simplex2DLocalFiniteElement::type │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +Definition brezzidouglasmarini2simplex2d.hh:70 │ │ │ │ │ +Dune::BDM2Simplex2DLocalFiniteElement::localBasis │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Definition brezzidouglasmarini2simplex2d.hh:49 │ │ │ │ │ +Dune::BDM2Simplex2DLocalFiniteElement::localInterpolation │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Definition brezzidouglasmarini2simplex2d.hh:59 │ │ │ │ │ +Dune::BDM2Simplex2DLocalFiniteElement::BDM2Simplex2DLocalFiniteElement │ │ │ │ │ +BDM2Simplex2DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2d.hh:44 │ │ │ │ │ +Dune::BDM2Simplex2DLocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2d.hh:65 │ │ │ │ │ +Dune::BDM2Simplex2DLocalBasis │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalbasis.hh:30 │ │ │ │ │ +Dune::BDM2Simplex2DLocalCoefficients │ │ │ │ │ +Layout map for Brezzi-Douglas-Marini-2 elements on triangles. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalcoefficients.hh:24 │ │ │ │ │ +Dune::BDM2Simplex2DLocalInterpolation │ │ │ │ │ +First order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ │ +Definition brezzidouglasmarini2simplex2dlocalinterpolation.hh:26 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +Definition localfiniteelementtraits.hh:16 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +Definition localfiniteelementtraits.hh:20 │ │ │ │ │ +Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +Definition localfiniteelementtraits.hh:24 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00512.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0localcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: refined.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,30 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
refinedp0localcoefficients.hh File Reference
│ │ │ │ +
refined.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localkey.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

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

│ │ │ │ -Namespaces

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

Detailed Description

│ │ │ │ +

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

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,19 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ - * refinedp0 │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -refinedp0localcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +refined.hh File Reference │ │ │ │ │ +Convenience header that includes all available LocalFiniteElements based on │ │ │ │ │ +uniform element refinement. More... │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -class  Dune::RefinedP0LocalCoefficients<_k_> │ │ │ │ │ -  Layout map for RefinedP0 elements. More... │ │ │ │ │ -  │ │ │ │ │ - Namespaces │ │ │ │ │ -namespace  Dune │ │ │ │ │ -  │ │ │ │ │ +***** Detailed Description ***** │ │ │ │ │ +Convenience header that includes all available LocalFiniteElements based on │ │ │ │ │ +uniform element refinement. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00512_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0localcoefficients.hh Source File │ │ │ │ +dune-localfunctions: refined.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,85 +70,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedp0localcoefficients.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_REFINED_P0_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_REFINED_P0_LOCALCOEFFICIENTS_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <iostream>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
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;
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ -
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
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Piecewise P0 finite element.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,84 +7,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ - * refinedp0 │ │ │ │ │ -refinedp0localcoefficients.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_REFINED_P0_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_REFINED_P0_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14namespace Dune │ │ │ │ │ - 15{ │ │ │ │ │ - 16 │ │ │ │ │ - 23 template │ │ │ │ │ -24 class RefinedP0LocalCoefficients │ │ │ │ │ - 25 { │ │ │ │ │ - 26 // 2 to the k-th power │ │ │ │ │ - 27 constexpr static int N = 1< localKeys_; │ │ │ │ │ - 52 │ │ │ │ │ - 53 }; │ │ │ │ │ - 54 │ │ │ │ │ - 55} │ │ │ │ │ - 56 │ │ │ │ │ - 57#endif │ │ │ │ │ -localkey.hh │ │ │ │ │ -Dune │ │ │ │ │ -Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::RefinedP0LocalCoefficients │ │ │ │ │ -Layout map for RefinedP0 elements. │ │ │ │ │ -Definition refinedp0localcoefficients.hh:25 │ │ │ │ │ -Dune::RefinedP0LocalCoefficients::RefinedP0LocalCoefficients │ │ │ │ │ -RefinedP0LocalCoefficients() │ │ │ │ │ -Definition refinedp0localcoefficients.hh:30 │ │ │ │ │ -Dune::RefinedP0LocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition refinedp0localcoefficients.hh:39 │ │ │ │ │ -Dune::RefinedP0LocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition refinedp0localcoefficients.hh:45 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ +refinedp1.hh │ │ │ │ │ +refinedp0.hh │ │ │ │ │ +Piecewise P0 finite element. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00515.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0localbasis.hh File Reference │ │ │ │ +dune-localfunctions: localcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
refinedp0localbasis.hh File Reference
│ │ │ │ +
localcoefficients.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>
│ │ │ │ +
#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::RefinedP0LocalBasis< D, R, dim >
 Uniformly refined constant shape functions on a unit simplex in R^dim. More...
class  Dune::BDFMCubeLocalCoefficients< D, R, dim, order >
 Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,28 +6,28 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ - * refinedp0 │ │ │ │ │ + * brezzidouglasfortinmarini │ │ │ │ │ + * cube │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -refinedp0localbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +localcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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... │ │ │ │ │ +class  Dune::BDFMCubeLocalCoefficients<_D,_R,_dim,_order_> │ │ │ │ │ +  Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00515_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0localbasis.hh Source File │ │ │ │ +dune-localfunctions: localcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,119 +70,102 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedp0localbasis.hh
│ │ │ │ +
localcoefficients.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
│ │ │ │ -
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/fvector.hh>
│ │ │ │ -
11#include <dune/common/fmatrix.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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
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.
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,133 +7,114 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ - * refinedp0 │ │ │ │ │ -refinedp0localbasis.hh │ │ │ │ │ + * brezzidouglasfortinmarini │ │ │ │ │ + * cube │ │ │ │ │ +localcoefficients.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 │ │ │ │ │ + 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_REFINED_P0_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_REFINED_P0_LOCALBASIS_HH │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ + 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 │ │ │ │ │ - 14#include │ │ │ │ │ - 15 │ │ │ │ │ - 16namespace Dune │ │ │ │ │ - 17{ │ │ │ │ │ - 18 │ │ │ │ │ - 37 template │ │ │ │ │ -38 class RefinedP0LocalBasis │ │ │ │ │ - 39 : public RefinedSimplexLocalBasis │ │ │ │ │ - 40 { │ │ │ │ │ - 41 // 2 to the k-th power │ │ │ │ │ - 42 constexpr static int N = 1<,R,1,Dune:: │ │ │ │ │ -FieldVector, Dune::FieldMatrix > 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& 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& order, │ │ │ │ │ - 74 const typename Traits::DomainType& in, // position │ │ │ │ │ - 75 std::vector& 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 │ │ │ │ │ -refinedsimplexlocalbasis.hh │ │ │ │ │ -Contains a base class for LocalBasis classes based on uniform refinement. │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune │ │ │ │ │ + 16{ │ │ │ │ │ + 17 │ │ │ │ │ + 31 template │ │ │ │ │ +32 class BDFMCubeLocalCoefficients │ │ │ │ │ + 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: │ │ │ │ │ +42 BDFMCubeLocalCoefficients () : li(numDofs) │ │ │ │ │ + 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 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 │ │ │ │ │ +localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::RefinedSimplexLocalBasis │ │ │ │ │ -Definition refinedsimplexlocalbasis.hh:20 │ │ │ │ │ -Dune::RefinedP0LocalBasis │ │ │ │ │ -Uniformly refined constant shape functions on a unit simplex in R^dim. │ │ │ │ │ -Definition refinedp0localbasis.hh:40 │ │ │ │ │ -Dune::RefinedP0LocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::RefinedP0LocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition refinedp0localbasis.hh:54 │ │ │ │ │ -Dune::RefinedP0LocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Definition refinedp0localbasis.hh:64 │ │ │ │ │ -Dune::RefinedP0LocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition refinedp0localbasis.hh:91 │ │ │ │ │ -Dune::RefinedP0LocalBasis::Traits │ │ │ │ │ -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 │ │ │ │ │ -Dune::RefinedP0LocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition refinedp0localbasis.hh:48 │ │ │ │ │ -localbasis.hh │ │ │ │ │ +Dune::BDFMCubeLocalCoefficients │ │ │ │ │ +Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes. │ │ │ │ │ +Definition localcoefficients.hh:33 │ │ │ │ │ +Dune::BDFMCubeLocalCoefficients::BDFMCubeLocalCoefficients │ │ │ │ │ +BDFMCubeLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition localcoefficients.hh:42 │ │ │ │ │ +Dune::BDFMCubeLocalCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition localcoefficients.hh:53 │ │ │ │ │ +Dune::BDFMCubeLocalCoefficients::localKey │ │ │ │ │ +auto localKey(std::size_t i) const -> const LocalKey & │ │ │ │ │ +geth i'th index │ │ │ │ │ +Definition localcoefficients.hh:56 │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00518.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0localinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: bdfmcube.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,38 +65,36 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
refinedp0localinterpolation.hh File Reference
│ │ │ │ +
bdfmcube.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 > >
class  Dune::BDFMCubeLocalFiniteElement< D, R, dim, order >
 Brezzi-Douglas-Fortin-Marini finite elements for cubes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,29 +6,28 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ - * refinedp0 │ │ │ │ │ + * brezzidouglasfortinmarini │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -refinedp0localinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +bdfmcube.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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_>_> │ │ │ │ │ +class  Dune::BDFMCubeLocalFiniteElement<_D,_R,_dim,_order_> │ │ │ │ │ +  Brezzi-Douglas-Fortin-Marini finite elements for cubes. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00518_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0localinterpolation.hh Source File │ │ │ │ +dune-localfunctions: bdfmcube.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,205 +70,95 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedp0localinterpolation.hh
│ │ │ │ +
bdfmcube.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_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11namespace Dune
│ │ │ │ -
12{
│ │ │ │ -
13 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
15 {};
│ │ │ │ -
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
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 };
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
43 template<class D, class R, unsigned int dim, unsigned int order>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
45 {
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
49
│ │ │ │ -
50 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
52 {
│ │ │ │ - │ │ │ │ -
54 typedef typename LB::Traits::DomainType DT;
│ │ │ │ +
50 public:
│ │ │ │ + │ │ │ │ +
52
│ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
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 };
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
79} // namespace Dune
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
81#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,201 +7,116 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ - * refinedp0 │ │ │ │ │ -refinedp0localinterpolation.hh │ │ │ │ │ + * brezzidouglasfortinmarini │ │ │ │ │ +bdfmcube.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_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11namespace Dune │ │ │ │ │ - 12{ │ │ │ │ │ - 13 template │ │ │ │ │ -14 class RefinedP0LocalInterpolation │ │ │ │ │ - 15 {}; │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ 16 │ │ │ │ │ - 17 template │ │ │ │ │ -18 class RefinedP0LocalInterpolation > │ │ │ │ │ - 19 { │ │ │ │ │ - 20 typedef RefinedP0LocalBasis LB; │ │ │ │ │ - 21 typedef typename LB::Traits::DomainType DT; │ │ │ │ │ - 22 │ │ │ │ │ - 23 public: │ │ │ │ │ -24 RefinedP0LocalInterpolation() : │ │ │ │ │ - 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 │ │ │ │ │ -35 void interpolate (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 }; │ │ │ │ │ +17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ + 19 │ │ │ │ │ + 43 template │ │ │ │ │ +44 class BDFMCubeLocalFiniteElement │ │ │ │ │ + 45 { │ │ │ │ │ + 46 using LocalBasis = BDFMCubeLocalBasis; │ │ │ │ │ + 47 using LocalCoefficients = BDFMCubeLocalCoefficients; │ │ │ │ │ + 48 using LocalInterpolation = BDFMCubeLocalInterpolation; │ │ │ │ │ 49 │ │ │ │ │ - 50 template │ │ │ │ │ -51 class RefinedP0LocalInterpolation > │ │ │ │ │ - 52 { │ │ │ │ │ - 53 typedef RefinedP0LocalBasis LB; │ │ │ │ │ - 54 typedef typename LB::Traits::DomainType DT; │ │ │ │ │ + 50 public: │ │ │ │ │ +51 using Traits = LocalFiniteElementTraits; │ │ │ │ │ + 52 │ │ │ │ │ +54 BDFMCubeLocalFiniteElement () {} │ │ │ │ │ 55 │ │ │ │ │ - 56 public: │ │ │ │ │ -57 RefinedP0LocalInterpolation() : │ │ │ │ │ - 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 │ │ │ │ │ -76 void interpolate (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 │ │ │ │ │ -92 class RefinedP0LocalInterpolation > │ │ │ │ │ - 93 { │ │ │ │ │ - 94 typedef RefinedP0LocalBasis LB; │ │ │ │ │ - 95 typedef typename LB::Traits::DomainType DT; │ │ │ │ │ - 96 │ │ │ │ │ - 97 public: │ │ │ │ │ -98 RefinedP0LocalInterpolation() : │ │ │ │ │ - 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 │ │ │ │ │ -137 void interpolate (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 │ │ │ │ │ -refinedp0localbasis.hh │ │ │ │ │ +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 }; │ │ │ │ │ + 78 │ │ │ │ │ + 79} // namespace Dune │ │ │ │ │ + 80 │ │ │ │ │ + 81#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_HH │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ +localcoefficients.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RefinedP0LocalBasis │ │ │ │ │ -Uniformly refined constant shape functions on a unit simplex in R^dim. │ │ │ │ │ -Definition refinedp0localbasis.hh:40 │ │ │ │ │ -Dune::RefinedP0LocalInterpolation │ │ │ │ │ -Definition refinedp0localinterpolation.hh:15 │ │ │ │ │ -Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_1_>_>:: │ │ │ │ │ -RefinedP0LocalInterpolation │ │ │ │ │ -RefinedP0LocalInterpolation() │ │ │ │ │ -Definition refinedp0localinterpolation.hh:24 │ │ │ │ │ -Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_1_>_>:: │ │ │ │ │ -interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Definition refinedp0localinterpolation.hh:35 │ │ │ │ │ -Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_2_>_>:: │ │ │ │ │ -RefinedP0LocalInterpolation │ │ │ │ │ -RefinedP0LocalInterpolation() │ │ │ │ │ -Definition refinedp0localinterpolation.hh:57 │ │ │ │ │ -Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_2_>_>:: │ │ │ │ │ -interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Definition refinedp0localinterpolation.hh:76 │ │ │ │ │ -Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_3_>_>:: │ │ │ │ │ -interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Definition refinedp0localinterpolation.hh:137 │ │ │ │ │ -Dune::RefinedP0LocalInterpolation<_RefinedP0LocalBasis<_D,_R,_3_>_>:: │ │ │ │ │ -RefinedP0LocalInterpolation │ │ │ │ │ -RefinedP0LocalInterpolation() │ │ │ │ │ -Definition refinedp0localinterpolation.hh:98 │ │ │ │ │ +Dune::BDFMCubeLocalFiniteElement │ │ │ │ │ +Brezzi-Douglas-Fortin-Marini finite elements for cubes. │ │ │ │ │ +Definition bdfmcube.hh:45 │ │ │ │ │ +Dune::BDFMCubeLocalFiniteElement::localCoefficients │ │ │ │ │ +auto localCoefficients() const -> const LocalCoefficients & │ │ │ │ │ +Definition bdfmcube.hh:66 │ │ │ │ │ +Dune::BDFMCubeLocalFiniteElement::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +Definition bdfmcube.hh:70 │ │ │ │ │ +Dune::BDFMCubeLocalFiniteElement::BDFMCubeLocalFiniteElement │ │ │ │ │ +BDFMCubeLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition bdfmcube.hh:54 │ │ │ │ │ +Dune::BDFMCubeLocalFiniteElement::localBasis │ │ │ │ │ +auto localBasis() const -> const LocalBasis & │ │ │ │ │ +Definition bdfmcube.hh:65 │ │ │ │ │ +Dune::BDFMCubeLocalFiniteElement::type │ │ │ │ │ +static constexpr auto type() -> GeometryType │ │ │ │ │ +Definition bdfmcube.hh:71 │ │ │ │ │ +Dune::BDFMCubeLocalFiniteElement::localInterpolation │ │ │ │ │ +auto localInterpolation() const -> const LocalInterpolation & │ │ │ │ │ +Definition bdfmcube.hh:67 │ │ │ │ │ +Dune::BDFMCubeLocalFiniteElement::BDFMCubeLocalFiniteElement │ │ │ │ │ +BDFMCubeLocalFiniteElement(std::bitset< 2 *dim > s) │ │ │ │ │ +Make set number s, where 0 <= s < 2^(2*dim) │ │ │ │ │ +Definition bdfmcube.hh:61 │ │ │ │ │ +Dune::BDFMCubeLocalBasis │ │ │ │ │ +Brezzi-Douglas-Fortin-Marini shape functions on a reference cube. │ │ │ │ │ +Definition brezzidouglasfortinmarini/cube/localbasis.hh:37 │ │ │ │ │ +Dune::BDFMCubeLocalCoefficients │ │ │ │ │ +Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes. │ │ │ │ │ +Definition localcoefficients.hh:33 │ │ │ │ │ +Dune::BDFMCubeLocalInterpolation │ │ │ │ │ +Interpolation for Brezzi-Douglas-Fortin-Marini shape functions on cubes. │ │ │ │ │ +Definition brezzidouglasfortinmarini/cube/localinterpolation.hh:38 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +localbasis.hh │ │ │ │ │ localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00521.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedsimplexlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: hierarchical.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,54 +65,31 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
refinedsimplexlocalbasis.hh File Reference
│ │ │ │ +
hierarchical.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

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

Convenience header that includes all available hierarchical LocalFiniteElements. │ │ │ │ More...

│ │ │ │ -
#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.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...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

namespace  Dune
 
│ │ │ │

Detailed Description

│ │ │ │ -

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

│ │ │ │ +

Convenience header that includes all available hierarchical LocalFiniteElements.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,40 +6,20 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ - * common │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -refinedsimplexlocalbasis.hh File Reference │ │ │ │ │ -Contains a base class for LocalBasis classes based on uniform refinement. │ │ │ │ │ -More... │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +hierarchical.hh File Reference │ │ │ │ │ +Convenience header that includes all available hierarchical │ │ │ │ │ +LocalFiniteElements. More... │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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... │ │ │ │ │ -  │ │ │ │ │ - Namespaces │ │ │ │ │ -namespace  Dune │ │ │ │ │ -  │ │ │ │ │ ***** Detailed Description ***** │ │ │ │ │ -Contains a base class for LocalBasis classes based on uniform refinement. │ │ │ │ │ +Convenience header that includes all available hierarchical │ │ │ │ │ +LocalFiniteElements. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00521_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedsimplexlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: hierarchical.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,291 +70,31 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedsimplexlocalbasis.hh
│ │ │ │ +
hierarchical.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
│ │ │ │ -
7
│ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ -
27
│ │ │ │ -
35 template<class D>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 {
│ │ │ │ -
38 protected:
│ │ │ │ -
39
│ │ │ │ - │ │ │ │ -
42
│ │ │ │ -
│ │ │ │ -
53 static int getSubElement(const FieldVector<D,1>& global)
│ │ │ │ -
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)
│ │ │ │ -
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
│ │ │ │ -
164
│ │ │ │ -
165 };
│ │ │ │ -
│ │ │ │ -
166
│ │ │ │ -
177 template<class D>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
179 {
│ │ │ │ -
180 protected:
│ │ │ │ -
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,306 +7,24 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ - * common │ │ │ │ │ -refinedsimplexlocalbasis.hh │ │ │ │ │ +hierarchical.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 │ │ │ │ │ - 7 │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15 │ │ │ │ │ - 16namespace Dune │ │ │ │ │ - 17{ │ │ │ │ │ - 18 template │ │ │ │ │ -19 class RefinedSimplexLocalBasis │ │ │ │ │ - 20 { │ │ │ │ │ - 21 protected: │ │ │ │ │ -22 RefinedSimplexLocalBasis() │ │ │ │ │ - 23 { │ │ │ │ │ - 24 DUNE_THROW(Dune::NotImplemented,"RefinedSimplexLocalBasis not implemented │ │ │ │ │ -for dim > 3."); │ │ │ │ │ - 25 } │ │ │ │ │ - 26 }; │ │ │ │ │ - 27 │ │ │ │ │ - 35 template │ │ │ │ │ -36 class RefinedSimplexLocalBasis │ │ │ │ │ - 37 { │ │ │ │ │ - 38 protected: │ │ │ │ │ - 39 │ │ │ │ │ -41 RefinedSimplexLocalBasis() {} │ │ │ │ │ - 42 │ │ │ │ │ -53 static int getSubElement(const FieldVector& global) │ │ │ │ │ - 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& 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 │ │ │ │ │ -97 class RefinedSimplexLocalBasis │ │ │ │ │ - 98 { │ │ │ │ │ - 99 protected: │ │ │ │ │ - 100 │ │ │ │ │ -102 RefinedSimplexLocalBasis() {} │ │ │ │ │ - 103 │ │ │ │ │ -119 static int getSubElement(const FieldVector& global) │ │ │ │ │ - 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& global, │ │ │ │ │ - 138 int& subElement, │ │ │ │ │ - 139 FieldVector& 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 │ │ │ │ │ - 164 │ │ │ │ │ - 165 }; │ │ │ │ │ - 166 │ │ │ │ │ - 177 template │ │ │ │ │ -178 class RefinedSimplexLocalBasis │ │ │ │ │ - 179 { │ │ │ │ │ - 180 protected: │ │ │ │ │ - 181 │ │ │ │ │ -183 RefinedSimplexLocalBasis() {} │ │ │ │ │ - 184 │ │ │ │ │ -215 static int getSubElement(const FieldVector& 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& 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 │ │ │ │ │ -Dune │ │ │ │ │ -Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RefinedSimplexLocalBasis │ │ │ │ │ -Definition refinedsimplexlocalbasis.hh:20 │ │ │ │ │ -Dune::RefinedSimplexLocalBasis::RefinedSimplexLocalBasis │ │ │ │ │ -RefinedSimplexLocalBasis() │ │ │ │ │ -Definition refinedsimplexlocalbasis.hh:22 │ │ │ │ │ -Dune::RefinedSimplexLocalBasis<_D,_1_>::RefinedSimplexLocalBasis │ │ │ │ │ -RefinedSimplexLocalBasis() │ │ │ │ │ -Protected default constructor so this class can only be instantiated as a base │ │ │ │ │ -class. │ │ │ │ │ -Definition refinedsimplexlocalbasis.hh:41 │ │ │ │ │ -Dune::RefinedSimplexLocalBasis<_D,_1_>::getSubElement │ │ │ │ │ -static void getSubElement(const FieldVector< D, 1 > &global, int &subElement, │ │ │ │ │ -FieldVector< D, 1 > &local) │ │ │ │ │ -Get local coordinates in the subelement. │ │ │ │ │ -Definition refinedsimplexlocalbasis.hh:69 │ │ │ │ │ -Dune::RefinedSimplexLocalBasis<_D,_1_>::getSubElement │ │ │ │ │ -static int getSubElement(const FieldVector< D, 1 > &global) │ │ │ │ │ -Get the number of the subelement containing a given point. │ │ │ │ │ -Definition refinedsimplexlocalbasis.hh:53 │ │ │ │ │ -Dune::RefinedSimplexLocalBasis<_D,_2_>::RefinedSimplexLocalBasis │ │ │ │ │ -RefinedSimplexLocalBasis() │ │ │ │ │ -Protected default constructor so this class can only be instantiated as a base │ │ │ │ │ -class. │ │ │ │ │ -Definition refinedsimplexlocalbasis.hh:102 │ │ │ │ │ -Dune::RefinedSimplexLocalBasis<_D,_2_>::getSubElement │ │ │ │ │ -static int getSubElement(const FieldVector< D, 2 > &global) │ │ │ │ │ -Get the number of the subtriangle containing a given point. │ │ │ │ │ -Definition refinedsimplexlocalbasis.hh:119 │ │ │ │ │ -Dune::RefinedSimplexLocalBasis<_D,_2_>::getSubElement │ │ │ │ │ -static void getSubElement(const FieldVector< D, 2 > &global, int &subElement, │ │ │ │ │ -FieldVector< D, 2 > &local) │ │ │ │ │ -Get local coordinates in the subtriangle. │ │ │ │ │ -Definition refinedsimplexlocalbasis.hh:137 │ │ │ │ │ -Dune::RefinedSimplexLocalBasis<_D,_3_>::getSubElement │ │ │ │ │ -static void getSubElement(const FieldVector< D, 3 > &global, int &subElement, │ │ │ │ │ -FieldVector< D, 3 > &local) │ │ │ │ │ -Get local coordinates in the subsimplex. │ │ │ │ │ -Definition refinedsimplexlocalbasis.hh:243 │ │ │ │ │ -Dune::RefinedSimplexLocalBasis<_D,_3_>::RefinedSimplexLocalBasis │ │ │ │ │ -RefinedSimplexLocalBasis() │ │ │ │ │ -Protected default constructor so this class can only be instantiated as a base │ │ │ │ │ -class. │ │ │ │ │ -Definition refinedsimplexlocalbasis.hh:183 │ │ │ │ │ -Dune::RefinedSimplexLocalBasis<_D,_3_>::getSubElement │ │ │ │ │ -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 │ │ │ │ │ -localbasis.hh │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ +hierarchicalp2withelementbubble.hh │ │ │ │ │ +hierarchicalprismp2.hh │ │ │ │ │ +hierarchicalp2.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00524.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0.hh File Reference │ │ │ │ +dune-localfunctions: basismatrix.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,58 +65,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
refinedp0.hh File Reference
│ │ │ │ +
basismatrix.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 <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::RefinedP0LocalFiniteElement< D, R, dim >
 Local finite element that is piecewise P0 on a once uniformly refined reference geometry. More...
struct  Dune::BasisMatrixBase< PreBasis, Interpolation, Field >
 
struct  Dune::BasisMatrix< const MonomialBasis< geometryId, F >, Interpolation, Field >
 
class  Dune::RefinedP0LocalFiniteElement< D, R, 1 >
 Local finite element that is piecewise P0 on a once uniformly refined reference geometry. More...
struct  Dune::BasisMatrix< const Dune::VirtualMonomialBasis< dim, F >, Interpolation, Field >
 
class  Dune::RefinedP0LocalFiniteElement< D, R, 2 >
 Local finite element that is piecewise P0 on a once uniformly refined reference geometry. More...
struct  Dune::BasisMatrix< const PolynomialBasis< Eval, CM, D, R >, Interpolation, Field >
 
class  Dune::RefinedP0LocalFiniteElement< D, R, 3 >
 Local finite element that is piecewise P0 on a once uniformly refined reference geometry. More...
struct  Dune::BasisMatrix< const PolynomialBasisWithMatrix< Eval, CM >, Interpolation, Field >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Piecewise P0 finite element.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,43 +6,37 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ + * utility │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -refinedp0.hh File Reference │ │ │ │ │ -Piecewise P0 finite element. More... │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "refinedp0/refinedp0localbasis.hh" │ │ │ │ │ -#include "refinedp0/refinedp0localcoefficients.hh" │ │ │ │ │ -#include "refinedp0/refinedp0localinterpolation.hh" │ │ │ │ │ +basismatrix.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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... │ │ │ │ │ +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_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ -***** Detailed Description ***** │ │ │ │ │ -Piecewise P0 finite element. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00524_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0.hh Source File │ │ │ │ +dune-localfunctions: basismatrix.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,264 +70,286 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedp0.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_REFINED_P0_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_REFINED_P0_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_BASISMATRIX_HH
│ │ │ │ +
6#define DUNE_BASISMATRIX_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 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
71 {
│ │ │ │ -
72 return interpolation_;
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
│ │ │ │ -
76 unsigned int size () const
│ │ │ │ -
77 {
│ │ │ │ -
78 return basis_.size();
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
125
│ │ │ │ +
127 template <class Vector>
│ │ │ │
│ │ │ │ - │ │ │ │ +
128 void row( const unsigned int row, Vector &vec ) const
│ │ │ │
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 };
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
154 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
156 {
│ │ │ │ -
157 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
164
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
168 {}
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,283 +7,346 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ -refinedp0.hh │ │ │ │ │ + * utility │ │ │ │ │ +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_REFINED_P0_LOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_REFINED_P0_LOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_BASISMATRIX_HH │ │ │ │ │ + 6#define DUNE_BASISMATRIX_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include "refinedp0/refinedp0localbasis.hh" │ │ │ │ │ - 14#include "refinedp0/refinedp0localcoefficients.hh" │ │ │ │ │ - 15#include "refinedp0/refinedp0localinterpolation.hh" │ │ │ │ │ - 16 │ │ │ │ │ - 20namespace Dune │ │ │ │ │ - 21{ │ │ │ │ │ - 22 │ │ │ │ │ - 25 template │ │ │ │ │ -26 class RefinedP0LocalFiniteElement │ │ │ │ │ - 27 { │ │ │ │ │ - 28 RefinedP0LocalFiniteElement() {} │ │ │ │ │ - 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. │ │ │ │ │ -33 typedef typename P0LocalFiniteElement::Traits Traits; │ │ │ │ │ - 34 }; │ │ │ │ │ - 35 │ │ │ │ │ - 38 template │ │ │ │ │ -39 class RefinedP0LocalFiniteElement │ │ │ │ │ - 40 { │ │ │ │ │ - 41 public: │ │ │ │ │ - 44 typedef LocalFiniteElementTraits< │ │ │ │ │ - 45 RefinedP0LocalBasis, │ │ │ │ │ - 46 RefinedP0LocalCoefficients<1>, │ │ │ │ │ -47 RefinedP0LocalInterpolation > > Traits; │ │ │ │ │ - 48 │ │ │ │ │ -51 RefinedP0LocalFiniteElement () │ │ │ │ │ - 52 {} │ │ │ │ │ - 53 │ │ │ │ │ -56 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 57 { │ │ │ │ │ - 58 return basis_; │ │ │ │ │ - 59 } │ │ │ │ │ - 60 │ │ │ │ │ -63 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 64 { │ │ │ │ │ - 65 return coefficients_; │ │ │ │ │ - 66 } │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 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 > │ │ │ │ │ +27 struct BasisMatrix; │ │ │ │ │ + 28 │ │ │ │ │ + 29 template< class PreBasis, class Interpolation, │ │ │ │ │ + 30 class Field > │ │ │ │ │ +31 struct BasisMatrixBase : public LFEMatrix │ │ │ │ │ + 32 { │ │ │ │ │ +33 typedef LFEMatrix Matrix; │ │ │ │ │ + 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 { │ │ │ │ │ +64 typedef const MonomialBasis<_geometryId,_F_> PreBasis; │ │ │ │ │ +65 typedef BasisMatrixBase Base; │ │ │ │ │ +66 typedef typename Base::Matrix Matrix; │ │ │ │ │ 67 │ │ │ │ │ -70 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 71 { │ │ │ │ │ - 72 return interpolation_; │ │ │ │ │ - 73 } │ │ │ │ │ - 74 │ │ │ │ │ -76 unsigned int size () const │ │ │ │ │ - 77 { │ │ │ │ │ - 78 return basis_.size(); │ │ │ │ │ - 79 } │ │ │ │ │ - 80 │ │ │ │ │ -83 static constexpr GeometryType type () │ │ │ │ │ - 84 { │ │ │ │ │ - 85 return GeometryTypes::line; │ │ │ │ │ - 86 } │ │ │ │ │ - 87 │ │ │ │ │ - 88 private: │ │ │ │ │ - 89 RefinedP0LocalBasis basis_; │ │ │ │ │ - 90 RefinedP0LocalCoefficients<1> coefficients_; │ │ │ │ │ - 91 RefinedP0LocalInterpolation > interpolation_; │ │ │ │ │ - 92 }; │ │ │ │ │ - 93 │ │ │ │ │ - 96 template │ │ │ │ │ -97 class RefinedP0LocalFiniteElement │ │ │ │ │ - 98 { │ │ │ │ │ - 99 public: │ │ │ │ │ - 102 typedef LocalFiniteElementTraits< │ │ │ │ │ - 103 RefinedP0LocalBasis, │ │ │ │ │ - 104 RefinedP0LocalCoefficients<2>, │ │ │ │ │ -105 RefinedP0LocalInterpolation > > Traits; │ │ │ │ │ - 106 │ │ │ │ │ -109 RefinedP0LocalFiniteElement () │ │ │ │ │ - 110 {} │ │ │ │ │ - 111 │ │ │ │ │ -114 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 115 { │ │ │ │ │ - 116 return basis_; │ │ │ │ │ - 117 } │ │ │ │ │ - 118 │ │ │ │ │ -121 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 122 { │ │ │ │ │ - 123 return coefficients_; │ │ │ │ │ - 124 } │ │ │ │ │ - 125 │ │ │ │ │ -128 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ +68 BasisMatrix( const PreBasis& preBasis, │ │ │ │ │ + 69 const Interpolation& localInterpolation ) │ │ │ │ │ + 70 : Base(preBasis, localInterpolation) │ │ │ │ │ + 71 {} │ │ │ │ │ + 72 template │ │ │ │ │ +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 │ │ │ │ │ +86 struct BasisMatrix< const Dune::VirtualMonomialBasis< dim, F >, │ │ │ │ │ +Interpolation, Field > │ │ │ │ │ + 87 : public BasisMatrixBase< const VirtualMonomialBasis< dim, F >, │ │ │ │ │ +Interpolation, Field > │ │ │ │ │ + 88 { │ │ │ │ │ +89 typedef const VirtualMonomialBasis<_dim,_F_> PreBasis; │ │ │ │ │ +90 typedef BasisMatrixBase Base; │ │ │ │ │ +91 typedef typename Base::Matrix Matrix; │ │ │ │ │ + 92 │ │ │ │ │ +93 BasisMatrix( const PreBasis& preBasis, │ │ │ │ │ + 94 const Interpolation& localInterpolation ) │ │ │ │ │ + 95 : Base(preBasis, localInterpolation) │ │ │ │ │ + 96 {} │ │ │ │ │ + 97 template │ │ │ │ │ +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 │ │ │ │ │ +111 struct BasisMatrix< const PolynomialBasis, Interpolation, │ │ │ │ │ +Field > │ │ │ │ │ + 112 : public BasisMatrixBase< const PolynomialBasis, │ │ │ │ │ +Interpolation, Field > │ │ │ │ │ + 113 { │ │ │ │ │ +114 typedef const PolynomialBasis PreBasis; │ │ │ │ │ +115 typedef BasisMatrixBase Base; │ │ │ │ │ +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 │ │ │ │ │ +128 void row( const unsigned int row, Vector &vec ) const │ │ │ │ │ 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: │ │ │ │ │ - 147 RefinedP0LocalBasis basis_; │ │ │ │ │ - 148 RefinedP0LocalCoefficients<2> coefficients_; │ │ │ │ │ - 149 RefinedP0LocalInterpolation > interpolation_; │ │ │ │ │ - 150 }; │ │ │ │ │ + 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 │ │ │ │ │ +145 struct BasisMatrix< const PolynomialBasisWithMatrix, │ │ │ │ │ +Interpolation, Field > │ │ │ │ │ + 146 : public BasisMatrixBase< const PolynomialBasisWithMatrix, │ │ │ │ │ +Interpolation, Field > │ │ │ │ │ + 147 { │ │ │ │ │ +148 typedef const PolynomialBasisWithMatrix PreBasis; │ │ │ │ │ +149 typedef BasisMatrixBase Base; │ │ │ │ │ +150 typedef typename Base::Matrix Matrix; │ │ │ │ │ 151 │ │ │ │ │ - 154 template │ │ │ │ │ -155 class RefinedP0LocalFiniteElement │ │ │ │ │ - 156 { │ │ │ │ │ - 157 public: │ │ │ │ │ - 160 typedef LocalFiniteElementTraits< │ │ │ │ │ - 161 RefinedP0LocalBasis, │ │ │ │ │ - 162 RefinedP0LocalCoefficients<3>, │ │ │ │ │ -163 RefinedP0LocalInterpolation > > Traits; │ │ │ │ │ - 164 │ │ │ │ │ -167 RefinedP0LocalFiniteElement () │ │ │ │ │ - 168 {} │ │ │ │ │ - 169 │ │ │ │ │ -172 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 173 { │ │ │ │ │ - 174 return basis_; │ │ │ │ │ - 175 } │ │ │ │ │ - 176 │ │ │ │ │ -179 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 180 { │ │ │ │ │ - 181 return coefficients_; │ │ │ │ │ - 182 } │ │ │ │ │ - 183 │ │ │ │ │ -186 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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: │ │ │ │ │ - 205 RefinedP0LocalBasis basis_; │ │ │ │ │ - 206 RefinedP0LocalCoefficients<3> coefficients_; │ │ │ │ │ - 207 RefinedP0LocalInterpolation > interpolation_; │ │ │ │ │ - 208 }; │ │ │ │ │ - 209 │ │ │ │ │ - 210 │ │ │ │ │ - 211} │ │ │ │ │ - 212 │ │ │ │ │ - 213#endif │ │ │ │ │ -p0.hh │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -refinedp0localcoefficients.hh │ │ │ │ │ -refinedp0localbasis.hh │ │ │ │ │ -refinedp0localinterpolation.hh │ │ │ │ │ +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 │ │ │ │ │ +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::Traits Traits │ │ │ │ │ -Definition refinedp0.hh:33 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition refinedp0.hh:56 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition refinedp0.hh:83 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::RefinedP0LocalFiniteElement │ │ │ │ │ -RefinedP0LocalFiniteElement() │ │ │ │ │ -Definition refinedp0.hh:51 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition refinedp0.hh:70 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition refinedp0.hh:63 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::Traits │ │ │ │ │ -LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 1 >, │ │ │ │ │ -RefinedP0LocalCoefficients< 1 >, RefinedP0LocalInterpolation< │ │ │ │ │ -RefinedP0LocalBasis< D, R, 1 > > > Traits │ │ │ │ │ -Definition refinedp0.hh:47 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_1_>::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition refinedp0.hh:76 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition refinedp0.hh:134 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::RefinedP0LocalFiniteElement │ │ │ │ │ -RefinedP0LocalFiniteElement() │ │ │ │ │ -Definition refinedp0.hh:109 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition refinedp0.hh:141 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::Traits │ │ │ │ │ -LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 2 >, │ │ │ │ │ -RefinedP0LocalCoefficients< 2 >, RefinedP0LocalInterpolation< │ │ │ │ │ -RefinedP0LocalBasis< D, R, 2 > > > Traits │ │ │ │ │ -Definition refinedp0.hh:105 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition refinedp0.hh:121 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition refinedp0.hh:128 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_2_>::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition refinedp0.hh:114 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::RefinedP0LocalFiniteElement │ │ │ │ │ -RefinedP0LocalFiniteElement() │ │ │ │ │ -Definition refinedp0.hh:167 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition refinedp0.hh:172 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition refinedp0.hh:186 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition refinedp0.hh:199 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -Definition refinedp0.hh:192 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition refinedp0.hh:179 │ │ │ │ │ -Dune::RefinedP0LocalFiniteElement<_D,_R,_3_>::Traits │ │ │ │ │ -LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 3 >, │ │ │ │ │ -RefinedP0LocalCoefficients< 3 >, RefinedP0LocalInterpolation< │ │ │ │ │ -RefinedP0LocalBasis< D, R, 3 > > > Traits │ │ │ │ │ -Definition refinedp0.hh:163 │ │ │ │ │ -Dune::RefinedP0LocalBasis │ │ │ │ │ -Uniformly refined constant shape functions on a unit simplex in R^dim. │ │ │ │ │ -Definition refinedp0localbasis.hh:40 │ │ │ │ │ -Dune::RefinedP0LocalCoefficients │ │ │ │ │ -Layout map for RefinedP0 elements. │ │ │ │ │ -Definition refinedp0localcoefficients.hh:25 │ │ │ │ │ -Dune::RefinedP0LocalInterpolation │ │ │ │ │ -Definition refinedp0localinterpolation.hh:15 │ │ │ │ │ +Dune::field_cast │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +Definition field.hh:159 │ │ │ │ │ +Dune::BasisMatrix │ │ │ │ │ +Definition basismatrix.hh:27 │ │ │ │ │ +Dune::BasisMatrixBase │ │ │ │ │ +Definition basismatrix.hh:32 │ │ │ │ │ +Dune::BasisMatrixBase::cols │ │ │ │ │ +unsigned int cols() const │ │ │ │ │ +Definition basismatrix.hh:46 │ │ │ │ │ +Dune::BasisMatrixBase::rows │ │ │ │ │ +unsigned int rows() const │ │ │ │ │ +Definition basismatrix.hh:50 │ │ │ │ │ +Dune::BasisMatrixBase::BasisMatrixBase │ │ │ │ │ +BasisMatrixBase(const PreBasis &preBasis, const Interpolation │ │ │ │ │ +&localInterpolation) │ │ │ │ │ +Definition basismatrix.hh:35 │ │ │ │ │ +Dune::BasisMatrixBase::Matrix │ │ │ │ │ +LFEMatrix< Field > Matrix │ │ │ │ │ +Definition basismatrix.hh:33 │ │ │ │ │ +Dune::BasisMatrix<_const_MonomialBasis<_geometryId,_F_>,_Interpolation,_Field │ │ │ │ │ +>::row │ │ │ │ │ +void row(const unsigned int row, Vector &vec) const │ │ │ │ │ +Definition basismatrix.hh:73 │ │ │ │ │ +Dune::BasisMatrix<_const_MonomialBasis<_geometryId,_F_>,_Interpolation,_Field │ │ │ │ │ +>::PreBasis │ │ │ │ │ +const MonomialBasis< geometryId, F > PreBasis │ │ │ │ │ +Definition basismatrix.hh:64 │ │ │ │ │ +Dune::BasisMatrix<_const_MonomialBasis<_geometryId,_F_>,_Interpolation,_Field │ │ │ │ │ +>::Matrix │ │ │ │ │ +Base::Matrix Matrix │ │ │ │ │ +Definition basismatrix.hh:66 │ │ │ │ │ +Dune::BasisMatrix<_const_MonomialBasis<_geometryId,_F_>,_Interpolation,_Field │ │ │ │ │ +>::BasisMatrix │ │ │ │ │ +BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ +Definition basismatrix.hh:68 │ │ │ │ │ +Dune::BasisMatrix<_const_MonomialBasis<_geometryId,_F_>,_Interpolation,_Field │ │ │ │ │ +>::Base │ │ │ │ │ +BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ +Definition basismatrix.hh:65 │ │ │ │ │ +Dune::BasisMatrix<_const_Dune::VirtualMonomialBasis<_dim,_F_>,_Interpolation, │ │ │ │ │ +Field_>::row │ │ │ │ │ +void row(const unsigned int row, Vector &vec) const │ │ │ │ │ +Definition basismatrix.hh:98 │ │ │ │ │ +Dune::BasisMatrix<_const_Dune::VirtualMonomialBasis<_dim,_F_>,_Interpolation, │ │ │ │ │ +Field_>::Base │ │ │ │ │ +BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ +Definition basismatrix.hh:90 │ │ │ │ │ +Dune::BasisMatrix<_const_Dune::VirtualMonomialBasis<_dim,_F_>,_Interpolation, │ │ │ │ │ +Field_>::Matrix │ │ │ │ │ +Base::Matrix Matrix │ │ │ │ │ +Definition basismatrix.hh:91 │ │ │ │ │ +Dune::BasisMatrix<_const_Dune::VirtualMonomialBasis<_dim,_F_>,_Interpolation, │ │ │ │ │ +Field_>::PreBasis │ │ │ │ │ +const VirtualMonomialBasis< dim, F > PreBasis │ │ │ │ │ +Definition basismatrix.hh:89 │ │ │ │ │ +Dune::BasisMatrix<_const_Dune::VirtualMonomialBasis<_dim,_F_>,_Interpolation, │ │ │ │ │ +Field_>::BasisMatrix │ │ │ │ │ +BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ +Definition basismatrix.hh:93 │ │ │ │ │ +Dune::BasisMatrix<_const_PolynomialBasis<_Eval,_CM,_D,_R_>,_Interpolation, │ │ │ │ │ +Field_>::Matrix │ │ │ │ │ +Base::Matrix Matrix │ │ │ │ │ +Definition basismatrix.hh:116 │ │ │ │ │ +Dune::BasisMatrix<_const_PolynomialBasis<_Eval,_CM,_D,_R_>,_Interpolation, │ │ │ │ │ +Field_>::Base │ │ │ │ │ +BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ +Definition basismatrix.hh:115 │ │ │ │ │ +Dune::BasisMatrix<_const_PolynomialBasis<_Eval,_CM,_D,_R_>,_Interpolation, │ │ │ │ │ +Field_>::BasisMatrix │ │ │ │ │ +BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ +Definition basismatrix.hh:118 │ │ │ │ │ +Dune::BasisMatrix<_const_PolynomialBasis<_Eval,_CM,_D,_R_>,_Interpolation, │ │ │ │ │ +Field_>::cols │ │ │ │ │ +unsigned int cols() const │ │ │ │ │ +Definition basismatrix.hh:123 │ │ │ │ │ +Dune::BasisMatrix<_const_PolynomialBasis<_Eval,_CM,_D,_R_>,_Interpolation, │ │ │ │ │ +Field_>::row │ │ │ │ │ +void row(const unsigned int row, Vector &vec) const │ │ │ │ │ +Definition basismatrix.hh:128 │ │ │ │ │ +Dune::BasisMatrix<_const_PolynomialBasis<_Eval,_CM,_D,_R_>,_Interpolation, │ │ │ │ │ +Field_>::PreBasis │ │ │ │ │ +const PolynomialBasis< Eval, CM, D, R > PreBasis │ │ │ │ │ +Definition basismatrix.hh:114 │ │ │ │ │ +Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ +Field_>::PreBasis │ │ │ │ │ +const PolynomialBasisWithMatrix< Eval, CM > PreBasis │ │ │ │ │ +Definition basismatrix.hh:148 │ │ │ │ │ +Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ +Field_>::Base │ │ │ │ │ +BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ +Definition basismatrix.hh:149 │ │ │ │ │ +Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ +Field_>::rows │ │ │ │ │ +unsigned int rows() const │ │ │ │ │ +Definition basismatrix.hh:161 │ │ │ │ │ +Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ +Field_>::Matrix │ │ │ │ │ +Base::Matrix Matrix │ │ │ │ │ +Definition basismatrix.hh:150 │ │ │ │ │ +Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ +Field_>::BasisMatrix │ │ │ │ │ +BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ +Definition basismatrix.hh:152 │ │ │ │ │ +Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ +Field_>::row │ │ │ │ │ +void row(const unsigned int row, Vector &vec) const │ │ │ │ │ +Definition basismatrix.hh:167 │ │ │ │ │ +Dune::BasisMatrix<_const_PolynomialBasisWithMatrix<_Eval,_CM_>,_Interpolation, │ │ │ │ │ +Field_>::cols │ │ │ │ │ +unsigned int cols() const │ │ │ │ │ +Definition basismatrix.hh:157 │ │ │ │ │ +Dune::LFEMatrix │ │ │ │ │ +Definition lfematrix.hh:18 │ │ │ │ │ +Dune::LFEMatrix<_Field_>::rows │ │ │ │ │ +unsigned int rows() const │ │ │ │ │ +Definition lfematrix.hh:58 │ │ │ │ │ +Dune::LFEMatrix<_Field_>::invert │ │ │ │ │ +bool invert() │ │ │ │ │ +Definition lfematrix.hh:89 │ │ │ │ │ +Dune::LFEMatrix<_Field_>::Field │ │ │ │ │ +Field Field │ │ │ │ │ +Definition lfematrix.hh:24 │ │ │ │ │ +Dune::MonomialBasis │ │ │ │ │ +Definition monomialbasis.hh:440 │ │ │ │ │ +Dune::VirtualMonomialBasis │ │ │ │ │ +Definition monomialbasis.hh:612 │ │ │ │ │ +Dune::PolynomialBasis │ │ │ │ │ +Definition polynomialbasis.hh:65 │ │ │ │ │ +Dune::PolynomialBasisWithMatrix │ │ │ │ │ +Definition polynomialbasis.hh:348 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00527.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp1.hh File Reference │ │ │ │ +dune-localfunctions: basisprint.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,42 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
refinedp1.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
basisprint.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>
│ │ │ │ + │ │ │ │

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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ 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 {} │ │ │ │ │ @@ -6,27 +6,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -refinedp1.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * utility │ │ │ │ │ +Namespaces | Functions │ │ │ │ │ +basisprint.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ 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... │ │ │ │ │ -  │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Functions │ │ │ │ │ +template │ │ │ │ │ +void Dune::basisPrint (std::ostream &out, typename BasisFactory::Object │ │ │ │ │ + &basis) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +void Dune::basisPrint (std::ostream &out, typename BasisFactory::Key &key) │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00527_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp1.hh Source File │ │ │ │ +dune-localfunctions: basisprint.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,120 +70,105 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedp1.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_REFINED_REFINEDP1_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ -
12
│ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
18
│ │ │ │ -
25 template<class D, class R, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
27 {
│ │ │ │ -
28 public:
│ │ │ │ - │ │ │ │ -
32 Impl::LagrangeSimplexLocalCoefficients<dim,2>,
│ │ │ │ -
33 Impl::LagrangeSimplexLocalInterpolation<Impl::LagrangeSimplexLocalBasis<D,R,dim,2> > > Traits;
│ │ │ │ -
34
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 {}
│ │ │ │ -
│ │ │ │ -
39
│ │ │ │ -
│ │ │ │ -
42 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
43 {
│ │ │ │ -
44 return basis_;
│ │ │ │ -
45 }
│ │ │ │ -
│ │ │ │ -
46
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
50 {
│ │ │ │ -
51 return coefficients_;
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
57 {
│ │ │ │ -
58 return interpolation_;
│ │ │ │ +
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 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 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 }
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ +
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 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.
│ │ │ │ +
74#endif // BASISPRINT
│ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ +
void basisPrint(std::ostream &out, typename BasisFactory::Object &basis)
Definition basisprint.hh:23
│ │ │ │ +
Definition multiindex.hh:37
│ │ │ │ +
Definition polynomialbasis.hh:65
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,142 +7,105 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * refined │ │ │ │ │ -refinedp1.hh │ │ │ │ │ + * utility │ │ │ │ │ +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_REFINED_REFINEDP1_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15 │ │ │ │ │ - 16namespace Dune │ │ │ │ │ - 17{ │ │ │ │ │ - 18 │ │ │ │ │ - 25 template │ │ │ │ │ -26 class RefinedP1LocalFiniteElement │ │ │ │ │ - 27 { │ │ │ │ │ - 28 public: │ │ │ │ │ - 31 typedef LocalFiniteElementTraits, │ │ │ │ │ - 32 Impl::LagrangeSimplexLocalCoefficients, │ │ │ │ │ -33 Impl::LagrangeSimplexLocalInterpolation > > Traits; │ │ │ │ │ - 34 │ │ │ │ │ -37 RefinedP1LocalFiniteElement () │ │ │ │ │ - 38 {} │ │ │ │ │ - 39 │ │ │ │ │ -42 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 43 { │ │ │ │ │ - 44 return basis_; │ │ │ │ │ - 45 } │ │ │ │ │ - 46 │ │ │ │ │ -49 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 50 { │ │ │ │ │ - 51 return coefficients_; │ │ │ │ │ - 52 } │ │ │ │ │ - 53 │ │ │ │ │ -56 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 57 { │ │ │ │ │ - 58 return interpolation_; │ │ │ │ │ + 5#ifndef BASISPRINT │ │ │ │ │ + 6#define BASISPRINT │ │ │ │ │ + 7#include │ │ │ │ │ + 8#include │ │ │ │ │ + 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 │ │ │ │ │ + 22 template │ │ │ │ │ +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 │ │ │ │ │ + 29 typedef MultiIndex<_dimension,_PrintField_> Field; │ │ │ │ │ + 30 typedef typename BasisFactory::template │ │ │ │ │ +EvaluationBasisFactory::Type │ │ │ │ │ + 31 MIBasisFactory; │ │ │ │ │ + 32 typedef typename MIBasisFactory::Object MIBasis; │ │ │ │ │ + 33 typedef typename Basis::CoefficientMatrix CMatrix; │ │ │ │ │ + 34 typedef PolynomialBasis, CMatrix > PrintBasis; │ │ │ │ │ + 35 │ │ │ │ │ + 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 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 │ │ │ │ │ +64 void basisPrint(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 private: │ │ │ │ │ - 75 RefinedP1LocalBasis 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 │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ -p0.hh │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -refinedp1localbasis.hh │ │ │ │ │ -Linear Lagrange shape functions on a uniformly refined reference element. │ │ │ │ │ + 74#endif // BASISPRINT │ │ │ │ │ +multiindex.hh │ │ │ │ │ +polynomialbasis.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::RefinedP1LocalFiniteElement │ │ │ │ │ -Piecewise linear continuous Lagrange functions on a uniformly refined simplex │ │ │ │ │ -element. │ │ │ │ │ -Definition refinedp1.hh:27 │ │ │ │ │ -Dune::RefinedP1LocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -The element type that this finite element is defined on. │ │ │ │ │ -Definition refinedp1.hh:69 │ │ │ │ │ -Dune::RefinedP1LocalFiniteElement::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions of this finite element. │ │ │ │ │ -Definition refinedp1.hh:62 │ │ │ │ │ -Dune::RefinedP1LocalFiniteElement::RefinedP1LocalFiniteElement │ │ │ │ │ -RefinedP1LocalFiniteElement() │ │ │ │ │ -Default constructor. │ │ │ │ │ -Definition refinedp1.hh:37 │ │ │ │ │ -Dune::RefinedP1LocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Evaluates all degrees of freedom for a given function. │ │ │ │ │ -Definition refinedp1.hh:56 │ │ │ │ │ -Dune::RefinedP1LocalFiniteElement::Traits │ │ │ │ │ -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 │ │ │ │ │ -Dune::RefinedP1LocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Produces the assignments of the degrees of freedom to the element subentities. │ │ │ │ │ -Definition refinedp1.hh:49 │ │ │ │ │ -Dune::RefinedP1LocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -The set of shape functions. │ │ │ │ │ -Definition refinedp1.hh:42 │ │ │ │ │ -Dune::RefinedP1LocalBasis │ │ │ │ │ -Definition refinedp1localbasis.hh:23 │ │ │ │ │ +Dune::basisPrint │ │ │ │ │ +void basisPrint(std::ostream &out, typename BasisFactory::Object &basis) │ │ │ │ │ +Definition basisprint.hh:23 │ │ │ │ │ +Dune::MultiIndex │ │ │ │ │ +Definition multiindex.hh:37 │ │ │ │ │ +Dune::PolynomialBasis │ │ │ │ │ +Definition polynomialbasis.hh:65 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00530.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: mimetic.hh File Reference │ │ │ │ +dune-localfunctions: multiindex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,75 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
mimetic.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
multiindex.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include "common/localfiniteelementtraits.hh"
│ │ │ │ -#include "mimetic/mimeticall.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::MimeticLocalFiniteElement< D, R, dim >
class  Dune::MultiIndex< dim, Field >
 
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 {} │ │ │ │ │ @@ -6,22 +6,67 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -mimetic.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include "common/localfiniteelementtraits.hh" │ │ │ │ │ -#include "mimetic/mimeticall.hh" │ │ │ │ │ + * utility │ │ │ │ │ +Classes | Namespaces | Functions │ │ │ │ │ +multiindex.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::MimeticLocalFiniteElement<_D,_R,_dim_> │ │ │ │ │ + class  Dune::MultiIndex<_dim,_Field_> │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::Unity<_MultiIndex<_dim,_F_>_> │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::Zero<_MultiIndex<_dim,_F_>_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Functions │ │ │ │ │ +template │ │ │ │ │ + std::ostream & Dune::operator<< (std::ostream &, const MultiIndex< │ │ │ │ │ + dim, Field > &) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +MultiIndex< dim, Field > Dune::operator* (const F &f, const MultiIndex< dim, │ │ │ │ │ + Field > &m) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +MultiIndex< dim, Field > Dune::operator/ (const F &f, const MultiIndex< dim, │ │ │ │ │ + Field > &m) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + std::ostream & Dune::operator<< (std::ostream &out, const std:: │ │ │ │ │ + vector< MultiIndex< d, F > > &y) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + std::ostream & Dune::operator<< (std::ostream &out, const std:: │ │ │ │ │ + vector< Dune::FieldVector< MultiIndex< d, F >, dimR > │ │ │ │ │ + > &y) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + std::ostream & Dune::operator<< (std::ostream &out, const std:: │ │ │ │ │ + vector< Dune::FieldMatrix< MultiIndex< d, F >, dimR1, │ │ │ │ │ + dimR2 > > &y) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + std::ostream & Dune::operator<< (std::ostream &out, const │ │ │ │ │ + MultiIndex< d, F > &val) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool Dune::operator< (const Zero< MultiIndex< dim, Field > │ │ │ │ │ + > &, const MultiIndex< dim, Field > &) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool Dune::operator< (const MultiIndex< dim, Field > &f, │ │ │ │ │ + const Zero< MultiIndex< dim, Field > > &) │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00530_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: mimetic.hh Source File │ │ │ │ +dune-localfunctions: multiindex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,112 +70,644 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
mimetic.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#ifndef DUNE_MIMETICLOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_MIMETICLOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_MULTIINDEX_HH
│ │ │ │ +
6#define DUNE_MULTIINDEX_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11#include "mimetic/mimeticall.hh"
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9#include <ostream>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/fvector.hh>
│ │ │ │
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
22 template<class D, class R, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25 Dune::GeometryType gt;
│ │ │ │ - │ │ │ │ -
27 MimeticLocalCoefficients coefficients;
│ │ │ │ - │ │ │ │ + │ │ │ │ +
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 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
30
│ │ │ │ +
31
│ │ │ │ +
32 // MultiIndex
│ │ │ │ +
33 // ----------
│ │ │ │
34
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
36 {}
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ -
38 MimeticLocalFiniteElement (Dune::GeometryType::BasicType basicType)
│ │ │ │ -
39 : gt(basicType,dim)
│ │ │ │ -
40 {}
│ │ │ │ -
│ │ │ │ +
35 template< int dim,class Field >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 {
│ │ │ │ + │ │ │ │ +
39
│ │ │ │ +
40 friend std::ostream &operator<<<> ( std::ostream &, const This & );
│ │ │ │
41
│ │ │ │ -
│ │ │ │ -
42 MimeticLocalFiniteElement (Dune::GeometryType::BasicType basicType, unsigned int variant)
│ │ │ │ -
43 : gt(basicType,dim), basis(variant), coefficients(variant)
│ │ │ │ -
44 {}
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
│ │ │ │ -
46 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
47 {
│ │ │ │ -
48 return basis;
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
52 {
│ │ │ │ -
53 return coefficients;
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
57 {
│ │ │ │ -
58 return interpolation;
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
61 Dune::GeometryType type () const { return gt; }
│ │ │ │ -
62 };
│ │ │ │ -
│ │ │ │ -
63}
│ │ │ │ -
64
│ │ │ │ -
65#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
Definition mimetic.hh:24
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition mimetic.hh:56
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition mimetic.hh:46
│ │ │ │ -
MimeticLocalFiniteElement(Dune::GeometryType::BasicType basicType, unsigned int variant)
Definition mimetic.hh:42
│ │ │ │ -
MimeticLocalFiniteElement()
Definition mimetic.hh:35
│ │ │ │ -
MimeticLocalFiniteElement(Dune::GeometryType::BasicType basicType)
Definition mimetic.hh:38
│ │ │ │ -
Dune::GeometryType type() const
Definition mimetic.hh:61
│ │ │ │ -
Dune::LocalFiniteElementTraits< MimeticLocalBasis< D, R, dim >, MimeticLocalCoefficients, MimeticLocalInterpolation< MimeticLocalBasis< D, R, dim > > > Traits
Definition mimetic.hh:33
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition mimetic.hh:51
│ │ │ │ -
Definition mimeticall.hh:23
│ │ │ │ -
Definition mimeticall.hh:74
│ │ │ │ -
!
Definition mimeticall.hh:88
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,124 +7,622 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -mimetic.hh │ │ │ │ │ + * utility │ │ │ │ │ +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#ifndef DUNE_MIMETICLOCALFINITEELEMENT_HH │ │ │ │ │ - 6#define DUNE_MIMETICLOCALFINITEELEMENT_HH │ │ │ │ │ + 5#ifndef DUNE_MULTIINDEX_HH │ │ │ │ │ + 6#define DUNE_MULTIINDEX_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include "common/localfiniteelementtraits.hh" │ │ │ │ │ - 11#include "mimetic/mimeticall.hh" │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13namespace Dune │ │ │ │ │ - 14{ │ │ │ │ │ - 22 template │ │ │ │ │ -23 class MimeticLocalFiniteElement │ │ │ │ │ - 24 { │ │ │ │ │ - 25 Dune::GeometryType gt; │ │ │ │ │ - 26 MimeticLocalBasis basis; │ │ │ │ │ - 27 MimeticLocalCoefficients coefficients; │ │ │ │ │ - 28 MimeticLocalInterpolation > interpolation; │ │ │ │ │ + 13#include │ │ │ │ │ + 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 public: │ │ │ │ │ - 31 typedef Dune::LocalFiniteElementTraits, │ │ │ │ │ - 32 MimeticLocalCoefficients, │ │ │ │ │ -33 MimeticLocalInterpolation > > Traits; │ │ │ │ │ + 30 │ │ │ │ │ + 31 │ │ │ │ │ + 32 // MultiIndex │ │ │ │ │ + 33 // ---------- │ │ │ │ │ 34 │ │ │ │ │ -35 MimeticLocalFiniteElement () │ │ │ │ │ - 36 {} │ │ │ │ │ - 37 │ │ │ │ │ -38 MimeticLocalFiniteElement (Dune::GeometryType::BasicType basicType) │ │ │ │ │ - 39 : gt(basicType,dim) │ │ │ │ │ - 40 {} │ │ │ │ │ + 35 template< int dim,class Field > │ │ │ │ │ +36 class MultiIndex │ │ │ │ │ + 37 { │ │ │ │ │ + 38 typedef MultiIndex<_dim,_Field_> This; │ │ │ │ │ + 39 │ │ │ │ │ +40 friend std::ostream &operator<<<> ( std::ostream &, const This & ); │ │ │ │ │ 41 │ │ │ │ │ -42 MimeticLocalFiniteElement (Dune::GeometryType::BasicType basicType, unsigned │ │ │ │ │ -int variant) │ │ │ │ │ - 43 : gt(basicType,dim), basis(variant), coefficients(variant) │ │ │ │ │ - 44 {} │ │ │ │ │ - 45 │ │ │ │ │ -46 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 47 { │ │ │ │ │ - 48 return basis; │ │ │ │ │ - 49 } │ │ │ │ │ - 50 │ │ │ │ │ -51 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 52 { │ │ │ │ │ - 53 return coefficients; │ │ │ │ │ - 54 } │ │ │ │ │ - 55 │ │ │ │ │ -56 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 57 { │ │ │ │ │ - 58 return interpolation; │ │ │ │ │ - 59 } │ │ │ │ │ - 60 │ │ │ │ │ -61 Dune::GeometryType type () const { return gt; } │ │ │ │ │ - 62 }; │ │ │ │ │ - 63} │ │ │ │ │ - 64 │ │ │ │ │ - 65#endif │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -mimeticall.hh │ │ │ │ │ + 42 public: │ │ │ │ │ +43 static const int dimension = dim; │ │ │ │ │ + 44 │ │ │ │ │ +45 MultiIndex () │ │ │ │ │ + 46 : vecZ_( 0 ), │ │ │ │ │ + 47 vecOMZ_( 0 ), │ │ │ │ │ + 48 factor_( 1. ), │ │ │ │ │ + 49 next_( 0 ) │ │ │ │ │ + 50 {} │ │ │ │ │ + 51 template │ │ │ │ │ +52 explicit MultiIndex (const F &f) │ │ │ │ │ + 53 : vecZ_( 0 ), │ │ │ │ │ + 54 vecOMZ_( 0 ), │ │ │ │ │ + 55 factor_( field_cast(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 │ │ │ │ │ +86 ~MultiIndex() │ │ │ │ │ + 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 } │ │ │ │ │ +114 This &operator=( const Zero &f ) │ │ │ │ │ + 115 { │ │ │ │ │ + 116 remove(); │ │ │ │ │ + 117 vecZ_ = 0; │ │ │ │ │ + 118 vecOMZ_ = 0; │ │ │ │ │ + 119 factor_ = 0.; │ │ │ │ │ + 120 return *this; │ │ │ │ │ + 121 } │ │ │ │ │ +122 This &operator=( const Unity &f ) │ │ │ │ │ + 123 { │ │ │ │ │ + 124 remove(); │ │ │ │ │ + 125 vecZ_ = 0; │ │ │ │ │ + 126 vecOMZ_ = 0; │ │ │ │ │ + 127 factor_ = 1.; │ │ │ │ │ + 128 return *this; │ │ │ │ │ + 129 } │ │ │ │ │ + 130 template │ │ │ │ │ +131 This &operator=( const F &f ) │ │ │ │ │ + 132 { │ │ │ │ │ + 133 remove(); │ │ │ │ │ + 134 vecZ_ = 0; │ │ │ │ │ + 135 vecOMZ_ = 0; │ │ │ │ │ + 136 factor_ = field_cast(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 │ │ │ │ │ +147 This &operator*=( const F &f ) │ │ │ │ │ + 148 { │ │ │ │ │ + 149 factor_ *= field_cast(f); │ │ │ │ │ + 150 if (next_) │ │ │ │ │ + 151 (*next_) *= f; │ │ │ │ │ + 152 return *this; │ │ │ │ │ + 153 } │ │ │ │ │ + 154 template │ │ │ │ │ +155 This &operator/=( const F &f ) │ │ │ │ │ + 156 { │ │ │ │ │ + 157 factor_ /= field_cast(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 │ │ │ │ │ +225 This operator*( const F &f ) const │ │ │ │ │ + 226 { │ │ │ │ │ + 227 This z = *this; │ │ │ │ │ + 228 return (z *= f); │ │ │ │ │ + 229 } │ │ │ │ │ + 230 template │ │ │ │ │ +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 │ │ │ │ │ +312 MultiIndex operator*( const F &f, │ │ │ │ │ + 313 const MultiIndex &m) │ │ │ │ │ + 314 { │ │ │ │ │ + 315 MultiIndex z = m; │ │ │ │ │ + 316 return (z *= f); │ │ │ │ │ + 317 } │ │ │ │ │ + 318 template │ │ │ │ │ +319 MultiIndex operator/( const F &f, │ │ │ │ │ + 320 const MultiIndex &m) │ │ │ │ │ + 321 { │ │ │ │ │ + 322 MultiIndex z = m; │ │ │ │ │ + 323 return (z /= f); │ │ │ │ │ + 324 } │ │ │ │ │ + 325 │ │ │ │ │ + 326 template │ │ │ │ │ +327 std::ostream &operator<<(std::ostream& out,const std:: │ │ │ │ │ +vector >& y) { │ │ │ │ │ + 328 for (unsigned int r=0; r │ │ │ │ │ +356 std::ostream &operator<<(std::ostream& out, │ │ │ │ │ + 357 const std::vector,dimR1,dimR2> >& y) { │ │ │ │ │ + 358 out << "\\begin{eqnarray*}" << std::endl; │ │ │ │ │ + 359 for (unsigned int k=0; k │ │ │ │ │ +376 std::ostream &operator<<(std::ostream& out,const MultiIndex& val) │ │ │ │ │ + 377 { │ │ │ │ │ + 378 bool first = true; │ │ │ │ │ + 379 const MultiIndex *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(); │ │ │ │ │ + 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> │ │ │ │ │ +451 struct Unity< MultiIndex< dim, F > > │ │ │ │ │ + 452 { │ │ │ │ │ +453 typedef MultiIndex<_dim,_F_> Field; │ │ │ │ │ + 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 { │ │ │ │ │ +476 typedef MultiIndex<_dim,F_> Field; │ │ │ │ │ + 477 │ │ │ │ │ + 478 // zero does not acutally exist │ │ │ │ │ +479 operator Field () │ │ │ │ │ + 480 { │ │ │ │ │ + 481 return Field(0); │ │ │ │ │ + 482 } │ │ │ │ │ + 483 }; │ │ │ │ │ + 484 │ │ │ │ │ + 485 template< int dim, class Field > │ │ │ │ │ +486 bool operator<( const Zero< MultiIndex<_dim,Field_> > &, const MultiIndex< │ │ │ │ │ +dim,Field_> & ) │ │ │ │ │ + 487 { │ │ │ │ │ + 488 return true; │ │ │ │ │ + 489 } │ │ │ │ │ + 490 │ │ │ │ │ + 491 template< int dim, class Field > │ │ │ │ │ +492 bool operator<( const MultiIndex<_dim,_Field_> &f, const Zero< MultiIndex< │ │ │ │ │ +dim,Field_> > & ) │ │ │ │ │ + 493 { │ │ │ │ │ + 494 return true; │ │ │ │ │ + 495 } │ │ │ │ │ + 496 │ │ │ │ │ + 497} │ │ │ │ │ + 498 │ │ │ │ │ + 499#endif // #ifndef DUNE_MULTIINDEX_HH │ │ │ │ │ +field.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::MimeticLocalFiniteElement │ │ │ │ │ -Definition mimetic.hh:24 │ │ │ │ │ -Dune::MimeticLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition mimetic.hh:56 │ │ │ │ │ -Dune::MimeticLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition mimetic.hh:46 │ │ │ │ │ -Dune::MimeticLocalFiniteElement::MimeticLocalFiniteElement │ │ │ │ │ -MimeticLocalFiniteElement(Dune::GeometryType::BasicType basicType, unsigned int │ │ │ │ │ -variant) │ │ │ │ │ -Definition mimetic.hh:42 │ │ │ │ │ -Dune::MimeticLocalFiniteElement::MimeticLocalFiniteElement │ │ │ │ │ -MimeticLocalFiniteElement() │ │ │ │ │ -Definition mimetic.hh:35 │ │ │ │ │ -Dune::MimeticLocalFiniteElement::MimeticLocalFiniteElement │ │ │ │ │ -MimeticLocalFiniteElement(Dune::GeometryType::BasicType basicType) │ │ │ │ │ -Definition mimetic.hh:38 │ │ │ │ │ -Dune::MimeticLocalFiniteElement::type │ │ │ │ │ -Dune::GeometryType type() const │ │ │ │ │ -Definition mimetic.hh:61 │ │ │ │ │ -Dune::MimeticLocalFiniteElement::Traits │ │ │ │ │ -Dune::LocalFiniteElementTraits< MimeticLocalBasis< D, R, dim >, │ │ │ │ │ -MimeticLocalCoefficients, MimeticLocalInterpolation< MimeticLocalBasis< D, R, │ │ │ │ │ -dim > > > Traits │ │ │ │ │ -Definition mimetic.hh:33 │ │ │ │ │ -Dune::MimeticLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition mimetic.hh:51 │ │ │ │ │ -Dune::MimeticLocalBasis │ │ │ │ │ -Definition mimeticall.hh:23 │ │ │ │ │ -Dune::MimeticLocalInterpolation │ │ │ │ │ -Definition mimeticall.hh:74 │ │ │ │ │ -Dune::MimeticLocalCoefficients │ │ │ │ │ -! │ │ │ │ │ -Definition mimeticall.hh:88 │ │ │ │ │ +Dune::operator- │ │ │ │ │ +Field operator-(const Unity< Field > &u, const Field &f) │ │ │ │ │ +Definition field.hh:44 │ │ │ │ │ +Dune::field_cast │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +Definition field.hh:159 │ │ │ │ │ +Dune::operator< │ │ │ │ │ +bool operator<(const Zero< Field > &, const Field &f) │ │ │ │ │ +Definition field.hh:119 │ │ │ │ │ +Dune::operator/ │ │ │ │ │ +Field operator/(const Unity< Field > &u, const Field &f) │ │ │ │ │ +Definition field.hh:56 │ │ │ │ │ +Dune::operator<< │ │ │ │ │ +std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat) │ │ │ │ │ +Definition lfematrix.hh:152 │ │ │ │ │ +Dune::operator* │ │ │ │ │ +Field operator*(const Unity< Field > &u, const Field &f) │ │ │ │ │ +Definition field.hh:50 │ │ │ │ │ +Dune::Unity │ │ │ │ │ +A class representing the unit of a given Field. │ │ │ │ │ +Definition field.hh:30 │ │ │ │ │ +Dune::Zero │ │ │ │ │ +A class representing the zero of a given Field. │ │ │ │ │ +Definition field.hh:79 │ │ │ │ │ +Dune::MultiIndex │ │ │ │ │ +Definition multiindex.hh:37 │ │ │ │ │ +Dune::MultiIndex::operator+ │ │ │ │ │ +This operator+(const This &other) const │ │ │ │ │ +Definition multiindex.hh:248 │ │ │ │ │ +Dune::MultiIndex::absOMZ │ │ │ │ │ +int absOMZ() const │ │ │ │ │ +Definition multiindex.hh:272 │ │ │ │ │ +Dune::MultiIndex::~MultiIndex │ │ │ │ │ +~MultiIndex() │ │ │ │ │ +Definition multiindex.hh:86 │ │ │ │ │ +Dune::MultiIndex::operator-= │ │ │ │ │ +This & operator-=(const This &other) │ │ │ │ │ +Definition multiindex.hh:207 │ │ │ │ │ +Dune::MultiIndex::MultiIndex │ │ │ │ │ +MultiIndex(int, const This &other) │ │ │ │ │ +Definition multiindex.hh:59 │ │ │ │ │ +Dune::MultiIndex::dimension │ │ │ │ │ +static const int dimension │ │ │ │ │ +Definition multiindex.hh:43 │ │ │ │ │ +Dune::MultiIndex::absZ │ │ │ │ │ +int absZ() const │ │ │ │ │ +Definition multiindex.hh:264 │ │ │ │ │ +Dune::MultiIndex::omz │ │ │ │ │ +int omz(int i) const │ │ │ │ │ +Definition multiindex.hh:95 │ │ │ │ │ +Dune::MultiIndex::operator+= │ │ │ │ │ +This & operator+=(const This &other) │ │ │ │ │ +Definition multiindex.hh:184 │ │ │ │ │ +Dune::MultiIndex::operator== │ │ │ │ │ +bool operator==(const This &other) const │ │ │ │ │ +Definition multiindex.hh:140 │ │ │ │ │ +Dune::MultiIndex::sameMultiIndex │ │ │ │ │ +bool sameMultiIndex(const This &ind) │ │ │ │ │ +Definition multiindex.hh:280 │ │ │ │ │ +Dune::MultiIndex::operator= │ │ │ │ │ +This & operator=(const This &other) │ │ │ │ │ +Definition multiindex.hh:104 │ │ │ │ │ +Dune::MultiIndex::MultiIndex │ │ │ │ │ +MultiIndex(const This &other) │ │ │ │ │ +Definition multiindex.hh:73 │ │ │ │ │ +Dune::MultiIndex::operator*= │ │ │ │ │ +This & operator*=(const F &f) │ │ │ │ │ +Definition multiindex.hh:147 │ │ │ │ │ +Dune::MultiIndex::factor │ │ │ │ │ +const Field & factor() const │ │ │ │ │ +Definition multiindex.hh:99 │ │ │ │ │ +Dune::MultiIndex::operator/ │ │ │ │ │ +This operator/(const F &f) const │ │ │ │ │ +Definition multiindex.hh:231 │ │ │ │ │ +Dune::MultiIndex::MultiIndex │ │ │ │ │ +MultiIndex(const F &f) │ │ │ │ │ +Definition multiindex.hh:52 │ │ │ │ │ +Dune::MultiIndex::operator/= │ │ │ │ │ +This & operator/=(const F &f) │ │ │ │ │ +Definition multiindex.hh:155 │ │ │ │ │ +Dune::MultiIndex::operator* │ │ │ │ │ +This operator*(const F &f) const │ │ │ │ │ +Definition multiindex.hh:225 │ │ │ │ │ +Dune::MultiIndex::set │ │ │ │ │ +void set(int d, int power=1) │ │ │ │ │ +Definition multiindex.hh:259 │ │ │ │ │ +Dune::MultiIndex::operator- │ │ │ │ │ +This operator-(const This &other) const │ │ │ │ │ +Definition multiindex.hh:253 │ │ │ │ │ +Dune::MultiIndex::z │ │ │ │ │ +int z(int i) const │ │ │ │ │ +Definition multiindex.hh:91 │ │ │ │ │ +Dune::MultiIndex::MultiIndex │ │ │ │ │ +MultiIndex() │ │ │ │ │ +Definition multiindex.hh:45 │ │ │ │ │ +Dune::Unity<_MultiIndex<_dim,_F_>_>::Field │ │ │ │ │ +MultiIndex< dim, F > Field │ │ │ │ │ +Definition multiindex.hh:453 │ │ │ │ │ +Dune::Zero<_MultiIndex<_dim,_F_>_>::Field │ │ │ │ │ +MultiIndex< dim, F > Field │ │ │ │ │ +Definition multiindex.hh:476 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00533.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelecsimplexbasis.hh File Reference │ │ │ │ +dune-localfunctions: field.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,128 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
nedelecsimplexbasis.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
field.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/localfunctions/utility/defaultbasisfactory.hh>
│ │ │ │ -#include "nedelecsimplexinterpolation.hh"
│ │ │ │ -#include "nedelecsimplexprebasis.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::NedelecBasisFactory< dim, SF, CF >
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 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ 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 {} │ │ │ │ │ @@ -6,26 +6,129 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * nedelec │ │ │ │ │ - * nedelecsimplex │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -nedelecsimplexbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "nedelecsimplexinterpolation.hh" │ │ │ │ │ -#include "nedelecsimplexprebasis.hh" │ │ │ │ │ + * utility │ │ │ │ │ +Classes | Namespaces | Functions │ │ │ │ │ +field.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  Dune::NedelecBasisFactory<_dim,_SF,_CF_> │ │ │ │ │ +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_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Functions │ │ │ │ │ +template │ │ │ │ │ + Field Dune::operator+ (const Unity< Field > &u, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + Field Dune::operator- (const Unity< Field > &u, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + Field Dune::operator* (const Unity< Field > &u, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + Field Dune::operator/ (const Unity< Field > &u, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool Dune::operator== (const Zero< Field > &, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool Dune::operator== (const Field &f, const Zero< Field > │ │ │ │ │ + &z) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool Dune::operator< (const Zero< Field > &, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool Dune::operator< (const Field &f, const Zero< Field > │ │ │ │ │ + &) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool Dune::operator> (const Zero< Field > &z, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool Dune::operator> (const Field &f, const Zero< Field > │ │ │ │ │ + &z) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void Dune::field_cast (const F1 &f1, F2 &f2) │ │ │ │ │ +  a helper class to cast from one field to another │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void Dune::field_cast (const Dune::FieldVector< F1, dim > │ │ │ │ │ + &f1, Dune::FieldVector< F2, dim > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void Dune::field_cast (const Dune::FieldVector< F1, 1 > │ │ │ │ │ + &f1, F2 &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void Dune::field_cast (const F1 &f1, Dune::FieldVector< │ │ │ │ │ + F2, 1 > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void Dune::field_cast (const Dune::FieldMatrix< F1, rdim, │ │ │ │ │ + cdim > &f1, Dune::FieldMatrix< F2, rdim, cdim > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void Dune::field_cast (const Dune::FieldMatrix< F1, 1, 1 > │ │ │ │ │ + &f1, Dune::FieldMatrix< F2, 1, 1 > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void Dune::field_cast (const Dune::FieldMatrix< F1, 1, 1 > │ │ │ │ │ + &f1, F2 &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void Dune::field_cast (const F1 &f1, Dune::FieldMatrix< │ │ │ │ │ + F2, 1, 1 > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void Dune::field_cast (const Dune::FieldVector< F1, 1 > │ │ │ │ │ + &f1, Dune::FieldMatrix< F2, 1, 1 > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void Dune::field_cast (const Dune::FieldMatrix< F1, 1, 1 > │ │ │ │ │ + &f1, Dune::FieldVector< F2, 1 > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void Dune::field_cast (const Dune::FieldVector< F1, 1 > │ │ │ │ │ + &f1, Dune::FieldVector< F2, 1 > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +FieldCast< F2, V >::type Dune::field_cast (const V &f1) │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00533_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelecsimplexbasis.hh Source File │ │ │ │ +dune-localfunctions: field.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,73 +70,385 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
nedelecsimplexbasis.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_NEDELECSIMPLEXBASIS_HH
│ │ │ │ -
6
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXBASIS_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <fstream>
│ │ │ │ -
10#include <dune/common/exceptions.hh>
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <dune/common/gmpfield.hh>
│ │ │ │ +
9#include <dune/common/fvector.hh>
│ │ │ │ +
10#include <dune/common/fmatrix.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 */
│ │ │ │ -
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}
│ │ │ │ -
43
│ │ │ │ -
44#endif // #ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXBASIS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
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< 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 }
│ │ │ │ +
│ │ │ │ +
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#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
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition nedelecsimplexbasis.hh:41
│ │ │ │ -
Definition defaultbasisfactory.hh:38
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,73 +7,353 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * nedelec │ │ │ │ │ - * nedelecsimplex │ │ │ │ │ -nedelecsimplexbasis.hh │ │ │ │ │ + * utility │ │ │ │ │ +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_NEDELECSIMPLEXBASIS_HH │ │ │ │ │ - 6 │ │ │ │ │ - 7#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXBASIS_HH │ │ │ │ │ - 8 │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include "nedelecsimplexinterpolation.hh" │ │ │ │ │ - 14#include "nedelecsimplexprebasis.hh" │ │ │ │ │ - 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 */ │ │ │ │ │ - 35 │ │ │ │ │ - 36 template< unsigned int dim, class SF, class CF > │ │ │ │ │ -37 struct NedelecBasisFactory │ │ │ │ │ - 38 : public DefaultBasisFactory< NedelecPreBasisFactory, │ │ │ │ │ - 39 NedelecL2InterpolationFactory, │ │ │ │ │ - 40 dim,dim,SF,CF > │ │ │ │ │ - 41 {}; │ │ │ │ │ - 42} │ │ │ │ │ - 43 │ │ │ │ │ - 44#endif // #ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXBASIS_HH │ │ │ │ │ -defaultbasisfactory.hh │ │ │ │ │ -nedelecsimplexprebasis.hh │ │ │ │ │ -nedelecsimplexinterpolation.hh │ │ │ │ │ + 12namespace Dune │ │ │ │ │ + 13{ │ │ │ │ │ + 14 │ │ │ │ │ + 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< 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 } │ │ │ │ │ + 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#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::epsilon() && f > -Zero::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::epsilon(); │ │ │ │ │ + 122 } │ │ │ │ │ + 123 │ │ │ │ │ + 124 template< class Field > │ │ │ │ │ +125 inline bool operator<( const Field &f, const Zero<_Field_> & ) │ │ │ │ │ + 126 { │ │ │ │ │ + 127 return f < -Zero::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, 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, 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, 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 ) │ │ │ │ │ + 229 { │ │ │ │ │ + 230 field_cast( f1[ 0 ], f2[ 0 ] ); │ │ │ │ │ + 231 } │ │ │ │ │ + 232 │ │ │ │ │ + 233 template< class F2,class V > │ │ │ │ │ +234 struct FieldCast │ │ │ │ │ + 235 { │ │ │ │ │ +236 typedef F2 type; │ │ │ │ │ + 237 }; │ │ │ │ │ + 238 template< class F2,class F1,int dim > │ │ │ │ │ +239 struct FieldCast< F2, Dune::FieldVector > │ │ │ │ │ + 240 { │ │ │ │ │ +241 typedef Dune::FieldVector type; │ │ │ │ │ + 242 }; │ │ │ │ │ + 243 template< class F2,class F1,int dim1, int dim2> │ │ │ │ │ +244 struct FieldCast< F2, Dune::FieldMatrix > │ │ │ │ │ + 245 { │ │ │ │ │ +246 typedef Dune::FieldMatrix type; │ │ │ │ │ + 247 }; │ │ │ │ │ + 248 template< class F2,class V > │ │ │ │ │ +249 inline typename FieldCast::type field_cast ( const V &f1 ) │ │ │ │ │ + 250 { │ │ │ │ │ + 251 typename FieldCast::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 │ │ │ │ │ +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 │ │ │ │ │ +296 struct ComputeField │ │ │ │ │ + 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 Type; │ │ │ │ │ + 306 }; │ │ │ │ │ + 307#endif │ │ │ │ │ + 308} // namespace Dune │ │ │ │ │ + 309 │ │ │ │ │ + 310#endif // #ifndef DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::NedelecBasisFactory │ │ │ │ │ -Definition nedelecsimplexbasis.hh:41 │ │ │ │ │ -Dune::DefaultBasisFactory │ │ │ │ │ -Definition defaultbasisfactory.hh:38 │ │ │ │ │ +Dune::operator- │ │ │ │ │ +Field operator-(const Unity< Field > &u, const Field &f) │ │ │ │ │ +Definition field.hh:44 │ │ │ │ │ +Dune::field_cast │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +Definition field.hh:159 │ │ │ │ │ +Dune::operator< │ │ │ │ │ +bool operator<(const Zero< Field > &, const Field &f) │ │ │ │ │ +Definition field.hh:119 │ │ │ │ │ +Dune::operator== │ │ │ │ │ +bool operator==(const Zero< Field > &, const Field &f) │ │ │ │ │ +Definition field.hh:107 │ │ │ │ │ +Dune::operator> │ │ │ │ │ +bool operator>(const Zero< Field > &z, const Field &f) │ │ │ │ │ +Definition field.hh:131 │ │ │ │ │ +Dune::operator+ │ │ │ │ │ +Field operator+(const Unity< Field > &u, const Field &f) │ │ │ │ │ +Definition field.hh:38 │ │ │ │ │ +Dune::operator/ │ │ │ │ │ +Field operator/(const Unity< Field > &u, const Field &f) │ │ │ │ │ +Definition field.hh:56 │ │ │ │ │ +Dune::operator* │ │ │ │ │ +Field operator*(const Unity< Field > &u, const Field &f) │ │ │ │ │ +Definition field.hh:50 │ │ │ │ │ +Dune::Unity │ │ │ │ │ +A class representing the unit of a given Field. │ │ │ │ │ +Definition field.hh:30 │ │ │ │ │ +Dune::Zero │ │ │ │ │ +A class representing the zero of a given Field. │ │ │ │ │ +Definition field.hh:79 │ │ │ │ │ +Dune::Zero::epsilon │ │ │ │ │ +static const Field epsilon() │ │ │ │ │ +Definition field.hh:84 │ │ │ │ │ +Dune::FieldCast │ │ │ │ │ +Definition field.hh:235 │ │ │ │ │ +Dune::FieldCast::type │ │ │ │ │ +F2 type │ │ │ │ │ +Definition field.hh:236 │ │ │ │ │ +Dune::FieldCast<_F2,_Dune::FieldVector<_F1,_dim_>_>::type │ │ │ │ │ +Dune::FieldVector< F2, dim > type │ │ │ │ │ +Definition field.hh:241 │ │ │ │ │ +Dune::FieldCast<_F2,_Dune::FieldMatrix<_F1,_dim1,_dim2_>_>::type │ │ │ │ │ +Dune::FieldMatrix< F2, dim1, dim2 > type │ │ │ │ │ +Definition field.hh:246 │ │ │ │ │ +Dune::Precision │ │ │ │ │ +Definition field.hh:264 │ │ │ │ │ +Dune::ComputeField │ │ │ │ │ +Definition field.hh:297 │ │ │ │ │ +Dune::ComputeField::Type │ │ │ │ │ +Field Type │ │ │ │ │ +Definition field.hh:298 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00536.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelecsimplexprebasis.hh File Reference │ │ │ │ +dune-localfunctions: monomialbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,38 +65,60 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
nedelecsimplexprebasis.hh File Reference
│ │ │ │ +
monomialbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <utility>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/utility/polynomialbasis.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

struct  Dune::NedelecPreBasisFactory< dim, Field >
class  Dune::MonomialBasisSize< geometryId >
 
struct  Dune::NedelecPreBasisFactory< dim, Field >::EvaluationBasisFactory< dd, FF >
struct  Dune::MonomialBasisHelper< mydim, dim, F >
 
struct  Dune::NedelecVecMatrix< geometryId, Field >
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 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,30 +6,51 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * nedelec │ │ │ │ │ - * nedelecsimplex │ │ │ │ │ + * utility │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -nedelecsimplexprebasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +monomialbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  Dune::NedelecPreBasisFactory<_dim,_Field_> │ │ │ │ │ + class  Dune::MonomialBasisSize<_geometryId_> │ │ │ │ │   │ │ │ │ │ -struct  Dune::NedelecPreBasisFactory<_dim,_Field_>::EvaluationBasisFactory< │ │ │ │ │ - dd,_FF_> │ │ │ │ │ +struct  Dune::MonomialBasisHelper<_mydim,_dim,_F_> │ │ │ │ │   │ │ │ │ │ -struct  Dune::NedelecVecMatrix<_geometryId,_Field_> │ │ │ │ │ + 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 │ │ │ │ │ + > │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00536_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelecsimplexprebasis.hh Source File │ │ │ │ +dune-localfunctions: monomialbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,353 +70,1025 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
nedelecsimplexprebasis.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_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH
│ │ │ │ +
5#ifndef DUNE_MONOMIALBASIS_HH
│ │ │ │ +
6#define DUNE_MONOMIALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <utility>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/geometry/type.hh>
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/fvector.hh>
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │
12
│ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17 template < GeometryType::Id geometryId, class Field >
│ │ │ │ -
18 struct NedelecVecMatrix;
│ │ │ │ +
13#include <dune/geometry/type.hh>
│ │ │ │ +
14#include <dune/geometry/topologyfactory.hh>
│ │ │ │ +
15
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ -
37 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
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");
│ │ │ │ -
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() );
│ │ │ │ +
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 // -----------------------------
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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.;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 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 }
│ │ │ │ +
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 /* 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 }
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
271
│ │ │ │ -
272 unsigned int row_,col_;
│ │ │ │ -
273 Field **mat_;
│ │ │ │ -
274 };
│ │ │ │ +
225 };
│ │ │ │
│ │ │ │ -
275
│ │ │ │ +
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}
│ │ │ │ -
278#endif // #ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH
│ │ │ │ - │ │ │ │ +
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 };
│ │ │ │ +
│ │ │ │ +
788 };
│ │ │ │ +
│ │ │ │ +
789
│ │ │ │ +
790}
│ │ │ │ +
791
│ │ │ │ +
792#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 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
│ │ │ │ +
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
│ │ │ │ -
Definition multiindex.hh:37
│ │ │ │ -
int z(int i) const
Definition multiindex.hh:91
│ │ │ │ -
Definition polynomialbasis.hh:348
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,409 +7,1115 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * nedelec │ │ │ │ │ - * nedelecsimplex │ │ │ │ │ -nedelecsimplexprebasis.hh │ │ │ │ │ + * utility │ │ │ │ │ +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_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_MONOMIALBASIS_HH │ │ │ │ │ + 6#define DUNE_MONOMIALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ - 11#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune │ │ │ │ │ - 16{ │ │ │ │ │ - 17 template < GeometryType::Id geometryId, class Field > │ │ │ │ │ - 18 struct NedelecVecMatrix; │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16#include │ │ │ │ │ + 17#include │ │ │ │ │ + 18#include │ │ │ │ │ 19 │ │ │ │ │ - 20 template │ │ │ │ │ -21 struct NedelecPreBasisFactory │ │ │ │ │ - 22 { │ │ │ │ │ -23 typedef MonomialBasisProvider MBasisFactory; │ │ │ │ │ -24 typedef typename MBasisFactory::Object MBasis; │ │ │ │ │ -25 typedef StandardEvaluator EvalMBasis; │ │ │ │ │ -26 typedef PolynomialBasisWithMatrix > │ │ │ │ │ -Basis; │ │ │ │ │ - 27 │ │ │ │ │ -28 typedef const Basis Object; │ │ │ │ │ -29 typedef std::size_t Key; │ │ │ │ │ - 30 │ │ │ │ │ - 31 template │ │ │ │ │ -32 struct EvaluationBasisFactory │ │ │ │ │ - 33 { │ │ │ │ │ -34 typedef MonomialBasisProvider Type; │ │ │ │ │ - 35 }; │ │ │ │ │ - 36 │ │ │ │ │ - 37 template< GeometryType::Id geometryId > │ │ │ │ │ -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. │ │ │ │ │ + 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 * 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 NedelecVecMatrix vecMatrix(order); │ │ │ │ │ - 51 MBasis *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 } │ │ │ │ │ -56 static void release( Object *object ) { delete object; } │ │ │ │ │ - 57 }; │ │ │ │ │ - 58 │ │ │ │ │ - 59 template │ │ │ │ │ -60 struct NedelecVecMatrix │ │ │ │ │ - 61 { │ │ │ │ │ -62 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ -63 static const unsigned int dim = geometry.dim(); │ │ │ │ │ -64 typedef MultiIndex MI; │ │ │ │ │ -65 typedef MonomialBasis MIBasis; │ │ │ │ │ -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: =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"); │ │ │ │ │ - 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() ); │ │ │ │ │ + 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 // ----------------------------- │ │ │ │ │ + 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 > │ │ │ │ │ +83 class MonomialBasisSize │ │ │ │ │ + 84 { │ │ │ │ │ + 85 typedef MonomialBasisSize<_geometryId_> This; │ │ │ │ │ + 86 │ │ │ │ │ + 87 public: │ │ │ │ │ +88 static This &instance () │ │ │ │ │ + 89 { │ │ │ │ │ + 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 │ │ │ │ │ - 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=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 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 │ │ │ │ │ +176 struct MonomialBasisHelper │ │ │ │ │ + 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[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 /* 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; w0; │ │ │ │ │ - 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(); │ │ │ │ │ + 222 } │ │ │ │ │ + 223 } │ │ │ │ │ + 224 } │ │ │ │ │ + 225 }; │ │ │ │ │ + 226 │ │ │ │ │ + 227 │ │ │ │ │ + 228 │ │ │ │ │ + 229 // MonomialBasisImpl │ │ │ │ │ + 230 // ----------------- │ │ │ │ │ + 231 │ │ │ │ │ + 232 template< GeometryType::Id geometryId, class F> │ │ │ │ │ +233 class MonomialBasisImpl │ │ │ │ │ 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 } │ │ │ │ │ + 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 │ │ │ │ │ -247 ~NedelecVecMatrix() │ │ │ │ │ - 248 { │ │ │ │ │ - 249 for (unsigned int i=0; i │ │ │ │ │ -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 │ │ │ │ │ + 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(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 Field *const values ) const │ │ │ │ │ + 275 { │ │ │ │ │ 276 │ │ │ │ │ - 277} │ │ │ │ │ - 278#endif // #ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH │ │ │ │ │ -polynomialbasis.hh │ │ │ │ │ + 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 BaseSize; │ │ │ │ │ + 284 │ │ │ │ │ + 285 const BaseSize &size = BaseSize::instance(); │ │ │ │ │ + 286 const_cast(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(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(order, offsets, values); │ │ │ │ │ + 325 } │ │ │ │ │ + 326 │ │ │ │ │ + 327 template │ │ │ │ │ + 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(order, offsets, values); │ │ │ │ │ + 339 else │ │ │ │ │ + 340 integrateConical(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(order, offsets, values); │ │ │ │ │ + 351 } │ │ │ │ │ + 352 │ │ │ │ │ + 353 } │ │ │ │ │ + 354 │ │ │ │ │ + 355 template │ │ │ │ │ + 356 void integratePrismatic ( const unsigned int order, │ │ │ │ │ + 357 const unsigned int *const offsets, │ │ │ │ │ + 358 Field *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 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 │ │ │ │ │ + 394 void integrateConical ( const unsigned int order, │ │ │ │ │ + 395 const unsigned int *const offsets, │ │ │ │ │ + 396 Field *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 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 > │ │ │ │ │ +438 class MonomialBasis │ │ │ │ │ + 439 : public MonomialBasisImpl< geometryId, F > │ │ │ │ │ + 440 { │ │ │ │ │ + 441 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ + 442 typedef MonomialBasis<_geometryId,_F_> This; │ │ │ │ │ + 443 typedef MonomialBasisImpl<_geometryId,_F_> Base; │ │ │ │ │ + 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 │ │ │ │ │ +451 typedef typename Base::DomainVector DomainVector; │ │ │ │ │ + 452 │ │ │ │ │ +453 typedef Dune::FieldVector RangeVector; │ │ │ │ │ + 454 │ │ │ │ │ +455 typedef MonomialBasisSize Size; │ │ │ │ │ + 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 │ │ │ │ │ +505 void evaluate ( const DomainVector &x, │ │ │ │ │ + 506 Field *const values ) const │ │ │ │ │ + 507 { │ │ │ │ │ + 508 evaluate( deriv, x, values ); │ │ │ │ │ + 509 } │ │ │ │ │ + 510 │ │ │ │ │ + 511 template │ │ │ │ │ +512 void evaluate ( const DomainVector &x, │ │ │ │ │ + 513 Vector &values ) const │ │ │ │ │ + 514 { │ │ │ │ │ + 515 evaluate(x,&(values[0])); │ │ │ │ │ + 516 } │ │ │ │ │ + 517 template │ │ │ │ │ +518 void evaluate ( const DomainVector &x, │ │ │ │ │ + 519 Derivatives *values ) const │ │ │ │ │ + 520 { │ │ │ │ │ + 521 evaluate(x,&(values->block())); │ │ │ │ │ + 522 } │ │ │ │ │ + 523 template< unsigned int deriv > │ │ │ │ │ +524 void evaluate ( const DomainVector &x, │ │ │ │ │ + 525 FieldVector::size> *values ) const │ │ │ │ │ + 526 { │ │ │ │ │ + 527 evaluate(0,x,&(values[0][0])); │ │ │ │ │ + 528 } │ │ │ │ │ + 529 │ │ │ │ │ + 530 template │ │ │ │ │ +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 │ │ │ │ │ +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 > │ │ │ │ │ +569 class StandardMonomialBasis │ │ │ │ │ + 570 : public MonomialBasis< GeometryTypes::simplex(dim).toId() , F > │ │ │ │ │ + 571 { │ │ │ │ │ + 572 typedef StandardMonomialBasis<_dim,_F_> This; │ │ │ │ │ + 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 │ │ │ │ │ +579 StandardMonomialBasis ( unsigned int order ) │ │ │ │ │ + 580 : Base( order ) │ │ │ │ │ + 581 {} │ │ │ │ │ + 582 }; │ │ │ │ │ + 583 │ │ │ │ │ + 584 │ │ │ │ │ + 585 │ │ │ │ │ + 586 // StandardBiMonomialBasis │ │ │ │ │ + 587 // ----------------------- │ │ │ │ │ + 588 │ │ │ │ │ + 589 template< int dim, class F > │ │ │ │ │ +590 class StandardBiMonomialBasis │ │ │ │ │ + 591 : public MonomialBasis< GeometryTypes::cube(dim).toId() , F > │ │ │ │ │ + 592 { │ │ │ │ │ + 593 typedef StandardBiMonomialBasis<_dim,_F_> This; │ │ │ │ │ + 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 │ │ │ │ │ +600 StandardBiMonomialBasis ( unsigned int order ) │ │ │ │ │ + 601 : Base( order ) │ │ │ │ │ + 602 {} │ │ │ │ │ + 603 }; │ │ │ │ │ + 604 │ │ │ │ │ + 605 // ----------------------------------------------------------- │ │ │ │ │ + 606 // ----------------------------------------------------------- │ │ │ │ │ + 607 // VirtualMonomialBasis │ │ │ │ │ + 608 // ------------------- │ │ │ │ │ + 609 │ │ │ │ │ + 610 template< int dim, class F > │ │ │ │ │ +611 class VirtualMonomialBasis │ │ │ │ │ + 612 { │ │ │ │ │ + 613 typedef VirtualMonomialBasis<_dim,_F_> This; │ │ │ │ │ + 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 DomainVector; │ │ │ │ │ +622 typedef FieldVector RangeVector; │ │ │ │ │ + 623 │ │ │ │ │ +624 explicit VirtualMonomialBasis(const GeometryType& gt, │ │ │ │ │ + 625 unsigned int order) │ │ │ │ │ + 626 : order_(order), geometry_(gt) {} │ │ │ │ │ + 627 │ │ │ │ │ +628 virtual ~VirtualMonomialBasis() {} │ │ │ │ │ + 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 *const values ) const │ │ │ │ │ + 658 { │ │ │ │ │ + 659 evaluate( deriv, x, &(values[0][0]) ); │ │ │ │ │ + 660 } │ │ │ │ │ + 661 template │ │ │ │ │ +662 void evaluate ( const DomainVector &x, │ │ │ │ │ + 663 Derivatives *values ) const │ │ │ │ │ + 664 { │ │ │ │ │ + 665 evaluate(x,&(values->block())); │ │ │ │ │ + 666 } │ │ │ │ │ + 667 template │ │ │ │ │ +668 void evaluate ( const DomainVector &x, │ │ │ │ │ + 669 Vector &values ) const │ │ │ │ │ + 670 { │ │ │ │ │ + 671 evaluate( 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( bx, values ); │ │ │ │ │ + 696 } │ │ │ │ │ + 697 │ │ │ │ │ +698 virtual void integrate ( Field *const values ) const = 0; │ │ │ │ │ + 699 template │ │ │ │ │ +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 > │ │ │ │ │ +710 class VirtualMonomialBasisImpl │ │ │ │ │ + 711 : public VirtualMonomialBasis< static_cast(geometryId).dim │ │ │ │ │ +(), F > │ │ │ │ │ + 712 { │ │ │ │ │ + 713 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ + 714 typedef VirtualMonomialBasis< geometry.dim(), F > Base; │ │ │ │ │ + 715 typedef VirtualMonomialBasisImpl<_geometryId,_F_> This; │ │ │ │ │ + 716 │ │ │ │ │ + 717 public: │ │ │ │ │ +718 typedef typename Base::Field Field; │ │ │ │ │ +719 typedef typename Base::DomainVector DomainVector; │ │ │ │ │ + 720 │ │ │ │ │ +721 VirtualMonomialBasisImpl(unsigned int order) │ │ │ │ │ + 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: │ │ │ │ │ + 742 MonomialBasis basis_; │ │ │ │ │ + 743 using Base::order_; │ │ │ │ │ + 744 }; │ │ │ │ │ + 745 │ │ │ │ │ + 746 // MonomialBasisFactory │ │ │ │ │ + 747 // -------------------- │ │ │ │ │ + 748 │ │ │ │ │ + 749 template< int dim, class F > │ │ │ │ │ +750 struct MonomialBasisFactory │ │ │ │ │ + 751 { │ │ │ │ │ +752 static const unsigned int dimension = dim; │ │ │ │ │ +753 typedef F StorageField; │ │ │ │ │ + 754 │ │ │ │ │ +755 typedef unsigned int Key; │ │ │ │ │ +756 typedef const VirtualMonomialBasis<_dimension,_F_> Object; │ │ │ │ │ + 757 │ │ │ │ │ + 758 template < int dd, class FF > │ │ │ │ │ +759 struct EvaluationBasisFactory │ │ │ │ │ + 760 { │ │ │ │ │ +761 typedef MonomialBasisFactory Type; │ │ │ │ │ + 762 }; │ │ │ │ │ + 763 │ │ │ │ │ + 764 template< GeometryType::Id geometryId > │ │ │ │ │ +765 static Object* create ( const Key &order ) │ │ │ │ │ + 766 { │ │ │ │ │ + 767 return new VirtualMonomialBasisImpl<_geometryId,_StorageField_>( order ); │ │ │ │ │ + 768 } │ │ │ │ │ +769 static void release( Object *object ) { delete object; } │ │ │ │ │ + 770 }; │ │ │ │ │ + 771 │ │ │ │ │ + 772 │ │ │ │ │ + 773 │ │ │ │ │ + 774 // MonomialBasisProvider │ │ │ │ │ + 775 // --------------------- │ │ │ │ │ + 776 │ │ │ │ │ + 777 template< int dim, class SF > │ │ │ │ │ +778 struct MonomialBasisProvider │ │ │ │ │ + 779 : public TopologySingletonFactory< MonomialBasisFactory< dim, SF > > │ │ │ │ │ + 780 { │ │ │ │ │ +781 static const unsigned int dimension = dim; │ │ │ │ │ +782 typedef SF StorageField; │ │ │ │ │ + 783 template < int dd, class FF > │ │ │ │ │ +784 struct EvaluationBasisFactory │ │ │ │ │ + 785 { │ │ │ │ │ +786 typedef MonomialBasisProvider Type; │ │ │ │ │ + 787 }; │ │ │ │ │ + 788 }; │ │ │ │ │ + 789 │ │ │ │ │ + 790} │ │ │ │ │ + 791 │ │ │ │ │ + 792#endif │ │ │ │ │ +multiindex.hh │ │ │ │ │ +field.hh │ │ │ │ │ +tensor.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::field_cast │ │ │ │ │ void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ a helper class to cast from one field to another │ │ │ │ │ Definition field.hh:159 │ │ │ │ │ -Dune::NedelecVecMatrix │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:61 │ │ │ │ │ -Dune::NedelecVecMatrix::NedelecVecMatrix │ │ │ │ │ -NedelecVecMatrix(std::size_t order) │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:66 │ │ │ │ │ -Dune::NedelecVecMatrix::MI │ │ │ │ │ -MultiIndex< dim, Field > MI │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:64 │ │ │ │ │ -Dune::NedelecVecMatrix::row_ │ │ │ │ │ -unsigned int row_ │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:272 │ │ │ │ │ -Dune::NedelecVecMatrix::cols │ │ │ │ │ -unsigned int cols() const │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:255 │ │ │ │ │ -Dune::NedelecVecMatrix::~NedelecVecMatrix │ │ │ │ │ -~NedelecVecMatrix() │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:247 │ │ │ │ │ -Dune::NedelecVecMatrix::MIBasis │ │ │ │ │ -MonomialBasis< geometryId, MI > MIBasis │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:65 │ │ │ │ │ -Dune::NedelecVecMatrix::col_ │ │ │ │ │ -unsigned int col_ │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:272 │ │ │ │ │ -Dune::NedelecVecMatrix::dim │ │ │ │ │ -static const unsigned int dim │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:63 │ │ │ │ │ -Dune::NedelecVecMatrix::row │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:264 │ │ │ │ │ -Dune::NedelecVecMatrix::geometry │ │ │ │ │ -static constexpr GeometryType geometry │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:62 │ │ │ │ │ -Dune::NedelecVecMatrix::rows │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:259 │ │ │ │ │ -Dune::NedelecVecMatrix::mat_ │ │ │ │ │ -Field ** mat_ │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:273 │ │ │ │ │ -Dune::NedelecPreBasisFactory │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:22 │ │ │ │ │ -Dune::NedelecPreBasisFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:56 │ │ │ │ │ -Dune::NedelecPreBasisFactory::MBasis │ │ │ │ │ -MBasisFactory::Object MBasis │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:24 │ │ │ │ │ -Dune::NedelecPreBasisFactory::create │ │ │ │ │ -static Object * create(Key order) │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:38 │ │ │ │ │ -Dune::NedelecPreBasisFactory::Basis │ │ │ │ │ -PolynomialBasisWithMatrix< EvalMBasis, SparseCoeffMatrix< Field, dim > > Basis │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:26 │ │ │ │ │ -Dune::NedelecPreBasisFactory::Object │ │ │ │ │ -const Basis Object │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:28 │ │ │ │ │ -Dune::NedelecPreBasisFactory::EvalMBasis │ │ │ │ │ -StandardEvaluator< MBasis > EvalMBasis │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:25 │ │ │ │ │ -Dune::NedelecPreBasisFactory::MBasisFactory │ │ │ │ │ -MonomialBasisProvider< dim, Field > MBasisFactory │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:23 │ │ │ │ │ -Dune::NedelecPreBasisFactory::Key │ │ │ │ │ -std::size_t Key │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:29 │ │ │ │ │ -Dune::NedelecPreBasisFactory::EvaluationBasisFactory │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:33 │ │ │ │ │ -Dune::NedelecPreBasisFactory::EvaluationBasisFactory::Type │ │ │ │ │ -MonomialBasisProvider< dd, FF > Type │ │ │ │ │ -Definition nedelecsimplexprebasis.hh:34 │ │ │ │ │ -Dune::StandardEvaluator │ │ │ │ │ -Definition basisevaluator.hh:131 │ │ │ │ │ +Dune::Unity │ │ │ │ │ +A class representing the unit of a given Field. │ │ │ │ │ +Definition field.hh:30 │ │ │ │ │ +Dune::Zero │ │ │ │ │ +A class representing the zero of a given Field. │ │ │ │ │ +Definition field.hh:79 │ │ │ │ │ +Dune::MonomialBasisSize │ │ │ │ │ +Definition monomialbasis.hh:84 │ │ │ │ │ +Dune::MonomialBasisSize::numBaseFunctions_ │ │ │ │ │ +unsigned int * numBaseFunctions_ │ │ │ │ │ +Definition monomialbasis.hh:100 │ │ │ │ │ +Dune::MonomialBasisSize::computeSizes │ │ │ │ │ +void computeSizes(unsigned int order) │ │ │ │ │ +Definition monomialbasis.hh:126 │ │ │ │ │ +Dune::MonomialBasisSize::sizes_ │ │ │ │ │ +unsigned int * sizes_ │ │ │ │ │ +Definition monomialbasis.hh:97 │ │ │ │ │ +Dune::MonomialBasisSize::MonomialBasisSize │ │ │ │ │ +MonomialBasisSize() │ │ │ │ │ +Definition monomialbasis.hh:102 │ │ │ │ │ +Dune::MonomialBasisSize::~MonomialBasisSize │ │ │ │ │ +~MonomialBasisSize() │ │ │ │ │ +Definition monomialbasis.hh:110 │ │ │ │ │ +Dune::MonomialBasisSize::operator() │ │ │ │ │ +unsigned int operator()(const unsigned int order) const │ │ │ │ │ +Definition monomialbasis.hh:116 │ │ │ │ │ +Dune::MonomialBasisSize::maxOrder_ │ │ │ │ │ +unsigned int maxOrder_ │ │ │ │ │ +Definition monomialbasis.hh:94 │ │ │ │ │ +Dune::MonomialBasisSize::maxOrder │ │ │ │ │ +unsigned int maxOrder() const │ │ │ │ │ +Definition monomialbasis.hh:121 │ │ │ │ │ +Dune::MonomialBasisSize::instance │ │ │ │ │ +static This & instance() │ │ │ │ │ +Definition monomialbasis.hh:88 │ │ │ │ │ Dune::MonomialBasis │ │ │ │ │ Definition monomialbasis.hh:440 │ │ │ │ │ Dune::MonomialBasis::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ Definition monomialbasis.hh:476 │ │ │ │ │ +Dune::MonomialBasis::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition monomialbasis.hh:446 │ │ │ │ │ +Dune::MonomialBasis::RangeVector │ │ │ │ │ +Dune::FieldVector< Field, dimRange > RangeVector │ │ │ │ │ +Definition monomialbasis.hh:453 │ │ │ │ │ Dune::MonomialBasis::evaluate │ │ │ │ │ void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ values) const │ │ │ │ │ Definition monomialbasis.hh:498 │ │ │ │ │ Dune::MonomialBasis::sizes │ │ │ │ │ +const unsigned int * sizes() const │ │ │ │ │ +Definition monomialbasis.hh:471 │ │ │ │ │ +Dune::MonomialBasis::topologyId │ │ │ │ │ +unsigned int topologyId() const │ │ │ │ │ +Definition monomialbasis.hh:493 │ │ │ │ │ +Dune::MonomialBasis::integrate │ │ │ │ │ +void integrate(Vector &values) const │ │ │ │ │ +Definition monomialbasis.hh:552 │ │ │ │ │ +Dune::MonomialBasis::Field │ │ │ │ │ +Base::Field Field │ │ │ │ │ +Definition monomialbasis.hh:449 │ │ │ │ │ +Dune::MonomialBasis::integrate │ │ │ │ │ +void integrate(Field *const values) const │ │ │ │ │ +Definition monomialbasis.hh:547 │ │ │ │ │ +Dune::MonomialBasis::dimRange │ │ │ │ │ +static const unsigned int dimRange │ │ │ │ │ +Definition monomialbasis.hh:447 │ │ │ │ │ +Dune::MonomialBasis::DomainVector │ │ │ │ │ +Base::DomainVector DomainVector │ │ │ │ │ +Definition monomialbasis.hh:451 │ │ │ │ │ +Dune::MonomialBasis::evaluate │ │ │ │ │ +void evaluate(const DomainVector &x, Field *const values) const │ │ │ │ │ +Definition monomialbasis.hh:505 │ │ │ │ │ +Dune::MonomialBasis::evaluate │ │ │ │ │ +void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ +Definition monomialbasis.hh:531 │ │ │ │ │ +Dune::MonomialBasis::evaluate │ │ │ │ │ +void evaluate(const DomainVector &x, FieldVector< Field, Derivatives< Field, │ │ │ │ │ +dimension, 1, deriv, DerivativeLayoutNS::value >::size > *values) const │ │ │ │ │ +Definition monomialbasis.hh:524 │ │ │ │ │ +Dune::MonomialBasis::evaluate │ │ │ │ │ +void evaluate(const DomainVector &x, Derivatives< Field, dimension, 1, deriv, │ │ │ │ │ +layout > *values) const │ │ │ │ │ +Definition monomialbasis.hh:518 │ │ │ │ │ +Dune::MonomialBasis::evaluate │ │ │ │ │ +void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ +Definition monomialbasis.hh:538 │ │ │ │ │ +Dune::MonomialBasis::Size │ │ │ │ │ +MonomialBasisSize< geometryId > Size │ │ │ │ │ +Definition monomialbasis.hh:455 │ │ │ │ │ +Dune::MonomialBasis::evaluate │ │ │ │ │ +void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ +Definition monomialbasis.hh:512 │ │ │ │ │ +Dune::MonomialBasis::MonomialBasis │ │ │ │ │ +MonomialBasis(unsigned int order) │ │ │ │ │ +Definition monomialbasis.hh:457 │ │ │ │ │ +Dune::MonomialBasis::derivSize │ │ │ │ │ +unsigned int derivSize(const unsigned int deriv) const │ │ │ │ │ +Definition monomialbasis.hh:482 │ │ │ │ │ +Dune::MonomialBasis::sizes │ │ │ │ │ const unsigned int * sizes(unsigned int order) const │ │ │ │ │ Definition monomialbasis.hh:465 │ │ │ │ │ +Dune::MonomialBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Definition monomialbasis.hh:488 │ │ │ │ │ +Dune::MonomialBasisHelper │ │ │ │ │ +Definition monomialbasis.hh:177 │ │ │ │ │ +Dune::MonomialBasisHelper::Size │ │ │ │ │ +MonomialBasisSize< GeometryTypes::simplex(dim).toId() > Size │ │ │ │ │ +Definition monomialbasis.hh:179 │ │ │ │ │ +Dune::MonomialBasisHelper::copy │ │ │ │ │ +static void copy(const unsigned int deriv, F *&wit, F *&rit, const unsigned int │ │ │ │ │ +numBaseFunctions, const F &z) │ │ │ │ │ +Definition monomialbasis.hh:181 │ │ │ │ │ +Dune::MonomialBasisHelper::MySize │ │ │ │ │ +MonomialBasisSize< GeometryTypes::simplex(mydim).toId() > MySize │ │ │ │ │ +Definition monomialbasis.hh:178 │ │ │ │ │ +Dune::MonomialBasisImpl │ │ │ │ │ +Definition monomialbasis.hh:234 │ │ │ │ │ +Dune::MonomialBasisImpl::DomainVector │ │ │ │ │ +FieldVector< Field, dimDomain > DomainVector │ │ │ │ │ +Definition monomialbasis.hh:242 │ │ │ │ │ +Dune::MonomialBasisImpl::geometry │ │ │ │ │ +static constexpr GeometryType geometry │ │ │ │ │ +Definition monomialbasis.hh:238 │ │ │ │ │ +Dune::MonomialBasisImpl::Field │ │ │ │ │ +F Field │ │ │ │ │ +Definition monomialbasis.hh:236 │ │ │ │ │ +Dune::MonomialBasisImpl::dimDomain │ │ │ │ │ +static const unsigned int dimDomain │ │ │ │ │ +Definition monomialbasis.hh:240 │ │ │ │ │ +Dune::StandardMonomialBasis │ │ │ │ │ +Definition monomialbasis.hh:571 │ │ │ │ │ +Dune::StandardMonomialBasis::geometry │ │ │ │ │ +static constexpr GeometryType geometry │ │ │ │ │ +Definition monomialbasis.hh:576 │ │ │ │ │ +Dune::StandardMonomialBasis::StandardMonomialBasis │ │ │ │ │ +StandardMonomialBasis(unsigned int order) │ │ │ │ │ +Definition monomialbasis.hh:579 │ │ │ │ │ +Dune::StandardMonomialBasis::dimension │ │ │ │ │ +static const int dimension │ │ │ │ │ +Definition monomialbasis.hh:577 │ │ │ │ │ +Dune::StandardBiMonomialBasis │ │ │ │ │ +Definition monomialbasis.hh:592 │ │ │ │ │ +Dune::StandardBiMonomialBasis::dimension │ │ │ │ │ +static const int dimension │ │ │ │ │ +Definition monomialbasis.hh:598 │ │ │ │ │ +Dune::StandardBiMonomialBasis::geometry │ │ │ │ │ +static constexpr GeometryType geometry │ │ │ │ │ +Definition monomialbasis.hh:597 │ │ │ │ │ +Dune::StandardBiMonomialBasis::StandardBiMonomialBasis │ │ │ │ │ +StandardBiMonomialBasis(unsigned int order) │ │ │ │ │ +Definition monomialbasis.hh:600 │ │ │ │ │ +Dune::VirtualMonomialBasis │ │ │ │ │ +Definition monomialbasis.hh:612 │ │ │ │ │ +Dune::VirtualMonomialBasis::geometry_ │ │ │ │ │ +GeometryType geometry_ │ │ │ │ │ +Definition monomialbasis.hh:706 │ │ │ │ │ +Dune::VirtualMonomialBasis::DomainVector │ │ │ │ │ +FieldVector< Field, dimension > DomainVector │ │ │ │ │ +Definition monomialbasis.hh:621 │ │ │ │ │ +Dune::VirtualMonomialBasis::order_ │ │ │ │ │ +unsigned int order_ │ │ │ │ │ +Definition monomialbasis.hh:705 │ │ │ │ │ +Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ +void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ +Definition monomialbasis.hh:674 │ │ │ │ │ +Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ +void evaluate(const DomainVector &x, Field *const values) const │ │ │ │ │ +Definition monomialbasis.hh:650 │ │ │ │ │ +Dune::VirtualMonomialBasis::Field │ │ │ │ │ +F Field │ │ │ │ │ +Definition monomialbasis.hh:616 │ │ │ │ │ +Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ +void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ +Definition monomialbasis.hh:668 │ │ │ │ │ +Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ +void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ +Definition monomialbasis.hh:680 │ │ │ │ │ +Dune::VirtualMonomialBasis::order │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Definition monomialbasis.hh:637 │ │ │ │ │ +Dune::VirtualMonomialBasis::dimRange │ │ │ │ │ +static const unsigned int dimRange │ │ │ │ │ +Definition monomialbasis.hh:619 │ │ │ │ │ +Dune::VirtualMonomialBasis::StorageField │ │ │ │ │ +F StorageField │ │ │ │ │ +Definition monomialbasis.hh:617 │ │ │ │ │ +Dune::VirtualMonomialBasis::dimension │ │ │ │ │ +static const int dimension │ │ │ │ │ +Definition monomialbasis.hh:618 │ │ │ │ │ +Dune::VirtualMonomialBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Definition monomialbasis.hh:632 │ │ │ │ │ +Dune::VirtualMonomialBasis::RangeVector │ │ │ │ │ +FieldVector< Field, dimRange > RangeVector │ │ │ │ │ +Definition monomialbasis.hh:622 │ │ │ │ │ +Dune::VirtualMonomialBasis::~VirtualMonomialBasis │ │ │ │ │ +virtual ~VirtualMonomialBasis() │ │ │ │ │ +Definition monomialbasis.hh:628 │ │ │ │ │ +Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ +virtual void evaluate(const unsigned int deriv, const DomainVector &x, Field │ │ │ │ │ +*const values) const =0 │ │ │ │ │ +Dune::VirtualMonomialBasis::integrate │ │ │ │ │ +virtual void integrate(Field *const values) const =0 │ │ │ │ │ +Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ +void evaluate(const DomainVector &x, Dune::FieldVector< Field, size > *const │ │ │ │ │ +values) const │ │ │ │ │ +Definition monomialbasis.hh:656 │ │ │ │ │ +Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ +void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ +Definition monomialbasis.hh:689 │ │ │ │ │ +Dune::VirtualMonomialBasis::type │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +Definition monomialbasis.hh:642 │ │ │ │ │ +Dune::VirtualMonomialBasis::evaluate │ │ │ │ │ +void evaluate(const DomainVector &x, Derivatives< Field, dimension, 1, deriv, │ │ │ │ │ +layout > *values) const │ │ │ │ │ +Definition monomialbasis.hh:662 │ │ │ │ │ +Dune::VirtualMonomialBasis::VirtualMonomialBasis │ │ │ │ │ +VirtualMonomialBasis(const GeometryType >, unsigned int order) │ │ │ │ │ +Definition monomialbasis.hh:624 │ │ │ │ │ +Dune::VirtualMonomialBasis::sizes │ │ │ │ │ +virtual const unsigned int * sizes() const =0 │ │ │ │ │ +Dune::VirtualMonomialBasis::integrate │ │ │ │ │ +void integrate(Vector &values) const │ │ │ │ │ +Definition monomialbasis.hh:700 │ │ │ │ │ +Dune::VirtualMonomialBasisImpl │ │ │ │ │ +Definition monomialbasis.hh:712 │ │ │ │ │ +Dune::VirtualMonomialBasisImpl::integrate │ │ │ │ │ +void integrate(Field *const values) const │ │ │ │ │ +Definition monomialbasis.hh:736 │ │ │ │ │ +Dune::VirtualMonomialBasisImpl::sizes │ │ │ │ │ +const unsigned int * sizes() const │ │ │ │ │ +Definition monomialbasis.hh:725 │ │ │ │ │ +Dune::VirtualMonomialBasisImpl::DomainVector │ │ │ │ │ +Base::DomainVector DomainVector │ │ │ │ │ +Definition monomialbasis.hh:719 │ │ │ │ │ +Dune::VirtualMonomialBasisImpl::Field │ │ │ │ │ +Base::Field Field │ │ │ │ │ +Definition monomialbasis.hh:718 │ │ │ │ │ +Dune::VirtualMonomialBasisImpl::evaluate │ │ │ │ │ +void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ +values) const │ │ │ │ │ +Definition monomialbasis.hh:730 │ │ │ │ │ +Dune::VirtualMonomialBasisImpl::VirtualMonomialBasisImpl │ │ │ │ │ +VirtualMonomialBasisImpl(unsigned int order) │ │ │ │ │ +Definition monomialbasis.hh:721 │ │ │ │ │ +Dune::MonomialBasisFactory │ │ │ │ │ +Definition monomialbasis.hh:751 │ │ │ │ │ +Dune::MonomialBasisFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition monomialbasis.hh:769 │ │ │ │ │ +Dune::MonomialBasisFactory::Object │ │ │ │ │ +const VirtualMonomialBasis< dimension, F > Object │ │ │ │ │ +Definition monomialbasis.hh:756 │ │ │ │ │ +Dune::MonomialBasisFactory::create │ │ │ │ │ +static Object * create(const Key &order) │ │ │ │ │ +Definition monomialbasis.hh:765 │ │ │ │ │ +Dune::MonomialBasisFactory::StorageField │ │ │ │ │ +F StorageField │ │ │ │ │ +Definition monomialbasis.hh:753 │ │ │ │ │ +Dune::MonomialBasisFactory::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition monomialbasis.hh:752 │ │ │ │ │ +Dune::MonomialBasisFactory::Key │ │ │ │ │ +unsigned int Key │ │ │ │ │ +Definition monomialbasis.hh:755 │ │ │ │ │ +Dune::MonomialBasisFactory::EvaluationBasisFactory │ │ │ │ │ +Definition monomialbasis.hh:760 │ │ │ │ │ +Dune::MonomialBasisFactory::EvaluationBasisFactory::Type │ │ │ │ │ +MonomialBasisFactory< dd, FF > Type │ │ │ │ │ +Definition monomialbasis.hh:761 │ │ │ │ │ Dune::MonomialBasisProvider │ │ │ │ │ Definition monomialbasis.hh:780 │ │ │ │ │ -Dune::MultiIndex │ │ │ │ │ -Definition multiindex.hh:37 │ │ │ │ │ -Dune::MultiIndex::z │ │ │ │ │ -int z(int i) const │ │ │ │ │ -Definition multiindex.hh:91 │ │ │ │ │ -Dune::PolynomialBasisWithMatrix │ │ │ │ │ -Definition polynomialbasis.hh:348 │ │ │ │ │ +Dune::MonomialBasisProvider::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition monomialbasis.hh:781 │ │ │ │ │ +Dune::MonomialBasisProvider::StorageField │ │ │ │ │ +SF StorageField │ │ │ │ │ +Definition monomialbasis.hh:782 │ │ │ │ │ +Dune::MonomialBasisProvider::EvaluationBasisFactory │ │ │ │ │ +Definition monomialbasis.hh:785 │ │ │ │ │ +Dune::MonomialBasisProvider::EvaluationBasisFactory::Type │ │ │ │ │ +MonomialBasisProvider< dd, FF > Type │ │ │ │ │ +Definition monomialbasis.hh:786 │ │ │ │ │ +Dune::Derivatives │ │ │ │ │ +Definition tensor.hh:172 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00539.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelecsimplexinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: coeffmatrix.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,50 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
nedelecsimplexinterpolation.hh File Reference
│ │ │ │ +
coeffmatrix.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 <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::LocalCoefficientsContainer
struct  Dune::Mult< Field, Field2 >
 
struct  Dune::NedelecCoefficientsFactory< dim >
struct  Dune::Mult< Field, FieldVector< Field2, dimRange > >
 
struct  Dune::NedelecL2InterpolationBuilder< dim, Field >
 
class  Dune::NedelecL2Interpolation< dimension, F >
 An L2-based interpolation for Nedelec. More...
 
struct  Dune::NedelecL2InterpolationFactory< dim, Field >
class  Dune::SparseCoeffMatrix< F, bSize >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,41 +6,30 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * nedelec │ │ │ │ │ - * nedelecsimplex │ │ │ │ │ + * utility │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -nedelecsimplexinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +coeffmatrix.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ - class  Dune::LocalCoefficientsContainer │ │ │ │ │ +struct  Dune::Mult<_Field,_Field2_> │ │ │ │ │   │ │ │ │ │ -struct  Dune::NedelecCoefficientsFactory<_dim_> │ │ │ │ │ +struct  Dune::Mult<_Field,_FieldVector<_Field2,_dimRange_>_> │ │ │ │ │   │ │ │ │ │ -struct  Dune::NedelecL2InterpolationBuilder<_dim,_Field_> │ │ │ │ │ -  │ │ │ │ │ - class  Dune::NedelecL2Interpolation<_dimension,_F_> │ │ │ │ │ -  An L2-based interpolation for Nedelec. More... │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::NedelecL2InterpolationFactory<_dim,_Field_> │ │ │ │ │ + class  Dune::SparseCoeffMatrix<_F,_bSize_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00539_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelecsimplexinterpolation.hh Source File │ │ │ │ +dune-localfunctions: coeffmatrix.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,816 +70,338 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
nedelecsimplexinterpolation.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_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <utility>
│ │ │ │ -
10#include <numeric>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/exceptions.hh>
│ │ │ │ +
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
│ │ │ │ -
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 )
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ + │ │ │ │ +
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 /* 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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
264#endif // DUNE_COEFFMATRIX_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
│ │ │ │ -
Definition interpolationhelper.hh:22
│ │ │ │ -
Definition interpolationhelper.hh:24
│ │ │ │ -
Definition polynomialbasis.hh:65
│ │ │ │ -
unsigned int size() const
Definition polynomialbasis.hh:113
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,906 +7,349 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * nedelec │ │ │ │ │ - * nedelecsimplex │ │ │ │ │ -nedelecsimplexinterpolation.hh │ │ │ │ │ + * utility │ │ │ │ │ +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_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH │ │ │ │ │ - 6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ + 5#ifndef DUNE_COEFFMATRIX_HH │ │ │ │ │ + 6#define DUNE_COEFFMATRIX_HH │ │ │ │ │ + 7#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ - 17 │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include │ │ │ │ │ - 20#include │ │ │ │ │ - 21#include │ │ │ │ │ - 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 │ │ │ │ │ -37 class LocalCoefficientsContainer │ │ │ │ │ - 38 { │ │ │ │ │ - 39 typedef LocalCoefficientsContainer This; │ │ │ │ │ - 40 │ │ │ │ │ - 41 public: │ │ │ │ │ - 42 template │ │ │ │ │ -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 } │ │ │ │ │ + 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 │ │ │ │ │ +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 │ │ │ │ │ +36 struct Mult< Field,FieldVector > │ │ │ │ │ + 37 { │ │ │ │ │ +38 typedef FieldVector 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 > │ │ │ │ │ +47 class SparseCoeffMatrix │ │ │ │ │ + 48 { │ │ │ │ │ + 49 public: │ │ │ │ │ +50 typedef F Field; │ │ │ │ │ +51 static const unsigned int blockSize = bSize; │ │ │ │ │ +52 typedef SparseCoeffMatrix This; │ │ │ │ │ 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 > │ │ │ │ │ -69 struct NedelecCoefficientsFactory │ │ │ │ │ +54 SparseCoeffMatrix() │ │ │ │ │ + 55 : coeff_(0), │ │ │ │ │ + 56 rows_(0), │ │ │ │ │ + 57 skip_(0), │ │ │ │ │ + 58 numRows_(0), │ │ │ │ │ + 59 numCols_(0) │ │ │ │ │ + 60 {} │ │ │ │ │ + 61 │ │ │ │ │ +62 ~SparseCoeffMatrix() │ │ │ │ │ + 63 { │ │ │ │ │ + 64 delete [] coeff_; │ │ │ │ │ + 65 delete [] rows_; │ │ │ │ │ + 66 delete [] skip_; │ │ │ │ │ + 67 } │ │ │ │ │ + 68 │ │ │ │ │ +69 unsigned int size () const │ │ │ │ │ 70 { │ │ │ │ │ -71 typedef std::size_t Key; │ │ │ │ │ -72 typedef const LocalCoefficientsContainer Object; │ │ │ │ │ - 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 > │ │ │ │ │ -110 struct NedelecL2InterpolationBuilder │ │ │ │ │ - 111 { │ │ │ │ │ -112 static const unsigned int dimension = dim; │ │ │ │ │ - 113 │ │ │ │ │ - 114 // for the dofs associated to the element │ │ │ │ │ -115 typedef OrthonormalBasisFactory<_dimension,_Field_> TestBasisFactory; │ │ │ │ │ -116 typedef typename TestBasisFactory::Object TestBasis; │ │ │ │ │ - 117 │ │ │ │ │ - 118 // for the dofs associated to the faces │ │ │ │ │ -119 typedef OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory; │ │ │ │ │ -120 typedef typename TestFaceBasisFactory::Object TestFaceBasis; │ │ │ │ │ - 121 │ │ │ │ │ - 122 // for the dofs associated to the edges │ │ │ │ │ -123 typedef OrthonormalBasisFactory<_1,_Field_> TestEdgeBasisFactory; │ │ │ │ │ -124 typedef typename TestEdgeBasisFactory::Object TestEdgeBasis; │ │ │ │ │ - 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,dim-1> FaceTangents; │ │ │ │ │ - 132 │ │ │ │ │ -133 NedelecL2InterpolationBuilder () = default; │ │ │ │ │ - 134 │ │ │ │ │ -135 NedelecL2InterpolationBuilder ( const NedelecL2InterpolationBuilder & ) = │ │ │ │ │ -delete; │ │ │ │ │ -136 NedelecL2InterpolationBuilder ( NedelecL2InterpolationBuilder && ) = │ │ │ │ │ -delete; │ │ │ │ │ - 137 │ │ │ │ │ -138 ~NedelecL2InterpolationBuilder () │ │ │ │ │ - 139 { │ │ │ │ │ - 140 TestBasisFactory::release( testBasis_ ); │ │ │ │ │ - 141 for( FaceStructure &f : faceStructure_ ) │ │ │ │ │ - 142 TestFaceBasisFactory::release( f.basis_ ); │ │ │ │ │ - 143 for( EdgeStructure& e : edgeStructure_ ) │ │ │ │ │ - 144 TestEdgeBasisFactory::release( e.basis_ ); │ │ │ │ │ - 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 │ │ │ │ │ -175 TestBasis *testBasis () const │ │ │ │ │ - 176 { │ │ │ │ │ - 177 return testBasis_; │ │ │ │ │ - 178 } │ │ │ │ │ - 179 │ │ │ │ │ - 180 // basis associated to face f │ │ │ │ │ -181 TestFaceBasis *testFaceBasis ( unsigned int f ) const │ │ │ │ │ + 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::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 } │ │ │ │ │ + 127 DerivativeAssign::apply(r,val,y[i]); │ │ │ │ │ + 128 } │ │ │ │ │ + 129 } │ │ │ │ │ + 130 } │ │ │ │ │ + 131 template │ │ │ │ │ +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 │ │ │ │ │ +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; │ │ │ │ │ + 152 LFETensorAxpy::apply(r,*pos,*itx,val); │ │ │ │ │ + 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 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 assert( f < faceSize() ); │ │ │ │ │ - 184 return faceStructure_[ f ].basis_; │ │ │ │ │ - 185 } │ │ │ │ │ - 186 │ │ │ │ │ - 187 // basis associated to edge e │ │ │ │ │ -188 TestEdgeBasis *testEdgeBasis ( unsigned int e ) const │ │ │ │ │ + 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() || Zero() < val) │ │ │ │ │ 189 { │ │ │ │ │ - 190 assert( e < edgeSize() ); │ │ │ │ │ - 191 return edgeStructure_[ e ].basis_; │ │ │ │ │ - 192 } │ │ │ │ │ - 193 │ │ │ │ │ -194 const Tangent& edgeTangent ( unsigned int e ) const │ │ │ │ │ + 190 *cit = val; │ │ │ │ │ + 191 ++sit; │ │ │ │ │ + 192 ++cit; │ │ │ │ │ + 193 *sit = 1; │ │ │ │ │ + 194 } else │ │ │ │ │ 195 { │ │ │ │ │ - 196 assert( e < edgeSize() ); │ │ │ │ │ - 197 return edgeStructure_[ e ].tangent_; │ │ │ │ │ + 196 ++(*sit); │ │ │ │ │ + 197 } │ │ │ │ │ 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(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 zero(0); │ │ │ │ │ - 244 FaceTangents faceTangents; │ │ │ │ │ - 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; jvertex2) │ │ │ │ │ - 259 faceTangents[j-1] *=-1; │ │ │ │ │ - 260 │ │ │ │ │ - 261 vertex1 = vertex2; │ │ │ │ │ - 262 } │ │ │ │ │ + 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 │ │ │ │ │ +223 void addRow( unsigned int k, const Field &a, Vector &b) const │ │ │ │ │ + 224 { │ │ │ │ │ + 225 assert(k( (*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 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; iv1) │ │ │ │ │ - 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> │ │ │ │ │ -359 class NedelecL2Interpolation │ │ │ │ │ - 360 : public InterpolationHelper< F ,dimension > │ │ │ │ │ - 361 { │ │ │ │ │ - 362 typedef NedelecL2Interpolation<_dimension,_F_> This; │ │ │ │ │ - 363 typedef InterpolationHelper Base; │ │ │ │ │ - 364 │ │ │ │ │ - 365 public: │ │ │ │ │ -366 typedef F Field; │ │ │ │ │ -367 typedef NedelecL2InterpolationBuilder Builder; │ │ │ │ │ -368 typedef typename Builder::FaceTangents FaceTangents; │ │ │ │ │ - 369 │ │ │ │ │ -370 NedelecL2Interpolation() │ │ │ │ │ - 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().resize │ │ │ │ │ -(1) ),void >::value,void> │ │ │ │ │ - 378 { │ │ │ │ │ - 379 coefficients.resize(size()); │ │ │ │ │ - 380 typename Base::template Helper 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().rowPtr(0)), typename Matrix::Field* >:: │ │ │ │ │ -value,void> │ │ │ │ │ - 388 { │ │ │ │ │ - 389 matrix.resize( size(), basis.size() ); │ │ │ │ │ - 390 typename Base::template Helper 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 │ │ │ │ │ -404 void build( std::size_t order ) │ │ │ │ │ - 405 { │ │ │ │ │ - 406 size_ = 0; │ │ │ │ │ - 407 order_ = order; │ │ │ │ │ - 408 builder_.template build(order_); │ │ │ │ │ - 409 if (builder_.testBasis()) │ │ │ │ │ - 410 size_ += dimension*builder_.testBasis()->size(); │ │ │ │ │ - 411 │ │ │ │ │ - 412 for ( unsigned int f=0; fsize(); │ │ │ │ │ - 415 │ │ │ │ │ - 416 for ( unsigned int e=0; esize(); │ │ │ │ │ - 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; esize(); ++i,++row) │ │ │ │ │ - 429 keys[row] = LocalKey(e,dimension-1,i); │ │ │ │ │ - 430 } │ │ │ │ │ - 431 for (unsigned int f=0; fsize()*(dimension-1); │ │ │ │ │ -++i,++row) │ │ │ │ │ - 435 keys[row] = LocalKey(f,1,i); │ │ │ │ │ - 436 } │ │ │ │ │ - 437 │ │ │ │ │ - 438 if (builder_.testBasis()) │ │ │ │ │ - 439 for (unsigned int i=0; isize()*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 ) const │ │ │ │ │ - 447 { │ │ │ │ │ - 448 const Dune::GeometryType geoType( builder_.topologyId(), dimension ); │ │ │ │ │ - 449 │ │ │ │ │ - 450 std::vector testBasisVal; │ │ │ │ │ - 451 │ │ │ │ │ - 452 for (unsigned int i=0; i EdgeQuadrature; │ │ │ │ │ - 460 typedef Dune::QuadratureRules EdgeQuadratureRules; │ │ │ │ │ - 461 │ │ │ │ │ - 462 const auto &refElement = Dune::ReferenceElements< Field, dimension >:: │ │ │ │ │ -general( geoType ); │ │ │ │ │ - 463 │ │ │ │ │ - 464 for (unsigned int e=0; esize()); │ │ │ │ │ - 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() ) ), │ │ │ │ │ - 484 builder_.edgeTangent(e), │ │ │ │ │ - 485 edgeQuad[qi].weight(), │ │ │ │ │ - 486 func); │ │ │ │ │ - 487 } │ │ │ │ │ - 488 │ │ │ │ │ - 489 row += builder_.testEdgeBasis(e)->size(); │ │ │ │ │ - 490 } │ │ │ │ │ - 491 │ │ │ │ │ - 492 // face dofs: │ │ │ │ │ - 493 typedef Dune::QuadratureRule FaceQuadrature; │ │ │ │ │ - 494 typedef Dune::QuadratureRules FaceQuadratureRules; │ │ │ │ │ - 495 │ │ │ │ │ - 496 for (unsigned int f=0; fsize()); │ │ │ │ │ - 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() ) ), │ │ │ │ │ - 517 builder_.faceTangents(f), │ │ │ │ │ - 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 Quadrature; │ │ │ │ │ - 533 typedef Dune::QuadratureRules 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 │ │ │ │ │ - 563 void computeEdgeDofs (unsigned int startRow, │ │ │ │ │ - 564 const MVal &mVal, │ │ │ │ │ - 565 const NedVal &nedVal, │ │ │ │ │ - 566 const FieldVector &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 │ │ │ │ │ - 594 void computeFaceDofs (unsigned int startRow, │ │ │ │ │ - 595 const MVal &mVal, │ │ │ │ │ - 596 const NedVal &nedVal, │ │ │ │ │ - 597 const FaceTangents& faceTangents, │ │ │ │ │ - 598 const FieldVector &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 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 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 │ │ │ │ │ -661 struct NedelecL2InterpolationFactory │ │ │ │ │ - 662 { │ │ │ │ │ -663 typedef NedelecL2InterpolationBuilder Builder; │ │ │ │ │ -664 typedef const NedelecL2Interpolation Object; │ │ │ │ │ -665 typedef std::size_t Key; │ │ │ │ │ -666 typedef typename std::remove_const::type NonConstObject; │ │ │ │ │ - 667 │ │ │ │ │ - 668 template │ │ │ │ │ -669 static Object *create( const Key &key ) │ │ │ │ │ - 670 { │ │ │ │ │ - 671 if ( !supports(key) ) │ │ │ │ │ - 672 return 0; │ │ │ │ │ - 673 NonConstObject *interpol = new NonConstObject(); │ │ │ │ │ - 674 interpol->template build(key); │ │ │ │ │ - 675 return interpol; │ │ │ │ │ - 676 } │ │ │ │ │ - 677 │ │ │ │ │ - 678 template │ │ │ │ │ -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 │ │ │ │ │ -interpolationhelper.hh │ │ │ │ │ -polynomialbasis.hh │ │ │ │ │ -orthonormalbasis.hh │ │ │ │ │ -localkey.hh │ │ │ │ │ + 264#endif // DUNE_COEFFMATRIX_HH │ │ │ │ │ +field.hh │ │ │ │ │ +tensor.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::NedelecL2InterpolationFactory │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:662 │ │ │ │ │ -Dune::NedelecL2InterpolationFactory::create │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:669 │ │ │ │ │ -Dune::NedelecL2InterpolationFactory::Object │ │ │ │ │ -const NedelecL2Interpolation< dim, Field > Object │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:664 │ │ │ │ │ -Dune::NedelecL2InterpolationFactory::Builder │ │ │ │ │ -NedelecL2InterpolationBuilder< dim, Field > Builder │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:663 │ │ │ │ │ -Dune::NedelecL2InterpolationFactory::Key │ │ │ │ │ -std::size_t Key │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:665 │ │ │ │ │ -Dune::NedelecL2InterpolationFactory::supports │ │ │ │ │ -static bool supports(const Key &key) │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:679 │ │ │ │ │ -Dune::NedelecL2InterpolationFactory::NonConstObject │ │ │ │ │ -std::remove_const< Object >::type NonConstObject │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:666 │ │ │ │ │ -Dune::NedelecL2InterpolationFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:684 │ │ │ │ │ -Dune::LocalCoefficientsContainer │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:38 │ │ │ │ │ -Dune::LocalCoefficientsContainer::LocalCoefficientsContainer │ │ │ │ │ -LocalCoefficientsContainer(const Setter &setter) │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:43 │ │ │ │ │ -Dune::LocalCoefficientsContainer::localKey │ │ │ │ │ -const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:48 │ │ │ │ │ -Dune::LocalCoefficientsContainer::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:54 │ │ │ │ │ -Dune::NedelecCoefficientsFactory │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:70 │ │ │ │ │ -Dune::NedelecCoefficientsFactory::create │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:75 │ │ │ │ │ -Dune::NedelecCoefficientsFactory::supports │ │ │ │ │ -static bool supports(const Key &key) │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:87 │ │ │ │ │ -Dune::NedelecCoefficientsFactory::Object │ │ │ │ │ -const LocalCoefficientsContainer Object │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:72 │ │ │ │ │ -Dune::NedelecCoefficientsFactory::Key │ │ │ │ │ -std::size_t Key │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:71 │ │ │ │ │ -Dune::NedelecCoefficientsFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:92 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:111 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::testEdgeBasis │ │ │ │ │ -TestEdgeBasis * testEdgeBasis(unsigned int e) const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:188 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::~NedelecL2InterpolationBuilder │ │ │ │ │ -~NedelecL2InterpolationBuilder() │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:138 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::type │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:152 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::TestBasis │ │ │ │ │ -TestBasisFactory::Object TestBasis │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:116 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::Tangent │ │ │ │ │ -FieldVector< Field, dimension > Tangent │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:127 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::TestFaceBasis │ │ │ │ │ -TestFaceBasisFactory::Object TestFaceBasis │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:120 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::testFaceBasis │ │ │ │ │ -TestFaceBasis * testFaceBasis(unsigned int f) const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:181 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::TestEdgeBasis │ │ │ │ │ -TestEdgeBasisFactory::Object TestEdgeBasis │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:124 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::Normal │ │ │ │ │ -FieldVector< Field, dimension > Normal │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:130 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::build │ │ │ │ │ -void build(std::size_t order) │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:213 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::TestBasisFactory │ │ │ │ │ -OrthonormalBasisFactory< dimension, Field > TestBasisFactory │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:115 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::TestFaceBasisFactory │ │ │ │ │ -OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:119 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::faceTangents │ │ │ │ │ -const FaceTangents & faceTangents(unsigned int f) const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:200 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::faceSize │ │ │ │ │ -unsigned int faceSize() const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:163 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::testBasis │ │ │ │ │ -TestBasis * testBasis() const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:175 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::FaceTangents │ │ │ │ │ -std::array< FieldVector< Field, dimension >, dim-1 > FaceTangents │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:131 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::TestEdgeBasisFactory │ │ │ │ │ -OrthonormalBasisFactory< 1, Field > TestEdgeBasisFactory │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:123 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::edgeTangent │ │ │ │ │ -const Tangent & edgeTangent(unsigned int e) const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:194 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::NedelecL2InterpolationBuilder │ │ │ │ │ -NedelecL2InterpolationBuilder(NedelecL2InterpolationBuilder &&)=delete │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::order │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:157 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::edgeSize │ │ │ │ │ -unsigned int edgeSize() const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:169 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::topologyId │ │ │ │ │ -unsigned int topologyId() const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:147 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::NedelecL2InterpolationBuilder │ │ │ │ │ -NedelecL2InterpolationBuilder(const NedelecL2InterpolationBuilder &)=delete │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:112 │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::NedelecL2InterpolationBuilder │ │ │ │ │ -NedelecL2InterpolationBuilder()=default │ │ │ │ │ -Dune::NedelecL2InterpolationBuilder::normal │ │ │ │ │ -const Normal & normal(unsigned int f) const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:206 │ │ │ │ │ -Dune::NedelecL2Interpolation │ │ │ │ │ -An L2-based interpolation for Nedelec. │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:361 │ │ │ │ │ -Dune::NedelecL2Interpolation::FaceTangents │ │ │ │ │ -Builder::FaceTangents FaceTangents │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:368 │ │ │ │ │ -Dune::NedelecL2Interpolation::Field │ │ │ │ │ +Dune::field_cast │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +Definition field.hh:159 │ │ │ │ │ +Dune::Mult │ │ │ │ │ +Definition coeffmatrix.hh:26 │ │ │ │ │ +Dune::Mult::add │ │ │ │ │ +static void add(const Field &vec1, const BasisEntry &vec2, BasisEntry &res) │ │ │ │ │ +Definition coeffmatrix.hh:28 │ │ │ │ │ +Dune::Mult::BasisEntry │ │ │ │ │ +Field2 BasisEntry │ │ │ │ │ +Definition coeffmatrix.hh:27 │ │ │ │ │ +Dune::Mult<_Field,_FieldVector<_Field2,_dimRange_>_>::BasisEntry │ │ │ │ │ +FieldVector< Field2, dimRange > BasisEntry │ │ │ │ │ +Definition coeffmatrix.hh:38 │ │ │ │ │ +Dune::Mult<_Field,_FieldVector<_Field2,_dimRange_>_>::add │ │ │ │ │ +static void add(const Field &vec1, const BasisEntry &vec2, BasisEntry &res) │ │ │ │ │ +Definition coeffmatrix.hh:39 │ │ │ │ │ +Dune::SparseCoeffMatrix │ │ │ │ │ +Definition coeffmatrix.hh:48 │ │ │ │ │ +Dune::SparseCoeffMatrix::blockSize │ │ │ │ │ +static const unsigned int blockSize │ │ │ │ │ +Definition coeffmatrix.hh:51 │ │ │ │ │ +Dune::SparseCoeffMatrix::SparseCoeffMatrix │ │ │ │ │ +SparseCoeffMatrix() │ │ │ │ │ +Definition coeffmatrix.hh:54 │ │ │ │ │ +Dune::SparseCoeffMatrix::Field │ │ │ │ │ F Field │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:366 │ │ │ │ │ -Dune::NedelecL2Interpolation::interpolate │ │ │ │ │ -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 │ │ │ │ │ -Dune::NedelecL2Interpolation::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:398 │ │ │ │ │ -Dune::NedelecL2Interpolation::interpolate │ │ │ │ │ -void interpolate(typename Base::template Helper< Func, Container, type > &func) │ │ │ │ │ -const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:446 │ │ │ │ │ -Dune::NedelecL2Interpolation::order_ │ │ │ │ │ -std::size_t order_ │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:656 │ │ │ │ │ -Dune::NedelecL2Interpolation::Builder │ │ │ │ │ -NedelecL2InterpolationBuilder< dimension, Field > Builder │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:367 │ │ │ │ │ -Dune::NedelecL2Interpolation::interpolate │ │ │ │ │ -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 │ │ │ │ │ -Dune::NedelecL2Interpolation::size_ │ │ │ │ │ -std::size_t size_ │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:657 │ │ │ │ │ -Dune::NedelecL2Interpolation::NedelecL2Interpolation │ │ │ │ │ -NedelecL2Interpolation() │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:370 │ │ │ │ │ -Dune::NedelecL2Interpolation::build │ │ │ │ │ -void build(std::size_t order) │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:404 │ │ │ │ │ -Dune::NedelecL2Interpolation::order │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:394 │ │ │ │ │ -Dune::NedelecL2Interpolation::setLocalKeys │ │ │ │ │ -void setLocalKeys(std::vector< LocalKey > &keys) const │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:421 │ │ │ │ │ -Dune::NedelecL2Interpolation::builder_ │ │ │ │ │ -Builder builder_ │ │ │ │ │ -Definition nedelecsimplexinterpolation.hh:655 │ │ │ │ │ -Dune::OrthonormalBasisFactory │ │ │ │ │ -Definition orthonormalbasis.hh:20 │ │ │ │ │ -Dune::OrthonormalBasisFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition orthonormalbasis.hh:57 │ │ │ │ │ -Dune::InterpolationHelper │ │ │ │ │ -Definition interpolationhelper.hh:22 │ │ │ │ │ -Dune::InterpolationHelper::Helper │ │ │ │ │ -Definition interpolationhelper.hh:24 │ │ │ │ │ -Dune::PolynomialBasis │ │ │ │ │ -Definition polynomialbasis.hh:65 │ │ │ │ │ -Dune::PolynomialBasis::size │ │ │ │ │ +Definition coeffmatrix.hh:50 │ │ │ │ │ +Dune::SparseCoeffMatrix::baseSize │ │ │ │ │ +unsigned int baseSize() const │ │ │ │ │ +Definition coeffmatrix.hh:73 │ │ │ │ │ +Dune::SparseCoeffMatrix::This │ │ │ │ │ +SparseCoeffMatrix< Field, blockSize > This │ │ │ │ │ +Definition coeffmatrix.hh:52 │ │ │ │ │ +Dune::SparseCoeffMatrix::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Definition polynomialbasis.hh:113 │ │ │ │ │ +Definition coeffmatrix.hh:69 │ │ │ │ │ +Dune::SparseCoeffMatrix::fill │ │ │ │ │ +void fill(const RowMatrix &mat, bool verbose=false) │ │ │ │ │ +Definition coeffmatrix.hh:160 │ │ │ │ │ +Dune::SparseCoeffMatrix::addRow │ │ │ │ │ +void addRow(unsigned int k, const Field &a, Vector &b) const │ │ │ │ │ +Definition coeffmatrix.hh:223 │ │ │ │ │ +Dune::SparseCoeffMatrix::mult │ │ │ │ │ +void mult(const BasisIterator &x, unsigned int numLsg, FF *y) const │ │ │ │ │ +Definition coeffmatrix.hh:79 │ │ │ │ │ +Dune::SparseCoeffMatrix::mult │ │ │ │ │ +void mult(const BasisIterator &x, Vector &y) const │ │ │ │ │ +Definition coeffmatrix.hh:132 │ │ │ │ │ +Dune::SparseCoeffMatrix::mult │ │ │ │ │ +void mult(const BasisIterator &x, Vector &y) const │ │ │ │ │ +Definition coeffmatrix.hh:105 │ │ │ │ │ +Dune::SparseCoeffMatrix::~SparseCoeffMatrix │ │ │ │ │ +~SparseCoeffMatrix() │ │ │ │ │ +Definition coeffmatrix.hh:62 │ │ │ │ │ +Dune::Zero │ │ │ │ │ +A class representing the zero of a given Field. │ │ │ │ │ +Definition field.hh:79 │ │ │ │ │ +Dune::LFETensorAxpy::apply │ │ │ │ │ +static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ +Definition tensor.hh:571 │ │ │ │ │ +Dune::DerivativeAssign::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:649 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00542.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelec1stkindcube.hh File Reference │ │ │ │ +dune-localfunctions: tensor.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,47 +65,128 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
nedelec1stkindcube.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Enumerations | │ │ │ │ +Functions
│ │ │ │ +
tensor.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ +
#include <ostream>
│ │ │ │ +#include <vector>
│ │ │ │ #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/localfunctions/common/localinterpolation.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/localfunctions/utility/field.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::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)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,31 +6,139 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * nedelec │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -nedelec1stkindcube.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * utility │ │ │ │ │ +Classes | Namespaces | Enumerations | Functions │ │ │ │ │ +tensor.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ 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::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 │ │ │ │ │ +std::ostream & Dune::operator<< (std::ostream &out, const LFETensor< F, dimD, │ │ │ │ │ + deriv > &tensor) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, │ │ │ │ │ + dimD, dimR, deriv, DerivativeLayoutNS::derivative > &d) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, │ │ │ │ │ + dimD, dimR, deriv, DerivativeLayoutNS::value > &d) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, │ │ │ │ │ + dimD, dimR, 0, DerivativeLayoutNS::derivative > &d) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, │ │ │ │ │ + dimD, dimR, 0, DerivativeLayoutNS::value > &d) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +std::ostream & Dune::operator<< (std::ostream &out, const std::vector< │ │ │ │ │ + Derivatives< F, dimD, dimR, deriv, layout > > &y) │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00542_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelec1stkindcube.hh Source File │ │ │ │ +dune-localfunctions: tensor.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,521 +70,1393 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
nedelec1stkindcube.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_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDCUBE_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDCUBE_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/fmatrix.hh>
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ -
12#include <dune/common/math.hh>
│ │ │ │ +
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
│ │ │ │ -
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;
│ │ │ │ + │ │ │ │ +
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 ***************************************************/
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │
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);
│ │ │ │ +
│ │ │ │ +
67 field_type &operator[] ( const unsigned int i )
│ │ │ │ +
68 {
│ │ │ │ +
69 return block()[ i ];
│ │ │ │ +
70 }
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
73 {
│ │ │ │ +
74 return block_;
│ │ │ │
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());
│ │ │ │ -
87
│ │ │ │ -
88 if (dim==2)
│ │ │ │ -
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};
│ │ │ │ -
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};
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
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 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]};
│ │ │ │ -
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);
│ │ │ │ +
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
│ │ │ │ -
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> > >;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 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
│ │ │ │ +
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 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();
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,547 +7,1609 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * nedelec │ │ │ │ │ -nedelec1stkindcube.hh │ │ │ │ │ + * utility │ │ │ │ │ +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_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDCUBE_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDCUBE_HH │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ + 5 │ │ │ │ │ + 6#ifndef DUNE_TENSOR_HH │ │ │ │ │ + 7#define DUNE_TENSOR_HH │ │ │ │ │ + 8 │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16 │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include │ │ │ │ │ - 19#include // For │ │ │ │ │ -deprecated makeFunctionWithCallOperator │ │ │ │ │ - 20#include │ │ │ │ │ - 21 │ │ │ │ │ - 22namespace Dune │ │ │ │ │ - 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 │ │ │ │ │ + 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 ***************************************************/ │ │ │ │ │ + 29 │ │ │ │ │ + 30 // Structure for scalar tensor of order deriv │ │ │ │ │ + 31 template │ │ │ │ │ +32 class LFETensor │ │ │ │ │ + 33 { │ │ │ │ │ + 34 typedef LFETensor This; │ │ │ │ │ + 35 typedef LFETensor BaseDim; │ │ │ │ │ + 36 typedef LFETensor BaseDeriv; │ │ │ │ │ + 37 │ │ │ │ │ + 38 public: │ │ │ │ │ +39 typedef F field_type; │ │ │ │ │ +40 static const unsigned int size = BaseDim::size+BaseDeriv::size; │ │ │ │ │ +41 typedef Dune::FieldVector Block; │ │ │ │ │ + 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 │ │ │ │ │ +56 This &operator*=( const field_type &f ) │ │ │ │ │ + 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 } │ │ │ │ │ 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); │ │ │ │ │ +67 field_type &operator[]( const unsigned int i ) │ │ │ │ │ + 68 { │ │ │ │ │ + 69 return block()[ i ]; │ │ │ │ │ + 70 } │ │ │ │ │ + 71 │ │ │ │ │ +72 Block &block() │ │ │ │ │ + 73 { │ │ │ │ │ + 74 return block_; │ │ │ │ │ 75 } │ │ │ │ │ - 76 │ │ │ │ │ - 82 void evaluateFunction(const typename Traits::DomainType& in, │ │ │ │ │ - 83 std::vector& out) const │ │ │ │ │ - 84 { │ │ │ │ │ - 85 static_assert(k==1, "Evaluating Nédélec shape functions is implemented only │ │ │ │ │ -for first order."); │ │ │ │ │ - 86 out.resize(size()); │ │ │ │ │ - 87 │ │ │ │ │ - 88 if (dim==2) │ │ │ │ │ - 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 │ │ │ │ │ +85 void assign(const LFETensor &y) │ │ │ │ │ + 86 { │ │ │ │ │ + 87 field_cast(y.block(),block()); │ │ │ │ │ + 88 } │ │ │ │ │ +89 Block block_; │ │ │ │ │ + 90 }; │ │ │ │ │ + 91 │ │ │ │ │ + 92 // ****************************************** │ │ │ │ │ + 93 template │ │ │ │ │ +94 struct LFETensor │ │ │ │ │ + 95 { │ │ │ │ │ +96 static const int size = 0; │ │ │ │ │ + 97 }; │ │ │ │ │ + 98 │ │ │ │ │ + 99 template │ │ │ │ │ +100 struct LFETensor │ │ │ │ │ + 101 { │ │ │ │ │ +102 static const int size = 1; │ │ │ │ │ + 103 }; │ │ │ │ │ + 104 │ │ │ │ │ + 105 template │ │ │ │ │ +106 class LFETensor │ │ │ │ │ + 107 { │ │ │ │ │ + 108 typedef LFETensor This; │ │ │ │ │ + 109 │ │ │ │ │ + 110 public: │ │ │ │ │ +111 typedef F field_type; │ │ │ │ │ +112 static const int size = 1; │ │ │ │ │ +113 typedef Dune::FieldVector 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 │ │ │ │ │ +128 This &operator*=( const field_type &f ) │ │ │ │ │ + 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 │ │ │ │ │ +149 void assign(const LFETensor &y) │ │ │ │ │ + 150 { │ │ │ │ │ + 151 field_cast(y.block(),block()); │ │ │ │ │ + 152 } │ │ │ │ │ + 153 │ │ │ │ │ +154 Block &block() │ │ │ │ │ + 155 { │ │ │ │ │ + 156 return block_; │ │ │ │ │ + 157 } │ │ │ │ │ +158 const Block &block() const │ │ │ │ │ + 159 { │ │ │ │ │ + 160 return block_; │ │ │ │ │ + 161 } │ │ │ │ │ +162 Block block_; │ │ │ │ │ + 163 }; │ │ │ │ │ + 164 // *********************************************************** │ │ │ │ │ + 165 // Structure for all derivatives up to order deriv │ │ │ │ │ + 166 // for vector valued function │ │ │ │ │ +167 namespace DerivativeLayoutNS { │ │ │ │ │ +168 enum DerivativeLayout {value,derivative}; │ │ │ │ │ + 169 } │ │ │ │ │ + 170 template │ │ │ │ │ +172 struct Derivatives; │ │ │ │ │ + 173 │ │ │ │ │ + 174 // Implemnetation for valued based layout │ │ │ │ │ + 175 template │ │ │ │ │ +176 struct Derivatives │ │ │ │ │ + 177 : public Derivatives │ │ │ │ │ + 178 { │ │ │ │ │ +179 typedef Derivatives This; │ │ │ │ │ +180 typedef Derivatives Base; │ │ │ │ │ +181 typedef LFETensor ThisLFETensor; │ │ │ │ │ 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]}; │ │ │ │ │ - 192 │ │ │ │ │ - 193 } │ │ │ │ │ - 194 │ │ │ │ │ - 195 for (std::size_t i=0; i& order, │ │ │ │ │ - 207 const typename Traits::DomainType& in, │ │ │ │ │ - 208 std::vector& out) const │ │ │ │ │ +183 typedef F Field; │ │ │ │ │ +184 typedef F field_type; │ │ │ │ │ + 185 │ │ │ │ │ +186 static const DerivativeLayoutNS::DerivativeLayout layout = │ │ │ │ │ +DerivativeLayoutNS::value; │ │ │ │ │ +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 Block; │ │ │ │ │ + 191 │ │ │ │ │ +192 This &operator=(const F& f) │ │ │ │ │ + 193 { │ │ │ │ │ + 194 block() = f; │ │ │ │ │ + 195 return *this; │ │ │ │ │ + 196 } │ │ │ │ │ +197 This &operator=(const Dune::FieldVector &t) │ │ │ │ │ + 198 { │ │ │ │ │ + 199 tensor_ = t; │ │ │ │ │ + 200 return *this; │ │ │ │ │ + 201 } │ │ │ │ │ + 202 template │ │ │ │ │ +203 This &operator=(const Dune::FieldVector,dimR> &t) │ │ │ │ │ + 204 { │ │ │ │ │ + 205 tensor() = t; │ │ │ │ │ + 206 return *this; │ │ │ │ │ + 207 } │ │ │ │ │ +208 This &operator=(const Block &t) │ │ │ │ │ 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 │ │ │ │ │ +227 void assign(const Derivatives │ │ │ │ │ +&y) │ │ │ │ │ + 228 { │ │ │ │ │ + 229 field_cast(y.block(),block()); │ │ │ │ │ + 230 } │ │ │ │ │ + 231 // assign with different layout (same dimRange) │ │ │ │ │ + 232 template │ │ │ │ │ +233 void assign(const Derivatives &y) │ │ │ │ │ + 234 { │ │ │ │ │ + 235 Base::assign(y); │ │ │ │ │ + 236 for (int rr=0; rr()[0]; │ │ │ │ │ + 238 } │ │ │ │ │ + 239 // assign with rth component of function │ │ │ │ │ + 240 template │ │ │ │ │ +241 void assign(const Derivatives &y,unsigned int r) │ │ │ │ │ + 242 { │ │ │ │ │ + 243 assign(y.block(),r); │ │ │ │ │ + 244 } │ │ │ │ │ + 245 // assign with scalar functions to component r │ │ │ │ │ + 246 template │ │ │ │ │ +247 void assign(unsigned int r,const │ │ │ │ │ +Derivatives &y) │ │ │ │ │ + 248 { │ │ │ │ │ + 249 assign(r,y.block()); │ │ │ │ │ + 250 } │ │ │ │ │ + 251 template │ │ │ │ │ +252 void assign(unsigned int r,const │ │ │ │ │ +Derivatives &y) │ │ │ │ │ + 253 { │ │ │ │ │ + 254 assign(r,y[0]); │ │ │ │ │ + 255 } │ │ │ │ │ + 256 │ │ │ │ │ +257 Block &block() │ │ │ │ │ + 258 { │ │ │ │ │ + 259 return reinterpret_cast(*this); │ │ │ │ │ + 260 } │ │ │ │ │ +261 const Block &block() const │ │ │ │ │ + 262 { │ │ │ │ │ + 263 return reinterpret_cast(*this); │ │ │ │ │ + 264 } │ │ │ │ │ + 265 │ │ │ │ │ + 266 template │ │ │ │ │ +267 const Dune::FieldVector,dimR> &tensor() 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 │ │ │ │ │ +274 Dune::FieldVector,dimR> &tensor() │ │ │ │ │ + 275 { │ │ │ │ │ + 276 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ + 277 return tensor(std::integral_constant()); │ │ │ │ │ + 278 } │ │ │ │ │ + 279 template │ │ │ │ │ +280 const Dune::FieldVector::size*dimR> &block() │ │ │ │ │ +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 │ │ │ │ │ +287 Dune::FieldVector::size*dimR> &block() │ │ │ │ │ + 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 } │ │ │ │ │ +293 ThisLFETensor &operator[](int r) { │ │ │ │ │ + 294 return tensor_[r]; │ │ │ │ │ + 295 } │ │ │ │ │ +296 const ThisLFETensor &operator[](int r) const { │ │ │ │ │ + 297 return tensor_[r]; │ │ │ │ │ + 298 } │ │ │ │ │ + 299 protected: │ │ │ │ │ + 300 template │ │ │ │ │ +301 void assign(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 │ │ │ │ │ +307 void assign(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 │ │ │ │ │ +314 void assign(const Derivatives &y) │ │ │ │ │ + 315 { │ │ │ │ │ + 316 Base::assign(y); │ │ │ │ │ + 317 for (int rr=0; rr()[0]; │ │ │ │ │ + 319 } │ │ │ │ │ + 320 │ │ │ │ │ + 321 template │ │ │ │ │ + 322 const Dune::FieldVector,dimR> & │ │ │ │ │ +323 tensor(const std::integral_constant &dorderVar) const │ │ │ │ │ + 324 { │ │ │ │ │ + 325 return Base::tensor(dorderVar); │ │ │ │ │ + 326 } │ │ │ │ │ + 327 const Dune::FieldVector,dimR> & │ │ │ │ │ +328 tensor(const std::integral_constant &dorderVar) const │ │ │ │ │ + 329 { │ │ │ │ │ + 330 return tensor_; │ │ │ │ │ + 331 } │ │ │ │ │ + 332 template │ │ │ │ │ + 333 Dune::FieldVector,dimR> & │ │ │ │ │ +334 tensor(const std::integral_constant &dorderVar) │ │ │ │ │ + 335 { │ │ │ │ │ + 336 return Base::tensor(dorderVar); │ │ │ │ │ 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 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; i,dimR> & │ │ │ │ │ +339 tensor(const std::integral_constant &dorderVar) │ │ │ │ │ + 340 { │ │ │ │ │ + 341 return tensor_; │ │ │ │ │ + 342 } │ │ │ │ │ +343 Dune::FieldVector tensor_; │ │ │ │ │ + 344 }; │ │ │ │ │ + 345 │ │ │ │ │ + 346 template │ │ │ │ │ +347 struct Derivatives │ │ │ │ │ + 348 { │ │ │ │ │ +349 typedef Derivatives This; │ │ │ │ │ +350 typedef LFETensor ThisLFETensor; │ │ │ │ │ + 351 │ │ │ │ │ +352 typedef F Field; │ │ │ │ │ +353 typedef F field_type; │ │ │ │ │ + 354 │ │ │ │ │ +355 static const DerivativeLayoutNS::DerivativeLayout layout = │ │ │ │ │ +DerivativeLayoutNS::value; │ │ │ │ │ +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 Block; │ │ │ │ │ + 360 │ │ │ │ │ + 361 template │ │ │ │ │ +362 This &operator=(const FF& f) │ │ │ │ │ + 363 { │ │ │ │ │ + 364 for (int r=0; r(f); │ │ │ │ │ + 366 return *this; │ │ │ │ │ + 367 } │ │ │ │ │ +368 This &operator=(const Dune::FieldVector &t) │ │ │ │ │ + 369 { │ │ │ │ │ + 370 tensor_ = t; │ │ │ │ │ + 371 return *this; │ │ │ │ │ + 372 } │ │ │ │ │ + 373 │ │ │ │ │ +374 This &operator=(const Block &t) │ │ │ │ │ + 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 │ │ │ │ │ +391 void assign(const Derivatives &y) │ │ │ │ │ + 392 { │ │ │ │ │ + 393 field_cast(y.block(),block()); │ │ │ │ │ + 394 } │ │ │ │ │ + 395 template │ │ │ │ │ +396 void assign(const Derivatives &y) │ │ │ │ │ + 397 { │ │ │ │ │ + 398 for (int rr=0; rr()[0]; │ │ │ │ │ + 400 } │ │ │ │ │ + 401 template │ │ │ │ │ +402 void assign(const Derivatives │ │ │ │ │ +&y,unsigned int r) │ │ │ │ │ + 403 { │ │ │ │ │ + 404 assign(y.block(),r); │ │ │ │ │ + 405 } │ │ │ │ │ + 406 template │ │ │ │ │ +407 void assign(unsigned int r,const │ │ │ │ │ +Derivatives &y) │ │ │ │ │ + 408 { │ │ │ │ │ + 409 tensor_[r].assign(y[0]); │ │ │ │ │ + 410 } │ │ │ │ │ + 411 template │ │ │ │ │ +412 void assign(unsigned int r,const │ │ │ │ │ +Derivatives &y) │ │ │ │ │ + 413 { │ │ │ │ │ + 414 tensor_[r].assign(y[0][0]); │ │ │ │ │ + 415 } │ │ │ │ │ + 416 │ │ │ │ │ +417 Block &block() │ │ │ │ │ + 418 { │ │ │ │ │ + 419 return reinterpret_cast(*this); │ │ │ │ │ + 420 } │ │ │ │ │ +421 const Block &block() const │ │ │ │ │ + 422 { │ │ │ │ │ + 423 return reinterpret_cast(*this); │ │ │ │ │ + 424 } │ │ │ │ │ 425 │ │ │ │ │ - 426 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 │ │ │ │ │ -495 class Nedelec1stKindCubeLocalFiniteElement │ │ │ │ │ - 496 { │ │ │ │ │ - 497 public: │ │ │ │ │ -498 using Traits = LocalFiniteElementTraits, │ │ │ │ │ - 499 Impl::Nedelec1stKindCubeLocalCoefficients, │ │ │ │ │ - 500 Impl::Nedelec1stKindCubeLocalInterpolation > >; │ │ │ │ │ +426 ThisLFETensor &operator[](int r) { │ │ │ │ │ + 427 return tensor_[r]; │ │ │ │ │ + 428 } │ │ │ │ │ +429 const ThisLFETensor &operator[](int r) const { │ │ │ │ │ + 430 return tensor_[r]; │ │ │ │ │ + 431 } │ │ │ │ │ + 432 template │ │ │ │ │ +433 const Dune::FieldVector,dimR> &tensor() const │ │ │ │ │ + 434 { │ │ │ │ │ + 435 return tensor_; │ │ │ │ │ + 436 } │ │ │ │ │ +437 Dune::FieldVector,dimR> &tensor() │ │ │ │ │ + 438 { │ │ │ │ │ + 439 return tensor_; │ │ │ │ │ + 440 } │ │ │ │ │ + 441 template │ │ │ │ │ +442 const Dune::FieldVector::size*dimR> &block() │ │ │ │ │ +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 │ │ │ │ │ +449 Dune::FieldVector::size*dimR> &block() │ │ │ │ │ + 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> & │ │ │ │ │ +458 tensor(const std::integral_constant &dorderVar) const │ │ │ │ │ + 459 { │ │ │ │ │ + 460 return tensor_; │ │ │ │ │ + 461 } │ │ │ │ │ + 462 Dune::FieldVector,dimR> & │ │ │ │ │ +463 tensor(const std::integral_constant &dorderVar) │ │ │ │ │ + 464 { │ │ │ │ │ + 465 return tensor_; │ │ │ │ │ + 466 } │ │ │ │ │ + 467 template │ │ │ │ │ +468 void assign(const Derivatives &y) │ │ │ │ │ + 469 { │ │ │ │ │ + 470 for (int rr=0; rr()[0]; │ │ │ │ │ + 472 } │ │ │ │ │ + 473 template │ │ │ │ │ +474 void assign(const FieldVector &y,unsigned int r) │ │ │ │ │ + 475 { │ │ │ │ │ + 476 tensor_[0] = reinterpret_cast&> │ │ │ │ │ +(y[r*ThisLFETensor::size]); │ │ │ │ │ + 477 } │ │ │ │ │ + 478 template │ │ │ │ │ +479 void assign(unsigned int r,const FieldVector &y) │ │ │ │ │ + 480 { │ │ │ │ │ + 481 tensor_[r] = y; │ │ │ │ │ + 482 } │ │ │ │ │ +483 Dune::FieldVector tensor_; │ │ │ │ │ + 484 }; │ │ │ │ │ + 485 │ │ │ │ │ + 486 // Implemnetation for DerivativeLayoutNS::derivative based layout │ │ │ │ │ + 487 template │ │ │ │ │ +488 struct Derivatives │ │ │ │ │ + 489 { │ │ │ │ │ +490 typedef Derivatives This; │ │ │ │ │ +491 typedef Derivatives ScalarDeriv; │ │ │ │ │ + 492 │ │ │ │ │ +493 typedef F Field; │ │ │ │ │ +494 typedef F field_type; │ │ │ │ │ + 495 │ │ │ │ │ +496 static const DerivativeLayoutNS::DerivativeLayout layout = │ │ │ │ │ +DerivativeLayoutNS::value; │ │ │ │ │ +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 Block; │ │ │ │ │ 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 │ │ │ │ │ -507 Nedelec1stKindCubeLocalFiniteElement() = default; │ │ │ │ │ - 508 │ │ │ │ │ -514 Nedelec1stKindCubeLocalFiniteElement (std::bitset s) : │ │ │ │ │ - 515 basis_(s), │ │ │ │ │ - 516 interpolation_(s) │ │ │ │ │ - 517 {} │ │ │ │ │ - 518 │ │ │ │ │ -519 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 520 { │ │ │ │ │ - 521 return basis_; │ │ │ │ │ - 522 } │ │ │ │ │ - 523 │ │ │ │ │ -524 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 525 { │ │ │ │ │ - 526 return coefficients_; │ │ │ │ │ - 527 } │ │ │ │ │ - 528 │ │ │ │ │ -529 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 530 { │ │ │ │ │ - 531 return interpolation_; │ │ │ │ │ - 532 } │ │ │ │ │ - 533 │ │ │ │ │ -534 static constexpr unsigned int size () │ │ │ │ │ - 535 { │ │ │ │ │ - 536 return Traits::LocalBasisType::size(); │ │ │ │ │ + 502 template │ │ │ │ │ +503 This &operator=(const FF& f) │ │ │ │ │ + 504 { │ │ │ │ │ + 505 block() = field_cast(f); │ │ │ │ │ + 506 return *this; │ │ │ │ │ + 507 } │ │ │ │ │ +508 This &operator=(const Block &t) │ │ │ │ │ + 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 │ │ │ │ │ +521 void axpy(const FF &a, const This &y) │ │ │ │ │ + 522 { │ │ │ │ │ + 523 block().axpy(field_cast(a),y.block()); │ │ │ │ │ + 524 } │ │ │ │ │ + 525 // assign with same layout (only different Field) │ │ │ │ │ + 526 template │ │ │ │ │ +527 void assign(const Derivatives &y) │ │ │ │ │ + 528 { │ │ │ │ │ + 529 field_cast(y.block(),block()); │ │ │ │ │ + 530 } │ │ │ │ │ + 531 // assign with different layout (same dimRange) │ │ │ │ │ + 532 template │ │ │ │ │ +533 void assign(const Derivatives │ │ │ │ │ +&y) │ │ │ │ │ + 534 { │ │ │ │ │ + 535 for (unsigned int rr=0; rr │ │ │ │ │ +540 void assign(unsigned int r,const Derivatives &y) │ │ │ │ │ + 541 { │ │ │ │ │ + 542 deriv_[r].assign(r,y); │ │ │ │ │ + 543 } │ │ │ │ │ + 544 │ │ │ │ │ +545 Block &block() │ │ │ │ │ + 546 { │ │ │ │ │ + 547 return reinterpret_cast(*this); │ │ │ │ │ + 548 } │ │ │ │ │ +549 const Block &block() const │ │ │ │ │ + 550 { │ │ │ │ │ + 551 return reinterpret_cast(*this); │ │ │ │ │ + 552 } │ │ │ │ │ + 553 │ │ │ │ │ +554 ScalarDeriv &operator[](int r) { │ │ │ │ │ + 555 return deriv_[r]; │ │ │ │ │ + 556 } │ │ │ │ │ +557 const ScalarDeriv &operator[](int r) const { │ │ │ │ │ + 558 return deriv_[r]; │ │ │ │ │ + 559 } │ │ │ │ │ + 560 protected: │ │ │ │ │ +561 Dune::FieldVector deriv_; │ │ │ │ │ + 562 }; │ │ │ │ │ + 563 │ │ │ │ │ + 564 // ****************************************** │ │ │ │ │ + 565 // AXPY ************************************* │ │ │ │ │ + 566 // ****************************************** │ │ │ │ │ + 567 template │ │ │ │ │ +568 struct LFETensorAxpy │ │ │ │ │ + 569 { │ │ │ │ │ + 570 template │ │ │ │ │ +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 │ │ │ │ │ +581 struct LFETensorAxpy,Vec2,deriv> │ │ │ │ │ + 582 { │ │ │ │ │ +583 typedef Derivatives Vec1; │ │ │ │ │ + 584 template │ │ │ │ │ +585 static void apply(unsigned int r,const Field &a, │ │ │ │ │ + 586 const Vec1 &x, Vec2 &y) │ │ │ │ │ + 587 { │ │ │ │ │ + 588 const FieldVector &xx = x.template block(); │ │ │ │ │ + 589 for (int i=0; i │ │ │ │ │ +597 struct LFETensorAxpy,Vec2,deriv> │ │ │ │ │ + 598 { │ │ │ │ │ +599 typedef Derivatives Vec1; │ │ │ │ │ + 600 template │ │ │ │ │ +601 static void apply(unsigned int r,const Field &a, │ │ │ │ │ + 602 const Vec1 &x, Vec2 &y) │ │ │ │ │ + 603 { │ │ │ │ │ + 604 for (int rr=0; rr, │ │ │ │ │ + 606 Vec2,deriv>::apply(rr,a,x[rr],y); │ │ │ │ │ + 607 } │ │ │ │ │ + 608 }; │ │ │ │ │ + 609 template │ │ │ │ │ +613 struct LFETensorAxpy,Vec2,deriv> │ │ │ │ │ + 614 { │ │ │ │ │ +615 typedef Derivatives Vec1; │ │ │ │ │ + 616 template │ │ │ │ │ +617 static void apply(unsigned int r,const Field &a, │ │ │ │ │ + 618 const Vec1 &x, Vec2 &y) │ │ │ │ │ + 619 { │ │ │ │ │ + 620 LFETensorAxpy, │ │ │ │ │ + 621 Vec2,deriv>::apply(r,a,x[0],y); │ │ │ │ │ + 622 } │ │ │ │ │ + 623 }; │ │ │ │ │ + 624 template │ │ │ │ │ +628 struct LFETensorAxpy,Vec2,deriv> │ │ │ │ │ + 629 { │ │ │ │ │ +630 typedef Derivatives Vec1; │ │ │ │ │ + 631 template │ │ │ │ │ +632 static void apply(unsigned int r,const Field &a, │ │ │ │ │ + 633 const Vec1 &x, Vec2 &y) │ │ │ │ │ + 634 { │ │ │ │ │ + 635 typedef LFETensor 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 │ │ │ │ │ +647 struct DerivativeAssign │ │ │ │ │ + 648 { │ │ │ │ │ +649 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ + 650 { │ │ │ │ │ + 651 field_cast(vec1,vec2); │ │ │ │ │ + 652 } │ │ │ │ │ + 653 }; │ │ │ │ │ + 654 template │ │ │ │ │ +656 struct DerivativeAssign, │ │ │ │ │ + 657 Derivatives > │ │ │ │ │ + 658 { │ │ │ │ │ +659 typedef Derivatives Vec1; │ │ │ │ │ +660 typedef Derivatives Vec2; │ │ │ │ │ +661 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ + 662 { │ │ │ │ │ + 663 field_cast(vec1.block(),vec2.block()); │ │ │ │ │ + 664 } │ │ │ │ │ + 665 }; │ │ │ │ │ + 666 template │ │ │ │ │ +668 struct DerivativeAssign, │ │ │ │ │ + 669 Derivatives > │ │ │ │ │ + 670 { │ │ │ │ │ +671 typedef Derivatives Vec1; │ │ │ │ │ +672 typedef Derivatives │ │ │ │ │ +Vec2; │ │ │ │ │ +673 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ + 674 { │ │ │ │ │ + 675 vec2.assign(vec1); │ │ │ │ │ + 676 } │ │ │ │ │ + 677 }; │ │ │ │ │ + 678 template │ │ │ │ │ +680 struct DerivativeAssign, │ │ │ │ │ + 681 Derivatives > │ │ │ │ │ + 682 { │ │ │ │ │ +683 typedef Derivatives │ │ │ │ │ +Vec1; │ │ │ │ │ +684 typedef Derivatives Vec2; │ │ │ │ │ +685 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ + 686 { │ │ │ │ │ + 687 vec2.assign(vec1); │ │ │ │ │ + 688 } │ │ │ │ │ + 689 }; │ │ │ │ │ + 690 template │ │ │ │ │ +692 struct DerivativeAssign, │ │ │ │ │ + 693 Derivatives > │ │ │ │ │ + 694 { │ │ │ │ │ +695 typedef Derivatives Vec1; │ │ │ │ │ +696 typedef Derivatives Vec2; │ │ │ │ │ +697 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ + 698 { │ │ │ │ │ + 699 vec2.assign(r,vec1); │ │ │ │ │ + 700 } │ │ │ │ │ + 701 }; │ │ │ │ │ + 702 template │ │ │ │ │ +704 struct DerivativeAssign, │ │ │ │ │ + 705 Derivatives > │ │ │ │ │ + 706 { │ │ │ │ │ +707 typedef Derivatives Vec1; │ │ │ │ │ +708 typedef Derivatives │ │ │ │ │ +Vec2; │ │ │ │ │ +709 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ + 710 { │ │ │ │ │ + 711 vec2.assign(r,vec1); │ │ │ │ │ + 712 } │ │ │ │ │ + 713 }; │ │ │ │ │ + 714 template │ │ │ │ │ +716 struct DerivativeAssign, │ │ │ │ │ + 717 Derivatives > │ │ │ │ │ + 718 { │ │ │ │ │ +719 typedef Derivatives Vec1; │ │ │ │ │ +720 typedef Derivatives Vec2; │ │ │ │ │ +721 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ + 722 { │ │ │ │ │ + 723 field_cast(vec1.block(),vec2.block()); │ │ │ │ │ + 724 } │ │ │ │ │ + 725 }; │ │ │ │ │ + 726 template │ │ │ │ │ +728 struct DerivativeAssign, │ │ │ │ │ + 729 Derivatives > │ │ │ │ │ + 730 { │ │ │ │ │ +731 typedef Derivatives Vec1; │ │ │ │ │ +732 typedef Derivatives Vec2; │ │ │ │ │ +733 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ + 734 { │ │ │ │ │ + 735 field_cast(vec1.block(),vec2.block()); │ │ │ │ │ + 736 } │ │ │ │ │ + 737 }; │ │ │ │ │ + 738 template │ │ │ │ │ +740 struct DerivativeAssign, │ │ │ │ │ + 741 Derivatives > │ │ │ │ │ + 742 { │ │ │ │ │ +743 typedef Derivatives Vec1; │ │ │ │ │ +744 typedef Derivatives Vec2; │ │ │ │ │ +745 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ + 746 { │ │ │ │ │ + 747 field_cast(vec1.block(),vec2.block()); │ │ │ │ │ + 748 } │ │ │ │ │ + 749 }; │ │ │ │ │ + 750 template │ │ │ │ │ +752 struct DerivativeAssign, │ │ │ │ │ + 753 Derivatives > │ │ │ │ │ + 754 { │ │ │ │ │ +755 typedef Derivatives Vec1; │ │ │ │ │ +756 typedef Derivatives Vec2; │ │ │ │ │ +757 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ + 758 { │ │ │ │ │ + 759 field_cast(vec1.block(),vec2.block()); │ │ │ │ │ + 760 } │ │ │ │ │ + 761 }; │ │ │ │ │ + 762 template │ │ │ │ │ +764 struct DerivativeAssign, │ │ │ │ │ + 765 F2 > │ │ │ │ │ + 766 { │ │ │ │ │ +767 typedef Derivatives Vec1; │ │ │ │ │ +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 │ │ │ │ │ +777 struct DerivativeAssign,FieldVector > │ │ │ │ │ + 778 { │ │ │ │ │ +779 typedef Derivatives Vec1; │ │ │ │ │ +780 typedef FieldVector 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 │ │ │ │ │ +789 struct DerivativeAssign,FieldVector > │ │ │ │ │ + 790 { │ │ │ │ │ +791 typedef Derivatives │ │ │ │ │ +Vec1; │ │ │ │ │ +792 typedef FieldVector Vec2; │ │ │ │ │ +793 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ + 794 { │ │ │ │ │ + 795 for (int rr=0; rr()[0].block(),vec2[rr]); │ │ │ │ │ + 797 } │ │ │ │ │ + 798 }; │ │ │ │ │ + 799 template │ │ │ │ │ +802 struct DerivativeAssign,FieldVector > │ │ │ │ │ + 803 { │ │ │ │ │ +804 typedef Derivatives Vec1; │ │ │ │ │ +805 typedef FieldVector 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 │ │ │ │ │ +814 struct DerivativeAssign,FieldVector > │ │ │ │ │ + 815 { │ │ │ │ │ +816 typedef Derivatives Vec1; │ │ │ │ │ +817 typedef FieldVector 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 │ │ │ │ │ +826 struct DerivativeAssign,FieldVector > │ │ │ │ │ + 827 { │ │ │ │ │ +828 typedef Derivatives Vec1; │ │ │ │ │ +829 typedef FieldVector 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 │ │ │ │ │ +838 struct DerivativeAssign,FieldVector > │ │ │ │ │ + 839 { │ │ │ │ │ +840 typedef Derivatives Vec1; │ │ │ │ │ +841 typedef FieldVector 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 │ │ │ │ │ +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 │ │ │ │ │ + 858 std::ostream &operator<<( 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 &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 │ │ │ │ │ +872 std::ostream &operator<<( std::ostream &out, const Derivatives< │ │ │ │ │ +F,dimD,dimR,deriv,DerivativeLayoutNS::derivative_> &d ) │ │ │ │ │ + 873 { │ │ │ │ │ + 874 out << " ( "; │ │ │ │ │ + 875 out << d[0]; │ │ │ │ │ + 876 for (int r=1; r │ │ │ │ │ +884 std::ostream &operator<<( std::ostream &out, const Derivatives< │ │ │ │ │ +F,dimD,dimR,deriv,DerivativeLayoutNS::value_> &d ) │ │ │ │ │ + 885 { │ │ │ │ │ + 886 out << static_cast &>(d); │ │ │ │ │ + 887 out << " ( "; │ │ │ │ │ + 888 out << d[0]; │ │ │ │ │ + 889 for (int r=1; r │ │ │ │ │ +897 std::ostream &operator<<( std::ostream &out, const Derivatives< │ │ │ │ │ +F,dimD,dimR,0,DerivativeLayoutNS::derivative_> &d ) │ │ │ │ │ + 898 { │ │ │ │ │ + 899 out << " ( "; │ │ │ │ │ + 900 out << d[0]; │ │ │ │ │ + 901 for (int r=1; r │ │ │ │ │ +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 │ │ │ │ │ +921 std::ostream &operator<<( std::ostream &out, const std::vector > &y ) │ │ │ │ │ + 922 { │ │ │ │ │ + 923 out << "Number of basis functions: " << y.size() << std::endl; │ │ │ │ │ + 924 for (unsigned int i=0; i s) │ │ │ │ │ -Constructor with explicitly given edge orientations. │ │ │ │ │ -Definition nedelec1stkindcube.hh:514 │ │ │ │ │ -localbasis.hh │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::field_cast │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +Definition field.hh:159 │ │ │ │ │ +Dune::operator<< │ │ │ │ │ +std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat) │ │ │ │ │ +Definition lfematrix.hh:152 │ │ │ │ │ +Dune::DerivativeLayoutNS::DerivativeLayout │ │ │ │ │ +DerivativeLayout │ │ │ │ │ +Definition tensor.hh:168 │ │ │ │ │ +Dune::DerivativeLayoutNS::derivative │ │ │ │ │ +@ derivative │ │ │ │ │ +Definition tensor.hh:168 │ │ │ │ │ +Dune::DerivativeLayoutNS::value │ │ │ │ │ +@ value │ │ │ │ │ +Definition tensor.hh:168 │ │ │ │ │ +Dune::LFETensor │ │ │ │ │ +Definition tensor.hh:33 │ │ │ │ │ +Dune::LFETensor::block │ │ │ │ │ +const Block & block() const │ │ │ │ │ +Definition tensor.hh:76 │ │ │ │ │ +Dune::LFETensor::operator*= │ │ │ │ │ +This & operator*=(const field_type &f) │ │ │ │ │ +Definition tensor.hh:56 │ │ │ │ │ +Dune::LFETensor::Block │ │ │ │ │ +Dune::FieldVector< F, size > Block │ │ │ │ │ +Definition tensor.hh:41 │ │ │ │ │ +Dune::LFETensor::operator= │ │ │ │ │ +This & operator=(const FF &f) │ │ │ │ │ +Definition tensor.hh:44 │ │ │ │ │ +Dune::LFETensor::block_ │ │ │ │ │ +Block block_ │ │ │ │ │ +Definition tensor.hh:89 │ │ │ │ │ +Dune::LFETensor::field_type │ │ │ │ │ +F field_type │ │ │ │ │ +Definition tensor.hh:39 │ │ │ │ │ +Dune::LFETensor::axpy │ │ │ │ │ +void axpy(const F &a, const This &y) │ │ │ │ │ +Definition tensor.hh:80 │ │ │ │ │ +Dune::LFETensor::block │ │ │ │ │ +Block & block() │ │ │ │ │ +Definition tensor.hh:72 │ │ │ │ │ +Dune::LFETensor::assign │ │ │ │ │ +void assign(const LFETensor< Fy, dimD, deriv > &y) │ │ │ │ │ +Definition tensor.hh:85 │ │ │ │ │ +Dune::LFETensor::size │ │ │ │ │ +static const unsigned int size │ │ │ │ │ +Definition tensor.hh:40 │ │ │ │ │ +Dune::LFETensor::operator[] │ │ │ │ │ +const field_type & operator[](const unsigned int i) const │ │ │ │ │ +Definition tensor.hh:62 │ │ │ │ │ +Dune::LFETensor<_F,_dimD,_0_> │ │ │ │ │ +Definition tensor.hh:107 │ │ │ │ │ +Dune::LFETensor<_F,_dimD,_0_>::block │ │ │ │ │ +Block & block() │ │ │ │ │ +Definition tensor.hh:154 │ │ │ │ │ +Dune::LFETensor<_F,_dimD,_0_>::field_type │ │ │ │ │ +F field_type │ │ │ │ │ +Definition tensor.hh:111 │ │ │ │ │ +Dune::LFETensor<_F,_dimD,_0_>::block_ │ │ │ │ │ +Block block_ │ │ │ │ │ +Definition tensor.hh:162 │ │ │ │ │ +Dune::LFETensor<_F,_dimD,_0_>::assign │ │ │ │ │ +void assign(const LFETensor< Fy, dimD, 0 > &y) │ │ │ │ │ +Definition tensor.hh:149 │ │ │ │ │ +Dune::LFETensor<_F,_dimD,_0_>::block │ │ │ │ │ +const Block & block() const │ │ │ │ │ +Definition tensor.hh:158 │ │ │ │ │ +Dune::LFETensor<_F,_dimD,_0_>::axpy │ │ │ │ │ +void axpy(const F &a, const This &y) │ │ │ │ │ +Definition tensor.hh:144 │ │ │ │ │ +Dune::LFETensor<_F,_dimD,_0_>::Block │ │ │ │ │ +Dune::FieldVector< F, size > Block │ │ │ │ │ +Definition tensor.hh:113 │ │ │ │ │ +Dune::Derivatives │ │ │ │ │ +Definition tensor.hh:172 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_> │ │ │ │ │ +Definition tensor.hh:178 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::Field │ │ │ │ │ +F Field │ │ │ │ │ +Definition tensor.hh:183 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::This │ │ │ │ │ +Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::value > This │ │ │ │ │ +Definition tensor.hh:179 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ +This & operator=(const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > │ │ │ │ │ +&t) │ │ │ │ │ +Definition tensor.hh:203 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>:: │ │ │ │ │ +field_type │ │ │ │ │ +F field_type │ │ │ │ │ +Definition tensor.hh:184 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::Base │ │ │ │ │ +Derivatives< F, dimD, dimR, deriv-1, DerivativeLayoutNS::value > Base │ │ │ │ │ +Definition tensor.hh:180 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ +const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor(const │ │ │ │ │ +std::integral_constant< int, dorder > &dorderVar) const │ │ │ │ │ +Definition tensor.hh:323 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(const FieldVector< Fy, size *dimRy > &y, unsigned int r) │ │ │ │ │ +Definition tensor.hh:301 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::value │ │ │ │ │ +> &y) │ │ │ │ │ +Definition tensor.hh:227 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, dy, DerivativeLayoutNS:: │ │ │ │ │ +derivative > &y) │ │ │ │ │ +Definition tensor.hh:314 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ +This & operator=(const F &f) │ │ │ │ │ +Definition tensor.hh:192 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::operator │ │ │ │ │ +[] │ │ │ │ │ +const ThisLFETensor & operator[](int r) const │ │ │ │ │ +Definition tensor.hh:296 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::block │ │ │ │ │ +Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block() │ │ │ │ │ +Definition tensor.hh:287 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>:: │ │ │ │ │ +ThisLFETensor │ │ │ │ │ +LFETensor< F, dimD, deriv > ThisLFETensor │ │ │ │ │ +Definition tensor.hh:181 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, │ │ │ │ │ +DerivativeLayoutNS::value > &y) │ │ │ │ │ +Definition tensor.hh:247 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::block │ │ │ │ │ +const Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block │ │ │ │ │ +() const │ │ │ │ │ +Definition tensor.hh:280 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ +Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor(const std:: │ │ │ │ │ +integral_constant< int, dorder > &dorderVar) │ │ │ │ │ +Definition tensor.hh:334 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::block │ │ │ │ │ +const Block & block() const │ │ │ │ │ +Definition tensor.hh:261 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::axpy │ │ │ │ │ +void axpy(const F &a, const This &y) │ │ │ │ │ +Definition tensor.hh:220 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS:: │ │ │ │ │ +derivative > &y) │ │ │ │ │ +Definition tensor.hh:233 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ +This & operator=(const Dune::FieldVector< ThisLFETensor, dimR > &t) │ │ │ │ │ +Definition tensor.hh:197 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, │ │ │ │ │ +DerivativeLayoutNS::derivative > &y) │ │ │ │ │ +Definition tensor.hh:252 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ +This & operator=(const Block &t) │ │ │ │ │ +Definition tensor.hh:208 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::Block │ │ │ │ │ +Dune::FieldVector< F, size > Block │ │ │ │ │ +Definition tensor.hh:190 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor_ │ │ │ │ │ +Dune::FieldVector< ThisLFETensor, dimR > tensor_ │ │ │ │ │ +Definition tensor.hh:343 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ +Dune::FieldVector< LFETensor< F, dimD, deriv >, dimR > & tensor(const std:: │ │ │ │ │ +integral_constant< int, deriv > &dorderVar) │ │ │ │ │ +Definition tensor.hh:339 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ +Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor() │ │ │ │ │ +Definition tensor.hh:274 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimRy, deriv, DerivativeLayoutNS:: │ │ │ │ │ +value > &y, unsigned int r) │ │ │ │ │ +Definition tensor.hh:241 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ +const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor() const │ │ │ │ │ +Definition tensor.hh:267 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ +const Dune::FieldVector< LFETensor< F, dimD, deriv >, dimR > & tensor(const │ │ │ │ │ +std::integral_constant< int, deriv > &dorderVar) const │ │ │ │ │ +Definition tensor.hh:328 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::operator │ │ │ │ │ +[] │ │ │ │ │ +ThisLFETensor & operator[](int r) │ │ │ │ │ +Definition tensor.hh:293 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::block │ │ │ │ │ +Block & block() │ │ │ │ │ +Definition tensor.hh:257 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(unsigned int r, const FieldVector< Fy, size/dimR > &y) │ │ │ │ │ +Definition tensor.hh:307 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_> │ │ │ │ │ +Definition tensor.hh:348 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::operator[] │ │ │ │ │ +ThisLFETensor & operator[](int r) │ │ │ │ │ +Definition tensor.hh:426 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::ThisLFETensor │ │ │ │ │ +LFETensor< F, dimD, 0 > ThisLFETensor │ │ │ │ │ +Definition tensor.hh:350 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::block │ │ │ │ │ +Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block() │ │ │ │ │ +Definition tensor.hh:449 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ +Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor(const std:: │ │ │ │ │ +integral_constant< int, 0 > &dorderVar) │ │ │ │ │ +Definition tensor.hh:463 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, 0, DerivativeLayoutNS::value > │ │ │ │ │ +&y) │ │ │ │ │ +Definition tensor.hh:391 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::Field │ │ │ │ │ +F Field │ │ │ │ │ +Definition tensor.hh:352 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::This │ │ │ │ │ +Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::value > This │ │ │ │ │ +Definition tensor.hh:349 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, dy, DerivativeLayoutNS:: │ │ │ │ │ +derivative > &y) │ │ │ │ │ +Definition tensor.hh:468 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimRy, 0, DerivativeLayoutNS::value > │ │ │ │ │ +&y, unsigned int r) │ │ │ │ │ +Definition tensor.hh:402 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ +const Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor() const │ │ │ │ │ +Definition tensor.hh:433 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ +Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor() │ │ │ │ │ +Definition tensor.hh:437 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ +This & operator=(const Block &t) │ │ │ │ │ +Definition tensor.hh:374 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::field_type │ │ │ │ │ +F field_type │ │ │ │ │ +Definition tensor.hh:353 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::operator[] │ │ │ │ │ +const ThisLFETensor & operator[](int r) const │ │ │ │ │ +Definition tensor.hh:429 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::tensor │ │ │ │ │ +const Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor(const std:: │ │ │ │ │ +integral_constant< int, 0 > &dorderVar) const │ │ │ │ │ +Definition tensor.hh:458 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::Block │ │ │ │ │ +Dune::FieldVector< F, size > Block │ │ │ │ │ +Definition tensor.hh:359 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::block │ │ │ │ │ +const Block & block() const │ │ │ │ │ +Definition tensor.hh:421 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::block │ │ │ │ │ +const Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block │ │ │ │ │ +() const │ │ │ │ │ +Definition tensor.hh:442 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(unsigned int r, const Derivatives< Fy, dimD, 1, 0, │ │ │ │ │ +DerivativeLayoutNS::derivative > &y) │ │ │ │ │ +Definition tensor.hh:412 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, 0, DerivativeLayoutNS:: │ │ │ │ │ +derivative > &y) │ │ │ │ │ +Definition tensor.hh:396 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(unsigned int r, const Derivatives< Fy, dimD, 1, 0, │ │ │ │ │ +DerivativeLayoutNS::value > &y) │ │ │ │ │ +Definition tensor.hh:407 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ +This & operator=(const Dune::FieldVector< ThisLFETensor, dimR > &t) │ │ │ │ │ +Definition tensor.hh:368 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(const FieldVector< Fy, size *dimRy > &y, unsigned int r) │ │ │ │ │ +Definition tensor.hh:474 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::tensor_ │ │ │ │ │ +Dune::FieldVector< ThisLFETensor, dimR > tensor_ │ │ │ │ │ +Definition tensor.hh:483 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::assign │ │ │ │ │ +void assign(unsigned int r, const FieldVector< Fy, size/dimR > &y) │ │ │ │ │ +Definition tensor.hh:479 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::operator= │ │ │ │ │ +This & operator=(const FF &f) │ │ │ │ │ +Definition tensor.hh:362 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::block │ │ │ │ │ +Block & block() │ │ │ │ │ +Definition tensor.hh:417 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_0,_DerivativeLayoutNS::value_>::axpy │ │ │ │ │ +void axpy(const F &a, const This &y) │ │ │ │ │ +Definition tensor.hh:386 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_> │ │ │ │ │ +Definition tensor.hh:489 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +operator= │ │ │ │ │ +This & operator=(const FF &f) │ │ │ │ │ +Definition tensor.hh:503 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +block │ │ │ │ │ +Block & block() │ │ │ │ │ +Definition tensor.hh:545 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +Field │ │ │ │ │ +F Field │ │ │ │ │ +Definition tensor.hh:493 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +block │ │ │ │ │ +const Block & block() const │ │ │ │ │ +Definition tensor.hh:549 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +field_type │ │ │ │ │ +F field_type │ │ │ │ │ +Definition tensor.hh:494 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +assign │ │ │ │ │ +void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, layouty > │ │ │ │ │ +&y) │ │ │ │ │ +Definition tensor.hh:540 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +operator[] │ │ │ │ │ +ScalarDeriv & operator[](int r) │ │ │ │ │ +Definition tensor.hh:554 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +assign │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::value │ │ │ │ │ +> &y) │ │ │ │ │ +Definition tensor.hh:533 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>::This │ │ │ │ │ +Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::derivative > This │ │ │ │ │ +Definition tensor.hh:490 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +ScalarDeriv │ │ │ │ │ +Derivatives< F, dimD, 1, deriv, DerivativeLayoutNS::value > ScalarDeriv │ │ │ │ │ +Definition tensor.hh:491 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +operator[] │ │ │ │ │ +const ScalarDeriv & operator[](int r) const │ │ │ │ │ +Definition tensor.hh:557 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>::axpy │ │ │ │ │ +void axpy(const FF &a, const This &y) │ │ │ │ │ +Definition tensor.hh:521 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +operator= │ │ │ │ │ +This & operator=(const Block &t) │ │ │ │ │ +Definition tensor.hh:508 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +Block │ │ │ │ │ +Dune::FieldVector< F, size > Block │ │ │ │ │ +Definition tensor.hh:500 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +deriv_ │ │ │ │ │ +Dune::FieldVector< ScalarDeriv, dimR > deriv_ │ │ │ │ │ +Definition tensor.hh:561 │ │ │ │ │ +Dune::Derivatives<_F,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>:: │ │ │ │ │ +assign │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS:: │ │ │ │ │ +derivative > &y) │ │ │ │ │ +Definition tensor.hh:527 │ │ │ │ │ +Dune::LFETensorAxpy │ │ │ │ │ +Definition tensor.hh:569 │ │ │ │ │ +Dune::LFETensorAxpy::apply │ │ │ │ │ +static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ +Definition tensor.hh:571 │ │ │ │ │ +Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_dimR,_d,_DerivativeLayoutNS::value │ │ │ │ │ +>,_Vec2,_deriv_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ +Definition tensor.hh:585 │ │ │ │ │ +Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_dimR,_d,_DerivativeLayoutNS::value │ │ │ │ │ +>,_Vec2,_deriv_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +Definition tensor.hh:583 │ │ │ │ │ +Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_dimR,_d,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_Vec2,_deriv_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +Definition tensor.hh:599 │ │ │ │ │ +Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_dimR,_d,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_Vec2,_deriv_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ +Definition tensor.hh:601 │ │ │ │ │ +Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_1,_d,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_Vec2,_deriv_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +Definition tensor.hh:615 │ │ │ │ │ +Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_1,_d,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_Vec2,_deriv_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ +Definition tensor.hh:617 │ │ │ │ │ +Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_1,_d,_DerivativeLayoutNS::value_>, │ │ │ │ │ +Vec2,_deriv_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ +Definition tensor.hh:632 │ │ │ │ │ +Dune::LFETensorAxpy<_Derivatives<_F1,_dimD,_1,_d,_DerivativeLayoutNS::value_>, │ │ │ │ │ +Vec2,_deriv_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +Definition tensor.hh:630 │ │ │ │ │ +Dune::DerivativeAssign │ │ │ │ │ +Definition tensor.hh:648 │ │ │ │ │ +Dune::DerivativeAssign::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:649 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv,_layout_>, │ │ │ │ │ +Derivatives<_F2,_dimD,_dimR,_deriv,_layout_>_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, deriv, layout > Vec1 │ │ │ │ │ +Definition tensor.hh:659 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv,_layout_>, │ │ │ │ │ +Derivatives<_F2,_dimD,_dimR,_deriv,_layout_>_>::Vec2 │ │ │ │ │ +Derivatives< F2, dimD, dimR, deriv, layout > Vec2 │ │ │ │ │ +Definition tensor.hh:660 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv,_layout_>, │ │ │ │ │ +Derivatives<_F2,_dimD,_dimR,_deriv,_layout_>_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:661 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::value_>,_Derivatives<_F2,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::derivative_>_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +Definition tensor.hh:671 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::value_>,_Derivatives<_F2,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::derivative_>_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:673 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::value_>,_Derivatives<_F2,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::derivative_>_>::Vec2 │ │ │ │ │ +Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ +Definition tensor.hh:672 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::derivative_>,_Derivatives<_F2,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::value_>_>::Vec2 │ │ │ │ │ +Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ +Definition tensor.hh:684 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::derivative_>,_Derivatives<_F2,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::value_>_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +Definition tensor.hh:683 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::derivative_>,_Derivatives<_F2,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::value_>_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:685 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_Derivatives< │ │ │ │ │ +F2,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, layout > Vec1 │ │ │ │ │ +Definition tensor.hh:695 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_Derivatives< │ │ │ │ │ +F2,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:697 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_Derivatives< │ │ │ │ │ +F2,_dimD,_dimR,_deriv,_DerivativeLayoutNS::value_>_>::Vec2 │ │ │ │ │ +Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ +Definition tensor.hh:696 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_Derivatives< │ │ │ │ │ +F2,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, layout > Vec1 │ │ │ │ │ +Definition tensor.hh:707 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_Derivatives< │ │ │ │ │ +F2,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:709 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_Derivatives< │ │ │ │ │ +F2,_dimD,_dimR,_deriv,_DerivativeLayoutNS::derivative_>_>::Vec2 │ │ │ │ │ +Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ +Definition tensor.hh:708 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +value_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::value_>_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +Definition tensor.hh:719 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +value_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::value_>_>::Vec2 │ │ │ │ │ +Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ +Definition tensor.hh:720 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +value_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::value_>_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:721 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::derivative_> │ │ │ │ │ +>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +Definition tensor.hh:731 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::derivative_> │ │ │ │ │ +>::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:733 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::derivative_> │ │ │ │ │ +>::Vec2 │ │ │ │ │ +Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ +Definition tensor.hh:732 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::value_>_>:: │ │ │ │ │ +Vec2 │ │ │ │ │ +Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ +Definition tensor.hh:744 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::value_>_>:: │ │ │ │ │ +apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:745 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::value_>_>:: │ │ │ │ │ +Vec1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +Definition tensor.hh:743 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +value_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::derivative_>_>:: │ │ │ │ │ +Vec2 │ │ │ │ │ +Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ +Definition tensor.hh:756 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +value_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::derivative_>_>:: │ │ │ │ │ +apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:757 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +value_>,_Derivatives<_F2,_dimD,_1,_deriv,_DerivativeLayoutNS::derivative_>_>:: │ │ │ │ │ +Vec1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +Definition tensor.hh:755 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_F2_>::Vec2 │ │ │ │ │ +F2 Vec2 │ │ │ │ │ +Definition tensor.hh:768 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_F2_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:769 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_layout_>,_F2_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, layout > Vec1 │ │ │ │ │ +Definition tensor.hh:767 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::value_>,_FieldVector<_F2,_dimR_>_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +Definition tensor.hh:779 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::value_>,_FieldVector<_F2,_dimR_>_>::Vec2 │ │ │ │ │ +FieldVector< F2, dimR > Vec2 │ │ │ │ │ +Definition tensor.hh:780 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::value_>,_FieldVector<_F2,_dimR_>_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:781 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::derivative_>,_FieldVector<_F2,_dimR_>_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +Definition tensor.hh:791 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::derivative_>,_FieldVector<_F2,_dimR_>_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:793 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_dimR,_deriv, │ │ │ │ │ +DerivativeLayoutNS::derivative_>,_FieldVector<_F2,_dimR_>_>::Vec2 │ │ │ │ │ +FieldVector< F2, dimR > Vec2 │ │ │ │ │ +Definition tensor.hh:792 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +value_>,_FieldVector<_F2,_dimR_>_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +Definition tensor.hh:804 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +value_>,_FieldVector<_F2,_dimR_>_>::Vec2 │ │ │ │ │ +FieldVector< F2, dimR > Vec2 │ │ │ │ │ +Definition tensor.hh:805 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +value_>,_FieldVector<_F2,_dimR_>_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:806 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_FieldVector<_F2,_dimR_>_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:818 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_FieldVector<_F2,_dimR_>_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +Definition tensor.hh:816 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_FieldVector<_F2,_dimR_>_>::Vec2 │ │ │ │ │ +FieldVector< F2, dimR > Vec2 │ │ │ │ │ +Definition tensor.hh:817 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +value_>,_FieldVector<_F2,_1_>_>::Vec2 │ │ │ │ │ +FieldVector< F2, 1 > Vec2 │ │ │ │ │ +Definition tensor.hh:829 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +value_>,_FieldVector<_F2,_1_>_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +Definition tensor.hh:828 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +value_>,_FieldVector<_F2,_1_>_>::apply │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:830 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_FieldVector<_F2,_1_>_>::Vec1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +Definition tensor.hh:840 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_FieldVector<_F2,_1_>_>::apply │ │ │ │ │ +static void apply(unsigned int, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +Definition tensor.hh:842 │ │ │ │ │ +Dune::DerivativeAssign<_Derivatives<_F1,_dimD,_1,_deriv,_DerivativeLayoutNS:: │ │ │ │ │ +derivative_>,_FieldVector<_F2,_1_>_>::Vec2 │ │ │ │ │ +FieldVector< F2, 1 > Vec2 │ │ │ │ │ +Definition tensor.hh:841 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00545.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelec1stkindsimplex.hh File Reference │ │ │ │ +dune-localfunctions: lfematrix.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,46 +65,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
nedelec1stkindsimplex.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
lfematrix.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 <cassert>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "field.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::LFEMatrix< F >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

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

│ │ │ │ +Functions

template<class Field >
std::ostream & Dune::operator<< (std::ostream &out, const LFEMatrix< Field > &mat)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,30 +6,28 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * nedelec │ │ │ │ │ -Classes | Namespaces │ │ │ │ │ -nedelec1stkindsimplex.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * utility │ │ │ │ │ +Classes | Namespaces | Functions │ │ │ │ │ +lfematrix.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "field.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::LFEMatrix<_F_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ + Functions │ │ │ │ │ +template │ │ │ │ │ +std::ostream & Dune::operator<< (std::ostream &out, const LFEMatrix< Field > │ │ │ │ │ + &mat) │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00545_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelec1stkindsimplex.hh Source File │ │ │ │ +dune-localfunctions: lfematrix.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,426 +70,230 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
nedelec1stkindsimplex.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_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDSIMPLEX_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDSIMPLEX_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/fmatrix.hh>
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ +
8#include <cassert>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include "field.hh"
│ │ │ │
12
│ │ │ │ -
13#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
14#include <dune/geometry/type.hh>
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │
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> >;
│ │ │ │ -
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;
│ │ │ │ -
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 }
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
62
│ │ │ │ +
│ │ │ │ +
63 unsigned int cols () const
│ │ │ │ +
64 {
│ │ │ │ +
65 return cols_;
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,448 +7,228 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * nedelec │ │ │ │ │ -nedelec1stkindsimplex.hh │ │ │ │ │ + * utility │ │ │ │ │ +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_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDSIMPLEX_HH │ │ │ │ │ - 6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDSIMPLEX_HH │ │ │ │ │ + 5#ifndef DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include "field.hh" │ │ │ │ │ 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ 15 │ │ │ │ │ - 16#include │ │ │ │ │ - 17#include │ │ │ │ │ - 18#include // For │ │ │ │ │ -deprecated makeFunctionWithCallOperator │ │ │ │ │ - 19#include │ │ │ │ │ - 20 │ │ │ │ │ - 21namespace Dune │ │ │ │ │ - 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 >; │ │ │ │ │ - 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& 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 Traits::DomainType& 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 │ │ │ │ │ -402 class Nedelec1stKindSimplexLocalFiniteElement │ │ │ │ │ - 403 { │ │ │ │ │ - 404 public: │ │ │ │ │ -405 using Traits = LocalFiniteElementTraits, │ │ │ │ │ - 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 │ │ │ │ │ -414 Nedelec1stKindSimplexLocalFiniteElement() = default; │ │ │ │ │ - 415 │ │ │ │ │ -421 Nedelec1stKindSimplexLocalFiniteElement (std::bitset s) : │ │ │ │ │ - 422 basis_(s), │ │ │ │ │ - 423 interpolation_(s) │ │ │ │ │ - 424 {} │ │ │ │ │ - 425 │ │ │ │ │ -426 const typename Traits::LocalBasisType& localBasis () const │ │ │ │ │ - 427 { │ │ │ │ │ - 428 return basis_; │ │ │ │ │ - 429 } │ │ │ │ │ - 430 │ │ │ │ │ -431 const typename Traits::LocalCoefficientsType& localCoefficients () const │ │ │ │ │ - 432 { │ │ │ │ │ - 433 return coefficients_; │ │ │ │ │ - 434 } │ │ │ │ │ - 435 │ │ │ │ │ -436 const typename Traits::LocalInterpolationType& localInterpolation () const │ │ │ │ │ - 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 │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ -localkey.hh │ │ │ │ │ + 16 template< class F > │ │ │ │ │ +17 class LFEMatrix │ │ │ │ │ + 18 { │ │ │ │ │ + 19 typedef LFEMatrix<_F_> This; │ │ │ │ │ + 20 typedef std::vector< F > Row; │ │ │ │ │ + 21 typedef std::vector 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 │ │ │ │ │ +37 void row( const unsigned int row, Vector &vec ) const │ │ │ │ │ + 38 { │ │ │ │ │ + 39 assert(row p(rows()); │ │ │ │ │ + 94 for (unsigned int j=0; j max ) │ │ │ │ │ + 104 { │ │ │ │ │ + 105 max = abs( (*this)(i,j) ); │ │ │ │ │ + 106 r = i; │ │ │ │ │ + 107 } │ │ │ │ │ + 108 } │ │ │ │ │ + 109 if (max == Zero()) │ │ │ │ │ + 110 return false; │ │ │ │ │ + 111 // row swap │ │ │ │ │ + 112 if (r > j) │ │ │ │ │ + 113 { │ │ │ │ │ + 114 for (unsigned int k=0; k()/(*this)(j,j); │ │ │ │ │ + 120 for (unsigned int i=0; i │ │ │ │ │ +152 inline std::ostream &operator<<(std::ostream &out, const LFEMatrix │ │ │ │ │ +&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 │ │ │ │ │ +field.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalFiniteElementTraits │ │ │ │ │ -traits helper struct │ │ │ │ │ -Definition localfiniteelementtraits.hh:13 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -Definition localfiniteelementtraits.hh:16 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalCoefficientsType │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -Definition localfiniteelementtraits.hh:20 │ │ │ │ │ -Dune::LocalFiniteElementTraits::LocalInterpolationType │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -Definition localfiniteelementtraits.hh:24 │ │ │ │ │ -Dune::Nedelec1stKindSimplexLocalFiniteElement │ │ │ │ │ -Nédélec elements of the first kind for simplex elements. │ │ │ │ │ -Definition nedelec1stkindsimplex.hh:403 │ │ │ │ │ -Dune::Nedelec1stKindSimplexLocalFiniteElement::size │ │ │ │ │ -static constexpr unsigned int size() │ │ │ │ │ -Definition nedelec1stkindsimplex.hh:441 │ │ │ │ │ -Dune::Nedelec1stKindSimplexLocalFiniteElement:: │ │ │ │ │ -Nedelec1stKindSimplexLocalFiniteElement │ │ │ │ │ -Nedelec1stKindSimplexLocalFiniteElement()=default │ │ │ │ │ -Default constructor. │ │ │ │ │ -Dune::Nedelec1stKindSimplexLocalFiniteElement::localInterpolation │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Definition nedelec1stkindsimplex.hh:436 │ │ │ │ │ -Dune::Nedelec1stKindSimplexLocalFiniteElement:: │ │ │ │ │ -Nedelec1stKindSimplexLocalFiniteElement │ │ │ │ │ -Nedelec1stKindSimplexLocalFiniteElement(std::bitset< dim *(dim+1)/2 > s) │ │ │ │ │ -Constructor with explicitly given edge orientations. │ │ │ │ │ -Definition nedelec1stkindsimplex.hh:421 │ │ │ │ │ -Dune::Nedelec1stKindSimplexLocalFiniteElement::type │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -Definition nedelec1stkindsimplex.hh:446 │ │ │ │ │ -Dune::Nedelec1stKindSimplexLocalFiniteElement::localBasis │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Definition nedelec1stkindsimplex.hh:426 │ │ │ │ │ -Dune::Nedelec1stKindSimplexLocalFiniteElement::localCoefficients │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Definition nedelec1stkindsimplex.hh:431 │ │ │ │ │ -localbasis.hh │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::field_cast │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +Definition field.hh:159 │ │ │ │ │ +Dune::operator<< │ │ │ │ │ +std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat) │ │ │ │ │ +Definition lfematrix.hh:152 │ │ │ │ │ +Dune::Unity │ │ │ │ │ +A class representing the unit of a given Field. │ │ │ │ │ +Definition field.hh:30 │ │ │ │ │ +Dune::Zero │ │ │ │ │ +A class representing the zero of a given Field. │ │ │ │ │ +Definition field.hh:79 │ │ │ │ │ +Dune::LFEMatrix │ │ │ │ │ +Definition lfematrix.hh:18 │ │ │ │ │ +Dune::LFEMatrix::rowPtr │ │ │ │ │ +Field * rowPtr(const unsigned int row) │ │ │ │ │ +Definition lfematrix.hh:74 │ │ │ │ │ +Dune::LFEMatrix::cols │ │ │ │ │ +unsigned int cols() const │ │ │ │ │ +Definition lfematrix.hh:63 │ │ │ │ │ +Dune::LFEMatrix::rowPtr │ │ │ │ │ +const Field * rowPtr(const unsigned int row) const │ │ │ │ │ +Definition lfematrix.hh:68 │ │ │ │ │ +Dune::LFEMatrix::resize │ │ │ │ │ +void resize(const unsigned int rows, const unsigned int cols) │ │ │ │ │ +Definition lfematrix.hh:80 │ │ │ │ │ +Dune::LFEMatrix::operator() │ │ │ │ │ +const Field & operator()(const unsigned int row, const unsigned int col) const │ │ │ │ │ +Definition lfematrix.hh:44 │ │ │ │ │ +Dune::LFEMatrix::row │ │ │ │ │ +void row(const unsigned int row, Vector &vec) const │ │ │ │ │ +Definition lfematrix.hh:37 │ │ │ │ │ +Dune::LFEMatrix::rows │ │ │ │ │ +unsigned int rows() const │ │ │ │ │ +Definition lfematrix.hh:58 │ │ │ │ │ +Dune::LFEMatrix::invert │ │ │ │ │ +bool invert() │ │ │ │ │ +Definition lfematrix.hh:89 │ │ │ │ │ +Dune::LFEMatrix::Field │ │ │ │ │ +F Field │ │ │ │ │ +Definition lfematrix.hh:24 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00548.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchical.hh File Reference │ │ │ │ +dune-localfunctions: defaultbasisfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,31 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchical.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
defaultbasisfactory.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Convenience header that includes all available hierarchical LocalFiniteElements. │ │ │ │ -More...

│ │ │ │ -
#include <dune/localfunctions/hierarchical/hierarchicalp2.hh>
│ │ │ │ -#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble.hh>
│ │ │ │ -#include <dune/localfunctions/hierarchical/hierarchicalprismp2.hh>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/localfunctions/utility/basismatrix.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ -

Detailed Description

│ │ │ │ -

Convenience header that includes all available hierarchical LocalFiniteElements.

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

│ │ │ │ +Classes

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 {} │ │ │ │ │ @@ -6,20 +6,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -hierarchical.hh File Reference │ │ │ │ │ -Convenience header that includes all available hierarchical │ │ │ │ │ -LocalFiniteElements. More... │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * utility │ │ │ │ │ +Classes | Namespaces │ │ │ │ │ +defaultbasisfactory.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ -***** Detailed Description ***** │ │ │ │ │ -Convenience header that includes all available hierarchical │ │ │ │ │ -LocalFiniteElements. │ │ │ │ │ + Classes │ │ │ │ │ +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 │ │ │ │ │ +  │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00548_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchical.hh Source File │ │ │ │ +dune-localfunctions: defaultbasisfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,31 +70,151 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchical.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_DEFAULTBASISFACTORY_HH
│ │ │ │ +
6#define DUNE_DEFAULTBASISFACTORY_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <dune/common/exceptions.hh>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ +
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>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ + │ │ │ │ +
Definition bdfmcube.hh:18
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,24 +7,190 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ -hierarchical.hh │ │ │ │ │ + * utility │ │ │ │ │ +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 │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ -hierarchicalp2.hh │ │ │ │ │ -hierarchicalprismp2.hh │ │ │ │ │ -hierarchicalp2withelementbubble.hh │ │ │ │ │ + 5#ifndef DUNE_DEFAULTBASISFACTORY_HH │ │ │ │ │ + 6#define DUNE_DEFAULTBASISFACTORY_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10 │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ +15 struct Identity │ │ │ │ │ + 16 { │ │ │ │ │ + 17 template │ │ │ │ │ +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 > │ │ │ │ │ +37 struct DefaultBasisFactory │ │ │ │ │ + 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:: │ │ │ │ │ +Type MonomialBasisFactory; │ │ │ │ │ +48 typedef typename MonomialBasisFactory::Object MonomialBasis; │ │ │ │ │ +49 typedef StandardEvaluator<_MonomialBasis_> Evaluator; │ │ │ │ │ +50 typedef PolynomialBasisWithMatrix<_Evaluator,_SparseCoeffMatrix<_SF, │ │ │ │ │ +dimRange_> > Basis; │ │ │ │ │ + 51 │ │ │ │ │ +52 typedef const Basis Object; │ │ │ │ │ +53 typedef typename InterpolationFactory::Key Key; │ │ │ │ │ + 54 template │ │ │ │ │ +55 struct EvaluationBasisFactory │ │ │ │ │ + 56 { │ │ │ │ │ + 57 typedef typename PreBasisFactory::template EvaluationBasisFactory:: │ │ │ │ │ +Type │ │ │ │ │ +58 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 │ │ │ │ │ +( preBasisKey ); │ │ │ │ │ + 66 const Interpolation *interpol = InterpolationFactory::template │ │ │ │ │ +create( 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 │ │ │ │ │ +basismatrix.hh │ │ │ │ │ +Dune │ │ │ │ │ +Definition bdfmcube.hh:18 │ │ │ │ │ +Dune::StandardEvaluator │ │ │ │ │ +Definition basisevaluator.hh:131 │ │ │ │ │ +Dune::BasisMatrix │ │ │ │ │ +Definition basismatrix.hh:27 │ │ │ │ │ +Dune::Identity │ │ │ │ │ +Definition defaultbasisfactory.hh:16 │ │ │ │ │ +Dune::Identity::apply │ │ │ │ │ +static T apply(const T &t) │ │ │ │ │ +Definition defaultbasisfactory.hh:18 │ │ │ │ │ +Dune::DefaultBasisFactory │ │ │ │ │ +Definition defaultbasisfactory.hh:38 │ │ │ │ │ +Dune::DefaultBasisFactory::Interpolation │ │ │ │ │ +InterpolationFactory::Object Interpolation │ │ │ │ │ +Definition defaultbasisfactory.hh:46 │ │ │ │ │ +Dune::DefaultBasisFactory::dimRange │ │ │ │ │ +static const unsigned int dimRange │ │ │ │ │ +Definition defaultbasisfactory.hh:40 │ │ │ │ │ +Dune::DefaultBasisFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +release the object returned by the create methods │ │ │ │ │ +Definition defaultbasisfactory.hh:81 │ │ │ │ │ +Dune::DefaultBasisFactory::ComputeField │ │ │ │ │ +CF ComputeField │ │ │ │ │ +Definition defaultbasisfactory.hh:42 │ │ │ │ │ +Dune::DefaultBasisFactory::PreBasisFactory │ │ │ │ │ +PreBFactory PreBasisFactory │ │ │ │ │ +Definition defaultbasisfactory.hh:43 │ │ │ │ │ +Dune::DefaultBasisFactory::Key │ │ │ │ │ +InterpolationFactory::Key Key │ │ │ │ │ +Definition defaultbasisfactory.hh:53 │ │ │ │ │ +Dune::DefaultBasisFactory::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition defaultbasisfactory.hh:39 │ │ │ │ │ +Dune::DefaultBasisFactory::create │ │ │ │ │ +static Object * create(const Key &key) │ │ │ │ │ +Definition defaultbasisfactory.hh:62 │ │ │ │ │ +Dune::DefaultBasisFactory::StorageField │ │ │ │ │ +SF StorageField │ │ │ │ │ +Definition defaultbasisfactory.hh:41 │ │ │ │ │ +Dune::DefaultBasisFactory::MonomialBasis │ │ │ │ │ +MonomialBasisFactory::Object MonomialBasis │ │ │ │ │ +Definition defaultbasisfactory.hh:48 │ │ │ │ │ +Dune::DefaultBasisFactory::PreBasis │ │ │ │ │ +PreBasisFactory::Object PreBasis │ │ │ │ │ +Definition defaultbasisfactory.hh:44 │ │ │ │ │ +Dune::DefaultBasisFactory::Object │ │ │ │ │ +const Basis Object │ │ │ │ │ +Definition defaultbasisfactory.hh:52 │ │ │ │ │ +Dune::DefaultBasisFactory::Evaluator │ │ │ │ │ +StandardEvaluator< MonomialBasis > Evaluator │ │ │ │ │ +Definition defaultbasisfactory.hh:49 │ │ │ │ │ +Dune::DefaultBasisFactory::InterpolationFactory │ │ │ │ │ +InterpolFactory InterpolationFactory │ │ │ │ │ +Definition defaultbasisfactory.hh:45 │ │ │ │ │ +Dune::DefaultBasisFactory::MonomialBasisFactory │ │ │ │ │ +PreBasisFactory::template EvaluationBasisFactory< dim, SF >::Type │ │ │ │ │ +MonomialBasisFactory │ │ │ │ │ +Definition defaultbasisfactory.hh:47 │ │ │ │ │ +Dune::DefaultBasisFactory::Basis │ │ │ │ │ +PolynomialBasisWithMatrix< Evaluator, SparseCoeffMatrix< SF, dimRange > > Basis │ │ │ │ │ +Definition defaultbasisfactory.hh:50 │ │ │ │ │ +Dune::DefaultBasisFactory::EvaluationBasisFactory │ │ │ │ │ +Definition defaultbasisfactory.hh:56 │ │ │ │ │ +Dune::DefaultBasisFactory::EvaluationBasisFactory::Type │ │ │ │ │ +PreBasisFactory::template EvaluationBasisFactory< dd, FF >::Type Type │ │ │ │ │ +Definition defaultbasisfactory.hh:58 │ │ │ │ │ +Dune::VirtualMonomialBasis │ │ │ │ │ +Definition monomialbasis.hh:612 │ │ │ │ │ +Dune::MonomialBasisFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition monomialbasis.hh:769 │ │ │ │ │ +Dune::PolynomialBasisWithMatrix │ │ │ │ │ +Definition polynomialbasis.hh:348 │ │ │ │ │ +Dune::PolynomialBasisWithMatrix::fill │ │ │ │ │ +void fill(const Matrix &matrix) │ │ │ │ │ +Definition polynomialbasis.hh:366 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00551.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannachertureklocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: interpolationhelper.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
rannachertureklocalbasis.hh File Reference
│ │ │ │ +
interpolationhelper.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include "rannacherturek2d/rannacherturek2dlocalbasis.hh"
│ │ │ │ -#include "rannacherturek3d/rannacherturek3dlocalbasis.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

struct  Dune::RannacherTurekLocalBasis< D, R, 2 >
struct  Dune::InterpolationHelper< F, dimension >
 
struct  Dune::RannacherTurekLocalBasis< D, R, 3 >
struct  Dune::InterpolationHelper< F, dimension >::Helper< Func, Vector, true >
 
struct  Dune::InterpolationHelper< F, dimension >::Helper< Basis, Matrix, false >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,24 +6,31 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * rannacherturek │ │ │ │ │ + * utility │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -rannachertureklocalbasis.hh File Reference │ │ │ │ │ -#include "rannacherturek2d/rannacherturek2dlocalbasis.hh" │ │ │ │ │ -#include "rannacherturek3d/rannacherturek3dlocalbasis.hh" │ │ │ │ │ +interpolationhelper.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  Dune::RannacherTurekLocalBasis<_D,_R,_2_> │ │ │ │ │ +struct  Dune::InterpolationHelper<_F,_dimension_> │ │ │ │ │   │ │ │ │ │ -struct  Dune::RannacherTurekLocalBasis<_D,_R,_3_> │ │ │ │ │ +struct  Dune::InterpolationHelper<_F,_dimension_>::Helper<_Func,_Vector,_true │ │ │ │ │ + > │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::InterpolationHelper<_F,_dimension_>::Helper<_Basis,_Matrix, │ │ │ │ │ + false_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00551_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannachertureklocalbasis.hh Source File │ │ │ │ +dune-localfunctions: interpolationhelper.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,60 +70,215 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
rannachertureklocalbasis.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_RANNACHER_TUREK_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_RANNACHER_TUREK_LOCALBASIS_HH
│ │ │ │ +
5#ifndef GENERIC_INTERPOLATIONHELPER_HH
│ │ │ │ +
6#define GENERIC_INTERPOLATIONHELPER_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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition rannacherturek2dlocalbasis.hh:21
│ │ │ │ -
Definition rannacherturek3dlocalbasis.hh:21
│ │ │ │ -
Rannacher-Turek shape functions.
Definition rannachertureklocalbasis.hh:24
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,54 +7,225 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * rannacherturek │ │ │ │ │ -rannachertureklocalbasis.hh │ │ │ │ │ + * utility │ │ │ │ │ +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_RANNACHER_TUREK_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_RANNACHER_TUREK_LOCALBASIS_HH │ │ │ │ │ + 5#ifndef GENERIC_INTERPOLATIONHELPER_HH │ │ │ │ │ + 6#define GENERIC_INTERPOLATIONHELPER_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include "rannacherturek2d/rannacherturek2dlocalbasis.hh" │ │ │ │ │ - 9#include "rannacherturek3d/rannacherturek3dlocalbasis.hh" │ │ │ │ │ - 10 │ │ │ │ │ - 11namespace Dune │ │ │ │ │ - 12{ │ │ │ │ │ - 13 │ │ │ │ │ - 23 template< class D, class R, unsigned int d > │ │ │ │ │ -24 struct RannacherTurekLocalBasis; │ │ │ │ │ - 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 │ │ │ │ │ -rannacherturek3dlocalbasis.hh │ │ │ │ │ -rannacherturek2dlocalbasis.hh │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 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 > │ │ │ │ │ +21 struct InterpolationHelper │ │ │ │ │ + 22 { │ │ │ │ │ + 23 template │ │ │ │ │ +24 struct Helper; │ │ │ │ │ + 25 }; │ │ │ │ │ + 26 template │ │ │ │ │ + 27 template │ │ │ │ │ +28 struct InterpolationHelper::Helper │ │ │ │ │ + 29 // Func is of Function type │ │ │ │ │ + 30 { │ │ │ │ │ +31 typedef std::vector< Dune::FieldVector > 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 │ │ │ │ │ +42 void set(unsigned int row,unsigned int col, │ │ │ │ │ + 43 const Fy &val) │ │ │ │ │ + 44 { │ │ │ │ │ + 45 assert(col==0); │ │ │ │ │ + 46 assert(row │ │ │ │ │ +50 void add(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> │ │ │ │ │ +59 const Result &evaluate(const DomainVector &x) const │ │ │ │ │ + 60 { │ │ │ │ │ + 61 field_cast(func_(x), tmp_[0] ); │ │ │ │ │ + 62 return tmp_; │ │ │ │ │ + 63 } │ │ │ │ │ + 64 template , │ │ │ │ │ +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 │ │ │ │ │ + 84 template │ │ │ │ │ +85 struct InterpolationHelper::Helper │ │ │ │ │ + 86 // Func is of Basis type │ │ │ │ │ + 87 { │ │ │ │ │ +88 typedef std::vector< Dune::FieldVector > 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 │ │ │ │ │ +102 void set(unsigned int row,unsigned int col, │ │ │ │ │ + 103 const Fy &val) │ │ │ │ │ + 104 { │ │ │ │ │ + 105 assert(col │ │ │ │ │ +110 void add(unsigned int row,unsigned int col, │ │ │ │ │ + 111 const Fy &val) │ │ │ │ │ + 112 { │ │ │ │ │ + 113 assert(col │ │ │ │ │ +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 │ │ │ │ │ +field.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::RannacherTurek2DLocalBasis │ │ │ │ │ -Definition rannacherturek2dlocalbasis.hh:21 │ │ │ │ │ -Dune::RannacherTurek3DLocalBasis │ │ │ │ │ -Definition rannacherturek3dlocalbasis.hh:21 │ │ │ │ │ -Dune::RannacherTurekLocalBasis │ │ │ │ │ -Rannacher-Turek shape functions. │ │ │ │ │ -Definition rannachertureklocalbasis.hh:24 │ │ │ │ │ +Dune::field_cast │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +Definition field.hh:159 │ │ │ │ │ +Dune::InterpolationHelper │ │ │ │ │ +Definition interpolationhelper.hh:22 │ │ │ │ │ +Dune::InterpolationHelper::Helper │ │ │ │ │ +Definition interpolationhelper.hh:24 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::add │ │ │ │ │ +void add(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ +Definition interpolationhelper.hh:50 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::func_ │ │ │ │ │ +const Func & func_ │ │ │ │ │ +Definition interpolationhelper.hh:79 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::Helper │ │ │ │ │ +Helper(const Func &func, Vector &vec) │ │ │ │ │ +Definition interpolationhelper.hh:32 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::evaluate │ │ │ │ │ +const Result & evaluate(const DomainVector &x) const │ │ │ │ │ +Definition interpolationhelper.hh:59 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::Result │ │ │ │ │ +std::vector< Dune::FieldVector< F, d > > Result │ │ │ │ │ +Definition interpolationhelper.hh:31 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Definition interpolationhelper.hh:75 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::vec_ │ │ │ │ │ +Vector & vec_ │ │ │ │ │ +Definition interpolationhelper.hh:80 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::set │ │ │ │ │ +void set(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ +Definition interpolationhelper.hh:42 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::tmp_ │ │ │ │ │ +Result tmp_ │ │ │ │ │ +Definition interpolationhelper.hh:81 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Func,_Vector,_true_>::operator() │ │ │ │ │ +const Vector::value_type & operator()(unsigned int row, unsigned int col) │ │ │ │ │ +Definition interpolationhelper.hh:37 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::basis_ │ │ │ │ │ +const Basis & basis_ │ │ │ │ │ +Definition interpolationhelper.hh:128 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::evaluate │ │ │ │ │ +const Result & evaluate(const DomainVector &x) const │ │ │ │ │ +Definition interpolationhelper.hh:118 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::operator() │ │ │ │ │ +F & operator()(unsigned int row, unsigned int col) │ │ │ │ │ +Definition interpolationhelper.hh:97 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::set │ │ │ │ │ +void set(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ +Definition interpolationhelper.hh:102 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::Helper │ │ │ │ │ +Helper(const Basis &basis, Matrix &matrix) │ │ │ │ │ +Definition interpolationhelper.hh:89 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Definition interpolationhelper.hh:123 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::tmp_ │ │ │ │ │ +Result tmp_ │ │ │ │ │ +Definition interpolationhelper.hh:130 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::add │ │ │ │ │ +void add(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ +Definition interpolationhelper.hh:110 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::Result │ │ │ │ │ +std::vector< Dune::FieldVector< F, d > > Result │ │ │ │ │ +Definition interpolationhelper.hh:88 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::matrix_ │ │ │ │ │ +Matrix & matrix_ │ │ │ │ │ +Definition interpolationhelper.hh:129 │ │ │ │ │ +Dune::InterpolationHelper::Helper<_Basis,_Matrix,_false_>::operator() │ │ │ │ │ +const F & operator()(unsigned int row, unsigned int col) const │ │ │ │ │ +Definition interpolationhelper.hh:93 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00554.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannachertureklocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: l2interpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
rannachertureklocalcoefficients.hh File Reference
│ │ │ │ +
l2interpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <algorithm>
│ │ │ │ -#include <array>
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <cstddef>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +
#include <dune/common/concept.hh>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +#include <dune/localfunctions/utility/lfematrix.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::RannacherTurekLocalCoefficients< d >
 layout for Rannacher-Turek 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
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,32 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * rannacherturek │ │ │ │ │ + * utility │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -rannachertureklocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +l2interpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  Dune::RannacherTurekLocalCoefficients<_d_> │ │ │ │ │ -  layout for Rannacher-Turek 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 │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00554_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannachertureklocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: l2interpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,96 +70,280 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
rannachertureklocalcoefficients.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_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_L2INTERPOLATION_HH
│ │ │ │ +
6#define DUNE_L2INTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <algorithm>
│ │ │ │ -
9#include <array>
│ │ │ │ -
10#include <cassert>
│ │ │ │ -
11#include <cstddef>
│ │ │ │ -
12
│ │ │ │ - │ │ │ │ +
8#include <dune/common/concept.hh>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/quadraturerules.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 }
│ │ │ │ -
│ │ │ │ -
32
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
34 {
│ │ │ │ -
35 (*this) = other;
│ │ │ │ -
36 }
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 {
│ │ │ │ -
40 std::copy( other.localKeys_.begin(), other.localKeys_.end(), localKeys_.begin() );
│ │ │ │ -
41 return *this;
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ +
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} // namespace Dune
│ │ │ │ -
62
│ │ │ │ -
63#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,98 +7,316 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * rannacherturek │ │ │ │ │ -rannachertureklocalcoefficients.hh │ │ │ │ │ + * utility │ │ │ │ │ +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_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH │ │ │ │ │ - 6#define DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH │ │ │ │ │ + 5#ifndef DUNE_L2INTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_L2INTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ 14 │ │ │ │ │ 15namespace Dune │ │ │ │ │ 16{ │ │ │ │ │ - 24 template< unsigned int d > │ │ │ │ │ -25 struct RannacherTurekLocalCoefficients │ │ │ │ │ - 26 { │ │ │ │ │ -27 RannacherTurekLocalCoefficients () │ │ │ │ │ - 28 { │ │ │ │ │ - 29 for( std::size_t i = 0; i < 2*d; ++i ) │ │ │ │ │ - 30 localKeys_[ i ] = LocalKey( i, 1, 0 ); │ │ │ │ │ - 31 } │ │ │ │ │ - 32 │ │ │ │ │ -33 RannacherTurekLocalCoefficients ( const RannacherTurekLocalCoefficients │ │ │ │ │ -&other ) │ │ │ │ │ - 34 { │ │ │ │ │ - 35 (*this) = other; │ │ │ │ │ - 36 } │ │ │ │ │ - 37 │ │ │ │ │ -38 RannacherTurekLocalCoefficients &operator=( const │ │ │ │ │ -RannacherTurekLocalCoefficients &other ) │ │ │ │ │ - 39 { │ │ │ │ │ - 40 std::copy( other.localKeys_.begin(), other.localKeys_.end(), │ │ │ │ │ -localKeys_.begin() ); │ │ │ │ │ - 41 return *this; │ │ │ │ │ - 42 } │ │ │ │ │ + 32 template< class B, class Q, bool onb > │ │ │ │ │ +33 struct LocalL2Interpolation; │ │ │ │ │ + 34 │ │ │ │ │ + 35 template< class B, class Q > │ │ │ │ │ +36 class LocalL2InterpolationBase │ │ │ │ │ + 37 { │ │ │ │ │ + 38 typedef LocalL2InterpolationBase<_B,_Q_> This; │ │ │ │ │ + 39 │ │ │ │ │ + 40 public: │ │ │ │ │ +41 typedef B Basis; │ │ │ │ │ +42 typedef Q Quadrature; │ │ │ │ │ 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 }; │ │ │ │ │ +44 static const unsigned int dimension = Basis::dimension; │ │ │ │ │ + 45 │ │ │ │ │ + 47 template< class Function, class DofField, std::enable_if_t, 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} // namespace Dune │ │ │ │ │ - 62 │ │ │ │ │ - 63#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH │ │ │ │ │ -localkey.hh │ │ │ │ │ + 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 │ │ │ │ │ +(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 > │ │ │ │ │ +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: │ │ │ │ │ +110 LocalL2InterpolationBase ( const Basis &basis, const Quadrature &quadrature │ │ │ │ │ +) │ │ │ │ │ + 111 : basis_( basis ), │ │ │ │ │ + 112 quadrature_( quadrature ) │ │ │ │ │ + 113 {} │ │ │ │ │ + 114 │ │ │ │ │ +115 const Basis &basis_; │ │ │ │ │ +116 const Quadrature &quadrature_; │ │ │ │ │ + 117 }; │ │ │ │ │ + 118 │ │ │ │ │ + 119 template< class B, class Q > │ │ │ │ │ +120 struct LocalL2Interpolation │ │ │ │ │ + 121 : public LocalL2InterpolationBase │ │ │ │ │ + 122 { │ │ │ │ │ +123 typedef LocalL2InterpolationBase Base; │ │ │ │ │ + 124 template< class BasisFactory, bool onb > │ │ │ │ │ +125 friend class LocalL2InterpolationFactory; │ │ │ │ │ + 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 │ │ │ │ │ + 135 : public LocalL2InterpolationBase │ │ │ │ │ + 136 { │ │ │ │ │ +137 typedef LocalL2InterpolationBase Base; │ │ │ │ │ + 138 template< class BasisFactory, bool onb > │ │ │ │ │ +139 friend class LocalL2InterpolationFactory; │ │ │ │ │ + 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(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; 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 > │ │ │ │ │ +198 struct LocalL2InterpolationFactory │ │ │ │ │ + 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 Quadrature; │ │ │ │ │ +205 typedef QuadratureRules QuadratureProvider; │ │ │ │ │ +206 typedef LocalL2Interpolation<_Basis,_Quadrature,_onb_> LocalInterpolation; │ │ │ │ │ +207 typedef const LocalInterpolation Object; │ │ │ │ │ + 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 │ │ │ │ │ +lfematrix.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::RannacherTurekLocalCoefficients │ │ │ │ │ -layout for Rannacher-Turek elements │ │ │ │ │ -Definition rannachertureklocalcoefficients.hh:26 │ │ │ │ │ -Dune::RannacherTurekLocalCoefficients::RannacherTurekLocalCoefficients │ │ │ │ │ -RannacherTurekLocalCoefficients() │ │ │ │ │ -Definition rannachertureklocalcoefficients.hh:27 │ │ │ │ │ -Dune::RannacherTurekLocalCoefficients::RannacherTurekLocalCoefficients │ │ │ │ │ -RannacherTurekLocalCoefficients(const RannacherTurekLocalCoefficients &other) │ │ │ │ │ -Definition rannachertureklocalcoefficients.hh:33 │ │ │ │ │ -Dune::RannacherTurekLocalCoefficients::operator= │ │ │ │ │ -RannacherTurekLocalCoefficients & operator=(const │ │ │ │ │ -RannacherTurekLocalCoefficients &other) │ │ │ │ │ -Definition rannachertureklocalcoefficients.hh:38 │ │ │ │ │ -Dune::RannacherTurekLocalCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -map index i to local key │ │ │ │ │ -Definition rannachertureklocalcoefficients.hh:51 │ │ │ │ │ -Dune::RannacherTurekLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition rannachertureklocalcoefficients.hh:45 │ │ │ │ │ +Dune::Zero │ │ │ │ │ +A class representing the zero of a given Field. │ │ │ │ │ +Definition field.hh:79 │ │ │ │ │ +Dune::LocalL2Interpolation │ │ │ │ │ +A local L2 interpolation taking a test basis and a quadrature rule. │ │ │ │ │ +Definition l2interpolation.hh:33 │ │ │ │ │ +Dune::LocalL2InterpolationBase │ │ │ │ │ +Definition l2interpolation.hh:37 │ │ │ │ │ +Dune::LocalL2InterpolationBase::LocalL2InterpolationBase │ │ │ │ │ +LocalL2InterpolationBase(const Basis &basis, const Quadrature &quadrature) │ │ │ │ │ +Definition l2interpolation.hh:110 │ │ │ │ │ +Dune::LocalL2InterpolationBase::interpolate │ │ │ │ │ +void interpolate(const Function &function, std::vector< DofField > │ │ │ │ │ +&coefficients) const │ │ │ │ │ +Interpolate a function that implements void evaluate(Domain, Range&) │ │ │ │ │ +Definition l2interpolation.hh:48 │ │ │ │ │ +Dune::LocalL2InterpolationBase::basis │ │ │ │ │ +const Basis & basis() const │ │ │ │ │ +Definition l2interpolation.hh:99 │ │ │ │ │ +Dune::LocalL2InterpolationBase::quadrature_ │ │ │ │ │ +const Quadrature & quadrature_ │ │ │ │ │ +Definition l2interpolation.hh:116 │ │ │ │ │ +Dune::LocalL2InterpolationBase::basis_ │ │ │ │ │ +const Basis & basis_ │ │ │ │ │ +Definition l2interpolation.hh:115 │ │ │ │ │ +Dune::LocalL2InterpolationBase::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition l2interpolation.hh:44 │ │ │ │ │ +Dune::LocalL2InterpolationBase::quadrature │ │ │ │ │ +const Quadrature & quadrature() const │ │ │ │ │ +Definition l2interpolation.hh:104 │ │ │ │ │ +Dune::LocalL2InterpolationBase::Quadrature │ │ │ │ │ +Q Quadrature │ │ │ │ │ +Definition l2interpolation.hh:42 │ │ │ │ │ +Dune::LocalL2InterpolationBase::Basis │ │ │ │ │ +B Basis │ │ │ │ │ +Definition l2interpolation.hh:41 │ │ │ │ │ +Dune::LocalL2Interpolation<_B,_Q,_true_>::Base │ │ │ │ │ +LocalL2InterpolationBase< B, Q > Base │ │ │ │ │ +Definition l2interpolation.hh:123 │ │ │ │ │ +Dune::LocalL2Interpolation<_B,_Q,_false_>::interpolate │ │ │ │ │ +void interpolate(const Function &function, std::vector< DofField > │ │ │ │ │ +&coefficients) const │ │ │ │ │ +Definition l2interpolation.hh:143 │ │ │ │ │ +Dune::LocalL2Interpolation<_B,_Q,_false_>::Base │ │ │ │ │ +LocalL2InterpolationBase< B, Q > Base │ │ │ │ │ +Definition l2interpolation.hh:137 │ │ │ │ │ +Dune::LocalL2InterpolationFactory │ │ │ │ │ +A factory class for the local l2 interpolations taking a basis factory. │ │ │ │ │ +Definition l2interpolation.hh:199 │ │ │ │ │ +Dune::LocalL2InterpolationFactory::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition l2interpolation.hh:200 │ │ │ │ │ +Dune::LocalL2InterpolationFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition l2interpolation.hh:217 │ │ │ │ │ +Dune::LocalL2InterpolationFactory::Basis │ │ │ │ │ +BasisFactory::Object Basis │ │ │ │ │ +Definition l2interpolation.hh:202 │ │ │ │ │ +Dune::LocalL2InterpolationFactory::Field │ │ │ │ │ +double Field │ │ │ │ │ +Definition l2interpolation.hh:203 │ │ │ │ │ +Dune::LocalL2InterpolationFactory::QuadratureProvider │ │ │ │ │ +QuadratureRules< Field, dimension > QuadratureProvider │ │ │ │ │ +Definition l2interpolation.hh:205 │ │ │ │ │ +Dune::LocalL2InterpolationFactory::Quadrature │ │ │ │ │ +QuadratureRule< Field, dimension > Quadrature │ │ │ │ │ +Definition l2interpolation.hh:204 │ │ │ │ │ +Dune::LocalL2InterpolationFactory::create │ │ │ │ │ +static Object * create(const Key &key) │ │ │ │ │ +Definition l2interpolation.hh:210 │ │ │ │ │ +Dune::LocalL2InterpolationFactory::Key │ │ │ │ │ +BasisFactory::Key Key │ │ │ │ │ +Definition l2interpolation.hh:201 │ │ │ │ │ +Dune::LocalL2InterpolationFactory::Object │ │ │ │ │ +const LocalInterpolation Object │ │ │ │ │ +Definition l2interpolation.hh:207 │ │ │ │ │ +Dune::LocalL2InterpolationFactory::LocalInterpolation │ │ │ │ │ +LocalL2Interpolation< Basis, Quadrature, onb > LocalInterpolation │ │ │ │ │ +Definition l2interpolation.hh:206 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00557.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannacherturek3dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: polynomialbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
rannacherturek3dlocalbasis.hh File Reference
│ │ │ │ +
polynomialbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fvector.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::RannacherTurek3DLocalBasis< D, R >
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 {} │ │ │ │ │ @@ -6,26 +6,35 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * rannacherturek │ │ │ │ │ - * rannacherturek3d │ │ │ │ │ + * utility │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -rannacherturek3dlocalbasis.hh File Reference │ │ │ │ │ +polynomialbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RannacherTurek3DLocalBasis<_D,_R_> │ │ │ │ │ + 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 │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00557_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannacherturek3dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: polynomialbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,166 +70,480 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
rannacherturek3dlocalbasis.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_RANNACHER_TUREK_3D_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_RANNACHER_TUREK_3D_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_POLYNOMIALBASIS_HH
│ │ │ │ +
6#define DUNE_POLYNOMIALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ -
9#include <vector>
│ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <numeric>
│ │ │ │
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;
│ │ │ │ -
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 }
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │ +
12
│ │ │ │ + │ │ │ │ +
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>;
│ │ │ │ + │ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
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
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -7,181 +7,540 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * rannacherturek │ │ │ │ │ - * rannacherturek3d │ │ │ │ │ -rannacherturek3dlocalbasis.hh │ │ │ │ │ + * utility │ │ │ │ │ +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_RANNACHER_TUREK_3D_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_RANNACHER_TUREK_3D_LOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_POLYNOMIALBASIS_HH │ │ │ │ │ + 6#define DUNE_POLYNOMIALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ 10 │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15 │ │ │ │ │ - 16namespace Dune │ │ │ │ │ - 17{ │ │ │ │ │ - 18 │ │ │ │ │ - 19 template< class D, class R > │ │ │ │ │ -20 class RannacherTurek3DLocalBasis │ │ │ │ │ - 21 { │ │ │ │ │ - 22 static const int coefficients[ 6 ][ 6 ]; │ │ │ │ │ - 23 │ │ │ │ │ - 24 public: │ │ │ │ │ - 25 typedef LocalBasisTraits<_D,_3,_FieldVector<_D,_3_>, │ │ │ │ │ - 26 R, 1, FieldVector< R, 1 >, │ │ │ │ │ -27 FieldMatrix< R, 1, 3 > > Traits; │ │ │ │ │ - 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& order, │ │ │ │ │ - 78 const typename Traits::DomainType& in, // position │ │ │ │ │ - 79 std::vector& 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"); │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ + 17#include │ │ │ │ │ + 18#include │ │ │ │ │ + 19 │ │ │ │ │ + 20namespace Dune │ │ │ │ │ + 21{ │ │ │ │ │ + 22 │ │ │ │ │ + 23 // PolynomialBasis │ │ │ │ │ + 24 // --------------- │ │ │ │ │ + 25 │ │ │ │ │ + 63 template< class Eval, class CM, class D=double, class R=double > │ │ │ │ │ +64 class PolynomialBasis │ │ │ │ │ + 65 { │ │ │ │ │ + 66 typedef PolynomialBasis<_Eval,_CM_> This; │ │ │ │ │ + 67 typedef Eval Evaluator; │ │ │ │ │ + 68 │ │ │ │ │ + 69 public: │ │ │ │ │ +70 typedef CM CoefficientMatrix; │ │ │ │ │ + 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; │ │ │ │ │ + 76 typedef LocalBasisTraits, │ │ │ │ │ + 77 R,dimRange,FieldVector, │ │ │ │ │ +78 FieldMatrix > Traits; │ │ │ │ │ +79 typedef typename Evaluator::Basis Basis; │ │ │ │ │ +80 typedef typename Evaluator::DomainVector DomainVector; │ │ │ │ │ + 81 template │ │ │ │ │ +82 using HessianFyType = │ │ │ │ │ +FieldVector,dimRange>; │ │ │ │ │ +83 using HessianType = HessianFyType; │ │ │ │ │ + 84 │ │ │ │ │ +85 PolynomialBasis (const Basis &basis, │ │ │ │ │ + 86 const CoefficientMatrix &coeffMatrix, │ │ │ │ │ + 87 unsigned int size) │ │ │ │ │ + 88 : basis_(basis), │ │ │ │ │ + 89 coeffMatrix_(&coeffMatrix), │ │ │ │ │ + 90 eval_(basis), │ │ │ │ │ + 91 order_(basis.order()), │ │ │ │ │ + 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 │ │ │ │ │ -105 unsigned int order () const │ │ │ │ │ - 106 { │ │ │ │ │ - 107 return 2; │ │ │ │ │ - 108 } │ │ │ │ │ - 109 }; │ │ │ │ │ - 110 │ │ │ │ │ - 111 │ │ │ │ │ + 102 │ │ │ │ │ +103 const CoefficientMatrix &matrix () const │ │ │ │ │ + 104 { │ │ │ │ │ + 105 return *coeffMatrix_; │ │ │ │ │ + 106 } │ │ │ │ │ + 107 │ │ │ │ │ +108 unsigned int order () const │ │ │ │ │ + 109 { │ │ │ │ │ + 110 return order_; │ │ │ │ │ + 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 │ │ │ │ │ +113 unsigned int size () const │ │ │ │ │ + 114 { │ │ │ │ │ + 115 return size_; │ │ │ │ │ + 116 } │ │ │ │ │ + 117 │ │ │ │ │ +119 void evaluateFunction (const typename Traits::DomainType& x, │ │ │ │ │ + 120 std::vector& 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& 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& out) const // return value │ │ │ │ │ + 137 { │ │ │ │ │ + 138 out.resize(size()); │ │ │ │ │ + 139 hessian(x,out); │ │ │ │ │ + 140 } │ │ │ │ │ + 141 │ │ │ │ │ +143 void partial (const std::array& order, │ │ │ │ │ + 144 const typename Traits::DomainType& in, // position │ │ │ │ │ + 145 std::vector& 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 jacs(out.size()); │ │ │ │ │ + 154 unsigned int k; │ │ │ │ │ + 155 for (unsigned int i=0;i hesss(out.size()); │ │ │ │ │ + 164 int k=-1,l=-1; │ │ │ │ │ + 165 for (unsigned int i=0;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 │ │ │ │ │ +182 void evaluate ( const DomainVector &x, F *values ) const │ │ │ │ │ + 183 { │ │ │ │ │ + 184 coeffMatrix_->mult( eval_.template evaluate( 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( bx, values ); │ │ │ │ │ + 194 } │ │ │ │ │ + 195 │ │ │ │ │ + 196 template │ │ │ │ │ +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 │ │ │ │ │ +209 struct Convert │ │ │ │ │ + 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()); │ │ │ │ │ + 220 const DomainVector &bx = Convert::apply(x); │ │ │ │ │ + 221 coeffMatrix_->mult( eval_.template evaluate( bx ), values ); │ │ │ │ │ + 222 } │ │ │ │ │ + 223 │ │ │ │ │ + 224 template │ │ │ │ │ +225 void evaluate ( const DomainVector &x, std::vector │ │ │ │ │ +> &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( eval_.template evaluate( x ), │ │ │ │ │ +values ); │ │ │ │ │ + 244 } │ │ │ │ │ + 245 template< unsigned int deriv, class Fy > │ │ │ │ │ +246 void evaluateSingle ( const DomainVector &x, │ │ │ │ │ + 247 std::vector< FieldVector:: │ │ │ │ │ +size>,dimRange> > &values) const │ │ │ │ │ + 248 { │ │ │ │ │ + 249 evaluateSingle(x,reinterpret_cast::size*dimRange> >&>(values)); │ │ │ │ │ + 250 } │ │ │ │ │ + 251 template< unsigned int deriv, class Fy > │ │ │ │ │ +252 void evaluateSingle ( const DomainVector &x, │ │ │ │ │ + 253 std::vector< FieldVector,dimRange> > │ │ │ │ │ +&values) const │ │ │ │ │ + 254 { │ │ │ │ │ + 255 evaluateSingle(x,reinterpret_cast::size*dimRange> >&>(values)); │ │ │ │ │ + 256 } │ │ │ │ │ + 257 │ │ │ │ │ + 258 template │ │ │ │ │ +259 void jacobian ( const DomainVector &x, │ │ │ │ │ + 260 std::vector > &values ) const │ │ │ │ │ + 261 { │ │ │ │ │ + 262 assert(values.size()>=size()); │ │ │ │ │ + 263 evaluateSingle<1>(x,reinterpret_cast >&>(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 │ │ │ │ │ +275 void hessian ( const DomainVector &x, │ │ │ │ │ + 276 std::vector> &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, dimRange> │ │ │ │ │ + 281 const unsigned int hsize = LFETensor::size; │ │ │ │ │ + 282 std::vector< FieldVector< FieldVector, 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 >&>(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 │ │ │ │ │ +317 void integrate ( std::vector &values ) const │ │ │ │ │ + 318 { │ │ │ │ │ + 319 assert(values.size()>=size()); │ │ │ │ │ + 320 coeffMatrix_->mult( eval_.template integrate(), values ); │ │ │ │ │ + 321 } │ │ │ │ │ + 322 │ │ │ │ │ + 323 protected: │ │ │ │ │ +324 PolynomialBasis(const PolynomialBasis &other) │ │ │ │ │ + 325 : basis_(other.basis_), │ │ │ │ │ + 326 coeffMatrix_(other.coeffMatrix_), │ │ │ │ │ + 327 eval_(basis_), │ │ │ │ │ + 328 order_(basis_.order()), │ │ │ │ │ + 329 size_(other.size_) │ │ │ │ │ + 330 {} │ │ │ │ │ +331 PolynomialBasis &operator=(const PolynomialBasis&); │ │ │ │ │ +332 const Basis &basis_; │ │ │ │ │ +333 const CoefficientMatrix* coeffMatrix_; │ │ │ │ │ +334 mutable Evaluator eval_; │ │ │ │ │ +335 unsigned int order_,size_; │ │ │ │ │ + 336 }; │ │ │ │ │ + 337 │ │ │ │ │ + 344 template< class Eval, class CM = SparseCoeffMatrix, │ │ │ │ │ + 345 class D=double, class R=double> │ │ │ │ │ +346 class PolynomialBasisWithMatrix │ │ │ │ │ + 347 : public PolynomialBasis< Eval, CM, D, R > │ │ │ │ │ + 348 { │ │ │ │ │ + 349 public: │ │ │ │ │ +350 typedef CM CoefficientMatrix; │ │ │ │ │ + 351 │ │ │ │ │ + 352 private: │ │ │ │ │ + 353 typedef Eval Evaluator; │ │ │ │ │ + 354 │ │ │ │ │ + 355 typedef PolynomialBasisWithMatrix<_Evaluator,_CM_> This; │ │ │ │ │ + 356 typedef PolynomialBasis Base; │ │ │ │ │ + 357 │ │ │ │ │ + 358 public: │ │ │ │ │ +359 typedef typename Base::Basis Basis; │ │ │ │ │ + 360 │ │ │ │ │ +361 PolynomialBasisWithMatrix (const Basis &basis) │ │ │ │ │ + 362 : Base(basis,coeffMatrix_,0) │ │ │ │ │ + 363 {} │ │ │ │ │ + 364 │ │ │ │ │ + 365 template │ │ │ │ │ +366 void fill(const Matrix& matrix) │ │ │ │ │ + 367 { │ │ │ │ │ + 368 coeffMatrix_.fill(matrix); │ │ │ │ │ + 369 this->size_ = coeffMatrix_.size(); │ │ │ │ │ + 370 } │ │ │ │ │ + 371 template │ │ │ │ │ +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: │ │ │ │ │ + 380 PolynomialBasisWithMatrix(const PolynomialBasisWithMatrix &); │ │ │ │ │ + 381 PolynomialBasisWithMatrix &operator=(const PolynomialBasisWithMatrix &); │ │ │ │ │ + 382 CoefficientMatrix coeffMatrix_; │ │ │ │ │ + 383 }; │ │ │ │ │ + 384} │ │ │ │ │ + 385#endif // DUNE_POLYNOMIALBASIS_HH │ │ │ │ │ +multiindex.hh │ │ │ │ │ +monomialbasis.hh │ │ │ │ │ +coeffmatrix.hh │ │ │ │ │ +basisevaluator.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ +Dune::field_cast │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +Definition field.hh:159 │ │ │ │ │ Dune::LocalBasisTraits │ │ │ │ │ Type traits for LocalBasisVirtualInterface. │ │ │ │ │ Definition common/localbasis.hh:34 │ │ │ │ │ Dune::LocalBasisTraits::DomainType │ │ │ │ │ D DomainType │ │ │ │ │ domain type │ │ │ │ │ Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalBasisTraits::RangeFieldType │ │ │ │ │ -RF RangeFieldType │ │ │ │ │ -Export type for range field. │ │ │ │ │ -Definition common/localbasis.hh:45 │ │ │ │ │ -Dune::RannacherTurek3DLocalBasis │ │ │ │ │ -Definition rannacherturek3dlocalbasis.hh:21 │ │ │ │ │ -Dune::RannacherTurek3DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 3, FieldVector< D, 3 >, R, 1, FieldVector< R, 1 >, │ │ │ │ │ -FieldMatrix< R, 1, 3 > > Traits │ │ │ │ │ -Definition rannacherturek3dlocalbasis.hh:27 │ │ │ │ │ -Dune::RannacherTurek3DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +Dune::PolynomialBasis │ │ │ │ │ +Definition polynomialbasis.hh:65 │ │ │ │ │ +Dune::PolynomialBasis::evaluate │ │ │ │ │ +void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ +Definition polynomialbasis.hh:230 │ │ │ │ │ +Dune::PolynomialBasis::evaluate │ │ │ │ │ +void evaluate(const DomainVector &x, std::vector< FieldVector< Fy, dimRange > > │ │ │ │ │ +&values) const │ │ │ │ │ +Definition polynomialbasis.hh:225 │ │ │ │ │ +Dune::PolynomialBasis::PolynomialBasis │ │ │ │ │ +PolynomialBasis(const PolynomialBasis &other) │ │ │ │ │ +Definition polynomialbasis.hh:324 │ │ │ │ │ +Dune::PolynomialBasis::evaluate │ │ │ │ │ +void evaluate(const DVector &x, F *values) const │ │ │ │ │ +Definition polynomialbasis.hh:187 │ │ │ │ │ +Dune::PolynomialBasis::evaluateHessian │ │ │ │ │ +void evaluateHessian(const typename Traits::DomainType &x, std::vector< │ │ │ │ │ +HessianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition polynomialbasis.hh:135 │ │ │ │ │ +Dune::PolynomialBasis::StorageField │ │ │ │ │ +CoefficientMatrix::Field StorageField │ │ │ │ │ +Definition polynomialbasis.hh:72 │ │ │ │ │ +Dune::PolynomialBasis::dimRange │ │ │ │ │ +static const unsigned int dimRange │ │ │ │ │ +Definition polynomialbasis.hh:75 │ │ │ │ │ +Dune::PolynomialBasis::jacobian │ │ │ │ │ +void jacobian(const DVector &x, RVector &values) const │ │ │ │ │ +Definition polynomialbasis.hh:266 │ │ │ │ │ +Dune::PolynomialBasis::DomainVector │ │ │ │ │ +Evaluator::DomainVector DomainVector │ │ │ │ │ +Definition polynomialbasis.hh:80 │ │ │ │ │ +Dune::PolynomialBasis::Basis │ │ │ │ │ +Evaluator::Basis Basis │ │ │ │ │ +Definition polynomialbasis.hh:79 │ │ │ │ │ +Dune::PolynomialBasis::evaluateSingle │ │ │ │ │ +void evaluateSingle(const DomainVector &x, Vector &values) const │ │ │ │ │ +Definition polynomialbasis.hh:240 │ │ │ │ │ +Dune::PolynomialBasis::evaluateSingle │ │ │ │ │ +void evaluateSingle(const DomainVector &x, std::vector< FieldVector< LFETensor< │ │ │ │ │ +Fy, dimension, deriv >, dimRange > > &values) const │ │ │ │ │ +Definition polynomialbasis.hh:252 │ │ │ │ │ +Dune::PolynomialBasis::jacobian │ │ │ │ │ +void jacobian(const DomainVector &x, std::vector< FieldMatrix< Fy, dimRange, │ │ │ │ │ +dimension > > &values) const │ │ │ │ │ +Definition polynomialbasis.hh:259 │ │ │ │ │ +Dune::PolynomialBasis::matrix │ │ │ │ │ +const CoefficientMatrix & matrix() const │ │ │ │ │ +Definition polynomialbasis.hh:103 │ │ │ │ │ +Dune::PolynomialBasis::basis_ │ │ │ │ │ +const Basis & basis_ │ │ │ │ │ +Definition polynomialbasis.hh:332 │ │ │ │ │ +Dune::PolynomialBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &x, std::vector< │ │ │ │ │ typename Traits::RangeType > &out) const │ │ │ │ │ -evaluate all shape functions │ │ │ │ │ -Definition rannacherturek3dlocalbasis.hh:36 │ │ │ │ │ -Dune::RannacherTurek3DLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition rannacherturek3dlocalbasis.hh:30 │ │ │ │ │ -Dune::RannacherTurek3DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition polynomialbasis.hh:119 │ │ │ │ │ +Dune::PolynomialBasis::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition polynomialbasis.hh:74 │ │ │ │ │ +Dune::PolynomialBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &x, std::vector< │ │ │ │ │ typename Traits::JacobianType > &out) const │ │ │ │ │ -evaluate jacobian of all shape functions │ │ │ │ │ -Definition rannacherturek3dlocalbasis.hh:54 │ │ │ │ │ -Dune::RannacherTurek3DLocalBasis::order │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +Definition polynomialbasis.hh:127 │ │ │ │ │ +Dune::PolynomialBasis::operator= │ │ │ │ │ +PolynomialBasis & operator=(const PolynomialBasis &) │ │ │ │ │ +Dune::PolynomialBasis::coeffMatrix_ │ │ │ │ │ +const CoefficientMatrix * coeffMatrix_ │ │ │ │ │ +Definition polynomialbasis.hh:333 │ │ │ │ │ +Dune::PolynomialBasis::integrate │ │ │ │ │ +void integrate(std::vector< Fy > &values) const │ │ │ │ │ +Definition polynomialbasis.hh:317 │ │ │ │ │ +Dune::PolynomialBasis::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Definition polynomialbasis.hh:113 │ │ │ │ │ +Dune::PolynomialBasis::evaluate │ │ │ │ │ +void evaluate(const DomainVector &x, F *values) const │ │ │ │ │ +Definition polynomialbasis.hh:182 │ │ │ │ │ +Dune::PolynomialBasis::hessian │ │ │ │ │ +void hessian(const DVector &x, HVector &values) const │ │ │ │ │ +Definition polynomialbasis.hh:307 │ │ │ │ │ +Dune::PolynomialBasis::CoefficientMatrix │ │ │ │ │ +CM CoefficientMatrix │ │ │ │ │ +Definition polynomialbasis.hh:70 │ │ │ │ │ +Dune::PolynomialBasis::HessianType │ │ │ │ │ +HessianFyType< R > HessianType │ │ │ │ │ +Definition polynomialbasis.hh:83 │ │ │ │ │ +Dune::PolynomialBasis::Traits │ │ │ │ │ +LocalBasisTraits< D, dimension, FieldVector< D, dimension >, R, dimRange, │ │ │ │ │ +FieldVector< R, dimRange >, FieldMatrix< R, dimRange, dimension > > Traits │ │ │ │ │ +Definition polynomialbasis.hh:78 │ │ │ │ │ +Dune::PolynomialBasis::order_ │ │ │ │ │ +unsigned int order_ │ │ │ │ │ +Definition polynomialbasis.hh:335 │ │ │ │ │ +Dune::PolynomialBasis::hessian │ │ │ │ │ +void hessian(const DomainVector &x, std::vector< HessianFyType< Fy > > &values) │ │ │ │ │ +const │ │ │ │ │ +Definition polynomialbasis.hh:275 │ │ │ │ │ +Dune::PolynomialBasis::evaluate │ │ │ │ │ +void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ +Definition polynomialbasis.hh:217 │ │ │ │ │ +Dune::PolynomialBasis::PolynomialBasis │ │ │ │ │ +PolynomialBasis(const Basis &basis, const CoefficientMatrix &coeffMatrix, │ │ │ │ │ +unsigned int size) │ │ │ │ │ +Definition polynomialbasis.hh:85 │ │ │ │ │ +Dune::PolynomialBasis::HessianFyType │ │ │ │ │ +FieldVector< FieldMatrix< Fy, dimension, dimension >, dimRange > HessianFyType │ │ │ │ │ +Definition polynomialbasis.hh:82 │ │ │ │ │ +Dune::PolynomialBasis::order │ │ │ │ │ unsigned int order() const │ │ │ │ │ -polynomial order of the shape functions │ │ │ │ │ -Definition rannacherturek3dlocalbasis.hh:105 │ │ │ │ │ -Dune::RannacherTurek3DLocalBasis::partial │ │ │ │ │ -void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ +Definition polynomialbasis.hh:108 │ │ │ │ │ +Dune::PolynomialBasis::evaluateSingle │ │ │ │ │ +void evaluateSingle(const DomainVector &x, std::vector< FieldVector< │ │ │ │ │ +FieldVector< Fy, LFETensor< Fy, dimension, deriv >::size >, dimRange > > │ │ │ │ │ +&values) const │ │ │ │ │ +Definition polynomialbasis.hh:246 │ │ │ │ │ +Dune::PolynomialBasis::basis │ │ │ │ │ +const Basis & basis() const │ │ │ │ │ +Definition polynomialbasis.hh:98 │ │ │ │ │ +Dune::PolynomialBasis::partial │ │ │ │ │ +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 rannacherturek3dlocalbasis.hh:77 │ │ │ │ │ +Definition polynomialbasis.hh:143 │ │ │ │ │ +Dune::PolynomialBasis::size_ │ │ │ │ │ +unsigned int size_ │ │ │ │ │ +Definition polynomialbasis.hh:335 │ │ │ │ │ +Dune::PolynomialBasis::eval_ │ │ │ │ │ +Evaluator eval_ │ │ │ │ │ +Definition polynomialbasis.hh:334 │ │ │ │ │ +Dune::PolynomialBasis::Convert │ │ │ │ │ +Definition polynomialbasis.hh:198 │ │ │ │ │ +Dune::PolynomialBasis::Convert::apply │ │ │ │ │ +static DomainVector apply(const DVector &x) │ │ │ │ │ +Definition polynomialbasis.hh:199 │ │ │ │ │ +Dune::PolynomialBasis::Convert<_dummy,_DomainVector_>::apply │ │ │ │ │ +static const DomainVector & apply(const DomainVector &x) │ │ │ │ │ +Definition polynomialbasis.hh:211 │ │ │ │ │ +Dune::PolynomialBasisWithMatrix │ │ │ │ │ +Definition polynomialbasis.hh:348 │ │ │ │ │ +Dune::PolynomialBasisWithMatrix::PolynomialBasisWithMatrix │ │ │ │ │ +PolynomialBasisWithMatrix(const Basis &basis) │ │ │ │ │ +Definition polynomialbasis.hh:361 │ │ │ │ │ +Dune::PolynomialBasisWithMatrix::CoefficientMatrix │ │ │ │ │ +CM CoefficientMatrix │ │ │ │ │ +Definition polynomialbasis.hh:350 │ │ │ │ │ +Dune::PolynomialBasisWithMatrix::fill │ │ │ │ │ +void fill(const Matrix &matrix, int size) │ │ │ │ │ +Definition polynomialbasis.hh:372 │ │ │ │ │ +Dune::PolynomialBasisWithMatrix::Basis │ │ │ │ │ +Base::Basis Basis │ │ │ │ │ +Definition polynomialbasis.hh:359 │ │ │ │ │ +Dune::PolynomialBasisWithMatrix::fill │ │ │ │ │ +void fill(const Matrix &matrix) │ │ │ │ │ +Definition polynomialbasis.hh:366 │ │ │ │ │ +Dune::LFETensor │ │ │ │ │ +Definition tensor.hh:33 │ │ │ │ │ localbasis.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00560.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannachertureklocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: dglocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,37 +65,37 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
rannachertureklocalinterpolation.hh File Reference
│ │ │ │ +
dglocalcoefficients.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>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::RannacherTurekLocalInterpolation< D, R, d >
 please doc me More...
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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,27 +6,27 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * rannacherturek │ │ │ │ │ + * utility │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -rannachertureklocalinterpolation.hh File Reference │ │ │ │ │ +dglocalcoefficients.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::RannacherTurekLocalInterpolation<_D,_R,_d_> │ │ │ │ │ -  please doc me More... │ │ │ │ │ + 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... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00560_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannachertureklocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: dglocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,89 +70,117 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
rannachertureklocalinterpolation.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_RANNACHER_TUREK_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_RANNACHER_TUREK_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_DGLOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_DGLOCALCOEFFICIENTS_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;
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │
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;
│ │ │ │ +
│ │ │ │ +
35 const LocalKey &localKey ( const unsigned int i ) const
│ │ │ │ +
36 {
│ │ │ │ +
37 assert( i < size() );
│ │ │ │ +
38 return localKey_[ i ];
│ │ │ │ +
39 }
│ │ │ │ +
│ │ │ │
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 }
│ │ │ │ +
│ │ │ │ +
41 unsigned int size () const
│ │ │ │ +
42 {
│ │ │ │ +
43 return localKey_.size();
│ │ │ │ +
44 }
│ │ │ │
│ │ │ │ -
59
│ │ │ │ -
60 };
│ │ │ │ +
45
│ │ │ │ +
46 private:
│ │ │ │ +
47 std::vector< LocalKey > localKey_;
│ │ │ │ +
48 };
│ │ │ │
│ │ │ │ -
61
│ │ │ │ -
62} // namespace Dune
│ │ │ │ +
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#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALINTERPOLATION_HH
│ │ │ │ +
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
│ │ │ │ -
please doc me
Definition rannachertureklocalinterpolation.hh:30
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Definition rannachertureklocalinterpolation.hh:37
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,88 +7,122 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * rannacherturek │ │ │ │ │ -rannachertureklocalinterpolation.hh │ │ │ │ │ + * utility │ │ │ │ │ +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_RANNACHER_TUREK_LOCALINTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_RANNACHER_TUREK_LOCALINTERPOLATION_HH │ │ │ │ │ + 5#ifndef DUNE_DGLOCALCOEFFICIENTS_HH │ │ │ │ │ + 6#define DUNE_DGLOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9#include │ │ │ │ │ 10 │ │ │ │ │ - 11#include │ │ │ │ │ + 11#include │ │ │ │ │ 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ - 17 │ │ │ │ │ - 18namespace Dune │ │ │ │ │ - 19{ │ │ │ │ │ - 20 │ │ │ │ │ - 28 template< class D, class R, unsigned int d > │ │ │ │ │ -29 class RannacherTurekLocalInterpolation │ │ │ │ │ + 13namespace Dune │ │ │ │ │ + 14{ │ │ │ │ │ + 15 │ │ │ │ │ + 16 // DGLocalCoefficients │ │ │ │ │ + 17 // ------------------- │ │ │ │ │ + 18 │ │ │ │ │ +22 class DGLocalCoefficients │ │ │ │ │ + 23 { │ │ │ │ │ + 24 typedef DGLocalCoefficients This; │ │ │ │ │ + 25 │ │ │ │ │ + 26 public: │ │ │ │ │ +28 DGLocalCoefficients ( const unsigned int n ) │ │ │ │ │ + 29 : localKey_( n ) │ │ │ │ │ 30 { │ │ │ │ │ - 31 typedef LocalBasisTraits<_D,_d,_FieldVector<_D,_d_>, │ │ │ │ │ - 32 R, 1, FieldVector< R, 1 >, │ │ │ │ │ - 33 FieldMatrix< R, 1, d > > Traits; │ │ │ │ │ + 31 for( unsigned i = 0; i < n; ++i ) │ │ │ │ │ + 32 localKey_[ i ] = LocalKey( 0, 0, i ); │ │ │ │ │ + 33 } │ │ │ │ │ 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; │ │ │ │ │ +35 const LocalKey &localKey ( const unsigned int i ) const │ │ │ │ │ + 36 { │ │ │ │ │ + 37 assert( i < size() ); │ │ │ │ │ + 38 return localKey_[ i ]; │ │ │ │ │ + 39 } │ │ │ │ │ 40 │ │ │ │ │ - 41 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ - 42 │ │ │ │ │ - 43 // get cubic reference element │ │ │ │ │ - 44 auto referenceElement = ReferenceElements< D, d >::cube(); │ │ │ │ │ +41 unsigned int size () const │ │ │ │ │ + 42 { │ │ │ │ │ + 43 return localKey_.size(); │ │ │ │ │ + 44 } │ │ │ │ │ 45 │ │ │ │ │ - 46 const int size = 2*d; │ │ │ │ │ - 47 assert( size == referenceElement.size( 1 ) ); │ │ │ │ │ - 48 │ │ │ │ │ - 49 // resize vector │ │ │ │ │ - 50 out.resize( size ); │ │ │ │ │ + 46 private: │ │ │ │ │ + 47 std::vector< LocalKey > localKey_; │ │ │ │ │ + 48 }; │ │ │ │ │ + 49 │ │ │ │ │ + 50 │ │ │ │ │ 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 │ │ │ │ │ + 52 // DGLocalCoefficientsFactory │ │ │ │ │ + 53 // -------------------------- │ │ │ │ │ + 57 template< class BasisFactory > │ │ │ │ │ +58 struct DGLocalCoefficientsFactory │ │ │ │ │ + 59 { │ │ │ │ │ +60 static const unsigned int dimension = BasisFactory::dimension; │ │ │ │ │ +61 typedef typename BasisFactory::Key Key; │ │ │ │ │ +62 typedef const DGLocalCoefficients Object; │ │ │ │ │ 63 │ │ │ │ │ - 64#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALINTERPOLATION_HH │ │ │ │ │ + 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 │ │ │ │ │ +localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::RannacherTurekLocalInterpolation │ │ │ │ │ -please doc me │ │ │ │ │ -Definition rannachertureklocalinterpolation.hh:30 │ │ │ │ │ -Dune::RannacherTurekLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Definition rannachertureklocalinterpolation.hh:37 │ │ │ │ │ -localbasis.hh │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::DGLocalCoefficients │ │ │ │ │ +A class providing local coefficients for dg spaces. │ │ │ │ │ +Definition dglocalcoefficients.hh:23 │ │ │ │ │ +Dune::DGLocalCoefficients::size │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Definition dglocalcoefficients.hh:41 │ │ │ │ │ +Dune::DGLocalCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ +Definition dglocalcoefficients.hh:35 │ │ │ │ │ +Dune::DGLocalCoefficients::DGLocalCoefficients │ │ │ │ │ +DGLocalCoefficients(const unsigned int n) │ │ │ │ │ +construct local keys for n basis functions │ │ │ │ │ +Definition dglocalcoefficients.hh:28 │ │ │ │ │ +Dune::DGLocalCoefficientsFactory │ │ │ │ │ +A factory class for the dg local coefficients. │ │ │ │ │ +Definition dglocalcoefficients.hh:59 │ │ │ │ │ +Dune::DGLocalCoefficientsFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition dglocalcoefficients.hh:73 │ │ │ │ │ +Dune::DGLocalCoefficientsFactory::Object │ │ │ │ │ +const DGLocalCoefficients Object │ │ │ │ │ +Definition dglocalcoefficients.hh:62 │ │ │ │ │ +Dune::DGLocalCoefficientsFactory::create │ │ │ │ │ +static Object * create(const Key &key) │ │ │ │ │ +Definition dglocalcoefficients.hh:65 │ │ │ │ │ +Dune::DGLocalCoefficientsFactory::Key │ │ │ │ │ +BasisFactory::Key Key │ │ │ │ │ +Definition dglocalcoefficients.hh:61 │ │ │ │ │ +Dune::DGLocalCoefficientsFactory::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition dglocalcoefficients.hh:60 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00563.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannacherturek2dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: basisevaluator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,46 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
rannacherturek2dlocalbasis.hh File Reference
│ │ │ │ +
basisevaluator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <vector>
│ │ │ │ -#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

struct  Dune::RannacherTurek2DLocalBasis< 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
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,36 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * rannacherturek │ │ │ │ │ - * rannacherturek2d │ │ │ │ │ + * utility │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -rannacherturek2dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +basisevaluator.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  Dune::RannacherTurek2DLocalBasis<_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 │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00563_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannacherturek2dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: basisevaluator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,159 +70,279 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
rannacherturek2dlocalbasis.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_RANNACHER_TUREK_2D_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_RANNACHER_TUREK_2D_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_BASISEVALUATOR_HH
│ │ │ │ +
6#define DUNE_BASISEVALUATOR_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/fmatrix.hh>
│ │ │ │
11#include <dune/common/fvector.hh>
│ │ │ │ -
12#include <dune/common/fmatrix.hh>
│ │ │ │ +
12#include <dune/common/typetraits.hh>
│ │ │ │
13
│ │ │ │ - │ │ │ │ +
14#include <dune/geometry/type.hh>
│ │ │ │
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
18
│ │ │ │ -
19 template< class D, class R >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
21 {
│ │ │ │ - │ │ │ │ -
23 R, 1, FieldVector< R, 1 >,
│ │ │ │ -
24 FieldMatrix< R, 1, 2 > > Traits;
│ │ │ │ -
25
│ │ │ │ -
│ │ │ │ -
27 unsigned int size () const
│ │ │ │ -
28 {
│ │ │ │ -
29 return 4;
│ │ │ │ -
30 }
│ │ │ │ -
│ │ │ │ -
31
│ │ │ │ -
│ │ │ │ -
33 inline void evaluateFunction ( const typename Traits::DomainType &in,
│ │ │ │ -
34 std::vector< typename Traits::RangeType > &out ) const
│ │ │ │ -
35 {
│ │ │ │ -
36 out.resize(4);
│ │ │ │ -
37 typename Traits::DomainFieldType qbase = in[0]*in[0]-in[1]*in[1];
│ │ │ │ -
38 out[0] = .75 - 2*in[0] + in[1] + qbase;
│ │ │ │ -
39 out[1] = -.25 + in[1] + qbase;
│ │ │ │ -
40 out[2] = .75 + in[0] - 2*in[1] - qbase;
│ │ │ │ -
41 out[3] = -.25 + in[0] - qbase;
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ -
45 inline void evaluateJacobian ( const typename Traits::DomainType &in,
│ │ │ │ -
46 std::vector< typename Traits::JacobianType > &out ) const
│ │ │ │ -
47 {
│ │ │ │ -
48 out.resize(4);
│ │ │ │ -
49
│ │ │ │ -
50 // see http://www.dune-project.org/doc/doxygen/html/classDune_1_1C1LocalBasisInterface.html#d6f8368f8aa43439cc7ef10419f6e2ea
│ │ │ │ -
51 // out[i][j][k] = d_k \phi^i_j , where \phi^i_j is the j'th component of the i'th shape function.
│ │ │ │ -
52
│ │ │ │ -
53 out[0][0][0] = -2 + 2*in[0]; out[0][0][1] = 1 - 2*in[1];
│ │ │ │ -
54 out[1][0][0] = 2*in[0]; out[1][0][1] = 1 - 2*in[1];
│ │ │ │ -
55 out[2][0][0] = 1 - 2*in[0]; out[2][0][1] = -2 + 2*in[1];
│ │ │ │ -
56 out[3][0][0] = 1 - 2*in[0]; out[3][0][1] = 2*in[1];
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
60 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ -
61 const typename Traits::DomainType& in, // position
│ │ │ │ -
62 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
63 {
│ │ │ │ -
64 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
65 if (totalOrder == 0) {
│ │ │ │ -
66 evaluateFunction(in, out);
│ │ │ │ -
67 } else if (totalOrder == 1) {
│ │ │ │ -
68 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
69 out.resize(size());
│ │ │ │ -
70
│ │ │ │ -
71 switch (direction) {
│ │ │ │ -
72 case 0:
│ │ │ │ -
73 out[0] = -2 + 2*in[0];
│ │ │ │ -
74 out[1] = 2*in[0];
│ │ │ │ -
75 out[2] = 1 - 2*in[0];
│ │ │ │ -
76 out[3] = 1 - 2*in[0];
│ │ │ │ -
77 break;
│ │ │ │ -
78 case 1:
│ │ │ │ -
79 out[0] = 1 - 2*in[1];
│ │ │ │ -
80 out[1] = 1 - 2*in[1];
│ │ │ │ -
81 out[2] = -2 + 2*in[1];
│ │ │ │ -
82 out[3] = 2*in[1];
│ │ │ │ -
83 break;
│ │ │ │ -
84 default:
│ │ │ │ -
85 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
86 }
│ │ │ │ -
87 } else if (totalOrder == 2) {
│ │ │ │ -
88 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 2));
│ │ │ │ -
89 out.resize(size());
│ │ │ │ -
90
│ │ │ │ -
91 switch (direction) {
│ │ │ │ -
92 case 0:
│ │ │ │ -
93 out[0] = out[1] = 2;
│ │ │ │ -
94 out[2] = out[3] =-2;
│ │ │ │ -
95 break;
│ │ │ │ -
96 case 1:
│ │ │ │ -
97 out[0] = out[1] =-2;
│ │ │ │ -
98 out[2] = out[3] = 2;
│ │ │ │ -
99 break;
│ │ │ │ -
100 default:
│ │ │ │ -
101 out[0] = out[1] = out[2] = out[3] = 0;
│ │ │ │ -
102 break;
│ │ │ │ -
103 }
│ │ │ │ -
104 } else {
│ │ │ │ -
105 out[0] = out[1] = out[2] = out[3] = 0;
│ │ │ │ -
106 }
│ │ │ │ -
107 }
│ │ │ │ -
│ │ │ │ -
108
│ │ │ │ -
│ │ │ │ -
110 unsigned int order () const
│ │ │ │ -
111 {
│ │ │ │ -
112 // must be 2 here since it contains x^2 and x^2
│ │ │ │ -
113 return 2;
│ │ │ │ -
114 }
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
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
│ │ │ │ +
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 };
│ │ │ │
│ │ │ │ -
115 };
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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} //namespace Dune
│ │ │ │ -
118
│ │ │ │ -
119#endif // #ifndef DUNE_RANNACHER_TUREK_2D_LOCALBASIS_HH
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
DF DomainFieldType
Export type for domain field.
Definition common/localbasis.hh:36
│ │ │ │ -
Definition rannacherturek2dlocalbasis.hh:21
│ │ │ │ -
LocalBasisTraits< D, 2, FieldVector< D, 2 >, R, 1, FieldVector< R, 1 >, FieldMatrix< R, 1, 2 > > Traits
Definition rannacherturek2dlocalbasis.hh:24
│ │ │ │ -
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 rannacherturek2dlocalbasis.hh:60
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition rannacherturek2dlocalbasis.hh:27
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
evaluate all shape functions
Definition rannacherturek2dlocalbasis.hh:33
│ │ │ │ -
unsigned int order() const
polynomial order of the shape functions
Definition rannacherturek2dlocalbasis.hh:110
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
evaluate jacobian of all shape functions
Definition rannacherturek2dlocalbasis.hh:45
│ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -7,176 +7,325 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * rannacherturek │ │ │ │ │ - * rannacherturek2d │ │ │ │ │ -rannacherturek2dlocalbasis.hh │ │ │ │ │ + * utility │ │ │ │ │ +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_RANNACHER_TUREK_2D_LOCALBASIS_HH │ │ │ │ │ - 6#define DUNE_RANNACHER_TUREK_2D_LOCALBASIS_HH │ │ │ │ │ + 5#ifndef DUNE_BASISEVALUATOR_HH │ │ │ │ │ + 6#define DUNE_BASISEVALUATOR_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10 │ │ │ │ │ + 8#include │ │ │ │ │ + 9 │ │ │ │ │ + 10#include │ │ │ │ │ 11#include │ │ │ │ │ - 12#include │ │ │ │ │ + 12#include │ │ │ │ │ 13 │ │ │ │ │ - 14#include │ │ │ │ │ + 14#include │ │ │ │ │ 15 │ │ │ │ │ - 16namespace Dune │ │ │ │ │ - 17{ │ │ │ │ │ - 18 │ │ │ │ │ - 19 template< class D, class R > │ │ │ │ │ -20 struct RannacherTurek2DLocalBasis │ │ │ │ │ - 21 { │ │ │ │ │ - 22 typedef LocalBasisTraits<_D,_2,_FieldVector<_D,_2_>, │ │ │ │ │ - 23 R, 1, FieldVector< R, 1 >, │ │ │ │ │ -24 FieldMatrix< R, 1, 2 > > Traits; │ │ │ │ │ - 25 │ │ │ │ │ -27 unsigned int size () const │ │ │ │ │ - 28 { │ │ │ │ │ - 29 return 4; │ │ │ │ │ - 30 } │ │ │ │ │ - 31 │ │ │ │ │ -33 inline void evaluateFunction ( const typename Traits::DomainType &in, │ │ │ │ │ - 34 std::vector< typename Traits::RangeType > &out ) const │ │ │ │ │ - 35 { │ │ │ │ │ - 36 out.resize(4); │ │ │ │ │ - 37 typename Traits::DomainFieldType qbase = in[0]*in[0]-in[1]*in[1]; │ │ │ │ │ - 38 out[0] = .75 - 2*in[0] + in[1] + qbase; │ │ │ │ │ - 39 out[1] = -.25 + in[1] + qbase; │ │ │ │ │ - 40 out[2] = .75 + in[0] - 2*in[1] - qbase; │ │ │ │ │ - 41 out[3] = -.25 + in[0] - qbase; │ │ │ │ │ - 42 } │ │ │ │ │ - 43 │ │ │ │ │ -45 inline void evaluateJacobian ( const typename Traits::DomainType &in, │ │ │ │ │ - 46 std::vector< typename Traits::JacobianType > &out ) const │ │ │ │ │ - 47 { │ │ │ │ │ - 48 out.resize(4); │ │ │ │ │ + 16#include │ │ │ │ │ + 17#include │ │ │ │ │ + 18#include │ │ │ │ │ + 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 │ │ │ │ │ + 28 │ │ │ │ │ + 29 template │ │ │ │ │ +30 struct MonomialEvaluator │ │ │ │ │ + 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 Container; │ │ │ │ │ + 39 │ │ │ │ │ + 40 template< class Deriv > │ │ │ │ │ + 41 struct BaseIterator; │ │ │ │ │ + 42 │ │ │ │ │ + 43 template │ │ │ │ │ +44 struct Iterator │ │ │ │ │ + 45 { │ │ │ │ │ +46 typedef │ │ │ │ │ +BaseIterator > All; │ │ │ │ │ +47 typedef BaseIterator > Integrate; │ │ │ │ │ + 48 }; │ │ │ │ │ 49 │ │ │ │ │ - 50 // see http://www.dune-project.org/doc/doxygen/html/ │ │ │ │ │ -classDune_1_1C1LocalBasisInterface.html#d6f8368f8aa43439cc7ef10419f6e2ea │ │ │ │ │ - 51 // out[i][j][k] = d_k \phi^i_j , where \phi^i_j is the j'th component of │ │ │ │ │ -the i'th shape function. │ │ │ │ │ - 52 │ │ │ │ │ - 53 out[0][0][0] = -2 + 2*in[0]; out[0][0][1] = 1 - 2*in[1]; │ │ │ │ │ - 54 out[1][0][0] = 2*in[0]; out[1][0][1] = 1 - 2*in[1]; │ │ │ │ │ - 55 out[2][0][0] = 1 - 2*in[0]; out[2][0][1] = -2 + 2*in[1]; │ │ │ │ │ - 56 out[3][0][0] = 1 - 2*in[0]; out[3][0][1] = 2*in[1]; │ │ │ │ │ - 57 } │ │ │ │ │ - 58 │ │ │ │ │ -60 void partial (const std::array& order, │ │ │ │ │ - 61 const typename Traits::DomainType& in, // position │ │ │ │ │ - 62 std::vector& out) const // return value │ │ │ │ │ - 63 { │ │ │ │ │ - 64 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ - 65 if (totalOrder == 0) { │ │ │ │ │ - 66 evaluateFunction(in, out); │ │ │ │ │ - 67 } else if (totalOrder == 1) { │ │ │ │ │ - 68 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ - 69 out.resize(size()); │ │ │ │ │ - 70 │ │ │ │ │ - 71 switch (direction) { │ │ │ │ │ - 72 case 0: │ │ │ │ │ - 73 out[0] = -2 + 2*in[0]; │ │ │ │ │ - 74 out[1] = 2*in[0]; │ │ │ │ │ - 75 out[2] = 1 - 2*in[0]; │ │ │ │ │ - 76 out[3] = 1 - 2*in[0]; │ │ │ │ │ - 77 break; │ │ │ │ │ - 78 case 1: │ │ │ │ │ - 79 out[0] = 1 - 2*in[1]; │ │ │ │ │ - 80 out[1] = 1 - 2*in[1]; │ │ │ │ │ - 81 out[2] = -2 + 2*in[1]; │ │ │ │ │ - 82 out[3] = 2*in[1]; │ │ │ │ │ - 83 break; │ │ │ │ │ - 84 default: │ │ │ │ │ - 85 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ - 86 } │ │ │ │ │ - 87 } else if (totalOrder == 2) { │ │ │ │ │ - 88 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 2)); │ │ │ │ │ - 89 out.resize(size()); │ │ │ │ │ - 90 │ │ │ │ │ - 91 switch (direction) { │ │ │ │ │ - 92 case 0: │ │ │ │ │ - 93 out[0] = out[1] = 2; │ │ │ │ │ - 94 out[2] = out[3] =-2; │ │ │ │ │ - 95 break; │ │ │ │ │ - 96 case 1: │ │ │ │ │ - 97 out[0] = out[1] =-2; │ │ │ │ │ - 98 out[2] = out[3] = 2; │ │ │ │ │ - 99 break; │ │ │ │ │ - 100 default: │ │ │ │ │ - 101 out[0] = out[1] = out[2] = out[3] = 0; │ │ │ │ │ - 102 break; │ │ │ │ │ - 103 } │ │ │ │ │ - 104 } else { │ │ │ │ │ - 105 out[0] = out[1] = out[2] = out[3] = 0; │ │ │ │ │ - 106 } │ │ │ │ │ - 107 } │ │ │ │ │ - 108 │ │ │ │ │ -110 unsigned int order () const │ │ │ │ │ - 111 { │ │ │ │ │ - 112 // must be 2 here since it contains x^2 and x^2 │ │ │ │ │ - 113 return 2; │ │ │ │ │ - 114 } │ │ │ │ │ - 115 }; │ │ │ │ │ +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 │ │ │ │ │ +63 void resize() │ │ │ │ │ + 64 { │ │ │ │ │ + 65 const int totalSize = │ │ │ │ │ +Derivatives:: │ │ │ │ │ +size*size_; │ │ │ │ │ + 66 container_.resize(totalSize); │ │ │ │ │ + 67 } │ │ │ │ │ +68 MonomialEvaluator(const MonomialEvaluator&); │ │ │ │ │ +69 const Basis &basis_; │ │ │ │ │ +70 unsigned int order_,size_; │ │ │ │ │ +71 Container container_; │ │ │ │ │ + 72 }; │ │ │ │ │ + 73 │ │ │ │ │ + 74 │ │ │ │ │ + 75 template< class B > │ │ │ │ │ + 76 template< class Deriv > │ │ │ │ │ +77 struct MonomialEvaluator< B >::BaseIterator │ │ │ │ │ + 78 { │ │ │ │ │ +79 typedef Deriv Derivatives; │ │ │ │ │ +80 typedef typename Deriv::Field Field; │ │ │ │ │ +81 static const unsigned int blockSize = Deriv::size; │ │ │ │ │ +82 typedef Dune::FieldVector 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 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(*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} //namespace Dune │ │ │ │ │ - 118 │ │ │ │ │ - 119#endif // #ifndef DUNE_RANNACHER_TUREK_2D_LOCALBASIS_HH │ │ │ │ │ +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 > │ │ │ │ │ +129 struct StandardEvaluator │ │ │ │ │ + 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 Container; │ │ │ │ │ +136 static const int dimension = Basis::dimension; │ │ │ │ │ +137 static const int dimRange = Basis::dimRange; │ │ │ │ │ +138 typedef MonomialEvaluator Base; │ │ │ │ │ + 139 │ │ │ │ │ + 140 template │ │ │ │ │ +141 struct Iterator : public Base::template Iterator │ │ │ │ │ + 142 {}; │ │ │ │ │ + 143 │ │ │ │ │ +144 StandardEvaluator(const Basis &basis) │ │ │ │ │ + 145 : Base(basis,basis.order(),basis.size()) │ │ │ │ │ + 146 {} │ │ │ │ │ + 147 template │ │ │ │ │ +148 typename Iterator::All evaluate(const DVector &x) │ │ │ │ │ + 149 { │ │ │ │ │ + 150 Base::template resize(); │ │ │ │ │ + 151 basis_.template evaluate(x,&(container_[0])); │ │ │ │ │ + 152 return typename Iterator::All(container_); │ │ │ │ │ + 153 } │ │ │ │ │ +154 typename Iterator<0>::Integrate integrate() │ │ │ │ │ + 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: │ │ │ │ │ + 167 StandardEvaluator(const StandardEvaluator&); │ │ │ │ │ + 168 using Base::basis_; │ │ │ │ │ + 169 using Base::container_; │ │ │ │ │ + 170 }; │ │ │ │ │ + 171 │ │ │ │ │ + 172} │ │ │ │ │ + 173 │ │ │ │ │ + 174#endif │ │ │ │ │ +multiindex.hh │ │ │ │ │ +field.hh │ │ │ │ │ +tensor.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalBasisTraits::DomainFieldType │ │ │ │ │ -DF DomainFieldType │ │ │ │ │ -Export type for domain field. │ │ │ │ │ -Definition common/localbasis.hh:36 │ │ │ │ │ -Dune::RannacherTurek2DLocalBasis │ │ │ │ │ -Definition rannacherturek2dlocalbasis.hh:21 │ │ │ │ │ -Dune::RannacherTurek2DLocalBasis::Traits │ │ │ │ │ -LocalBasisTraits< D, 2, FieldVector< D, 2 >, R, 1, FieldVector< R, 1 >, │ │ │ │ │ -FieldMatrix< R, 1, 2 > > Traits │ │ │ │ │ -Definition rannacherturek2dlocalbasis.hh:24 │ │ │ │ │ -Dune::RannacherTurek2DLocalBasis::partial │ │ │ │ │ -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 rannacherturek2dlocalbasis.hh:60 │ │ │ │ │ -Dune::RannacherTurek2DLocalBasis::size │ │ │ │ │ +Dune::operator* │ │ │ │ │ +Field operator*(const Unity< Field > &u, const Field &f) │ │ │ │ │ +Definition field.hh:50 │ │ │ │ │ +Dune::DerivativeLayoutNS::DerivativeLayout │ │ │ │ │ +DerivativeLayout │ │ │ │ │ +Definition tensor.hh:168 │ │ │ │ │ +Dune::MonomialEvaluator │ │ │ │ │ +Definition basisevaluator.hh:31 │ │ │ │ │ +Dune::MonomialEvaluator::dimRange │ │ │ │ │ +static const int dimRange │ │ │ │ │ +Definition basisevaluator.hh:36 │ │ │ │ │ +Dune::MonomialEvaluator::Basis │ │ │ │ │ +B Basis │ │ │ │ │ +Definition basisevaluator.hh:32 │ │ │ │ │ +Dune::MonomialEvaluator::order_ │ │ │ │ │ +unsigned int order_ │ │ │ │ │ +Definition basisevaluator.hh:70 │ │ │ │ │ +Dune::MonomialEvaluator::basis_ │ │ │ │ │ +const Basis & basis_ │ │ │ │ │ +Definition basisevaluator.hh:69 │ │ │ │ │ +Dune::MonomialEvaluator::MonomialEvaluator │ │ │ │ │ +MonomialEvaluator(const Basis &basis, unsigned int order, unsigned int size) │ │ │ │ │ +Definition basisevaluator.hh:56 │ │ │ │ │ +Dune::MonomialEvaluator::Field │ │ │ │ │ +Basis::Field Field │ │ │ │ │ +Definition basisevaluator.hh:33 │ │ │ │ │ +Dune::MonomialEvaluator::size_ │ │ │ │ │ +unsigned int size_ │ │ │ │ │ +Definition basisevaluator.hh:70 │ │ │ │ │ +Dune::MonomialEvaluator::DomainVector │ │ │ │ │ +Basis::DomainVector DomainVector │ │ │ │ │ +Definition basisevaluator.hh:34 │ │ │ │ │ +Dune::MonomialEvaluator::resize │ │ │ │ │ +void resize() │ │ │ │ │ +Definition basisevaluator.hh:63 │ │ │ │ │ +Dune::MonomialEvaluator::container_ │ │ │ │ │ +Container container_ │ │ │ │ │ +Definition basisevaluator.hh:71 │ │ │ │ │ +Dune::MonomialEvaluator::size │ │ │ │ │ unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition rannacherturek2dlocalbasis.hh:27 │ │ │ │ │ -Dune::RannacherTurek2DLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -evaluate all shape functions │ │ │ │ │ -Definition rannacherturek2dlocalbasis.hh:33 │ │ │ │ │ -Dune::RannacherTurek2DLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -polynomial order of the shape functions │ │ │ │ │ -Definition rannacherturek2dlocalbasis.hh:110 │ │ │ │ │ -Dune::RannacherTurek2DLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -evaluate jacobian of all shape functions │ │ │ │ │ -Definition rannacherturek2dlocalbasis.hh:45 │ │ │ │ │ -localbasis.hh │ │ │ │ │ +Definition basisevaluator.hh:50 │ │ │ │ │ +Dune::MonomialEvaluator::Container │ │ │ │ │ +std::vector< Field > Container │ │ │ │ │ +Definition basisevaluator.hh:38 │ │ │ │ │ +Dune::MonomialEvaluator::MonomialEvaluator │ │ │ │ │ +MonomialEvaluator(const MonomialEvaluator &) │ │ │ │ │ +Dune::MonomialEvaluator::dimension │ │ │ │ │ +static const int dimension │ │ │ │ │ +Definition basisevaluator.hh:35 │ │ │ │ │ +Dune::MonomialEvaluator::BaseIterator │ │ │ │ │ +Definition basisevaluator.hh:78 │ │ │ │ │ +Dune::MonomialEvaluator::BaseIterator::BaseIterator │ │ │ │ │ +BaseIterator(Container &container) │ │ │ │ │ +Definition basisevaluator.hh:90 │ │ │ │ │ +Dune::MonomialEvaluator::BaseIterator::operator* │ │ │ │ │ +const Deriv & operator*() const │ │ │ │ │ +Definition basisevaluator.hh:95 │ │ │ │ │ +Dune::MonomialEvaluator::BaseIterator::Block │ │ │ │ │ +Dune::FieldVector< Field, blockSize > Block │ │ │ │ │ +Definition basisevaluator.hh:82 │ │ │ │ │ +Dune::MonomialEvaluator::BaseIterator::done │ │ │ │ │ +bool done() const │ │ │ │ │ +Definition basisevaluator.hh:106 │ │ │ │ │ +Dune::MonomialEvaluator::BaseIterator::CIter │ │ │ │ │ +Container::iterator CIter │ │ │ │ │ +Definition basisevaluator.hh:88 │ │ │ │ │ +Dune::MonomialEvaluator::BaseIterator::operator-> │ │ │ │ │ +const Deriv * operator->() const │ │ │ │ │ +Definition basisevaluator.hh:101 │ │ │ │ │ +Dune::MonomialEvaluator::BaseIterator::Derivatives │ │ │ │ │ +Deriv Derivatives │ │ │ │ │ +Definition basisevaluator.hh:79 │ │ │ │ │ +Dune::MonomialEvaluator::BaseIterator::Container │ │ │ │ │ +std::vector< Field > Container │ │ │ │ │ +Definition basisevaluator.hh:87 │ │ │ │ │ +Dune::MonomialEvaluator::BaseIterator::Field │ │ │ │ │ +Deriv::Field Field │ │ │ │ │ +Definition basisevaluator.hh:80 │ │ │ │ │ +Dune::MonomialEvaluator::Iterator │ │ │ │ │ +Definition basisevaluator.hh:45 │ │ │ │ │ +Dune::MonomialEvaluator::Iterator::Integrate │ │ │ │ │ +BaseIterator< Derivatives< Field, dimension, 1, 0, DerivativeLayoutNS::value > │ │ │ │ │ +> Integrate │ │ │ │ │ +Definition basisevaluator.hh:47 │ │ │ │ │ +Dune::MonomialEvaluator::Iterator::All │ │ │ │ │ +BaseIterator< Derivatives< Field, dimension, dimRange, deriv, │ │ │ │ │ +DerivativeLayoutNS::derivative > > All │ │ │ │ │ +Definition basisevaluator.hh:46 │ │ │ │ │ +Dune::StandardEvaluator │ │ │ │ │ +Definition basisevaluator.hh:131 │ │ │ │ │ +Dune::StandardEvaluator::Field │ │ │ │ │ +Basis::Field Field │ │ │ │ │ +Definition basisevaluator.hh:133 │ │ │ │ │ +Dune::StandardEvaluator::DomainVector │ │ │ │ │ +Basis::DomainVector DomainVector │ │ │ │ │ +Definition basisevaluator.hh:134 │ │ │ │ │ +Dune::StandardEvaluator::evaluate │ │ │ │ │ +Iterator< deriv >::All evaluate(const DVector &x) │ │ │ │ │ +Definition basisevaluator.hh:148 │ │ │ │ │ +Dune::StandardEvaluator::Base │ │ │ │ │ +MonomialEvaluator< B > Base │ │ │ │ │ +Definition basisevaluator.hh:138 │ │ │ │ │ +Dune::StandardEvaluator::StandardEvaluator │ │ │ │ │ +StandardEvaluator(const Basis &basis) │ │ │ │ │ +Definition basisevaluator.hh:144 │ │ │ │ │ +Dune::StandardEvaluator::dimRange │ │ │ │ │ +static const int dimRange │ │ │ │ │ +Definition basisevaluator.hh:137 │ │ │ │ │ +Dune::StandardEvaluator::Container │ │ │ │ │ +std::vector< Field > Container │ │ │ │ │ +Definition basisevaluator.hh:135 │ │ │ │ │ +Dune::StandardEvaluator::integrate │ │ │ │ │ +Iterator< 0 >::Integrate integrate() │ │ │ │ │ +Definition basisevaluator.hh:154 │ │ │ │ │ +Dune::StandardEvaluator::Basis │ │ │ │ │ +B Basis │ │ │ │ │ +Definition basisevaluator.hh:132 │ │ │ │ │ +Dune::StandardEvaluator::StandardEvaluator │ │ │ │ │ +StandardEvaluator(const Basis &basis, unsigned int size) │ │ │ │ │ +Definition basisevaluator.hh:162 │ │ │ │ │ +Dune::StandardEvaluator::dimension │ │ │ │ │ +static const int dimension │ │ │ │ │ +Definition basisevaluator.hh:136 │ │ │ │ │ +Dune::StandardEvaluator::Iterator │ │ │ │ │ +Definition basisevaluator.hh:142 │ │ │ │ │ +Dune::Derivatives │ │ │ │ │ +Definition tensor.hh:172 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00566.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: mimeticall.hh File Reference │ │ │ │ +dune-localfunctions: lagrange.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,49 +65,54 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
mimeticall.hh File Reference
│ │ │ │ +
lagrange.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"
│ │ │ │ + │ │ │ │ +

Convenience header that includes all implementations of Lagrange finite elements. │ │ │ │ +More...

│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::MimeticLocalBasis< D, R, dim >
 
class  Dune::MimeticLocalInterpolation< LB >
 
class  Dune::MimeticLocalCoefficients
 ! More...
class  Dune::LagrangeLocalFiniteElement< LP, dimDomain, D, R, SF, CF >
 Lagrange local finite elements for a given set of interpolation points. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

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

Detailed Description

│ │ │ │ +

Convenience header that includes all implementations of Lagrange finite elements.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,32 +6,37 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * mimetic │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -mimeticall.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "../common/localbasis.hh" │ │ │ │ │ -#include "../common/localkey.hh" │ │ │ │ │ +lagrange.hh File Reference │ │ │ │ │ +Convenience header that includes all implementations of Lagrange finite │ │ │ │ │ +elements. More... │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::MimeticLocalBasis<_D,_R,_dim_> │ │ │ │ │ -  │ │ │ │ │ -class  Dune::MimeticLocalInterpolation<_LB_> │ │ │ │ │ -  │ │ │ │ │ -class  Dune::MimeticLocalCoefficients │ │ │ │ │ -  ! More... │ │ │ │ │ +class  Dune::LagrangeLocalFiniteElement<_LP,_dimDomain,_D,_R,_SF,_CF_> │ │ │ │ │ +  Lagrange local finite elements for a given set of interpolation points. │ │ │ │ │ + More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ +***** Detailed Description ***** │ │ │ │ │ +Convenience header that includes all implementations of Lagrange finite │ │ │ │ │ +elements. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00566_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: mimeticall.hh Source File │ │ │ │ +dune-localfunctions: lagrange.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,173 +70,90 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
mimeticall.hh
│ │ │ │ +
lagrange.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_LOCALFUNCTIONS_LAGRANGE_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_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>
│ │ │ │ +
12// Headers for Lagrange elements with run-time order
│ │ │ │ + │ │ │ │ + │ │ │ │
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;
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
19
│ │ │ │ +
20// Headers for Lagrange elements with compile-time order
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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 }
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ +
28namespace Dune
│ │ │ │ +
29{
│ │ │ │ +
59 template< template <class,unsigned int> class LP,
│ │ │ │ +
60 unsigned int dimDomain, class D, class R,
│ │ │ │ +
61 class SF=R, class CF=SF >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
63 : public GenericLocalFiniteElement< LagrangeBasisFactory< LP, dimDomain, SF, CF >,
│ │ │ │ +
64 LagrangeCoefficientsFactory<LP, dimDomain, SF >,
│ │ │ │ +
65 LagrangeInterpolationFactory< LP, dimDomain, SF > >
│ │ │ │ +
66 {
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
70 public:
│ │ │ │ +
71 typedef typename Base::Traits Traits;
│ │ │ │ +
72
│ │ │ │ +
│ │ │ │ +
75 LagrangeLocalFiniteElement ( const GeometryType &gt, unsigned int order )
│ │ │ │ +
76 : Base( gt, order )
│ │ │ │ +
77 {}
│ │ │ │ +
│ │ │ │ +
78 };
│ │ │ │ +
│ │ │ │ +
79}
│ │ │ │ +
80
│ │ │ │ +
81#endif // #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_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
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
Lagrange local finite elements for a given set of interpolation points.
Definition lagrange.hh:66
│ │ │ │ +
LagrangeLocalFiniteElement(const GeometryType &gt, unsigned int order)
Definition lagrange.hh:75
│ │ │ │ +
Base::Traits Traits
Definition lagrange.hh:71
│ │ │ │ +
Definition lagrange/interpolation.hh:100
│ │ │ │ +
Definition lagrangecoefficients.hh:23
│ │ │ │ +
A LocalFiniteElement implementation based on three TopologyFactories providing the LocalBasis,...
Definition localfunctions/utility/localfiniteelement.hh:25
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,195 +7,94 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * mimetic │ │ │ │ │ -mimeticall.hh │ │ │ │ │ +lagrange.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_LOCALFUNCTIONS_LAGRANGE_HH │ │ │ │ │ + 6#define DUNE_LOCALFUNCTIONS_LAGRANGE_HH │ │ │ │ │ 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9 │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ + 12// Headers for Lagrange elements with run-time order │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ 15 │ │ │ │ │ - 16#include "../common/localbasis.hh" │ │ │ │ │ - 17#include "../common/localkey.hh" │ │ │ │ │ - 18 │ │ │ │ │ - 19namespace Dune │ │ │ │ │ - 20{ │ │ │ │ │ - 21 template │ │ │ │ │ -22 class MimeticLocalBasis │ │ │ │ │ - 23 { │ │ │ │ │ - 24 public: │ │ │ │ │ - 25 typedef Dune::LocalBasisTraits, │ │ │ │ │ -26 R,1,Dune::FieldVector, Dune::FieldMatrix > Traits; │ │ │ │ │ + 16#include │ │ │ │ │ + 17#include │ │ │ │ │ + 18#include │ │ │ │ │ + 19 │ │ │ │ │ + 20// Headers for Lagrange elements with compile-time order │ │ │ │ │ + 21#include │ │ │ │ │ + 22#include │ │ │ │ │ + 23#include │ │ │ │ │ + 24#include │ │ │ │ │ + 25#include │ │ │ │ │ + 26#include │ │ │ │ │ 27 │ │ │ │ │ -28 MimeticLocalBasis (unsigned int variant_) │ │ │ │ │ - 29 : variant(variant_) │ │ │ │ │ - 30 {} │ │ │ │ │ - 31 │ │ │ │ │ -32 MimeticLocalBasis () │ │ │ │ │ - 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& 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& out) const │ │ │ │ │ - 50 { │ │ │ │ │ - 51 DUNE_THROW(Dune::Exception,"mimetic basis Jacobian evaluation not │ │ │ │ │ -available"); │ │ │ │ │ - 52 } │ │ │ │ │ - 53 │ │ │ │ │ -55 void partial (const std::array& /*order*/, │ │ │ │ │ - 56 const typename Traits::DomainType& /*in*/, // position │ │ │ │ │ - 57 std::vector& /*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 │ │ │ │ │ -73 class MimeticLocalInterpolation │ │ │ │ │ - 74 { │ │ │ │ │ - 75 public: │ │ │ │ │ - 76 │ │ │ │ │ - 78 template │ │ │ │ │ -79 void interpolate (const F& f, std::vector& out) const { │ │ │ │ │ - 80 DUNE_THROW(Dune::Exception,"mimetic local interpolation not available"); │ │ │ │ │ - 81 } │ │ │ │ │ - 82 }; │ │ │ │ │ - 83 │ │ │ │ │ -87 class MimeticLocalCoefficients │ │ │ │ │ - 88 { │ │ │ │ │ - 89 public: │ │ │ │ │ -90 MimeticLocalCoefficients (unsigned int variant_) │ │ │ │ │ - 91 : variant(variant_), li(variant_) │ │ │ │ │ - 92 { │ │ │ │ │ - 93 for (unsigned int i=0; i li; │ │ │ │ │ - 112 }; │ │ │ │ │ - 113} │ │ │ │ │ - 114 │ │ │ │ │ - 115#endif │ │ │ │ │ + 28namespace Dune │ │ │ │ │ + 29{ │ │ │ │ │ + 59 template< template class LP, │ │ │ │ │ + 60 unsigned int dimDomain, class D, class R, │ │ │ │ │ + 61 class SF=R, class CF=SF > │ │ │ │ │ +62 class LagrangeLocalFiniteElement │ │ │ │ │ + 63 : public GenericLocalFiniteElement< LagrangeBasisFactory< LP, dimDomain, │ │ │ │ │ +SF, CF >, │ │ │ │ │ + 64 LagrangeCoefficientsFactory, │ │ │ │ │ + 65 LagrangeInterpolationFactory< LP, dimDomain, SF > > │ │ │ │ │ + 66 { │ │ │ │ │ + 67 typedef GenericLocalFiniteElement<_LagrangeBasisFactory<_LP,_dimDomain,_SF, │ │ │ │ │ +CF_>, │ │ │ │ │ + 68 LagrangeCoefficientsFactory, │ │ │ │ │ + 69 LagrangeInterpolationFactory<_LP,_dimDomain,_SF_> > Base; │ │ │ │ │ + 70 public: │ │ │ │ │ +71 typedef typename Base::Traits Traits; │ │ │ │ │ + 72 │ │ │ │ │ +75 LagrangeLocalFiniteElement ( const GeometryType >, unsigned int order ) │ │ │ │ │ + 76 : Base( gt, order ) │ │ │ │ │ + 77 {} │ │ │ │ │ + 78 }; │ │ │ │ │ + 79} │ │ │ │ │ + 80 │ │ │ │ │ + 81#endif // #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_HH │ │ │ │ │ +p0.hh │ │ │ │ │ +lagrangebasis.hh │ │ │ │ │ +lagrangepyramid.hh │ │ │ │ │ +lagrangecoefficients.hh │ │ │ │ │ +lagrangeprism.hh │ │ │ │ │ +pq22d.hh │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ +lagrangecube.hh │ │ │ │ │ +dglocalcoefficients.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalBasisTraits │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -Definition common/localbasis.hh:34 │ │ │ │ │ -Dune::LocalBasisTraits::DomainType │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -Definition common/localbasis.hh:42 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::LocalKey::intersectionCodim │ │ │ │ │ -@ intersectionCodim │ │ │ │ │ -Codimension returned by LocalKey::codim() for degrees of freedom attached to an │ │ │ │ │ -intersection. │ │ │ │ │ -Definition localkey.hh:36 │ │ │ │ │ -Dune::MimeticLocalBasis │ │ │ │ │ -Definition mimeticall.hh:23 │ │ │ │ │ -Dune::MimeticLocalBasis::MimeticLocalBasis │ │ │ │ │ -MimeticLocalBasis(unsigned int variant_) │ │ │ │ │ -Definition mimeticall.hh:28 │ │ │ │ │ -Dune::MimeticLocalBasis::Traits │ │ │ │ │ -Dune::LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune:: │ │ │ │ │ -FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits │ │ │ │ │ -Definition mimeticall.hh:26 │ │ │ │ │ -Dune::MimeticLocalBasis::MimeticLocalBasis │ │ │ │ │ -MimeticLocalBasis() │ │ │ │ │ -Definition mimeticall.hh:32 │ │ │ │ │ -Dune::MimeticLocalBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -Definition mimeticall.hh:47 │ │ │ │ │ -Dune::MimeticLocalBasis::order │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition mimeticall.hh:63 │ │ │ │ │ -Dune::MimeticLocalBasis::partial │ │ │ │ │ -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 │ │ │ │ │ -Dune::MimeticLocalBasis::size │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Definition mimeticall.hh:36 │ │ │ │ │ -Dune::MimeticLocalBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition mimeticall.hh:39 │ │ │ │ │ -Dune::MimeticLocalInterpolation │ │ │ │ │ -Definition mimeticall.hh:74 │ │ │ │ │ -Dune::MimeticLocalInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &f, std::vector< C > &out) const │ │ │ │ │ -Local interpolation of a function. │ │ │ │ │ -Definition mimeticall.hh:79 │ │ │ │ │ -Dune::MimeticLocalCoefficients │ │ │ │ │ -! │ │ │ │ │ -Definition mimeticall.hh:88 │ │ │ │ │ -Dune::MimeticLocalCoefficients::localKey │ │ │ │ │ -const Dune::LocalKey & localKey(std::size_t i) const │ │ │ │ │ -map index i to local key │ │ │ │ │ -Definition mimeticall.hh:105 │ │ │ │ │ -Dune::MimeticLocalCoefficients::MimeticLocalCoefficients │ │ │ │ │ -MimeticLocalCoefficients(unsigned int variant_) │ │ │ │ │ -Definition mimeticall.hh:90 │ │ │ │ │ -Dune::MimeticLocalCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition mimeticall.hh:102 │ │ │ │ │ -Dune::MimeticLocalCoefficients::MimeticLocalCoefficients │ │ │ │ │ -MimeticLocalCoefficients() │ │ │ │ │ -Definition mimeticall.hh:97 │ │ │ │ │ +Dune::LocalFiniteElementTraits │ │ │ │ │ +traits helper struct │ │ │ │ │ +Definition localfiniteelementtraits.hh:13 │ │ │ │ │ +Dune::LagrangeLocalFiniteElement │ │ │ │ │ +Lagrange local finite elements for a given set of interpolation points. │ │ │ │ │ +Definition lagrange.hh:66 │ │ │ │ │ +Dune::LagrangeLocalFiniteElement::LagrangeLocalFiniteElement │ │ │ │ │ +LagrangeLocalFiniteElement(const GeometryType >, unsigned int order) │ │ │ │ │ +Definition lagrange.hh:75 │ │ │ │ │ +Dune::LagrangeLocalFiniteElement::Traits │ │ │ │ │ +Base::Traits Traits │ │ │ │ │ +Definition lagrange.hh:71 │ │ │ │ │ +Dune::LagrangeInterpolationFactory │ │ │ │ │ +Definition lagrange/interpolation.hh:100 │ │ │ │ │ +Dune::LagrangeCoefficientsFactory │ │ │ │ │ +Definition lagrangecoefficients.hh:23 │ │ │ │ │ +Dune::GenericLocalFiniteElement │ │ │ │ │ +A LocalFiniteElement implementation based on three TopologyFactories providing │ │ │ │ │ +the LocalBasis,... │ │ │ │ │ +Definition localfunctions/utility/localfiniteelement.hh:25 │ │ │ │ │ +interpolation.hh │ │ │ │ │ +localfiniteelement.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01405.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::BDFMCubeLocalFiniteElement< D, R, dim, order > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Brezzi-Douglas-Fortin-Marini finite elements for cubes. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasfortinmarini/bdfmcube.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasfortinmarini/bdfmcube.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

using Traits = LocalFiniteElementTraits< LocalBasis, LocalCoefficients, LocalInterpolation >
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -350,15 +350,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01425.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::BDFMCubeLocalCoefficients< D, R, dim, order > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasfortinmarini/cube/localcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasfortinmarini/cube/localcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDFMCubeLocalCoefficients< D, R, dim, order >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -243,15 +243,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01433.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::BDM1Cube2DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2d.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM1Cube2DLocalFiniteElement< D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -353,15 +353,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01437.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::BDM1Cube2DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2d/brezzidouglasmarini1cube2dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2d/brezzidouglasmarini1cube2dlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -404,15 +404,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01441.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::BDM1Cube2DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Brezzi-Douglas-Marini-1 elements on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2d/brezzidouglasmarini1cube2dlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2d/brezzidouglasmarini1cube2dlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM1Cube2DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01445.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::BDM1Cube2DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Brezzi-Douglas-Marini shape functions on the reference quadrilateral. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2d/brezzidouglasmarini1cube2dlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2d/brezzidouglasmarini1cube2dlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM1Cube2DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -237,15 +237,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01449.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::BDM1Cube3DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Brezzi-Douglas-Marini shape functions on hexahedron. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3d.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM1Cube3DLocalFiniteElement< D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -353,15 +353,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01453.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::BDM1Cube3DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Brezzi-Douglas-Marini shape functions on the reference hexahedron. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3d/brezzidouglasmarini1cube3dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3d/brezzidouglasmarini1cube3dlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -404,15 +404,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01457.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::BDM1Cube3DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Brezzi-Douglas-Marini-1 elements on hexahedra. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3d/brezzidouglasmarini1cube3dlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3d/brezzidouglasmarini1cube3dlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM1Cube3DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01461.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::BDM1Cube3DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Brezzi-Douglas-Marini shape functions on the reference hexahedron. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3d/brezzidouglasmarini1cube3dlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3d/brezzidouglasmarini1cube3dlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM1Cube3DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -237,15 +237,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01465.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::BDM1Simplex2DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2d.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM1Simplex2DLocalFiniteElement< D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -353,15 +353,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01469.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::BDM1Simplex2DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Brezzi-Douglas-Marini shape functions on the reference triangle. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2d/brezzidouglasmarini1simplex2dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2d/brezzidouglasmarini1simplex2dlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -404,15 +404,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01473.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::BDM1Simplex2DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Brezzi-Douglas-Marini-1 elements on triangles. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2d/brezzidouglasmarini1simplex2dlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2d/brezzidouglasmarini1simplex2dlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM1Simplex2DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01477.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::BDM1Simplex2DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Brezzi-Douglas-Marini shape functions on the reference triangle. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2d/brezzidouglasmarini1simplex2dlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2d/brezzidouglasmarini1simplex2dlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM1Simplex2DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -237,15 +237,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01481.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::BDM2Cube2DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Second order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2d.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM2Cube2DLocalFiniteElement< D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -353,15 +353,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01485.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::BDM2Cube2DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2d/brezzidouglasmarini2cube2dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2d/brezzidouglasmarini2cube2dlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -404,15 +404,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01489.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::BDM2Cube2DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Brezzi-Douglas-Marini-2 elements on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2d/brezzidouglasmarini2cube2dlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2d/brezzidouglasmarini2cube2dlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM2Cube2DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01493.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::BDM2Cube2DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2d/brezzidouglasmarini2cube2dlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2d/brezzidouglasmarini2cube2dlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM2Cube2DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -237,15 +237,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01497.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::BDM2Simplex2DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Second order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2d.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM2Simplex2DLocalFiniteElement< D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -353,15 +353,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01501.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::BDM2Simplex2DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Brezzi-Douglas-Marini shape functions on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2d/brezzidouglasmarini2simplex2dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2d/brezzidouglasmarini2simplex2dlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -404,15 +404,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01505.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::BDM2Simplex2DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Brezzi-Douglas-Marini-2 elements on triangles. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2d/brezzidouglasmarini2simplex2dlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2d/brezzidouglasmarini2simplex2dlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM2Simplex2DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01509.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::BDM2Simplex2DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Brezzi-Douglas-Marini shape functions on triangles. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2d/brezzidouglasmarini2simplex2dlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2d/brezzidouglasmarini2simplex2dlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BDM2Simplex2DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -237,15 +237,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01513.html │ │ │ │ @@ -88,15 +88,15 @@ │ │ │ │ RNumber type to represent shape function values │ │ │ │ dimDimension of the reference elements, must be 2 or 3 │ │ │ │ orderPolynomial order of the element │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01517.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::BrezziDouglasMariniCubeLocalFiniteElement< D, R, 2, 1 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Brezzi-Douglas-Marini local finite elements for cubes with dimension 2 and order 1. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinicube.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinicube.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BrezziDouglasMariniCubeLocalFiniteElement< D, R, 2, 1 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -354,15 +354,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01521.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::BrezziDouglasMariniCubeLocalFiniteElement< D, R, 2, 2 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Brezzi-Douglas-Marini local finite elements for cubes with dimension 2 and order 2. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinicube.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinicube.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BrezziDouglasMariniCubeLocalFiniteElement< D, R, 2, 2 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -354,15 +354,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01525.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::BrezziDouglasMariniCubeLocalFiniteElement< D, R, 3, 1 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Brezzi-Douglas-Marini local finite elements for cubes with dimension 3 and order 1. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinicube.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinicube.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BrezziDouglasMariniCubeLocalFiniteElement< D, R, 3, 1 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -354,15 +354,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01529.html │ │ │ │ @@ -88,15 +88,15 @@ │ │ │ │ RNumber type to represent shape function values │ │ │ │ dimDimension of the reference elements, currently only 2 is supported │ │ │ │ orderPolynomial order of the element │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01533.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::BrezziDouglasMariniSimplexLocalFiniteElement< D, R, 2, 1 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Brezzi-Douglas-Marini local finite elements for simplices with dimension 2 and order 1. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinisimplex.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinisimplex.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BrezziDouglasMariniSimplexLocalFiniteElement< D, R, 2, 1 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -354,15 +354,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01537.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::BrezziDouglasMariniSimplexLocalFiniteElement< D, R, 2, 2 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Brezzi-Douglas-Marini local finite elements for simplices with dimension 2 and order 2. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinisimplex.hh>

│ │ │ │ +

#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinisimplex.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BrezziDouglasMariniSimplexLocalFiniteElement< D, R, 2, 2 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -354,15 +354,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01541.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::FiniteElementInterface Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Interface for global-valued finite elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/interface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/interface.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::FiniteElementInterface:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -248,15 +248,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Extract geometry type of this finite element.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01545.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::FiniteElementInterface::Traits Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

types of component objects │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/interface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/interface.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::FiniteElementInterface::Traits:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -168,15 +168,15 @@ │ │ │ │

type of the Interpolation

│ │ │ │

Should be an implementation of InterpolationInterface

│ │ │ │
Note
May be an inline class instead of a typedef.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01549.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::FiniteElementFactoryInterface< Geometry, VertexOrder > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Factory interface for global-valued finite elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/interface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/interface.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::FiniteElementFactoryInterface< Geometry, VertexOrder >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -351,15 +351,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

create a finite element from a vertex ordering

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01553.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::BasisInterface Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Interface for global-valued shape functions. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/interface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/interface.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BasisInterface:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -265,15 +265,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Number of shape functions.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01557.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::BasisInterface::Traits Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

types of domain and range │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/interface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/interface.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BasisInterface::Traits:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -254,15 +254,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

dimension of the range

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01561.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::InterpolationInterface Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Interface for global-valued interpolation. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/interface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/interface.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::InterpolationInterface:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -172,15 +172,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01565.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::CoefficientsInterface Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Interface for global-valued coefficients. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/interface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/interface.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::CoefficientsInterface:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -146,15 +146,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of coefficients

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01569.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::FiniteElementInterfaceSwitch< FiniteElement, Dummy > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Switch for uniform treatment of finite element with either the local or the global interface. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/interfaceswitch.hh>

│ │ │ │ +

#include <dune/localfunctions/common/interfaceswitch.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -419,15 +419,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Store a finite element in the store.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01573.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::BasisInterfaceSwitch< Basis, Dummy > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Switch for uniform treatment of local and global basis classes. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/interfaceswitch.hh>

│ │ │ │ +

#include <dune/localfunctions/common/interfaceswitch.hh>

│ │ │ │

│ │ │ │ Public Types

typedef FiniteElement::Traits::Basis Basis
 export the type of the basis
 
typedef FiniteElement::Traits::Interpolation Interpolation
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -318,15 +318,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

export dimension of the values

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01581.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::LocalFiniteElementTraits< LB, LC, LI > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

traits helper struct │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/localfiniteelementtraits.hh>

│ │ │ │ +

#include <dune/localfunctions/common/localfiniteelementtraits.hh>

│ │ │ │

│ │ │ │ Public Types

typedef Basis::Traits::DomainField DomainField
 export field types of the coordinates
 
typedef Basis::Traits::DomainLocal DomainLocal
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -146,15 +146,15 @@ │ │ │ │

│ │ │ │ Public Types

typedef LB LocalBasisType
 
typedef LC LocalCoefficientsType
 
│ │ │ │
│ │ │ │
Todo:
Please doc me !
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01601.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::LocalFiniteElementVariant< Implementations > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Type erasure class for wrapping LocalFiniteElement classes. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/localfiniteelementvariant.hh>

│ │ │ │ +

#include <dune/localfunctions/common/localfiniteelementvariant.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalFiniteElementVariant< Implementations >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -632,15 +632,15 @@ │ │ │ │ │ │ │ │

Provide access to underlying std::variant.

│ │ │ │

This allows to use std::visit on a higher level which allows to avoid the indirection of the std::variant - polymorphism inside the visitor code. Notice that the provided std::variant contains std::monostate in its type list. Hence any visitor used to access the variant has to be std::monostate-aware.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01609.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::LocalFiniteElementVariantCache< Base > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A cache storing a compile time selection of local finite element implementations. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/localfiniteelementvariantcache.hh>

│ │ │ │ +

#include <dune/localfunctions/common/localfiniteelementvariantcache.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalFiniteElementVariantCache< Base >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -283,15 +283,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01629.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::LocalKey Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Describe position of one degree of freedom. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/localkey.hh>

│ │ │ │ +

#include <dune/localfunctions/common/localkey.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -361,15 +361,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Return number of associated subentity.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01633.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::LocalToGlobalBasisAdaptorTraits< LocalBasisTraits, dimDomainGlobal_ > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Traits class for local-to-global basis adaptors. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/localtoglobaladaptors.hh>

│ │ │ │ +

#include <dune/localfunctions/common/localtoglobaladaptors.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalToGlobalBasisAdaptorTraits< LocalBasisTraits, dimDomainGlobal_ >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -435,15 +435,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

enum  { intersectionCodim =666 │ │ │ │ }
 Enumerate 'special values' for the codimension method. More...
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01637.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Convert a simple scalar local basis into a global basis. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/localtoglobaladaptors.hh>

│ │ │ │ +

#include <dune/localfunctions/common/localtoglobaladaptors.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -472,15 +472,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01641.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::LocalToGlobalInterpolationAdaptor< LocalInterpolation, Traits_ > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Convert a local interpolation into a global interpolation. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/localtoglobaladaptors.hh>

│ │ │ │ +

#include <dune/localfunctions/common/localtoglobaladaptors.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalToGlobalInterpolationAdaptor< LocalInterpolation, Traits_ >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -268,15 +268,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01645.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::ScalarLocalToGlobalFiniteElementAdaptor< LocalFiniteElement, Geometry > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Convert a simple scalar local finite element into a global finite element. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/localtoglobaladaptors.hh>

│ │ │ │ +

#include <dune/localfunctions/common/localtoglobaladaptors.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::ScalarLocalToGlobalFiniteElementAdaptor< LocalFiniteElement, Geometry >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -281,15 +281,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01649.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::ScalarLocalToGlobalFiniteElementAdaptor< LocalFiniteElement, Geometry >::Traits Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/localtoglobaladaptors.hh>

│ │ │ │ +

#include <dune/localfunctions/common/localtoglobaladaptors.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::ScalarLocalToGlobalFiniteElementAdaptor< LocalFiniteElement, Geometry >::Traits:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -147,15 +147,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01653.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory< LocalFiniteElement, Geometry > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/localtoglobaladaptors.hh>

│ │ │ │ +

#include <dune/localfunctions/common/localtoglobaladaptors.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::ScalarLocalToGlobalFiniteElementAdaptorFactory< LocalFiniteElement, Geometry >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -436,15 +436,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

create a finite element from a vertex ordering

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01657.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::LocalInterpolationVirtualInterface< DomainType, RangeType > Class Template Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

virtual base class for a local interpolation │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalInterpolationVirtualInterface< DomainType, RangeType >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -345,15 +345,15 @@ │ │ │ │

Implements Dune::LocalInterpolationVirtualInterfaceBase< DomainType, RangeType >.

│ │ │ │ │ │ │ │

Implemented in Dune::LocalInterpolationVirtualImp< DomainType, RangeType, Imp >.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01661.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::LocalFiniteElementFunctionBase< FE > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return a proper base class for functions to use with LocalInterpolation. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -155,15 +155,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

using VirtualFunctionBase = FunctionBaseDummy
 
using FunctionBase = FunctionBaseDummy
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01669.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::LocalFiniteElementFunctionBase< FE >::FunctionBaseDummy::Traits Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -119,15 +119,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

using RangeType = Range
 
using DomainType = Domain
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01673.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::LocalBasisVirtualInterface< T > Class Template Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

virtual base class for a local basis │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalBasisVirtualInterface< T >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -384,15 +384,15 @@ │ │ │ │

Number of shape functions.

│ │ │ │ │ │ │ │

Implemented in Dune::LocalBasisVirtualImp< T, Imp >, and Dune::LocalBasisVirtualImp< LocalBasisTraits, typename Imp::Traits::LocalBasisType >.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01677.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::LocalInterpolationVirtualInterfaceBase< DomainType, RangeType > Class Template Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

virtual base class for a local interpolation │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalInterpolationVirtualInterfaceBase< DomainType, RangeType >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -241,15 +241,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

Implemented in Dune::LocalInterpolationVirtualImp< DomainType, RangeType, Imp >, and Dune::LocalInterpolationVirtualInterface< DomainType, RangeType >.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01681.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::LocalCoefficientsVirtualInterface Class Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

virtual base class for local coefficients │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalCoefficientsVirtualInterface:
│ │ │ │ │ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01685.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::LocalFiniteElementVirtualInterface< T > Class Template Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

virtual base class for local finite elements with functions │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │ +

#include <dune/localfunctions/common/virtualinterface.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalFiniteElementVirtualInterface< T >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -339,15 +339,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01689.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::LocalFiniteElementVirtualImp< Imp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

class for wrapping a finite element using the virtual interface │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/virtualwrappers.hh>

│ │ │ │ +

#include <dune/localfunctions/common/virtualwrappers.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalFiniteElementVirtualImp< Imp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -558,15 +558,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01693.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::LocalFiniteElementCloneFactoryHelper< Imp, IsInterface > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/virtualwrappers.hh>

│ │ │ │ +

#include <dune/localfunctions/common/virtualwrappers.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static Imp * clone (const Imp &imp)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -113,15 +113,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01701.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::LocalFiniteElementCloneFactory< Imp > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/virtualwrappers.hh>

│ │ │ │ +

#include <dune/localfunctions/common/virtualwrappers.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementVirtualInterface< typename Imp::Traits::LocalBasisType::Traits > Interface
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -165,15 +165,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01705.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::LocalBasisVirtualImp< T, Imp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

class for wrapping a basis using the virtual interface │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/virtualwrappers.hh>

│ │ │ │ +

#include <dune/localfunctions/common/virtualwrappers.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalBasisVirtualImp< T, Imp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -426,15 +426,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01709.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::LocalInterpolationVirtualImp< DomainType, RangeType, Imp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

class for wrapping a local interpolation using the virtual interface │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/virtualwrappers.hh>

│ │ │ │ +

#include <dune/localfunctions/common/virtualwrappers.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalInterpolationVirtualImp< DomainType, RangeType, Imp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -380,15 +380,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01713.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::LocalCoefficientsVirtualImp< Imp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

class for wrapping local coefficients using the virtual interface │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/common/virtualwrappers.hh>

│ │ │ │ +

#include <dune/localfunctions/common/virtualwrappers.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalCoefficientsVirtualImp< Imp >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -304,15 +304,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01729.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::CrouzeixRaviartLocalFiniteElement< D, R, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Crouzeix-Raviart finite element. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/crouzeixraviart.hh>

│ │ │ │ +

#include <dune/localfunctions/crouzeixraviart.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

using Traits = LocalFiniteElementTraits< Impl::CrouzeixRaviartLocalBasis< D, R, dim >, Impl::CrouzeixRaviartLocalCoefficients< dim >, Impl::CrouzeixRaviartLocalInterpolation< Impl::CrouzeixRaviartLocalBasis< D, R, dim > > >
 Export number types, dimensions, etc.
 
│ │ │ │ @@ -287,15 +287,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

The reference element that the local finite element is defined on.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01733.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::DualP1LocalFiniteElement< D, R, dim, faceDual > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

The local dual p1 finite element on simplices. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/dualmortarbasis/dualp1.hh>

│ │ │ │ +

#include <dune/localfunctions/dualmortarbasis/dualp1.hh>

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< DualP1LocalBasis< D, R, dim, faceDual >, DualP1LocalCoefficients< dim >, DualP1LocalInterpolation< dim, DualP1LocalBasis< D, R, dim, faceDual > > > Traits
 
│ │ │ │

│ │ │ │ @@ -310,15 +310,15 @@ │ │ │ │

│ │ │ │
│ │ │ │
Todo:
Please doc me !
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01737.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::DualP1LocalBasis< D, R, dim, faceDualT > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Dual Lagrange shape functions on the simplex. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/dualmortarbasis/dualp1/dualp1localbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/dualmortarbasis/dualp1/dualp1localbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DualP1LocalBasis< D, R, dim, faceDualT >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -368,15 +368,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Determines if the basis is only biorthogonal on adjacent faces.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01741.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::DualP1LocalCoefficients< dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Local coefficients for dual simplex P1 elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/dualmortarbasis/dualp1/dualp1localcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/dualmortarbasis/dualp1/dualp1localcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DualP1LocalCoefficients< dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -234,15 +234,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01745.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::DualP1LocalInterpolation< dim, LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/dualmortarbasis/dualp1/dualp1localinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/dualmortarbasis/dualp1/dualp1localinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DualP1LocalInterpolation< dim, LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -139,15 +139,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Local interpolation of a function.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01749.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ Protected Types | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::DualPQ1LocalFiniteElementCache< D, R, dim, faceDual > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/dualmortarbasis/dualpq1factory.hh>

│ │ │ │ +

#include <dune/localfunctions/dualmortarbasis/dualpq1factory.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef FE FiniteElementType
 Type of the finite elements stored in this cache.
 
│ │ │ │ @@ -374,15 +374,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01753.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::DualQ1LocalFiniteElement< D, R, dim, faceDual > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

The local dual Q1 finite element on cubes. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/dualmortarbasis/dualq1.hh>

│ │ │ │ +

#include <dune/localfunctions/dualmortarbasis/dualq1.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< DualQ1LocalBasis< D, R, dim >, DualQ1LocalCoefficients< dim >, DualQ1LocalInterpolation< dim, DualQ1LocalBasis< D, R, dim > > > Traits
 
│ │ │ │

│ │ │ │ @@ -310,15 +310,15 @@ │ │ │ │

│ │ │ │
│ │ │ │
Todo:
Please doc me !
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01757.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::DualQ1LocalBasis< D, R, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Dual Lagrange shape functions of order 1 on the reference cube. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/dualmortarbasis/dualq1/dualq1localbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/dualmortarbasis/dualq1/dualq1localbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -350,15 +350,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01761.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::DualQ1LocalCoefficients< dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for dual Q1 elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/dualmortarbasis/dualq1/dualq1localcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/dualmortarbasis/dualq1/dualq1localcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DualQ1LocalCoefficients< dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -234,15 +234,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01765.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::DualQ1LocalInterpolation< dim, LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/dualmortarbasis/dualq1/dualq1localinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/dualmortarbasis/dualq1/dualq1localinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DualQ1LocalInterpolation< dim, LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -172,15 +172,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01769.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::HierarchicalP2LocalFiniteElement< D, R, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalp2.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalp2.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< HierarchicalSimplexP2LocalBasis< D, R, dim >, typename LagrangeSimplexLocalFiniteElement< D, R, dim, 2 >::Traits::LocalCoefficientsType, HierarchicalSimplexP2LocalInterpolation< HierarchicalSimplexP2LocalBasis< D, R, dim > > > Traits
 
│ │ │ │

│ │ │ │ @@ -297,15 +297,15 @@ │ │ │ │

│ │ │ │
│ │ │ │
Todo:
Please doc me !
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01773.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::HierarchicalSimplexP2LocalBasis< D, R, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalp2/hierarchicalsimplexp2localbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalp2/hierarchicalsimplexp2localbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 HierarchicalSimplexP2LocalBasis ()
 
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01777.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::HierarchicalSimplexP2LocalBasis< D, R, 1 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Hierarchical P2 basis in 1d. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalp2/hierarchicalsimplexp2localbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalp2/hierarchicalsimplexp2localbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef 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
 
│ │ │ │ @@ -327,15 +327,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01781.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::HierarchicalSimplexP2LocalBasis< D, R, 2 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Hierarchical P2 basis in 2d. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalp2/hierarchicalsimplexp2localbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalp2/hierarchicalsimplexp2localbasis.hh>

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef 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
 
│ │ │ │ @@ -331,15 +331,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01785.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::HierarchicalSimplexP2LocalBasis< D, R, 3 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Hierarchical P2 basis in 3d. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalp2/hierarchicalsimplexp2localbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalp2/hierarchicalsimplexp2localbasis.hh>

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef 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
 
│ │ │ │ @@ -335,15 +335,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01789.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::HierarchicalSimplexP2LocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalp2/hierarchicalsimplexp2localinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalp2/hierarchicalsimplexp2localinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::HierarchicalSimplexP2LocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -144,15 +144,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01793.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::HierarchicalP2WithElementBubbleLocalFiniteElement< D, R, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, dim >, HierarchicalSimplexP2WithElementBubbleLocalCoefficients< dim >, HierarchicalSimplexP2WithElementBubbleLocalInterpolation< HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, dim > > > Traits
 
│ │ │ │

│ │ │ │ @@ -297,15 +297,15 @@ │ │ │ │

│ │ │ │
│ │ │ │
Todo:
Please doc me !
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01797.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 HierarchicalSimplexP2WithElementBubbleLocalBasis ()
 
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01801.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, 1 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Hierarchical P2 basis in 1d. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef 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
 
│ │ │ │ @@ -323,15 +323,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01805.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, 2 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Hierarchical P2 basis in 1d. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef 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
 
│ │ │ │ @@ -324,15 +324,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01809.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, 3 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Hierarchical P2 basis in 1d. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef 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
 
│ │ │ │ @@ -324,15 +324,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01813.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients< dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

The local finite element needed for the Zou-Kornhuber estimator for Signorini problems. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -202,15 +202,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of coefficients

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01817.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::HierarchicalSimplexP2WithElementBubbleLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::HierarchicalSimplexP2WithElementBubbleLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -140,15 +140,15 @@ │ │ │ │ │ │ │ │

Local interpolation of a function.

│ │ │ │
Todo:
Hack: extract the proper types
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01821.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::HierarchicalPrismP2LocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalprismp2.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalprismp2.hh>

│ │ │ │

│ │ │ │ Public Member Functions

 HierarchicalSimplexP2WithElementBubbleLocalCoefficients ()
 Standard constructor.
 
size_t size () const
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< HierarchicalPrismP2LocalBasis< D, R >, Impl::LagrangePrismLocalCoefficients< 2 >, HierarchicalPrismP2LocalInterpolation< HierarchicalPrismP2LocalBasis< D, R > > > Traits
 
│ │ │ │

│ │ │ │ @@ -297,15 +297,15 @@ │ │ │ │

│ │ │ │
│ │ │ │
Todo:
Please doc me !
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01825.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::HierarchicalPrismP2LocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalprismp2/hierarchicalprismp2localbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalprismp2/hierarchicalprismp2localbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef 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
 
│ │ │ │ @@ -308,15 +308,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01829.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::HierarchicalPrismP2LocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/hierarchical/hierarchicalprismp2/hierarchicalprismp2localinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/hierarchical/hierarchicalprismp2/hierarchicalprismp2localinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::HierarchicalPrismP2LocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -144,15 +144,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01833.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::LagrangeLocalFiniteElement< LP, dimDomain, D, R, SF, CF > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Lagrange local finite elements for a given set of interpolation points. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LagrangeLocalFiniteElement< LP, dimDomain, D, R, SF, CF >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -493,15 +493,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01837.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Attributes | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::LagrangePoint< F, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/emptypoints.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/emptypoints.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -300,15 +300,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef F Field
 
typedef FieldVector< Field, dimensionVector
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01841.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::EmptyPointSet< F, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/emptypoints.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/emptypoints.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::EmptyPointSet< F, dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -450,15 +450,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01845.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::EquidistantPointSet< F, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/equidistantpoints.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/equidistantpoints.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::EquidistantPointSet< F, dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -612,15 +612,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01849.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::LagrangeInterpolationFactory< LP, dim, F > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/interpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/interpolation.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -256,15 +256,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LagrangeCoefficientsFactory< LP, dim, F > LagrangePointSetFactory
 
typedef LagrangePointSetFactory::Object LagrangePointSet
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01853.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::LocalLagrangeInterpolation< LP, dim, F > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/interpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/interpolation.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -273,15 +273,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LP< F, dim > LagrangePointSet
 
typedef LagrangePointSet::Field Field
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01857.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::LagrangeBasisFactory< LP, dim, SF, CF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/lagrangebasis.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/lagrangebasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LagrangeBasisFactory< LP, dim, SF, CF >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -500,15 +500,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01861.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Attributes | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::LagrangeCoefficientsFactory< LP, dim, F > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/lagrangecoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/lagrangecoefficients.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef std::size_t Key
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -222,15 +222,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01877.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::LagrangeCubeLocalFiniteElement< D, R, dim, k > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/lagrangecube.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/lagrangecube.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LagrangeCubeLocalFiniteElement< D, R, dim, k >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -332,15 +332,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

The reference element that the local finite element is defined on.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01913.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::LagrangePrismLocalFiniteElement< D, R, k > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Lagrange finite element for 3d prisms with arbitrary compile-time polynomial order. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/lagrangeprism.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/lagrangeprism.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

using Traits = LocalFiniteElementTraits< Impl::LagrangePrismLocalBasis< D, R, k >, Impl::LagrangePrismLocalCoefficients< k >, Impl::LagrangePrismLocalInterpolation< Impl::LagrangePrismLocalBasis< D, R, k > > >
 Export number types, dimensions, etc.
 
│ │ │ │ @@ -321,15 +321,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

The reference element that the local finite element is defined on.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01929.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::LagrangePyramidLocalFiniteElement< D, R, k > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/lagrangepyramid.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/lagrangepyramid.hh>

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

using Traits = LocalFiniteElementTraits< Impl::LagrangePyramidLocalBasis< D, R, k >, Impl::LagrangePyramidLocalCoefficients< k >, Impl::LagrangePyramidLocalInterpolation< Impl::LagrangePyramidLocalBasis< D, R, k > > >
 Export number types, dimensions, etc.
 
│ │ │ │ @@ -335,15 +335,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

The reference element that the local finite element is defined on.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01945.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::LagrangeSimplexLocalFiniteElement< D, R, d, k > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/lagrangesimplex.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/lagrangesimplex.hh>

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

using Traits = LocalFiniteElementTraits< Impl::LagrangeSimplexLocalBasis< D, R, d, k >, Impl::LagrangeSimplexLocalCoefficients< d, k >, Impl::LagrangeSimplexLocalInterpolation< Impl::LagrangeSimplexLocalBasis< D, R, d, k > > >
 Export number types, dimensions, etc.
 
│ │ │ │ @@ -354,15 +354,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

The reference element that the local finite element is defined on.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01949.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::P0LocalFiniteElement< D, R, d > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

The local p0 finite element on all types of reference elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/p0.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/p0.hh>

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< P0LocalBasis< D, R, d >, P0LocalCoefficients, P0LocalInterpolation< P0LocalBasis< D, R, d > > > Traits
 
│ │ │ │

│ │ │ │ @@ -305,15 +305,15 @@ │ │ │ │

│ │ │ │
│ │ │ │
Todo:
Please doc me !
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file:
    │ │ │ │ -
  • p0.hh
  • │ │ │ │ +
  • p0.hh
  • │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01953.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::P0LocalBasis< D, R, d > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Constant shape function. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/p0/p0localbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/p0/p0localbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef 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
 
│ │ │ │ @@ -331,15 +331,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01957.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::P0LocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for P0 elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/p0/p0localcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/p0/p0localcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::P0LocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01961.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::P0LocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/p0/p0localinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/p0/p0localinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::P0LocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

determine coefficients interpolating a given function

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01965.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::Pk1DFiniteElement< Geometry, RF, k > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Langrange finite element of arbitrary order on triangles. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/pk1d.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/pk1d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Pk1DFiniteElement< Geometry, RF, k >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -284,15 +284,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01969.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::Pk1DFiniteElement< Geometry, RF, k >::Traits Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/pk1d.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/pk1d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Pk1DFiniteElement< Geometry, RF, k >::Traits:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -147,15 +147,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01973.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::Pk1DFiniteElementFactory< Geometry, RF, k > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Factory for Pk1DFiniteElement objects. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/pk1d.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/pk1d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Pk1DFiniteElementFactory< Geometry, RF, k >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -402,15 +402,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

create a finite element from a vertex ordering

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01977.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::Pk2DFiniteElement< Geometry, RF, k > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Langrange finite element of arbitrary order on triangles. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/pk2d.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/pk2d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Pk2DFiniteElement< Geometry, RF, k >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -284,15 +284,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01981.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::Pk2DFiniteElement< Geometry, RF, k >::Traits Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/pk2d.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/pk2d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Pk2DFiniteElement< Geometry, RF, k >::Traits:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -147,15 +147,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01985.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::Pk2DFiniteElementFactory< Geometry, RF, k > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Factory for Pk2DFiniteElement objects. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/pk2d.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/pk2d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Pk2DFiniteElementFactory< Geometry, RF, k >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -402,15 +402,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

create a finite element from a vertex ordering

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01989.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::PQ22DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/pq22d.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/pq22d.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

using Traits = typename LFEVariant::Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -325,15 +325,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01993.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::DimSpecificPQkLocalFiniteElementFactory< D, R, d, k > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Factory that only creates dimension specific local finite elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/pqkfactory.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/pqkfactory.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef P0LocalFiniteElement< D, R, d >::Traits::LocalBasisType::Traits T
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -146,15 +146,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

create finite element for given GeometryType

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a01997.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::DimSpecificPQkLocalFiniteElementFactory< D, R, 3, k > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Factory that only creates dimension specific local finite elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/pqkfactory.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/pqkfactory.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -218,15 +218,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

create finite element for given GeometryType

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02001.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::PQkLocalFiniteElementFactory< D, R, dim, k > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Factory to create any kind of Pk/Qk like element wrapped for the virtual interface. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/pqkfactory.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/pqkfactory.hh>

│ │ │ │

│ │ │ │ Public Types

typedef P0LocalFiniteElement< D, R, 3 >::Traits::LocalBasisType::Traits T
 
using PrismP1 = LagrangePrismLocalFiniteElement< D, R, 1 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -217,15 +217,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

create finite element for given GeometryType

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02005.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::PQkLocalFiniteElementCache< D, R, dim, k > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A cache that stores all available Pk/Qk like local finite elements for the given dimension and order. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/pqkfactory.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/pqkfactory.hh>

│ │ │ │

│ │ │ │ Public Types

typedef P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T
 
typedef LocalFiniteElementVirtualInterface< TFiniteElementType
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef FE FiniteElementType
 Type of the finite elements stored in this cache.
 
│ │ │ │ @@ -366,15 +366,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02009.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::Q1FiniteElementFactory< Geometry, RF > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Factory for global-valued Q1 elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/q1.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/q1.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Q1FiniteElementFactory< Geometry, RF >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -428,15 +428,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

create a finite element from a vertex ordering

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file:
    │ │ │ │ -
  • q1.hh
  • │ │ │ │ +
  • q1.hh
  • │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02013.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::Q2FiniteElementFactory< Geometry, RF > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Factory for global-valued Q23D elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/lagrange/q2.hh>

│ │ │ │ +

#include <dune/localfunctions/lagrange/q2.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Q2FiniteElementFactory< Geometry, RF >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -428,15 +428,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

create a finite element from a vertex ordering

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file:
    │ │ │ │ -
  • q2.hh
  • │ │ │ │ +
  • q2.hh
  • │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02017.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::PowerFiniteElement< Backend, dimR > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Meta-finite element turning a scalar finite element into vector-valued one. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/meta/power.hh>

│ │ │ │ +

#include <dune/localfunctions/meta/power.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Traits
 types of component objects More...
 
│ │ │ │ @@ -303,15 +303,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Extract geometry type of this finite element.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02021.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::PowerFiniteElement< Backend, dimR >::Traits Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

types of component objects │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/meta/power.hh>

│ │ │ │ +

#include <dune/localfunctions/meta/power.hh>

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -152,15 +152,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

type of the Interpolation

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02025.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::PowerFiniteElementFactory< BackendFiniteElement, dimR > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Factory for meta-finite elements turning scalar finite elements into vector-valued ones. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/meta/power.hh>

│ │ │ │ +

#include <dune/localfunctions/meta/power.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::PowerFiniteElementFactory< BackendFiniteElement, dimR >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -200,15 +200,15 @@ │ │ │ │ │ │ │ │

create a finite element

│ │ │ │
Note
With this overload of make() ownership of the backend finite element is determined by the shared_ptr.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02029.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::PowerBasis< Backend, dimR > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Meta-basis turning a scalar basis into vector-valued basis. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/meta/power/basis.hh>

│ │ │ │ +

#include <dune/localfunctions/meta/power/basis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::PowerBasis< Backend, dimR >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -352,15 +352,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Number of shape functions.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02033.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::PowerBasis< Backend, dimR >::Traits Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

types of domain and range │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/meta/power/basis.hh>

│ │ │ │ +

#include <dune/localfunctions/meta/power/basis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::PowerBasis< Backend, dimR >::Traits:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -176,15 +176,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Dimension of the range values.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02037.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::PowerCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Meta-coefficients turning a scalar coefficients into vector-valued coefficients. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/meta/power/coefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/meta/power/coefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::PowerCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -212,15 +212,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of coefficients

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02041.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::PowerInterpolation< Backend, BasisTraits > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Meta-interpolation turning a scalar interpolation into vector-valued interpolation. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/meta/power/interpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/meta/power/interpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::PowerInterpolation< Backend, BasisTraits >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -226,15 +226,15 @@ │ │ │ │

│ │ │ │ Public Types

typedef PowerBasis< typename Backend::Traits::Basis, dimR > Basis
 type of the Basis
 
typedef PowerCoefficients Coefficients
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02049.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::MimeticLocalFiniteElement< D, R, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/mimetic.hh>

│ │ │ │ +

#include <dune/localfunctions/mimetic.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Dune::LocalFiniteElementTraits< MimeticLocalBasis< D, R, dim >, MimeticLocalCoefficients, MimeticLocalInterpolation< MimeticLocalBasis< D, R, dim > > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -332,15 +332,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02053.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::MimeticLocalBasis< D, R, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/mimetic/mimeticall.hh>

│ │ │ │ +

#include <dune/localfunctions/mimetic/mimeticall.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Dune::LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -362,15 +362,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02057.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::MimeticLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/mimetic/mimeticall.hh>

│ │ │ │ +

#include <dune/localfunctions/mimetic/mimeticall.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::MimeticLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -139,15 +139,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Local interpolation of a function.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02061.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::MimeticLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

! │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/mimetic/mimeticall.hh>

│ │ │ │ +

#include <dune/localfunctions/mimetic/mimeticall.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::MimeticLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -252,15 +252,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02065.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::MonomialLocalFiniteElement< D, R, d, p > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Monomial basis for discontinuous Galerkin methods. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/monomial.hh>

│ │ │ │ +

#include <dune/localfunctions/monomial.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< MonomialLocalBasis< D, R, d, p >, MonomialLocalCoefficients< static_size >, MonomialLocalInterpolation< MonomialLocalBasis< D, R, d, p >, static_size > > Traits
 
│ │ │ │

│ │ │ │ @@ -309,15 +309,15 @@ │ │ │ │

│ │ │ │
│ │ │ │
Todo:
Please doc me !
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02069.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::MonomialFiniteElementFactory< Geometry, RF, p > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Factory for global-valued MonomFiniteElement objects. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/monomial.hh>

│ │ │ │ +

#include <dune/localfunctions/monomial.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::MonomialFiniteElementFactory< Geometry, RF, p >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -515,15 +515,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

create a finite element from a vertex ordering

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02073.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::MonomImp::EvalAccess< Traits > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access output vector of evaluateFunction() and evaluate() │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/monomial/monomiallocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/monomial/monomiallocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -179,15 +179,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 EvalAccess (std::vector< typename Traits::RangeType > &out_)
 
 ~EvalAccess ()
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02077.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::MonomImp::JacobianAccess< Traits > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access output vector of evaluateJacobian() │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/monomial/monomiallocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/monomial/monomiallocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -189,15 +189,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 JacobianAccess (std::vector< typename Traits::JacobianType > &out_, unsigned int row_)
 
 ~JacobianAccess ()
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02081.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::MonomImp::Evaluate< Traits, c > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/monomial/monomiallocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/monomial/monomiallocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

template<typename Access >
static void eval (const typename Traits::DomainType &in, const std::array< unsigned int, Traits::dimDomain > &derivatives, typename Traits::RangeFieldType prod, int bound, int &index, Access &access)
 
│ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

The next dimension to try for factors.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02085.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::MonomImp::Evaluate< Traits, 1 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

│ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/monomial/monomiallocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/monomial/monomiallocalbasis.hh>

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

template<typename Access >
static void eval (const typename Traits::DomainType &in, const std::array< unsigned int, Traits::dimDomain > &derivatives, typename Traits::RangeFieldType prod, int bound, int &index, Access &access)
 
│ │ │ │ @@ -208,15 +208,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02089.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::MonomialLocalBasis< D, R, d, p > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Constant shape function. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/monomial/monomiallocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/monomial/monomiallocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef 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
 
│ │ │ │ @@ -337,15 +337,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Number of shape functions.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02093.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::MonomialLocalCoefficients< static_size > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for monomial finite elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/monomial/monomiallocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/monomial/monomiallocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::MonomialLocalCoefficients< static_size >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -234,15 +234,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02097.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::MonomialLocalInterpolation< LB, size > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/monomial/monomiallocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/monomial/monomiallocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::MonomialLocalInterpolation< LB, size >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -181,15 +181,15 @@ │ │ │ │ │ │ │ │

Determine coefficients interpolating a given function.

│ │ │ │

The method computes the coefficients for the L^2 projection with respect to the given GeometryType. Be careful: the implementation is unstable for higher polynomial degrees.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02113.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::Nedelec1stKindCubeLocalFiniteElement< D, R, dim, k > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Nédélec elements of the first kind for cube elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/nedelec/nedelec1stkindcube.hh>

│ │ │ │ +

#include <dune/localfunctions/nedelec/nedelec1stkindcube.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

using Traits = LocalFiniteElementTraits< Impl::Nedelec1stKindCubeLocalBasis< D, R, dim, k >, Impl::Nedelec1stKindCubeLocalCoefficients< dim, k >, Impl::Nedelec1stKindCubeLocalInterpolation< Impl::Nedelec1stKindCubeLocalBasis< D, R, dim, k > > >
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -346,15 +346,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02129.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::Nedelec1stKindSimplexLocalFiniteElement< D, R, dim, k > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Nédélec elements of the first kind for simplex elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/nedelec/nedelec1stkindsimplex.hh>

│ │ │ │ +

#include <dune/localfunctions/nedelec/nedelec1stkindsimplex.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

using Traits = LocalFiniteElementTraits< Impl::Nedelec1stKindSimplexLocalBasis< D, R, dim, k >, Impl::Nedelec1stKindSimplexLocalCoefficients< dim, k >, Impl::Nedelec1stKindSimplexLocalInterpolation< Impl::Nedelec1stKindSimplexLocalBasis< D, R, dim, k > > >
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -346,15 +346,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02133.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::NedelecBasisFactory< dim, SF, CF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::NedelecBasisFactory< dim, SF, CF >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -500,15 +500,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02137.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::NedelecL2InterpolationFactory< dim, Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexinterpolation.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -256,15 +256,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef NedelecL2InterpolationBuilder< dim, Field > Builder
 
typedef const NedelecL2Interpolation< dim, Field > Object
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02141.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::LocalCoefficientsContainer Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexinterpolation.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -256,16 +256,16 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

template<class Setter >
 LocalCoefficientsContainer (const Setter &setter)
 
const LocalKeylocalKey (const unsigned int i) const
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02145.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::NedelecCoefficientsFactory< dim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexinterpolation.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -220,15 +220,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef std::size_t Key
 
typedef const LocalCoefficientsContainer Object
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02149.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::NedelecL2InterpolationBuilder< dim, Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::NedelecL2InterpolationBuilder< dim, Field >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -768,15 +768,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02169.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::NedelecL2Interpolation< dimension, F > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

An L2-based interpolation for Nedelec. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::NedelecL2Interpolation< dimension, F >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -494,15 +494,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02173.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Attributes | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::NedelecVecMatrix< geometryId, Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexprebasis.hh>

│ │ │ │ +

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexprebasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -400,15 +400,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef MultiIndex< dim, Field > MI
 
typedef MonomialBasis< geometryId, MIMIBasis
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02177.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::NedelecPreBasisFactory< dim, Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexprebasis.hh>

│ │ │ │ +

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexprebasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  EvaluationBasisFactory
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -265,15 +265,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02181.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::NedelecPreBasisFactory< dim, Field >::EvaluationBasisFactory< dd, FF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexprebasis.hh>

│ │ │ │ +

#include <dune/localfunctions/nedelec/nedelecsimplex/nedelecsimplexprebasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef MonomialBasisProvider< dd, FF > Type
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02185.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::OrthonormalLocalFiniteElement< dimDomain, D, R, SF, CF > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A class providing orthonormal basis functions. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/orthonormal.hh>

│ │ │ │ +

#include <dune/localfunctions/orthonormal.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::OrthonormalLocalFiniteElement< dimDomain, D, R, SF, CF >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -488,15 +488,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02189.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::OrthonormalBasisFactory< dim, SF, CF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/orthonormal/orthonormalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/orthonormal/orthonormalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  EvaluationBasisFactory
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -376,15 +376,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02193.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::OrthonormalBasisFactory< dim, SF, CF >::EvaluationBasisFactory< dd, FF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/orthonormal/orthonormalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/orthonormal/orthonormalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef MonomialBasisProvider< dd, FF > Type
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02197.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
ONBCompute::Integral< geometryId > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/orthonormal/orthonormalcompute.hh>

│ │ │ │ +

#include <dune/localfunctions/orthonormal/orthonormalcompute.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -299,15 +299,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

template<int dim, class scalar_t >
static int compute (const Dune::MultiIndex< dim, scalar_t > &alpha, scalar_t &p, scalar_t &q)
 
template<int dim, class scalar_t , int ... ints>
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02201.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
ONBCompute::ONBMatrix< geometryId, scalar_t > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/orthonormal/orthonormalcompute.hh>

│ │ │ │ +

#include <dune/localfunctions/orthonormal/orthonormalcompute.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for ONBCompute::ONBMatrix< geometryId, scalar_t >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -539,15 +539,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02209.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::RannacherTurek2DLocalBasis< D, R > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/rannacherturek/rannacherturek2d/rannacherturek2dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/rannacherturek/rannacherturek2d/rannacherturek2dlocalbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RannacherTurek2DLocalBasis< D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -315,15 +315,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02213.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::RannacherTurek3DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/rannacherturek/rannacherturek3d/rannacherturek3dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/rannacherturek/rannacherturek3d/rannacherturek3dlocalbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RannacherTurek3DLocalBasis< D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -315,15 +315,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02217.html │ │ │ │ @@ -87,15 +87,15 @@ │ │ │ │ Dtype to represent the field in the domain. │ │ │ │ Rtype to represent the field in the range. │ │ │ │ ddomain dimension │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02221.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::RannacherTurekLocalBasis< D, R, 2 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/rannacherturek/rannachertureklocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/rannacherturek/rannachertureklocalbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RannacherTurekLocalBasis< D, R, 2 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -323,15 +323,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02225.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::RannacherTurekLocalBasis< D, R, 3 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/rannacherturek/rannachertureklocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/rannacherturek/rannachertureklocalbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RannacherTurekLocalBasis< D, R, 3 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -323,15 +323,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02229.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RannacherTurekLocalCoefficients< d > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

layout for Rannacher-Turek elements │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/rannacherturek/rannachertureklocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/rannacherturek/rannachertureklocalcoefficients.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -250,15 +250,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of coefficients

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02233.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RannacherTurekLocalInterpolation< D, R, d > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

please doc me │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/rannacherturek/rannachertureklocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/rannacherturek/rannachertureklocalinterpolation.hh>

│ │ │ │

│ │ │ │ Public Member Functions

 RannacherTurekLocalCoefficients ()
 
 RannacherTurekLocalCoefficients (const RannacherTurekLocalCoefficients &other)
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

template<class F , class C >
void interpolate (const F &ff, std::vector< C > &out) const
 
│ │ │ │ @@ -140,15 +140,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02237.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RT02DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Zero order Raviart-Thomas shape functions on triangles. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas02d.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas02d.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< RT02DLocalBasis< D, R >, RT02DLocalCoefficients, RT02DLocalInterpolation< RT02DLocalBasis< D, R > > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -340,15 +340,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02241.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT02DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Lowest order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas02d/raviartthomas02dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas02d/raviartthomas02dlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -352,15 +352,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02245.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT02DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for RT0 elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas02d/raviartthomas02dlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas02d/raviartthomas02dlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT02DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02249.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::RT02DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas02d/raviartthomas02dlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas02d/raviartthomas02dlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT02DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02253.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RT03DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Zero order Raviart-Thomas shape functions on tetrahedra. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas03d.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas03d.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< RT03DLocalBasis< D, R >, RT03DLocalCoefficients, RT03DLocalInterpolation< RT03DLocalBasis< D, R > > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -340,15 +340,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02257.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT03DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Lowest order Raviart-Thomas shape functions on the reference tetrahedron. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas03d/raviartthomas03dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas03d/raviartthomas03dlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -352,15 +352,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02261.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT03DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for RT0 elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas03d/raviartthomas03dlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas03d/raviartthomas03dlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT03DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02265.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::RT03DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas03d/raviartthomas03dlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas03d/raviartthomas03dlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT03DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02269.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RT0Cube2DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Zero order Raviart-Thomas shape functions on rectangles. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0cube2d.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0cube2d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT0Cube2DLocalFiniteElement< D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -341,15 +341,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02273.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT0Cube2DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0cube2d/raviartthomas0cube2dall.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0cube2d/raviartthomas0cube2dall.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -352,15 +352,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02277.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RT0Cube2DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0cube2d/raviartthomas0cube2dall.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0cube2d/raviartthomas0cube2dall.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT0Cube2DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -182,15 +182,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02281.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT0Cube2DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for RT0 elements on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0cube2d/raviartthomas0cube2dall.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0cube2d/raviartthomas0cube2dall.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT0Cube2DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02289.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT0Cube3DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Lowest order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0cube3d/raviartthomas0cube3dall.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0cube3d/raviartthomas0cube3dall.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -352,15 +352,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02293.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RT0Cube3DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Lowest order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0cube3d/raviartthomas0cube3dall.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0cube3d/raviartthomas0cube3dall.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT0Cube3DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -182,15 +182,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02297.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT0Cube3DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for RT0 elements on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0cube3d/raviartthomas0cube3dall.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0cube3d/raviartthomas0cube3dall.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT0Cube3DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02301.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RT0PrismLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on prisms. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0prism.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0prism.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< RT0PrismLocalBasis< D, R >, RT0PrismLocalCoefficients, RT0PrismLocalInterpolation< RT0PrismLocalBasis< D, R > > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -343,15 +343,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02305.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT0PrismLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0prism/raviartthomas0prismlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0prism/raviartthomas0prismlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -372,15 +372,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02309.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT0PrismLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Raviart-Thomas-1 elements on prisms. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0prism/raviartthomas0prismlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0prism/raviartthomas0prismlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT0PrismLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02313.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RT0PrismLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0prism/raviartthomas0prismlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0prism/raviartthomas0prismlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT0PrismLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02317.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RT0PyramidLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on pyramids. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0pyramid.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0pyramid.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< RT0PyramidLocalBasis< D, R >, RT0PyramidLocalCoefficients, RT0PyramidLocalInterpolation< RT0PyramidLocalBasis< D, R > > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -343,15 +343,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02321.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT0PyramidLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on the reference pyramid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0pyramid/raviartthomas0pyramidlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0pyramid/raviartthomas0pyramidlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -372,15 +372,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02325.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT0PyramidLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Raviart-Thomas-1 elements on pyramids. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0pyramid/raviartthomas0pyramidlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0pyramid/raviartthomas0pyramidlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT0PyramidLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02329.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RT0PyramidLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas0pyramid/raviartthomas0pyramidlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas0pyramid/raviartthomas0pyramidlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT0PyramidLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02333.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RT12DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on triangles. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas12d.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas12d.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< RT12DLocalBasis< D, R >, RT12DLocalCoefficients, RT12DLocalInterpolation< RT12DLocalBasis< D, R > > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -343,15 +343,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02337.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT12DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas12d/raviartthomas12dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas12d/raviartthomas12dlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -372,15 +372,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02341.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RT12DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Raviart-Thomas-1 elements on the reference triangle. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas12d/raviartthomas12dlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas12d/raviartthomas12dlocalcoefficients.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -180,15 +180,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of coefficients

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02345.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RT12DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas12d/raviartthomas12dlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas12d/raviartthomas12dlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT12DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │

│ │ │ │ Public Member Functions

 RT12DLocalCoefficients ()
 Standard constructor.
 
std::size_t size () const
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02349.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RT1Cube2DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas1cube2d.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas1cube2d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT1Cube2DLocalFiniteElement< D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -353,15 +353,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02353.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT1Cube2DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas1cube2d/raviartthomas1cube2dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas1cube2d/raviartthomas1cube2dlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -372,15 +372,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02357.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT1Cube2DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas1cube2d/raviartthomas1cube2dlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas1cube2d/raviartthomas1cube2dlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT1Cube2DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02361.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RT1Cube2DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas1cube2d/raviartthomas1cube2dlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas1cube2d/raviartthomas1cube2dlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT1Cube2DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02365.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RT1Cube3DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on cubes. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas1cube3d.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas1cube3d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT1Cube3DLocalFiniteElement< D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -353,15 +353,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02369.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT1Cube3DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas1cube3d/raviartthomas1cube3dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas1cube3d/raviartthomas1cube3dlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -372,15 +372,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02373.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT1Cube3DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas1cube3d/raviartthomas1cube3dlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas1cube3d/raviartthomas1cube3dlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT1Cube3DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02377.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RT1Cube3DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas1cube3d/raviartthomas1cube3dlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas1cube3d/raviartthomas1cube3dlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT1Cube3DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02381.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RT2Cube2DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Second order Raviart-Thomas shape functions on cubes. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas2cube2d.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas2cube2d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT2Cube2DLocalFiniteElement< D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -353,15 +353,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02385.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT2Cube2DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas2cube2d/raviartthomas2cube2dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas2cube2d/raviartthomas2cube2dlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -372,15 +372,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02389.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT2Cube2DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Raviart-Thomas-2 elements on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas2cube2d/raviartthomas2cube2dlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas2cube2d/raviartthomas2cube2dlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT2Cube2DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02393.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RT2Cube2DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas2cube2d/raviartthomas2cube2dlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas2cube2d/raviartthomas2cube2dlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT2Cube2DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02397.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RT3Cube2DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Second order Raviart-Thomas shape functions on cubes. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas3cube2d.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas3cube2d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT3Cube2DLocalFiniteElement< D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -354,15 +354,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02401.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT3Cube2DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas3cube2d/raviartthomas3cube2dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas3cube2d/raviartthomas3cube2dlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -372,15 +372,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02405.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT3Cube2DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Raviart-Thomas-3 elements on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas3cube2d/raviartthomas3cube2dlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas3cube2d/raviartthomas3cube2dlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT3Cube2DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02409.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RT3Cube2DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas3cube2d/raviartthomas3cube2dlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas3cube2d/raviartthomas3cube2dlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT3Cube2DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02413.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RT4Cube2DLocalFiniteElement< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Second order Raviart-Thomas shape functions on cubes. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas4cube2d.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas4cube2d.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT4Cube2DLocalFiniteElement< D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -354,15 +354,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02417.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT4Cube2DLocalBasis< D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas4cube2d/raviartthomas4cube2dlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas4cube2d/raviartthomas4cube2dlocalbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -372,15 +372,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02421.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RT4Cube2DLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for Raviart-Thomas-4 elements on quadrilaterals. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas4cube2d/raviartthomas4cube2dlocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas4cube2d/raviartthomas4cube2dlocalcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT4Cube2DLocalCoefficients:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02425.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RT4Cube2DLocalInterpolation< LB > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomas4cube2d/raviartthomas4cube2dlocalinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomas4cube2d/raviartthomas4cube2dlocalinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RT4Cube2DLocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02429.html │ │ │ │ @@ -89,15 +89,15 @@ │ │ │ │ Rtype to represent the field in the range. │ │ │ │ dimdimension of the reference elements, must be 2 or 3. │ │ │ │ orderorder of the element, depending on dim it can be 0, 1, or 2. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02433.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 0 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Raviart-Thomas local finite elements for cubes with dimension 2 and order 0. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 0 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -342,15 +342,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02437.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 1 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Raviart-Thomas local finite elements for cubes with dimension 2 and order 1. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 1 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -342,15 +342,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02441.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 2 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Raviart-Thomas local finite elements for cubes with dimension 2 and order 2. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 2 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -342,15 +342,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02445.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 3 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Raviart-Thomas local finite elements for cubes with dimension 2 and order 3. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 3 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -342,15 +342,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02449.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 4 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Raviart-Thomas local finite elements for cubes with dimension 2 and order 4. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 4 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -342,15 +342,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02453.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RaviartThomasCubeLocalFiniteElement< D, R, 3, 0 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Raviart-Thomas local finite elements for cubes with dimension 3 and order 0. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RaviartThomasCubeLocalFiniteElement< D, R, 3, 0 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -342,15 +342,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02457.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RaviartThomasCubeLocalFiniteElement< D, R, 3, 1 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Raviart-Thomas local finite elements for cubes with dimension 3 and order 1. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RaviartThomasCubeLocalFiniteElement< D, R, 3, 1 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -342,15 +342,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02485.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RaviartThomasSimplexLocalFiniteElement< dimDomain, D, R, SF, CF > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

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

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomassimplex.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomassimplex.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RaviartThomasSimplexLocalFiniteElement< dimDomain, D, R, SF, CF >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -488,15 +488,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02489.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::RaviartThomasBasisFactory< dim, SF, CF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RaviartThomasBasisFactory< dim, SF, CF >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -500,15 +500,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02493.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::RaviartThomasL2InterpolationFactory< dim, Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexinterpolation.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -256,15 +256,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef RTL2InterpolationBuilder< dim, Field > Builder
 
typedef const RaviartThomasL2Interpolation< dim, Field > Object
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02497.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::RaviartThomasCoefficientsFactory< dim > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexinterpolation.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -220,15 +220,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef std::size_t Key
 
typedef const LocalCoefficientsContainer Object
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02501.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::RTL2InterpolationBuilder< dim, Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RTL2InterpolationBuilder< dim, Field >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -548,15 +548,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02509.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RaviartThomasL2Interpolation< dimension, F > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

An L2-based interpolation for Raviart Thomas. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RaviartThomasL2Interpolation< dimension, F >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -417,15 +417,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02513.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Attributes | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::RTVecMatrix< geometryId, Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexprebasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexprebasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -400,15 +400,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef MultiIndex< dim, Field > MI
 
typedef MonomialBasis< geometryId, MIMIBasis
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02517.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::RTPreBasisFactory< dim, Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexprebasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexprebasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  EvaluationBasisFactory
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -265,15 +265,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02521.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::RTPreBasisFactory< dim, Field >::EvaluationBasisFactory< dd, FF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexprebasis.hh>

│ │ │ │ +

#include <dune/localfunctions/raviartthomas/raviartthomassimplex/raviartthomassimplexprebasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef MonomialBasisProvider< dd, FF > Type
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02525.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Protected Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::RefinedSimplexLocalBasis< D, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/common/refinedsimplexlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/common/refinedsimplexlocalbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RefinedSimplexLocalBasis< D, dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -133,15 +133,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02529.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RefinedSimplexLocalBasis< D, 1 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Base class for LocalBasis classes based on uniform refinement in 1D; provides numbering and local coordinates of subelements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/common/refinedsimplexlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/common/refinedsimplexlocalbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RefinedSimplexLocalBasis< D, 1 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -241,15 +241,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02533.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RefinedSimplexLocalBasis< D, 2 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Base class for LocalBasis classes based on uniform refinement in 2D; provides numbering and local coordinates of subelements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/common/refinedsimplexlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/common/refinedsimplexlocalbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RefinedSimplexLocalBasis< D, 2 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -246,15 +246,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02537.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RefinedSimplexLocalBasis< D, 3 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Base class for LocalBasis classes based on uniform refinement in 3D; provides numbering and local coordinates of subelements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/common/refinedsimplexlocalbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/common/refinedsimplexlocalbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RefinedSimplexLocalBasis< D, 3 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -245,15 +245,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02541.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::RefinedP0LocalFiniteElement< D, R, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Local finite element that is piecewise P0 on a once uniformly refined reference geometry. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp0.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp0.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef P0LocalFiniteElement< D, R, dim >::Traits Traits
 
│ │ │ │

Detailed Description

│ │ │ │ @@ -107,15 +107,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02545.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RefinedP0LocalFiniteElement< D, R, 1 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Local finite element that is piecewise P0 on a once uniformly refined reference geometry. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp0.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp0.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 1 >, RefinedP0LocalCoefficients< 1 >, RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 1 > > > Traits
 
│ │ │ │

│ │ │ │ @@ -300,15 +300,15 @@ │ │ │ │

│ │ │ │
│ │ │ │
Todo:
Please doc me !
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02549.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RefinedP0LocalFiniteElement< D, R, 2 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Local finite element that is piecewise P0 on a once uniformly refined reference geometry. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp0.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp0.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 2 >, RefinedP0LocalCoefficients< 2 >, RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 2 > > > Traits
 
│ │ │ │

│ │ │ │ @@ -300,15 +300,15 @@ │ │ │ │

│ │ │ │
│ │ │ │
Todo:
Please doc me !
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02553.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RefinedP0LocalFiniteElement< D, R, 3 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Local finite element that is piecewise P0 on a once uniformly refined reference geometry. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp0.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp0.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 3 >, RefinedP0LocalCoefficients< 3 >, RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 3 > > > Traits
 
│ │ │ │

│ │ │ │ @@ -300,15 +300,15 @@ │ │ │ │

│ │ │ │
│ │ │ │
Todo:
Please doc me !
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02557.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RefinedP0LocalBasis< D, R, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Uniformly refined constant shape functions on a unit simplex in R^dim. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp0/refinedp0localbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp0/refinedp0localbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RefinedP0LocalBasis< D, R, dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -339,15 +339,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02561.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::RefinedP0LocalCoefficients< k > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Layout map for RefinedP0 elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp0/refinedp0localcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp0/refinedp0localcoefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RefinedP0LocalCoefficients< k >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -237,15 +237,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02565.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::RefinedP0LocalInterpolation< LB > Class Template Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp0/refinedp0localinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp0/refinedp0localinterpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RefinedP0LocalInterpolation< LB >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,15 +89,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02569.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 1 > > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp0/refinedp0localinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp0/refinedp0localinterpolation.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -156,15 +156,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 RefinedP0LocalInterpolation ()
 
template<typename F , typename C >
void interpolate (const F &ff, std::vector< C > &out) const
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02573.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 2 > > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp0/refinedp0localinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp0/refinedp0localinterpolation.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -156,15 +156,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 RefinedP0LocalInterpolation ()
 
template<typename F , typename C >
void interpolate (const F &ff, std::vector< C > &out) const
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02577.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 3 > > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp0/refinedp0localinterpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp0/refinedp0localinterpolation.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -156,15 +156,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 RefinedP0LocalInterpolation ()
 
template<typename F , typename C >
void interpolate (const F &ff, std::vector< C > &out) const
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02581.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::RefinedP1LocalFiniteElement< D, R, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Piecewise linear continuous Lagrange functions on a uniformly refined simplex element. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp1.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp1.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef 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.
 
│ │ │ │ @@ -320,15 +320,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

The element type that this finite element is defined on.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02585.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::RefinedP1LocalBasis< D, R, dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp1/refinedp1localbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp1/refinedp1localbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RefinedP1LocalBasis< D, R, dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -122,15 +122,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02589.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::RefinedP1LocalBasis< D, R, 1 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Uniformly refined linear Lagrange shape functions in 1D. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp1/refinedp1localbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp1/refinedp1localbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RefinedP1LocalBasis< D, R, 1 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -442,15 +442,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02593.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::RefinedP1LocalBasis< D, R, 2 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Uniformly refined linear Lagrange shape functions on the triangle. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp1/refinedp1localbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp1/refinedp1localbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RefinedP1LocalBasis< D, R, 2 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -446,15 +446,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02597.html │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │
Dune::RefinedP1LocalBasis< D, R, 3 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Uniformly refined linear Lagrange shape functions on the 3D-simplex (tetrahedron). │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/refined/refinedp1/refinedp1localbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/refined/refinedp1/refinedp1localbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::RefinedP1LocalBasis< D, R, 3 >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -445,15 +445,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02601.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::MonomialEvaluator< B > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/basisevaluator.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/basisevaluator.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::MonomialEvaluator< B >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -485,15 +485,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02605.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::MonomialEvaluator< B >::BaseIterator< Deriv > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/basisevaluator.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/basisevaluator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -494,15 +494,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Deriv Derivatives
 
typedef Deriv::Field Field
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02609.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::MonomialEvaluator< B >::Iterator< deriv > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/basisevaluator.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/basisevaluator.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -123,15 +123,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef BaseIterator< Derivatives< Field, dimension, dimRange, deriv, DerivativeLayoutNS::derivative > > All
 
typedef BaseIterator< Derivatives< Field, dimension, 1, 0, DerivativeLayoutNS::value > > Integrate
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02613.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::StandardEvaluator< B > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/basisevaluator.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/basisevaluator.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::StandardEvaluator< B >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -505,15 +505,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02617.html │ │ │ │ @@ -73,27 +73,27 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::StandardEvaluator< B >::Iterator< deriv > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/basisevaluator.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/basisevaluator.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::StandardEvaluator< B >::Iterator< deriv >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02621.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::BasisMatrix< PreBasis, Interpolation, Field > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02625.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::BasisMatrixBase< PreBasis, Interpolation, Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/basismatrix.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/basismatrix.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BasisMatrixBase< PreBasis, Interpolation, Field >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -546,15 +546,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02629.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::BasisMatrix< const MonomialBasis< geometryId, F >, Interpolation, Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/basismatrix.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/basismatrix.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BasisMatrix< const MonomialBasis< geometryId, F >, Interpolation, Field >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -572,15 +572,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02633.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::BasisMatrix< const Dune::VirtualMonomialBasis< dim, F >, Interpolation, Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/basismatrix.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/basismatrix.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BasisMatrix< const Dune::VirtualMonomialBasis< dim, F >, Interpolation, Field >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -572,15 +572,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02637.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::BasisMatrix< const PolynomialBasis< Eval, CM, D, R >, Interpolation, Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/basismatrix.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/basismatrix.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BasisMatrix< const PolynomialBasis< Eval, CM, D, R >, Interpolation, Field >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -574,15 +574,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02641.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::BasisMatrix< const PolynomialBasisWithMatrix< Eval, CM >, Interpolation, Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/basismatrix.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/basismatrix.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::BasisMatrix< const PolynomialBasisWithMatrix< Eval, CM >, Interpolation, Field >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -576,15 +576,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02645.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Mult< Field, Field2 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/coeffmatrix.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/coeffmatrix.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Field2 BasisEntry
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -152,15 +152,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02649.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Mult< Field, FieldVector< Field2, dimRange > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/coeffmatrix.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/coeffmatrix.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef FieldVector< Field2, dimRange > BasisEntry
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -152,15 +152,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02653.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::SparseCoeffMatrix< F, bSize > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/coeffmatrix.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/coeffmatrix.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::SparseCoeffMatrix< F, bSize >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -509,15 +509,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02657.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::Identity Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/defaultbasisfactory.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/defaultbasisfactory.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

template<class T >
static T apply (const T &t)
 
│ │ │ │ @@ -114,15 +114,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02661.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::DefaultBasisFactory< PreBFactory, InterpolFactory, dim, dimR, SF, CF, PreBasisKeyExtractor > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/defaultbasisfactory.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/defaultbasisfactory.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::DefaultBasisFactory< PreBFactory, InterpolFactory, dim, dimR, SF, CF, PreBasisKeyExtractor >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -453,15 +453,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02665.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::DefaultBasisFactory< PreBFactory, InterpolFactory, dim, dimR, SF, CF, PreBasisKeyExtractor >::EvaluationBasisFactory< dd, FF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/defaultbasisfactory.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/defaultbasisfactory.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef PreBasisFactory::template EvaluationBasisFactory< dd, FF >::Type Type
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02669.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::DGLocalCoefficients Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A class providing local coefficients for dg spaces. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/dglocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/dglocalcoefficients.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -175,15 +175,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 DGLocalCoefficients (const unsigned int n)
 construct local keys for n basis functions
 
const LocalKeylocalKey (const unsigned int i) const
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02673.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::DGLocalCoefficientsFactory< BasisFactory > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A factory class for the dg local coefficients. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/dglocalcoefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/dglocalcoefficients.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -224,15 +224,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef BasisFactory::Key Key
 
typedef const DGLocalCoefficients Object
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02677.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::Unity< Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A class representing the unit of a given Field. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 operator Field () const
 
│ │ │ │

Detailed Description

│ │ │ │ @@ -119,15 +119,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02681.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::Zero< Field > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A class representing the zero of a given Field. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 operator Field () const
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -152,15 +152,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02685.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::FieldCast< F2, V > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef F2 type
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -101,15 +101,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02689.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::FieldCast< F2, Dune::FieldVector< F1, dim > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Dune::FieldVector< F2, dim > type
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -101,15 +101,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02693.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::FieldCast< F2, Dune::FieldMatrix< F1, dim1, dim2 > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Dune::FieldMatrix< F2, dim1, dim2 > type
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -101,15 +101,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02697.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
Dune::Precision< Field > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02701.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Precision< double > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Attributes

static const unsigned int value = 64
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -107,15 +107,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02705.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Precision< long double > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Attributes

static const unsigned int value = 80
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -107,15 +107,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02709.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::Precision< float > Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Attributes

static const unsigned int value = 32
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -107,15 +107,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02713.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::ComputeField< Field, sum > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/field.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Field Type
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -101,15 +101,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02717.html │ │ │ │ @@ -75,15 +75,15 @@ │ │ │ │
│ │ │ │
│ │ │ │ Classes
│ │ │ │
Dune::InterpolationHelper< F, dimension > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/interpolationhelper.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/interpolationhelper.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::InterpolationHelper< F, dimension >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -99,15 +99,15 @@ │ │ │ │   │ │ │ │ struct  Helper< Basis, Matrix, false > │ │ │ │   │ │ │ │ struct  Helper< Func, Vector, true > │ │ │ │   │ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02721.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
Dune::InterpolationHelper< F, dimension >::Helper< Func, Container, type > Struct Template Reference
│ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02725.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::InterpolationHelper< F, dimension >::Helper< Func, Vector, true > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/interpolationhelper.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/interpolationhelper.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef std::vector< Dune::FieldVector< F, d > > Result
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -469,15 +469,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02729.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::InterpolationHelper< F, dimension >::Helper< Basis, Matrix, false > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/interpolationhelper.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/interpolationhelper.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef std::vector< Dune::FieldVector< F, d > > Result
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -476,15 +476,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02733.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │
template<class B, class Q, bool onb>
│ │ │ │ struct Dune::LocalL2Interpolation< B, Q, onb >

A local L2 interpolation taking a test basis and a quadrature rule.

│ │ │ │

This class computes a local interpolation where the coefficients are of the form: c = M^{-1}b

    │ │ │ │
  • M is the mass matrix with respect to the given basis and
  • │ │ │ │
  • b = int f phi (where phi are the basis functions). Thus the resulting local function u=c.varphi is defined through the l2 interpolation int u phi = in f phi for all phi in the base function set. The third template argument can be used to specify that the mass matrix is the unit matrix (onb=true).
  • │ │ │ │
│ │ │ │

The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02737.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::LocalL2InterpolationBase< B, Q > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/l2interpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/l2interpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalL2InterpolationBase< B, Q >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -418,15 +418,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02741.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::LocalL2Interpolation< B, Q, true > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/l2interpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/l2interpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalL2Interpolation< B, Q, true >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -389,15 +389,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02745.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::LocalL2Interpolation< B, Q, false > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/l2interpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/l2interpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LocalL2Interpolation< B, Q, false >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -340,15 +340,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02749.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::LocalL2InterpolationFactory< BasisFactory, onb > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A factory class for the local l2 interpolations taking a basis factory. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/l2interpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/l2interpolation.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -314,15 +314,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef BasisFactory::Key Key
 
typedef BasisFactory::Object Basis
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02753.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::LFEMatrix< F > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/lfematrix.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/lfematrix.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LFEMatrix< F >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -510,15 +510,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02773.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::MonomialBasisSize< geometryId > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -339,15 +339,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 MonomialBasisSize ()
 
 ~MonomialBasisSize ()
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02777.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::MonomialBasis< geometryId, F > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::MonomialBasis< geometryId, F >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -837,15 +837,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02781.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::MonomialBasisHelper< mydim, dim, F > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -182,15 +182,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef MonomialBasisSize< GeometryTypes::simplex(mydim).toId() > MySize
 
typedef MonomialBasisSize< GeometryTypes::simplex(dim).toId() > Size
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02785.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::MonomialBasisImpl< geometryId, F > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::MonomialBasisImpl< geometryId, F >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -201,15 +201,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02789.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::StandardMonomialBasis< dim, F > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::StandardMonomialBasis< dim, F >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -829,15 +829,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02793.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::StandardBiMonomialBasis< dim, F > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::StandardBiMonomialBasis< dim, F >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -829,15 +829,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02797.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::VirtualMonomialBasis< dim, F > Class Template Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VirtualMonomialBasis< dim, F >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -887,15 +887,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02801.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::VirtualMonomialBasisImpl< geometryId, F > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::VirtualMonomialBasisImpl< geometryId, F >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -706,15 +706,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02805.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::MonomialBasisFactory< dim, F > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  EvaluationBasisFactory
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -242,15 +242,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02809.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::MonomialBasisFactory< dim, F >::EvaluationBasisFactory< dd, FF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef MonomialBasisFactory< dd, FF > Type
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02813.html │ │ │ │ @@ -78,15 +78,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::MonomialBasisProvider< dim, SF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::MonomialBasisProvider< dim, SF >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -148,15 +148,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02817.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::MonomialBasisProvider< dim, SF >::EvaluationBasisFactory< dd, FF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/monomialbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef MonomialBasisProvider< dd, FF > Type
 
│ │ │ │

Member Typedef Documentation

│ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02821.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Member Functions | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::MultiIndex< dim, Field > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/multiindex.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/multiindex.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1018,15 +1018,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 MultiIndex ()
 
template<class F >
 MultiIndex (const F &f)
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02825.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Unity< MultiIndex< dim, F > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/multiindex.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/multiindex.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef MultiIndex< dim, F > Field
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -195,15 +195,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02829.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::Zero< MultiIndex< dim, F > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/multiindex.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/multiindex.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef MultiIndex< dim, F > Field
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -135,15 +135,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02833.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::PolynomialBasis< Eval, CM, D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/polynomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/polynomialbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::PolynomialBasis< Eval, CM, D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1393,15 +1393,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02837.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::PolynomialBasis< Eval, CM, D, R >::Convert< dummy, DVector > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/polynomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/polynomialbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static DomainVector apply (const DVector &x)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -115,15 +115,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02841.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::PolynomialBasis< Eval, CM, D, R >::Convert< dummy, DomainVector > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/polynomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/polynomialbasis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static const DomainVectorapply (const DomainVector &x)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -115,15 +115,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02845.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::PolynomialBasisWithMatrix< Eval, CM, D, R > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/polynomialbasis.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/polynomialbasis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::PolynomialBasisWithMatrix< Eval, CM, D, R >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1385,15 +1385,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02849.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Attributes | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::LFETensor< F, dimD, deriv > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -461,15 +461,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef F field_type
 
typedef Dune::FieldVector< F, sizeBlock
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02853.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::LFETensor< F, 0, deriv > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Attributes

static const int size = 0
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -109,15 +109,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02857.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Attributes | │ │ │ │ List of all members
│ │ │ │
Dune::LFETensor< F, 0, 0 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Attributes

static const int size = 1
 
│ │ │ │

Member Data Documentation

│ │ │ │ @@ -109,15 +109,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02861.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Public Attributes | │ │ │ │ Static Public Attributes | │ │ │ │ List of all members │ │ │ │
Dune::LFETensor< F, dimD, 0 > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -461,15 +461,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef F field_type
 
typedef Dune::FieldVector< F, sizeBlock
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02865.html │ │ │ │ @@ -85,15 +85,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02869.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::value > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::value >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1230,15 +1230,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02873.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │ Protected Member Functions | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::value > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1101,15 +1101,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::valueThis
 
typedef LFETensor< F, dimD, 0 > ThisLFETensor
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02877.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Attributes | │ │ │ │ List of all members │ │ │ │
Dune::Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -680,15 +680,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::derivativeThis
 
typedef Derivatives< F, dimD, 1, deriv, DerivativeLayoutNS::valueScalarDeriv
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02881.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::LFETensorAxpy< Vec1, Vec2, deriv > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

template<class Field >
static void apply (unsigned int r, const Field &a, const Vec1 &x, Vec2 &y)
 
│ │ │ │ @@ -138,15 +138,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02885.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::LFETensorAxpy< Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::value >, Vec2, deriv > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::valueVec1
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -161,15 +161,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02889.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::LFETensorAxpy< Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::derivative >, Vec2, deriv > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::derivativeVec1
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -161,15 +161,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02893.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::LFETensorAxpy< Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::derivative >, Vec2, deriv > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::derivativeVec1
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -161,15 +161,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02897.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::LFETensorAxpy< Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::value >, Vec2, deriv > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::valueVec1
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -161,15 +161,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02901.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Static Public Member Functions | │ │ │ │ List of all members
│ │ │ │
Dune::DerivativeAssign< Vec1, Vec2 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static void apply (unsigned int r, const Vec1 &vec1, Vec2 &vec2)
 
│ │ │ │

Member Function Documentation

│ │ │ │ @@ -129,15 +129,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02905.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, layout >, Derivatives< F2, dimD, dimR, deriv, layout > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, dimR, deriv, layout > Vec1
 
typedef Derivatives< F2, dimD, dimR, deriv, layout > Vec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02909.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value >, Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::valueVec1
 
typedef Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivativeVec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02913.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative >, Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivativeVec1
 
typedef Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::valueVec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02917.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, layout >, Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, 1, deriv, layout > Vec1
 
typedef Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::valueVec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02921.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, layout >, Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, 1, deriv, layout > Vec1
 
typedef Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivativeVec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02925.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value >, Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::valueVec1
 
typedef Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::valueVec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02929.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative >, Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivativeVec1
 
typedef Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivativeVec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02933.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative >, Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivativeVec1
 
typedef Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::valueVec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02937.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value >, Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::valueVec1
 
typedef Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivativeVec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02941.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, layout >, F2 > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, 1, deriv, layout > Vec1
 
typedef F2 Vec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02945.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value >, FieldVector< F2, dimR > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::valueVec1
 
typedef FieldVector< F2, dimR > Vec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02949.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative >, FieldVector< F2, dimR > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivativeVec1
 
typedef FieldVector< F2, dimR > Vec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02953.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value >, FieldVector< F2, dimR > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::valueVec1
 
typedef FieldVector< F2, dimR > Vec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02957.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative >, FieldVector< F2, dimR > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivativeVec1
 
typedef FieldVector< F2, dimR > Vec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02961.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value >, FieldVector< F2, 1 > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::valueVec1
 
typedef FieldVector< F2, 1 > Vec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02965.html │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ Public Types | │ │ │ │ Static Public Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative >, FieldVector< F2, 1 > > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ +

#include <dune/localfunctions/utility/tensor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivativeVec1
 
typedef FieldVector< F2, 1 > Vec2
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02969.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::EdgeS0_5FiniteElement< Geometry, RF > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

FiniteElement for lowest order edge elements on simplices. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/whitney/edges0.5.hh>

│ │ │ │ +

#include <dune/localfunctions/whitney/edges0.5.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Traits
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -296,15 +296,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

return geometry type of this element

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02973.html │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Public Types | │ │ │ │ List of all members
│ │ │ │
Dune::EdgeS0_5FiniteElement< Geometry, RF >::Traits Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/whitney/edges0.5.hh>

│ │ │ │ +

#include <dune/localfunctions/whitney/edges0.5.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::EdgeS0_5FiniteElement< Geometry, RF >::Traits:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -147,15 +147,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02977.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::EdgeS0_5FiniteElementFactory< Geometry, RF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Factory for EdgeS0_5FiniteElement objects. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/whitney/edges0.5.hh>

│ │ │ │ +

#include <dune/localfunctions/whitney/edges0.5.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::EdgeS0_5FiniteElementFactory< Geometry, RF >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -401,15 +401,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

create a finite element from a vertex ordering

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02981.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::EdgeS0_5Basis< Geometry, RF > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Basis for order 0.5 (lowest order) edge elements on simplices. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/whitney/edges0.5/basis.hh>

│ │ │ │ +

#include <dune/localfunctions/whitney/edges0.5/basis.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::EdgeS0_5Basis< Geometry, RF >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -368,15 +368,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of shape functions

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02985.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::EdgeS0_5Basis< Geometry, RF >::Traits Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

export type traits for function signature │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/whitney/edges0.5/basis.hh>

│ │ │ │ +

#include <dune/localfunctions/whitney/edges0.5/basis.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -280,15 +280,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef Geometry::ctype DomainField
 
typedef FieldVector< DomainField, dimDomainLocalDomainLocal
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02989.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::EdgeS0_5Coefficients< dim > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Coefficients for lowest order edge elements on simplices. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/whitney/edges0.5/coefficients.hh>

│ │ │ │ +

#include <dune/localfunctions/whitney/edges0.5/coefficients.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::EdgeS0_5Coefficients< dim >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

number of coefficients

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02993.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::EdgeS0_5Common< dim, DF > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Common base class for edge elements. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/whitney/edges0.5/common.hh>

│ │ │ │ +

#include <dune/localfunctions/whitney/edges0.5/common.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::EdgeS0_5Common< dim, DF >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -181,15 +181,15 @@ │ │ │ │ │ │ │ │

The number of base functions.

│ │ │ │
Note
This is not a compile time constant, since the number of edges is extracted from the reference element.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a02997.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::EdgeS0_5Interpolation< Geometry, Traits_ > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Interpolation for lowest order edge elements on simplices. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/localfunctions/whitney/edges0.5/interpolation.hh>

│ │ │ │ +

#include <dune/localfunctions/whitney/edges0.5/interpolation.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::EdgeS0_5Interpolation< Geometry, Traits_ >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -233,15 +233,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Interpolation of a function.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04473.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interpolation.hh File Reference │ │ │ │ +dune-localfunctions: basis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,38 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
interpolation.hh File Reference
│ │ │ │ +
basis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <type_traits>
│ │ │ │ -#include <utility>
│ │ │ │ +
#include <numeric>
│ │ │ │ +#include <cstddef>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/common/typeutilities.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangecoefficients.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::LocalLagrangeInterpolation< LP, dim, F >
class  Dune::PowerBasis< Backend, dimR >
 Meta-basis turning a scalar basis into vector-valued basis. More...
 
struct  Dune::LagrangeInterpolationFactory< LP, dim, F >
struct  Dune::PowerBasis< Backend, dimR >::Traits
 types of domain and range More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,28 +6,30 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ + * meta │ │ │ │ │ + * power │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -interpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +basis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ - class  Dune::LocalLagrangeInterpolation<_LP,_dim,_F_> │ │ │ │ │ + class  Dune::PowerBasis<_Backend,_dimR_> │ │ │ │ │ +  Meta-basis turning a scalar basis into vector-valued basis. More... │ │ │ │ │   │ │ │ │ │ -struct  Dune::LagrangeInterpolationFactory<_LP,_dim,_F_> │ │ │ │ │ +struct  Dune::PowerBasis<_Backend,_dimR_>::Traits │ │ │ │ │ +  types of domain and range More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04473_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interpolation.hh Source File │ │ │ │ +dune-localfunctions: basis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,189 +70,124 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrange/interpolation.hh
│ │ │ │ +
meta/power/basis.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_INTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LAGRANGEBASIS_INTERPOLATION_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <type_traits>
│ │ │ │ -
9#include <utility>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/typeutilities.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ - │ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_META_POWER_BASIS_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_META_POWER_BASIS_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <numeric>
│ │ │ │ +
10#include <cstddef>
│ │ │ │ +
11#include <vector>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/common/fmatrix.hh>
│ │ │ │ +
14#include <dune/common/fvector.hh>
│ │ │ │ +
15
│ │ │ │ +
16namespace Dune {
│ │ │ │ +
17
│ │ │ │
19
│ │ │ │ -
20 template< template <class,unsigned int> class LP,
│ │ │ │ -
21 unsigned int dim, class F >
│ │ │ │ -
22 struct LagrangeInterpolationFactory;
│ │ │ │ -
23
│ │ │ │ -
24 // LocalLagrangeInterpolation
│ │ │ │ -
25 // --------------------------
│ │ │ │ -
26
│ │ │ │ -
27 template< template <class,unsigned int> class LP, unsigned int dim, class F >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ - │ │ │ │ -
31
│ │ │ │ -
32 public:
│ │ │ │ -
33 typedef LP<F,dim> LagrangePointSet;
│ │ │ │ -
34 typedef typename LagrangePointSet::Field Field;
│ │ │ │ -
35
│ │ │ │ -
36 static const unsigned int dimension = LagrangePointSet::dimension;
│ │ │ │ -
37
│ │ │ │ -
38 private:
│ │ │ │ -
39 friend struct LagrangeInterpolationFactory<LP,dim,F>;
│ │ │ │ -
40 const LagrangePointSet &lagrangePoints_;
│ │ │ │ +
25 template<class Backend, std::size_t dimR>
│ │ │ │ +
│ │ │ │ +
26 class PowerBasis {
│ │ │ │ +
27 static_assert(Backend::Traits::dimRange == 1,
│ │ │ │ +
28 "PowerBasis works only with scalar backends");
│ │ │ │ +
29
│ │ │ │ +
30 // don't use a reference here so this class stays copyable
│ │ │ │ +
31 const Backend *backend;
│ │ │ │ +
32
│ │ │ │ +
33 public:
│ │ │ │ +
│ │ │ │ +
35 struct Traits : public Backend::Traits
│ │ │ │ +
36 {
│ │ │ │ +
38 static const std::size_t dimRange = dimR;
│ │ │ │ +
40 typedef FieldVector<typename Traits::RangeField, dimR> Range;
│ │ │ │
41
│ │ │ │ - │ │ │ │ -
43 : lagrangePoints_( lagrangePoints )
│ │ │ │ -
44 {}
│ │ │ │ -
45
│ │ │ │ -
46 const LagrangePointSet *points () const { return &lagrangePoints_; }
│ │ │ │ -
47
│ │ │ │ -
48 template< class Fn, class Vector >
│ │ │ │ -
49 auto interpolate ( const Fn &fn, Vector &coefficients, PriorityTag< 1 > ) const
│ │ │ │ -
50 -> std::enable_if_t< std::is_invocable_v< const Fn &, decltype( this->lagrangePoints_.begin()->point() ) > >
│ │ │ │ -
51 {
│ │ │ │ -
52 unsigned int index = 0;
│ │ │ │ -
53 for( const auto &lp : lagrangePoints_ )
│ │ │ │ -
54 field_cast( fn( lp.point() ), coefficients[ index++ ] );
│ │ │ │ -
55 }
│ │ │ │ -
56 template< class Fn, class Vector >
│ │ │ │ -
57 auto interpolate ( const Fn &fn, Vector &coefficients, PriorityTag< 0 > ) const
│ │ │ │ -
58 -> std::enable_if_t< models<Impl::FunctionWithEvaluate< typename Fn::DomainType, typename Fn::RangeType >, Fn>(), void>
│ │ │ │ -
59 {
│ │ │ │ -
60 unsigned int index = 0;
│ │ │ │ -
61 for( const auto &lp : lagrangePoints_ )
│ │ │ │ -
62 {
│ │ │ │ -
63 typename Fn::RangeType val;
│ │ │ │ -
64 fn.evaluate( field_cast< typename Fn::DomainType::field_type >( lp.point() ), val );
│ │ │ │ -
65 field_cast( val, coefficients[ index++ ] );
│ │ │ │ -
66 }
│ │ │ │ -
67 }
│ │ │ │ -
68
│ │ │ │ -
69 public:
│ │ │ │ -
70 template< class Fn, class Vector >
│ │ │ │ -
│ │ │ │ -
71 auto interpolate ( const Fn &fn, Vector &coefficients ) const
│ │ │ │ -
72 -> std::enable_if_t< std::is_same< decltype(std::declval<Vector>().resize(1) ),void >::value,void>
│ │ │ │ -
73 {
│ │ │ │ -
74 coefficients.resize( lagrangePoints_.size() );
│ │ │ │ -
75 interpolate( fn, coefficients, PriorityTag< 42 >() );
│ │ │ │ -
76 }
│ │ │ │ -
│ │ │ │ -
77
│ │ │ │ -
78 template< class Basis, class Matrix >
│ │ │ │ -
│ │ │ │ -
79 auto interpolate ( const Basis &basis, Matrix &coefficients ) const
│ │ │ │ -
80 -> std::enable_if_t< std::is_same<
│ │ │ │ -
81 decltype(std::declval<Matrix>().rowPtr(0)), typename Matrix::Field* >::value,void>
│ │ │ │ -
82 {
│ │ │ │ -
83 coefficients.resize( lagrangePoints_.size(), basis.size( ) );
│ │ │ │ -
84
│ │ │ │ -
85 unsigned int index = 0;
│ │ │ │ -
86 for( const auto &lp : lagrangePoints_ )
│ │ │ │ -
87 basis.template evaluate< 0 >( lp.point(), coefficients.rowPtr( index++ ) );
│ │ │ │ -
88 }
│ │ │ │ -
│ │ │ │ -
89
│ │ │ │ -
90 const LagrangePointSet &lagrangePoints () const { return lagrangePoints_; }
│ │ │ │ -
91 };
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
93
│ │ │ │ -
94
│ │ │ │ -
95 // LocalLagrangeInterpolationFactory
│ │ │ │ -
96 // ---------------------------------
│ │ │ │ -
97 template< template <class,unsigned int> class LP,
│ │ │ │ -
98 unsigned int dim, class F >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
100 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
103
│ │ │ │ - │ │ │ │ - │ │ │ │ -
106
│ │ │ │ -
107 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
108 static Object *create ( const Key &key )
│ │ │ │ -
109 {
│ │ │ │ -
110 const LagrangePointSet *lagrangeCoeff
│ │ │ │ -
111 = LagrangePointSetFactory::template create< geometryId >( key );
│ │ │ │ -
112 if ( lagrangeCoeff == 0 )
│ │ │ │ -
113 return 0;
│ │ │ │ -
114 else
│ │ │ │ -
115 return new Object( *lagrangeCoeff );
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
117 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
118 static bool supports ( const Key &key )
│ │ │ │ -
119 {
│ │ │ │ -
120 return true;
│ │ │ │ -
121 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
122 static void release( Object *object)
│ │ │ │ -
123 {
│ │ │ │ -
124 LagrangePointSetFactory::release( object->points() );
│ │ │ │ -
125 delete object;
│ │ │ │ -
126 }
│ │ │ │ -
│ │ │ │ -
127 };
│ │ │ │ -
│ │ │ │ -
128
│ │ │ │ -
129}
│ │ │ │ -
130
│ │ │ │ -
131#endif // #ifndef DUNE_LAGRANGEBASIS_INTERPOLATION_HH
│ │ │ │ - │ │ │ │ +
43
│ │ │ │ +
47 typedef FieldMatrix<typename Traits::RangeField, dimR,
│ │ │ │ +
48 Traits::dimDomainGlobal> Jacobian;
│ │ │ │ +
49 };
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
52
│ │ │ │ +
58 PowerBasis(const Backend &backend_) : backend(&backend_) { }
│ │ │ │ +
59
│ │ │ │ +
61 std::size_t size () const { return backend->size()*dimR; }
│ │ │ │ +
63 std::size_t order () const { return backend->order(); }
│ │ │ │ +
64
│ │ │ │ +
│ │ │ │ +
66 void evaluateFunction(const typename Traits::DomainLocal& in,
│ │ │ │ +
67 std::vector<typename Traits::Range>& out) const
│ │ │ │ +
68 {
│ │ │ │ +
69 std::vector<typename Backend::Traits::Range> backendValues;
│ │ │ │ +
70 backend->evaluateFunction(in, backendValues);
│ │ │ │ +
71 out.assign(size(), typename Traits::Range(0));
│ │ │ │ +
72 for(std::size_t d = 0; d < dimR; ++d)
│ │ │ │ +
73 for(std::size_t i = 0; i < backend->size(); ++i)
│ │ │ │ +
74 out[d*backend->size()+i][d] = backendValues[i][0];
│ │ │ │ +
75 }
│ │ │ │ +
│ │ │ │ +
76
│ │ │ │ +
│ │ │ │ +
78 void evaluateJacobian(const typename Traits::DomainLocal& in,
│ │ │ │ +
79 std::vector<typename Traits::Jacobian>& out) const
│ │ │ │ +
80 {
│ │ │ │ +
81 std::vector<typename Backend::Traits::Jacobian> backendValues;
│ │ │ │ +
82 backend->evaluateJacobian(in, backendValues);
│ │ │ │ +
83 out.assign(size(), typename Traits::Jacobian(0));
│ │ │ │ +
84 for(std::size_t d = 0; d < dimR; ++d)
│ │ │ │ +
85 for(std::size_t i = 0; i < backend->size(); ++i)
│ │ │ │ +
86 out[d*backend->size()+i][d] = backendValues[i][0];
│ │ │ │ +
87 }
│ │ │ │ +
│ │ │ │ +
88
│ │ │ │ +
│ │ │ │ +
90 void partial (const std::array<unsigned int, Backend::Traits::dimDomainGlobal>& order,
│ │ │ │ +
91 const typename Traits::DomainLocal& in, // position
│ │ │ │ +
92 std::vector<typename Traits::Range>& out) const // return value
│ │ │ │ +
93 {
│ │ │ │ +
94 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
95 if (totalOrder == 0) {
│ │ │ │ +
96 evaluateFunction(in, out);
│ │ │ │ +
97 } else {
│ │ │ │ +
98 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
99 }
│ │ │ │ +
100 }
│ │ │ │ +
│ │ │ │ +
101 };
│ │ │ │ +
│ │ │ │ +
102
│ │ │ │ +
103} // namespace Dune
│ │ │ │ +
104
│ │ │ │ +
105#endif // DUNE_LOCALFUNCTIONS_META_POWER_BASIS_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 lagrange/interpolation.hh:100
│ │ │ │ -
LagrangeCoefficientsFactory< LP, dim, F > LagrangePointSetFactory
Definition lagrange/interpolation.hh:101
│ │ │ │ -
LagrangePointSetFactory::Object LagrangePointSet
Definition lagrange/interpolation.hh:102
│ │ │ │ -
static bool supports(const Key &key)
Definition lagrange/interpolation.hh:118
│ │ │ │ -
LagrangePointSetFactory::Key Key
Definition lagrange/interpolation.hh:104
│ │ │ │ -
static Object * create(const Key &key)
Definition lagrange/interpolation.hh:108
│ │ │ │ -
static void release(Object *object)
Definition lagrange/interpolation.hh:122
│ │ │ │ -
const LocalLagrangeInterpolation< LP, dim, F > Object
Definition lagrange/interpolation.hh:105
│ │ │ │ -
Definition lagrange/interpolation.hh:29
│ │ │ │ -
LagrangePointSet::Field Field
Definition lagrange/interpolation.hh:34
│ │ │ │ -
const LagrangePointSet & lagrangePoints() const
Definition lagrange/interpolation.hh:90
│ │ │ │ -
static const unsigned int dimension
Definition lagrange/interpolation.hh:36
│ │ │ │ -
LP< F, dim > LagrangePointSet
Definition lagrange/interpolation.hh:33
│ │ │ │ -
auto interpolate(const Fn &fn, Vector &coefficients) const -> std::enable_if_t< std::is_same< decltype(std::declval< Vector >().resize(1)), void >::value, void >
Definition lagrange/interpolation.hh:71
│ │ │ │ -
auto interpolate(const Basis &basis, Matrix &coefficients) const -> std::enable_if_t< std::is_same< decltype(std::declval< Matrix >().rowPtr(0)), typename Matrix::Field * >::value, void >
Definition lagrange/interpolation.hh:79
│ │ │ │ -
Definition lagrangecoefficients.hh:23
│ │ │ │ -
static void release(Object *object)
Definition lagrangecoefficients.hh:42
│ │ │ │ -
const typedef LP< F, dim > Object
Definition lagrangecoefficients.hh:25
│ │ │ │ -
std::size_t Key
Definition lagrangecoefficients.hh:26
│ │ │ │ - │ │ │ │ +
Meta-basis turning a scalar basis into vector-valued basis.
Definition meta/power/basis.hh:26
│ │ │ │ +
PowerBasis(const Backend &backend_)
Construct a PowerBasis.
Definition meta/power/basis.hh:58
│ │ │ │ +
std::size_t size() const
Number of shape functions.
Definition meta/power/basis.hh:61
│ │ │ │ +
void partial(const std::array< unsigned int, Backend::Traits::dimDomainGlobal > &order, const typename Traits::DomainLocal &in, std::vector< typename Traits::Range > &out) const
Evaluate partial derivatives of all shape functions.
Definition meta/power/basis.hh:90
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainLocal &in, std::vector< typename Traits::Jacobian > &out) const
Evaluate Jacobian of all shape functions at given position.
Definition meta/power/basis.hh:78
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainLocal &in, std::vector< typename Traits::Range > &out) const
Evaluate all shape functions at given position.
Definition meta/power/basis.hh:66
│ │ │ │ +
std::size_t order() const
Polynomial order of the shape functions for quadrature.
Definition meta/power/basis.hh:63
│ │ │ │ +
types of domain and range
Definition meta/power/basis.hh:36
│ │ │ │ +
FieldMatrix< typename Traits::RangeField, dimR, Traits::dimDomainGlobal > Jacobian
Jacobian properties.
Definition meta/power/basis.hh:48
│ │ │ │ +
FieldVector< typename Traits::RangeField, dimR > Range
Type used for range values.
Definition meta/power/basis.hh:40
│ │ │ │ +
static const std::size_t dimRange
Dimension of the range values.
Definition meta/power/basis.hh:38
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,220 +7,146 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * lagrange │ │ │ │ │ -lagrange/interpolation.hh │ │ │ │ │ + * meta │ │ │ │ │ + * power │ │ │ │ │ +meta/power/basis.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_INTERPOLATION_HH │ │ │ │ │ - 6#define DUNE_LAGRANGEBASIS_INTERPOLATION_HH │ │ │ │ │ - 7 │ │ │ │ │ - 8#include │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14#include │ │ │ │ │ - 15#include │ │ │ │ │ - 16 │ │ │ │ │ - 17namespace Dune │ │ │ │ │ - 18{ │ │ │ │ │ + 5 │ │ │ │ │ + 6#ifndef DUNE_LOCALFUNCTIONS_META_POWER_BASIS_HH │ │ │ │ │ + 7#define DUNE_LOCALFUNCTIONS_META_POWER_BASIS_HH │ │ │ │ │ + 8 │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12 │ │ │ │ │ + 13#include │ │ │ │ │ + 14#include │ │ │ │ │ + 15 │ │ │ │ │ + 16namespace Dune { │ │ │ │ │ + 17 │ │ │ │ │ 19 │ │ │ │ │ - 20 template< template class LP, │ │ │ │ │ - 21 unsigned int dim, class F > │ │ │ │ │ - 22 struct LagrangeInterpolationFactory; │ │ │ │ │ - 23 │ │ │ │ │ - 24 // LocalLagrangeInterpolation │ │ │ │ │ - 25 // -------------------------- │ │ │ │ │ - 26 │ │ │ │ │ - 27 template< template class LP, unsigned int dim, class F │ │ │ │ │ -> │ │ │ │ │ -28 class LocalLagrangeInterpolation │ │ │ │ │ - 29 { │ │ │ │ │ - 30 typedef LocalLagrangeInterpolation<_LP,dim,F_> This; │ │ │ │ │ - 31 │ │ │ │ │ - 32 public: │ │ │ │ │ -33 typedef LP LagrangePointSet; │ │ │ │ │ -34 typedef typename LagrangePointSet::Field Field; │ │ │ │ │ - 35 │ │ │ │ │ -36 static const unsigned int dimension = LagrangePointSet::dimension; │ │ │ │ │ - 37 │ │ │ │ │ - 38 private: │ │ │ │ │ - 39 friend struct LagrangeInterpolationFactory; │ │ │ │ │ - 40 const LagrangePointSet &lagrangePoints_; │ │ │ │ │ + 25 template │ │ │ │ │ +26 class PowerBasis { │ │ │ │ │ + 27 static_assert(Backend::Traits::dimRange == 1, │ │ │ │ │ + 28 "PowerBasis works only with scalar backends"); │ │ │ │ │ + 29 │ │ │ │ │ + 30 // don't use a reference here so this class stays copyable │ │ │ │ │ + 31 const Backend *backend; │ │ │ │ │ + 32 │ │ │ │ │ + 33 public: │ │ │ │ │ +35 struct Traits : public Backend::Traits │ │ │ │ │ + 36 { │ │ │ │ │ +38 static const std::size_t dimRange = dimR; │ │ │ │ │ +40 typedef FieldVector Range; │ │ │ │ │ 41 │ │ │ │ │ - 42 explicit LocalLagrangeInterpolation ( const LagrangePointSet │ │ │ │ │ -&lagrangePoints ) │ │ │ │ │ - 43 : lagrangePoints_( lagrangePoints ) │ │ │ │ │ - 44 {} │ │ │ │ │ - 45 │ │ │ │ │ - 46 const LagrangePointSet *points () const { return &lagrangePoints_; } │ │ │ │ │ - 47 │ │ │ │ │ - 48 template< class Fn, class Vector > │ │ │ │ │ - 49 auto interpolate ( const Fn &fn, Vector &coefficients, PriorityTag< 1 > ) │ │ │ │ │ -const │ │ │ │ │ - 50 -> std::enable_if_t< std::is_invocable_v< const Fn &, decltype( this- │ │ │ │ │ ->lagrangePoints_.begin()->point() ) > > │ │ │ │ │ - 51 { │ │ │ │ │ - 52 unsigned int index = 0; │ │ │ │ │ - 53 for( const auto &lp : lagrangePoints_ ) │ │ │ │ │ - 54 field_cast( fn( lp.point() ), coefficients[ index++ ] ); │ │ │ │ │ - 55 } │ │ │ │ │ - 56 template< class Fn, class Vector > │ │ │ │ │ - 57 auto interpolate ( const Fn &fn, Vector &coefficients, PriorityTag< 0 > ) │ │ │ │ │ -const │ │ │ │ │ - 58 -> std::enable_if_t< models, Fn>(), void> │ │ │ │ │ - 59 { │ │ │ │ │ - 60 unsigned int index = 0; │ │ │ │ │ - 61 for( const auto &lp : lagrangePoints_ ) │ │ │ │ │ - 62 { │ │ │ │ │ - 63 typename Fn::RangeType val; │ │ │ │ │ - 64 fn.evaluate( field_cast< typename Fn::DomainType::field_type >( lp.point() │ │ │ │ │ -), val ); │ │ │ │ │ - 65 field_cast( val, coefficients[ index++ ] ); │ │ │ │ │ - 66 } │ │ │ │ │ - 67 } │ │ │ │ │ - 68 │ │ │ │ │ - 69 public: │ │ │ │ │ - 70 template< class Fn, class Vector > │ │ │ │ │ -71 auto interpolate ( const Fn &fn, Vector &coefficients ) const │ │ │ │ │ - 72 -> std::enable_if_t< std::is_same< decltype(std::declval().resize │ │ │ │ │ -(1) ),void >::value,void> │ │ │ │ │ - 73 { │ │ │ │ │ - 74 coefficients.resize( lagrangePoints_.size() ); │ │ │ │ │ - 75 interpolate( fn, coefficients, PriorityTag< 42 >() ); │ │ │ │ │ - 76 } │ │ │ │ │ - 77 │ │ │ │ │ - 78 template< class Basis, class Matrix > │ │ │ │ │ -79 auto interpolate ( const Basis &basis, Matrix &coefficients ) const │ │ │ │ │ - 80 -> std::enable_if_t< std::is_same< │ │ │ │ │ - 81 decltype(std::declval().rowPtr(0)), typename Matrix::Field* >:: │ │ │ │ │ -value,void> │ │ │ │ │ - 82 { │ │ │ │ │ - 83 coefficients.resize( lagrangePoints_.size(), basis.size( ) ); │ │ │ │ │ - 84 │ │ │ │ │ - 85 unsigned int index = 0; │ │ │ │ │ - 86 for( const auto &lp : lagrangePoints_ ) │ │ │ │ │ - 87 basis.template evaluate< 0 >( lp.point(), coefficients.rowPtr( index++ ) ); │ │ │ │ │ - 88 } │ │ │ │ │ - 89 │ │ │ │ │ -90 const LagrangePointSet &lagrangePoints () const { return lagrangePoints_; } │ │ │ │ │ - 91 }; │ │ │ │ │ - 92 │ │ │ │ │ - 93 │ │ │ │ │ - 94 │ │ │ │ │ - 95 // LocalLagrangeInterpolationFactory │ │ │ │ │ - 96 // --------------------------------- │ │ │ │ │ - 97 template< template class LP, │ │ │ │ │ - 98 unsigned int dim, class F > │ │ │ │ │ -99 struct LagrangeInterpolationFactory │ │ │ │ │ - 100 { │ │ │ │ │ -101 typedef LagrangeCoefficientsFactory LagrangePointSetFactory; │ │ │ │ │ -102 typedef typename LagrangePointSetFactory::Object LagrangePointSet; │ │ │ │ │ - 103 │ │ │ │ │ -104 typedef typename LagrangePointSetFactory::Key Key; │ │ │ │ │ -105 typedef const LocalLagrangeInterpolation<_LP,dim,F_> Object; │ │ │ │ │ - 106 │ │ │ │ │ - 107 template< GeometryType::Id geometryId > │ │ │ │ │ -108 static Object *create ( const Key &key ) │ │ │ │ │ - 109 { │ │ │ │ │ - 110 const LagrangePointSet *lagrangeCoeff │ │ │ │ │ - 111 = LagrangePointSetFactory::template create< geometryId >( key ); │ │ │ │ │ - 112 if ( lagrangeCoeff == 0 ) │ │ │ │ │ - 113 return 0; │ │ │ │ │ - 114 else │ │ │ │ │ - 115 return new Object( *lagrangeCoeff ); │ │ │ │ │ - 116 } │ │ │ │ │ - 117 template< GeometryType::Id geometryId > │ │ │ │ │ -118 static bool supports ( const Key &key ) │ │ │ │ │ - 119 { │ │ │ │ │ - 120 return true; │ │ │ │ │ - 121 } │ │ │ │ │ -122 static void release( Object *object) │ │ │ │ │ - 123 { │ │ │ │ │ - 124 LagrangePointSetFactory::release( object->points() ); │ │ │ │ │ - 125 delete object; │ │ │ │ │ - 126 } │ │ │ │ │ - 127 }; │ │ │ │ │ - 128 │ │ │ │ │ - 129} │ │ │ │ │ - 130 │ │ │ │ │ - 131#endif // #ifndef DUNE_LAGRANGEBASIS_INTERPOLATION_HH │ │ │ │ │ -lagrangecoefficients.hh │ │ │ │ │ + 43 │ │ │ │ │ + 47 typedef FieldMatrix Jacobian; │ │ │ │ │ + 49 }; │ │ │ │ │ + 50 │ │ │ │ │ + 52 │ │ │ │ │ +58 PowerBasis(const Backend &backend_) : backend(&backend_) { } │ │ │ │ │ + 59 │ │ │ │ │ +61 std::size_t size () const { return backend->size()*dimR; } │ │ │ │ │ +63 std::size_t order () const { return backend->order(); } │ │ │ │ │ + 64 │ │ │ │ │ +66 void evaluateFunction(const typename Traits::DomainLocal& in, │ │ │ │ │ + 67 std::vector& out) const │ │ │ │ │ + 68 { │ │ │ │ │ + 69 std::vector backendValues; │ │ │ │ │ + 70 backend->evaluateFunction(in, backendValues); │ │ │ │ │ + 71 out.assign(size(), typename Traits::Range(0)); │ │ │ │ │ + 72 for(std::size_t d = 0; d < dimR; ++d) │ │ │ │ │ + 73 for(std::size_t i = 0; i < backend->size(); ++i) │ │ │ │ │ + 74 out[d*backend->size()+i][d] = backendValues[i][0]; │ │ │ │ │ + 75 } │ │ │ │ │ + 76 │ │ │ │ │ +78 void evaluateJacobian(const typename Traits::DomainLocal& in, │ │ │ │ │ + 79 std::vector& out) const │ │ │ │ │ + 80 { │ │ │ │ │ + 81 std::vector backendValues; │ │ │ │ │ + 82 backend->evaluateJacobian(in, backendValues); │ │ │ │ │ + 83 out.assign(size(), typename Traits::Jacobian(0)); │ │ │ │ │ + 84 for(std::size_t d = 0; d < dimR; ++d) │ │ │ │ │ + 85 for(std::size_t i = 0; i < backend->size(); ++i) │ │ │ │ │ + 86 out[d*backend->size()+i][d] = backendValues[i][0]; │ │ │ │ │ + 87 } │ │ │ │ │ + 88 │ │ │ │ │ +90 void partial (const std::array& order, │ │ │ │ │ + 91 const typename Traits::DomainLocal& in, // position │ │ │ │ │ + 92 std::vector& out) const // return value │ │ │ │ │ + 93 { │ │ │ │ │ + 94 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ + 95 if (totalOrder == 0) { │ │ │ │ │ + 96 evaluateFunction(in, out); │ │ │ │ │ + 97 } else { │ │ │ │ │ + 98 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ + 99 } │ │ │ │ │ + 100 } │ │ │ │ │ + 101 }; │ │ │ │ │ + 102 │ │ │ │ │ + 103} // namespace Dune │ │ │ │ │ + 104 │ │ │ │ │ + 105#endif // DUNE_LOCALFUNCTIONS_META_POWER_BASIS_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::field_cast │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -Definition field.hh:159 │ │ │ │ │ -Dune::LagrangeInterpolationFactory │ │ │ │ │ -Definition lagrange/interpolation.hh:100 │ │ │ │ │ -Dune::LagrangeInterpolationFactory::LagrangePointSetFactory │ │ │ │ │ -LagrangeCoefficientsFactory< LP, dim, F > LagrangePointSetFactory │ │ │ │ │ -Definition lagrange/interpolation.hh:101 │ │ │ │ │ -Dune::LagrangeInterpolationFactory::LagrangePointSet │ │ │ │ │ -LagrangePointSetFactory::Object LagrangePointSet │ │ │ │ │ -Definition lagrange/interpolation.hh:102 │ │ │ │ │ -Dune::LagrangeInterpolationFactory::supports │ │ │ │ │ -static bool supports(const Key &key) │ │ │ │ │ -Definition lagrange/interpolation.hh:118 │ │ │ │ │ -Dune::LagrangeInterpolationFactory::Key │ │ │ │ │ -LagrangePointSetFactory::Key Key │ │ │ │ │ -Definition lagrange/interpolation.hh:104 │ │ │ │ │ -Dune::LagrangeInterpolationFactory::create │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -Definition lagrange/interpolation.hh:108 │ │ │ │ │ -Dune::LagrangeInterpolationFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition lagrange/interpolation.hh:122 │ │ │ │ │ -Dune::LagrangeInterpolationFactory::Object │ │ │ │ │ -const LocalLagrangeInterpolation< LP, dim, F > Object │ │ │ │ │ -Definition lagrange/interpolation.hh:105 │ │ │ │ │ -Dune::LocalLagrangeInterpolation │ │ │ │ │ -Definition lagrange/interpolation.hh:29 │ │ │ │ │ -Dune::LocalLagrangeInterpolation::Field │ │ │ │ │ -LagrangePointSet::Field Field │ │ │ │ │ -Definition lagrange/interpolation.hh:34 │ │ │ │ │ -Dune::LocalLagrangeInterpolation::lagrangePoints │ │ │ │ │ -const LagrangePointSet & lagrangePoints() const │ │ │ │ │ -Definition lagrange/interpolation.hh:90 │ │ │ │ │ -Dune::LocalLagrangeInterpolation::dimension │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -Definition lagrange/interpolation.hh:36 │ │ │ │ │ -Dune::LocalLagrangeInterpolation::LagrangePointSet │ │ │ │ │ -LP< F, dim > LagrangePointSet │ │ │ │ │ -Definition lagrange/interpolation.hh:33 │ │ │ │ │ -Dune::LocalLagrangeInterpolation::interpolate │ │ │ │ │ -auto interpolate(const Fn &fn, Vector &coefficients) const -> std::enable_if_t< │ │ │ │ │ -std::is_same< decltype(std::declval< Vector >().resize(1)), void >::value, void │ │ │ │ │ -> │ │ │ │ │ -Definition lagrange/interpolation.hh:71 │ │ │ │ │ -Dune::LocalLagrangeInterpolation::interpolate │ │ │ │ │ -auto interpolate(const Basis &basis, Matrix &coefficients) const -> std:: │ │ │ │ │ -enable_if_t< std::is_same< decltype(std::declval< Matrix >().rowPtr(0)), │ │ │ │ │ -typename Matrix::Field * >::value, void > │ │ │ │ │ -Definition lagrange/interpolation.hh:79 │ │ │ │ │ -Dune::LagrangeCoefficientsFactory │ │ │ │ │ -Definition lagrangecoefficients.hh:23 │ │ │ │ │ -Dune::LagrangeCoefficientsFactory::release │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -Definition lagrangecoefficients.hh:42 │ │ │ │ │ -Dune::LagrangeCoefficientsFactory::Object │ │ │ │ │ -const typedef LP< F, dim > Object │ │ │ │ │ -Definition lagrangecoefficients.hh:25 │ │ │ │ │ -Dune::LagrangeCoefficientsFactory::Key │ │ │ │ │ -std::size_t Key │ │ │ │ │ -Definition lagrangecoefficients.hh:26 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::PowerBasis │ │ │ │ │ +Meta-basis turning a scalar basis into vector-valued basis. │ │ │ │ │ +Definition meta/power/basis.hh:26 │ │ │ │ │ +Dune::PowerBasis::PowerBasis │ │ │ │ │ +PowerBasis(const Backend &backend_) │ │ │ │ │ +Construct a PowerBasis. │ │ │ │ │ +Definition meta/power/basis.hh:58 │ │ │ │ │ +Dune::PowerBasis::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +Number of shape functions. │ │ │ │ │ +Definition meta/power/basis.hh:61 │ │ │ │ │ +Dune::PowerBasis::partial │ │ │ │ │ +void partial(const std::array< unsigned int, Backend::Traits::dimDomainGlobal > │ │ │ │ │ +&order, const typename Traits::DomainLocal &in, std::vector< typename Traits:: │ │ │ │ │ +Range > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +Definition meta/power/basis.hh:90 │ │ │ │ │ +Dune::PowerBasis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainLocal &in, std::vector< │ │ │ │ │ +typename Traits::Jacobian > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions at given position. │ │ │ │ │ +Definition meta/power/basis.hh:78 │ │ │ │ │ +Dune::PowerBasis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainLocal &in, std::vector< │ │ │ │ │ +typename Traits::Range > &out) const │ │ │ │ │ +Evaluate all shape functions at given position. │ │ │ │ │ +Definition meta/power/basis.hh:66 │ │ │ │ │ +Dune::PowerBasis::order │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +Polynomial order of the shape functions for quadrature. │ │ │ │ │ +Definition meta/power/basis.hh:63 │ │ │ │ │ +Dune::PowerBasis::Traits │ │ │ │ │ +types of domain and range │ │ │ │ │ +Definition meta/power/basis.hh:36 │ │ │ │ │ +Dune::PowerBasis::Traits::Jacobian │ │ │ │ │ +FieldMatrix< typename Traits::RangeField, dimR, Traits::dimDomainGlobal > │ │ │ │ │ +Jacobian │ │ │ │ │ +Jacobian properties. │ │ │ │ │ +Definition meta/power/basis.hh:48 │ │ │ │ │ +Dune::PowerBasis::Traits::Range │ │ │ │ │ +FieldVector< typename Traits::RangeField, dimR > Range │ │ │ │ │ +Type used for range values. │ │ │ │ │ +Definition meta/power/basis.hh:40 │ │ │ │ │ +Dune::PowerBasis::Traits::dimRange │ │ │ │ │ +static const std::size_t dimRange │ │ │ │ │ +Dimension of the range values. │ │ │ │ │ +Definition meta/power/basis.hh:38 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04476.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interpolation.hh File Reference │ │ │ │ +dune-localfunctions: basis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
interpolation.hh File Reference
│ │ │ │ +
basis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <algorithm>
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <cstddef>
│ │ │ │ +
#include <cstddef>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/localfunctions/common/localtoglobaladaptors.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +#include <dune/localfunctions/whitney/edges0.5/common.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::PowerInterpolation< Backend, BasisTraits >
 Meta-interpolation turning a scalar interpolation into vector-valued interpolation. More...
class  Dune::EdgeS0_5Basis< Geometry, RF >
 Basis for order 0.5 (lowest order) edge elements on simplices. More...
 
struct  Dune::EdgeS0_5Basis< Geometry, RF >::Traits
 export type traits for function signature More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,28 +6,32 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * meta │ │ │ │ │ - * power │ │ │ │ │ + * whitney │ │ │ │ │ + * edges0.5 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -interpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +basis.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::PowerInterpolation<_Backend,_BasisTraits_> │ │ │ │ │ -  Meta-interpolation turning a scalar interpolation into vector-valued │ │ │ │ │ - interpolation. More... │ │ │ │ │ + class  Dune::EdgeS0_5Basis<_Geometry,_RF_> │ │ │ │ │ +  Basis for order 0.5 (lowest order) edge elements on simplices. More... │ │ │ │ │ +  │ │ │ │ │ +struct  Dune::EdgeS0_5Basis<_Geometry,_RF_>::Traits │ │ │ │ │ +  export type traits for function signature More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04476_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interpolation.hh Source File │ │ │ │ +dune-localfunctions: basis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,110 +70,217 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
meta/power/interpolation.hh
│ │ │ │ +
whitney/edges0.5/basis.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_INTERPOLATION_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_META_POWER_INTERPOLATION_HH
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_BASIS_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_BASIS_HH
│ │ │ │
8
│ │ │ │ -
9#include <algorithm>
│ │ │ │ -
10#include <cassert>
│ │ │ │ -
11#include <cstddef>
│ │ │ │ -
12#include <vector>
│ │ │ │ - │ │ │ │ +
9#include <cstddef>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ +
12#include <dune/common/fmatrix.hh>
│ │ │ │ +
13#include <dune/common/fvector.hh>
│ │ │ │
14
│ │ │ │ -
15namespace Dune {
│ │ │ │ -
16
│ │ │ │ -
19
│ │ │ │ -
25 template<class Backend, class BasisTraits>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
27 static_assert(Backend::Traits::dimRange == 1,
│ │ │ │ -
28 "PowerInterpolation works only with scalar backends");
│ │ │ │ -
29
│ │ │ │ -
30 const Backend *backend;
│ │ │ │ -
31
│ │ │ │ -
32 public:
│ │ │ │ -
34 typedef BasisTraits Traits;
│ │ │ │ -
35
│ │ │ │ -
37
│ │ │ │ -
43 PowerInterpolation(const Backend &backend_) : backend(&backend_) { }
│ │ │ │ -
44
│ │ │ │ -
45 private:
│ │ │ │ -
46 template<class F>
│ │ │ │ -
47 class ComponentEvaluator
│ │ │ │ -
48 {
│ │ │ │ -
49 const F &f;
│ │ │ │ -
50 std::size_t comp;
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
18
│ │ │ │ +
19namespace Dune {
│ │ │ │ +
20
│ │ │ │ +
22 //
│ │ │ │ +
23 // Basis
│ │ │ │ +
24 //
│ │ │ │ +
25
│ │ │ │ +
27
│ │ │ │ +
35 template<class Geometry, class RF>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 private EdgeS0_5Common<Geometry::mydimension, typename Geometry::ctype>
│ │ │ │ +
38 {
│ │ │ │ +
39 public:
│ │ │ │ +
│ │ │ │ +
41 struct Traits {
│ │ │ │ +
42 typedef typename Geometry::ctype DomainField;
│ │ │ │ +
43 static const std::size_t dimDomainLocal = Geometry::mydimension;
│ │ │ │ +
44 static const std::size_t dimDomainGlobal = Geometry::coorddimension;
│ │ │ │ +
45 typedef FieldVector<DomainField, dimDomainLocal> DomainLocal;
│ │ │ │ +
46 typedef FieldVector<DomainField, dimDomainGlobal> DomainGlobal;
│ │ │ │ +
47
│ │ │ │ +
48 typedef RF RangeField;
│ │ │ │ +
49 static const std::size_t dimRange = dimDomainLocal;
│ │ │ │ +
50 typedef FieldVector<RangeField, dimRange> Range;
│ │ │ │
51
│ │ │ │ -
52 public:
│ │ │ │ -
53 ComponentEvaluator(const F &f_, std::size_t comp_) :
│ │ │ │ -
54 f(f_), comp(comp_)
│ │ │ │ -
55 { }
│ │ │ │ -
56
│ │ │ │ -
57 typename Backend::Traits::Range operator()(const typename Backend::Traits::DomainLocal &x) const
│ │ │ │ -
58 {
│ │ │ │ -
59 typename Traits::Range fy = f(x);
│ │ │ │ -
60 typename Backend::Traits::Range y;
│ │ │ │ -
61 y[0] = fy[comp];
│ │ │ │ -
62 return y;
│ │ │ │ -
63 }
│ │ │ │ -
64 };
│ │ │ │ +
52 typedef FieldMatrix<RangeField, dimRange, dimDomainGlobal> Jacobian;
│ │ │ │ +
53 };
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
55 private:
│ │ │ │ +
56 typedef Dune::Impl::LagrangeSimplexLocalBasis<typename Traits::DomainField,
│ │ │ │ +
57 typename Traits::RangeField,
│ │ │ │ + │ │ │ │ +
59 1 // Polynomial order
│ │ │ │ +
60 > P1LocalBasis;
│ │ │ │ + │ │ │ │ +
62
│ │ │ │ +
63 static const P1LocalBasis& p1LocalBasis;
│ │ │ │ +
64 static const std::size_t dim = Traits::dimDomainLocal;
│ │ │ │
65
│ │ │ │ -
66 public:
│ │ │ │ -
68
│ │ │ │ -
77 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
78 void interpolate(const F& ff, std::vector<C>& out) const {
│ │ │ │ -
79
│ │ │ │ -
80 auto&& f = Impl::makeFunctionWithCallOperator<typename Backend::Traits::DomainLocal>(ff);
│ │ │ │ -
81
│ │ │ │ -
82
│ │ │ │ -
83 out.clear();
│ │ │ │ -
84 std::vector<C> cout;
│ │ │ │ -
85 for(std::size_t d = 0; d < Traits::dimRange; ++d) {
│ │ │ │ -
86 // When dropping support for `evaluate()` we can simply use a lambda
│ │ │ │ -
87 // instead of ComponentEvaluator. But changing this now would break
│ │ │ │ -
88 // PowerInterpolation for FE-implementation outside of dune-localfunctions
│ │ │ │ -
89 // which may not have been adjusted so far.
│ │ │ │ -
90 backend->interpolate(ComponentEvaluator<std::decay_t<decltype(f)>>(f, d), cout);
│ │ │ │ -
91 if(d == 0)
│ │ │ │ -
92 out.resize(cout.size()*Traits::dimRange);
│ │ │ │ -
93 // make sure the size of cout does not change surprisingly
│ │ │ │ -
94 assert(out.size() == cout.size()*Traits::dimRange);
│ │ │ │ -
95 std::copy(cout.begin(), cout.end(), out.begin() + d*cout.size());
│ │ │ │ -
96 }
│ │ │ │ -
97 }
│ │ │ │ -
│ │ │ │ -
98 };
│ │ │ │ -
│ │ │ │ -
99
│ │ │ │ -
100} // namespace Dune
│ │ │ │ -
101
│ │ │ │ -
102#endif // DUNE_LOCALFUNCTIONS_META_POWER_INTERPOLATION_HH
│ │ │ │ + │ │ │ │ +
67 using Base::refelem;
│ │ │ │ +
68 using Base::s;
│ │ │ │ +
69
│ │ │ │ +
70 // global values of the Jacobians (gradients) of the p1 basis
│ │ │ │ +
71 std::vector<typename P1Basis::Traits::Jacobian> p1j;
│ │ │ │ +
72 // edge sizes and orientations
│ │ │ │ +
73 std::vector<typename Traits::DomainField> edgel;
│ │ │ │ +
74
│ │ │ │ +
75 public:
│ │ │ │ +
77
│ │ │ │ +
83 template<typename VertexOrder>
│ │ │ │ +
│ │ │ │ +
84 EdgeS0_5Basis(const Geometry& geo, const VertexOrder& vertexOrder) :
│ │ │ │ +
85 p1j(s, typename P1Basis::Traits::Jacobian(0)), edgel(s)
│ │ │ │ +
86 {
│ │ │ │ +
87 // use some arbitrary position to evaluate jacobians, they are constant
│ │ │ │ +
88 static const typename Traits::DomainLocal xl(0);
│ │ │ │ +
89
│ │ │ │ +
90 // precompute Jacobian (gradients) of the p1 element
│ │ │ │ +
91 P1Basis(p1LocalBasis, geo).evaluateJacobian(xl, p1j);
│ │ │ │ +
92
│ │ │ │ +
93 // calculate edge sizes and orientations
│ │ │ │ +
94 for(std::size_t i = 0; i < s; ++i) {
│ │ │ │ +
95 edgel[i] = (geo.corner(refelem.subEntity(i,dim-1,0,dim))-
│ │ │ │ +
96 geo.corner(refelem.subEntity(i,dim-1,1,dim))
│ │ │ │ +
97 ).two_norm();
│ │ │ │ +
98 const typename VertexOrder::iterator& edgeVertexOrder =
│ │ │ │ +
99 vertexOrder.begin(dim-1, i);
│ │ │ │ +
100 if(edgeVertexOrder[0] > edgeVertexOrder[1])
│ │ │ │ +
101 edgel[i] *= -1;
│ │ │ │ +
102 }
│ │ │ │ +
103 }
│ │ │ │ +
│ │ │ │ +
104
│ │ │ │ +
106 std::size_t size () const { return s; }
│ │ │ │ +
107
│ │ │ │ +
│ │ │ │ +
109 void evaluateFunction(const typename Traits::DomainLocal& xl,
│ │ │ │ +
110 std::vector<typename Traits::Range>& out) const
│ │ │ │ +
111 {
│ │ │ │ +
112 out.assign(s, typename Traits::Range(0));
│ │ │ │ +
113
│ │ │ │ +
114 // compute p1 values -- use the local basis directly for that, local and
│ │ │ │ +
115 // global values are identical for scalars
│ │ │ │ +
116 std::vector<typename P1LocalBasis::Traits::RangeType> p1v;
│ │ │ │ +
117 p1LocalBasis.evaluateFunction(xl, p1v);
│ │ │ │ +
118
│ │ │ │ +
119 for(std::size_t i = 0; i < s; i++) {
│ │ │ │ +
120 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim);
│ │ │ │ +
121 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim);
│ │ │ │ +
122 out[i].axpy( p1v[i0], p1j[i1][0]);
│ │ │ │ +
123 out[i].axpy(-p1v[i1], p1j[i0][0]);
│ │ │ │ +
124 out[i] *= edgel[i];
│ │ │ │ +
125 }
│ │ │ │ +
126 }
│ │ │ │ +
│ │ │ │ +
127
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
130 std::vector<typename Traits::Jacobian>& out) const
│ │ │ │ +
131 {
│ │ │ │ +
132 out.resize(s);
│ │ │ │ +
133
│ │ │ │ +
134 for(std::size_t i = 0; i < s; i++) {
│ │ │ │ +
135 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim);
│ │ │ │ +
136 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim);
│ │ │ │ +
137 for(std::size_t j = 0; j < dim; j++)
│ │ │ │ +
138 for(std::size_t k = 0; k < dim; k++)
│ │ │ │ +
139 out[i][j][k] = edgel[i] *
│ │ │ │ +
140 (p1j[i0][0][k]*p1j[i1][0][j]-p1j[i1][0][k]*p1j[i0][0][j]);
│ │ │ │ +
141 }
│ │ │ │ +
142 }
│ │ │ │ +
│ │ │ │ +
143
│ │ │ │ +
│ │ │ │ +
145 void partial (const std::array<unsigned int, dim>& order,
│ │ │ │ +
146 const typename Traits::DomainLocal& in, // position
│ │ │ │ +
147 std::vector<typename Traits::Range>& out) const // return value
│ │ │ │ +
148 {
│ │ │ │ +
149 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
150 if (totalOrder == 0) {
│ │ │ │ +
151 evaluateFunction(in, out);
│ │ │ │ +
152 } else if (totalOrder==1) {
│ │ │ │ +
153 auto const k = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
154 out.resize(size());
│ │ │ │ +
155
│ │ │ │ +
156 for (std::size_t i = 0; i < s; i++)
│ │ │ │ +
157 {
│ │ │ │ +
158 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim);
│ │ │ │ +
159 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim);
│ │ │ │ +
160 for(std::size_t j = 0; j < dim; j++)
│ │ │ │ +
161 out[i][j] = edgel[i] *
│ │ │ │ +
162 (p1j[i0][0][k]*p1j[i1][0][j] - p1j[i1][0][k]*p1j[i0][0][j]);
│ │ │ │ +
163 }
│ │ │ │ +
164 } else {
│ │ │ │ +
165 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
166 }
│ │ │ │ +
167 }
│ │ │ │ +
│ │ │ │ +
168
│ │ │ │ +
170 std::size_t order () const { return 1; }
│ │ │ │ +
171 };
│ │ │ │ +
│ │ │ │ +
172
│ │ │ │ +
173 template<class Geometry, class RF>
│ │ │ │ +
174 const typename EdgeS0_5Basis<Geometry, RF>::P1LocalBasis&
│ │ │ │ +
175 EdgeS0_5Basis<Geometry, RF>::p1LocalBasis = P1LocalBasis();
│ │ │ │ +
176
│ │ │ │ +
177} // namespace Dune
│ │ │ │ +
178
│ │ │ │ +
179#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_BASIS_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Meta-interpolation turning a scalar interpolation into vector-valued interpolation.
Definition meta/power/interpolation.hh:26
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Determine coefficients interpolating a given function.
Definition meta/power/interpolation.hh:78
│ │ │ │ -
BasisTraits Traits
Export basis traits.
Definition meta/power/interpolation.hh:34
│ │ │ │ -
PowerInterpolation(const Backend &backend_)
Construct a PowerInterpolation.
Definition meta/power/interpolation.hh:43
│ │ │ │ - │ │ │ │ +
Convert a simple scalar local basis into a global basis.
Definition localtoglobaladaptors.hh:65
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainLocal &in, std::vector< typename Traits::Jacobian > &out) const
Definition localtoglobaladaptors.hh:125
│ │ │ │ +
Basis for order 0.5 (lowest order) edge elements on simplices.
Definition whitney/edges0.5/basis.hh:38
│ │ │ │ +
EdgeS0_5Basis(const Geometry &geo, const VertexOrder &vertexOrder)
Construct an EdgeS0_5Basis.
Definition whitney/edges0.5/basis.hh:84
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainLocal &, std::vector< typename Traits::Jacobian > &out) const
Evaluate all Jacobians.
Definition whitney/edges0.5/basis.hh:129
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainLocal &xl, std::vector< typename Traits::Range > &out) const
Evaluate all shape functions.
Definition whitney/edges0.5/basis.hh:109
│ │ │ │ +
std::size_t size() const
number of shape functions
Definition whitney/edges0.5/basis.hh:106
│ │ │ │ +
void partial(const std::array< unsigned int, dim > &order, const typename Traits::DomainLocal &in, std::vector< typename Traits::Range > &out) const
Evaluate partial derivatives of all shape functions.
Definition whitney/edges0.5/basis.hh:145
│ │ │ │ +
std::size_t order() const
Polynomial order of the shape functions.
Definition whitney/edges0.5/basis.hh:170
│ │ │ │ +
export type traits for function signature
Definition whitney/edges0.5/basis.hh:41
│ │ │ │ +
FieldVector< DomainField, dimDomainGlobal > DomainGlobal
Definition whitney/edges0.5/basis.hh:46
│ │ │ │ +
static const std::size_t dimRange
Definition whitney/edges0.5/basis.hh:49
│ │ │ │ +
static const std::size_t dimDomainLocal
Definition whitney/edges0.5/basis.hh:43
│ │ │ │ +
FieldMatrix< RangeField, dimRange, dimDomainGlobal > Jacobian
Definition whitney/edges0.5/basis.hh:52
│ │ │ │ +
static const std::size_t dimDomainGlobal
Definition whitney/edges0.5/basis.hh:44
│ │ │ │ +
RF RangeField
Definition whitney/edges0.5/basis.hh:48
│ │ │ │ +
FieldVector< DomainField, dimDomainLocal > DomainLocal
Definition whitney/edges0.5/basis.hh:45
│ │ │ │ +
FieldVector< RangeField, dimRange > Range
Definition whitney/edges0.5/basis.hh:50
│ │ │ │ +
Geometry::ctype DomainField
Definition whitney/edges0.5/basis.hh:42
│ │ │ │ +
Common base class for edge elements.
Definition common.hh:19
│ │ │ │ +
RefElem refelem
The reference element for this edge element.
Definition common.hh:26
│ │ │ │ +
std::size_t s
The number of base functions.
Definition common.hh:34
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,116 +7,257 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * meta │ │ │ │ │ - * power │ │ │ │ │ -meta/power/interpolation.hh │ │ │ │ │ + * whitney │ │ │ │ │ + * edges0.5 │ │ │ │ │ +whitney/edges0.5/basis.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_INTERPOLATION_HH │ │ │ │ │ - 7#define DUNE_LOCALFUNCTIONS_META_POWER_INTERPOLATION_HH │ │ │ │ │ + 6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_BASIS_HH │ │ │ │ │ + 7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_BASIS_HH │ │ │ │ │ 8 │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ 14 │ │ │ │ │ - 15namespace Dune { │ │ │ │ │ - 16 │ │ │ │ │ - 19 │ │ │ │ │ - 25 template │ │ │ │ │ -26 class PowerInterpolation { │ │ │ │ │ - 27 static_assert(Backend::Traits::dimRange == 1, │ │ │ │ │ - 28 "PowerInterpolation works only with scalar backends"); │ │ │ │ │ - 29 │ │ │ │ │ - 30 const Backend *backend; │ │ │ │ │ - 31 │ │ │ │ │ - 32 public: │ │ │ │ │ -34 typedef BasisTraits Traits; │ │ │ │ │ - 35 │ │ │ │ │ - 37 │ │ │ │ │ -43 PowerInterpolation(const Backend &backend_) : backend(&backend_) { } │ │ │ │ │ - 44 │ │ │ │ │ - 45 private: │ │ │ │ │ - 46 template │ │ │ │ │ - 47 class ComponentEvaluator │ │ │ │ │ - 48 { │ │ │ │ │ - 49 const F &f; │ │ │ │ │ - 50 std::size_t comp; │ │ │ │ │ + 15#include │ │ │ │ │ + 16#include │ │ │ │ │ + 17#include │ │ │ │ │ + 18 │ │ │ │ │ + 19namespace Dune { │ │ │ │ │ + 20 │ │ │ │ │ + 22 // │ │ │ │ │ + 23 // Basis │ │ │ │ │ + 24 // │ │ │ │ │ + 25 │ │ │ │ │ + 27 │ │ │ │ │ + 35 template │ │ │ │ │ +36 class EdgeS0_5Basis : │ │ │ │ │ + 37 private EdgeS0_5Common │ │ │ │ │ + 38 { │ │ │ │ │ + 39 public: │ │ │ │ │ +41 struct Traits { │ │ │ │ │ +42 typedef typename Geometry::ctype DomainField; │ │ │ │ │ +43 static const std::size_t dimDomainLocal = Geometry::mydimension; │ │ │ │ │ +44 static const std::size_t dimDomainGlobal = Geometry::coorddimension; │ │ │ │ │ +45 typedef FieldVector DomainLocal; │ │ │ │ │ +46 typedef FieldVector DomainGlobal; │ │ │ │ │ + 47 │ │ │ │ │ +48 typedef RF RangeField; │ │ │ │ │ +49 static const std::size_t dimRange = dimDomainLocal; │ │ │ │ │ +50 typedef FieldVector Range; │ │ │ │ │ 51 │ │ │ │ │ - 52 public: │ │ │ │ │ - 53 ComponentEvaluator(const F &f_, std::size_t comp_) : │ │ │ │ │ - 54 f(f_), comp(comp_) │ │ │ │ │ - 55 { } │ │ │ │ │ - 56 │ │ │ │ │ - 57 typename Backend::Traits::Range operator()(const typename Backend::Traits:: │ │ │ │ │ -DomainLocal &x) const │ │ │ │ │ - 58 { │ │ │ │ │ - 59 typename Traits::Range fy = f(x); │ │ │ │ │ - 60 typename Backend::Traits::Range y; │ │ │ │ │ - 61 y[0] = fy[comp]; │ │ │ │ │ - 62 return y; │ │ │ │ │ - 63 } │ │ │ │ │ - 64 }; │ │ │ │ │ +52 typedef FieldMatrix Jacobian; │ │ │ │ │ + 53 }; │ │ │ │ │ + 54 │ │ │ │ │ + 55 private: │ │ │ │ │ + 56 typedef Dune::Impl::LagrangeSimplexLocalBasis P1LocalBasis; │ │ │ │ │ + 61 typedef ScalarLocalToGlobalBasisAdaptor P1Basis; │ │ │ │ │ + 62 │ │ │ │ │ + 63 static const P1LocalBasis& p1LocalBasis; │ │ │ │ │ + 64 static const std::size_t dim = Traits::dimDomainLocal; │ │ │ │ │ 65 │ │ │ │ │ - 66 public: │ │ │ │ │ - 68 │ │ │ │ │ - 77 template │ │ │ │ │ -78 void interpolate(const F& ff, std::vector& out) const { │ │ │ │ │ - 79 │ │ │ │ │ - 80 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ - 81 │ │ │ │ │ - 82 │ │ │ │ │ - 83 out.clear(); │ │ │ │ │ - 84 std::vector cout; │ │ │ │ │ - 85 for(std::size_t d = 0; d < Traits::dimRange; ++d) { │ │ │ │ │ - 86 // When dropping support for `evaluate()` we can simply use a lambda │ │ │ │ │ - 87 // instead of ComponentEvaluator. But changing this now would break │ │ │ │ │ - 88 // PowerInterpolation for FE-implementation outside of dune-localfunctions │ │ │ │ │ - 89 // which may not have been adjusted so far. │ │ │ │ │ - 90 backend->interpolate(ComponentEvaluator>(f, d), │ │ │ │ │ -cout); │ │ │ │ │ - 91 if(d == 0) │ │ │ │ │ - 92 out.resize(cout.size()*Traits::dimRange); │ │ │ │ │ - 93 // make sure the size of cout does not change surprisingly │ │ │ │ │ - 94 assert(out.size() == cout.size()*Traits::dimRange); │ │ │ │ │ - 95 std::copy(cout.begin(), cout.end(), out.begin() + d*cout.size()); │ │ │ │ │ - 96 } │ │ │ │ │ - 97 } │ │ │ │ │ - 98 }; │ │ │ │ │ - 99 │ │ │ │ │ - 100} // namespace Dune │ │ │ │ │ - 101 │ │ │ │ │ - 102#endif // DUNE_LOCALFUNCTIONS_META_POWER_INTERPOLATION_HH │ │ │ │ │ + 66 typedef EdgeS0_5Common Base; │ │ │ │ │ + 67 using Base::refelem; │ │ │ │ │ + 68 using Base::s; │ │ │ │ │ + 69 │ │ │ │ │ + 70 // global values of the Jacobians (gradients) of the p1 basis │ │ │ │ │ + 71 std::vector p1j; │ │ │ │ │ + 72 // edge sizes and orientations │ │ │ │ │ + 73 std::vector edgel; │ │ │ │ │ + 74 │ │ │ │ │ + 75 public: │ │ │ │ │ + 77 │ │ │ │ │ + 83 template │ │ │ │ │ +84 EdgeS0_5Basis(const Geometry& geo, const VertexOrder& vertexOrder) : │ │ │ │ │ + 85 p1j(s, typename P1Basis::Traits::Jacobian(0)), edgel(s) │ │ │ │ │ + 86 { │ │ │ │ │ + 87 // use some arbitrary position to evaluate jacobians, they are constant │ │ │ │ │ + 88 static const typename Traits::DomainLocal xl(0); │ │ │ │ │ + 89 │ │ │ │ │ + 90 // precompute Jacobian (gradients) of the p1 element │ │ │ │ │ + 91 P1Basis(p1LocalBasis, geo).evaluateJacobian(xl, p1j); │ │ │ │ │ + 92 │ │ │ │ │ + 93 // calculate edge sizes and orientations │ │ │ │ │ + 94 for(std::size_t i = 0; i < s; ++i) { │ │ │ │ │ + 95 edgel[i] = (geo.corner(refelem.subEntity(i,dim-1,0,dim))- │ │ │ │ │ + 96 geo.corner(refelem.subEntity(i,dim-1,1,dim)) │ │ │ │ │ + 97 ).two_norm(); │ │ │ │ │ + 98 const typename VertexOrder::iterator& edgeVertexOrder = │ │ │ │ │ + 99 vertexOrder.begin(dim-1, i); │ │ │ │ │ + 100 if(edgeVertexOrder[0] > edgeVertexOrder[1]) │ │ │ │ │ + 101 edgel[i] *= -1; │ │ │ │ │ + 102 } │ │ │ │ │ + 103 } │ │ │ │ │ + 104 │ │ │ │ │ +106 std::size_t size () const { return s; } │ │ │ │ │ + 107 │ │ │ │ │ +109 void evaluateFunction(const typename Traits::DomainLocal& xl, │ │ │ │ │ + 110 std::vector& out) const │ │ │ │ │ + 111 { │ │ │ │ │ + 112 out.assign(s, typename Traits::Range(0)); │ │ │ │ │ + 113 │ │ │ │ │ + 114 // compute p1 values -- use the local basis directly for that, local and │ │ │ │ │ + 115 // global values are identical for scalars │ │ │ │ │ + 116 std::vector p1v; │ │ │ │ │ + 117 p1LocalBasis.evaluateFunction(xl, p1v); │ │ │ │ │ + 118 │ │ │ │ │ + 119 for(std::size_t i = 0; i < s; i++) { │ │ │ │ │ + 120 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim); │ │ │ │ │ + 121 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim); │ │ │ │ │ + 122 out[i].axpy( p1v[i0], p1j[i1][0]); │ │ │ │ │ + 123 out[i].axpy(-p1v[i1], p1j[i0][0]); │ │ │ │ │ + 124 out[i] *= edgel[i]; │ │ │ │ │ + 125 } │ │ │ │ │ + 126 } │ │ │ │ │ + 127 │ │ │ │ │ +129 void evaluateJacobian(const typename Traits::DomainLocal&, │ │ │ │ │ + 130 std::vector& out) const │ │ │ │ │ + 131 { │ │ │ │ │ + 132 out.resize(s); │ │ │ │ │ + 133 │ │ │ │ │ + 134 for(std::size_t i = 0; i < s; i++) { │ │ │ │ │ + 135 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim); │ │ │ │ │ + 136 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim); │ │ │ │ │ + 137 for(std::size_t j = 0; j < dim; j++) │ │ │ │ │ + 138 for(std::size_t k = 0; k < dim; k++) │ │ │ │ │ + 139 out[i][j][k] = edgel[i] * │ │ │ │ │ + 140 (p1j[i0][0][k]*p1j[i1][0][j]-p1j[i1][0][k]*p1j[i0][0][j]); │ │ │ │ │ + 141 } │ │ │ │ │ + 142 } │ │ │ │ │ + 143 │ │ │ │ │ +145 void partial (const std::array& order, │ │ │ │ │ + 146 const typename Traits::DomainLocal& in, // position │ │ │ │ │ + 147 std::vector& out) const // return value │ │ │ │ │ + 148 { │ │ │ │ │ + 149 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ + 150 if (totalOrder == 0) { │ │ │ │ │ + 151 evaluateFunction(in, out); │ │ │ │ │ + 152 } else if (totalOrder==1) { │ │ │ │ │ + 153 auto const k = std::distance(order.begin(), std::find(order.begin(), │ │ │ │ │ +order.end(), 1)); │ │ │ │ │ + 154 out.resize(size()); │ │ │ │ │ + 155 │ │ │ │ │ + 156 for (std::size_t i = 0; i < s; i++) │ │ │ │ │ + 157 { │ │ │ │ │ + 158 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim); │ │ │ │ │ + 159 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim); │ │ │ │ │ + 160 for(std::size_t j = 0; j < dim; j++) │ │ │ │ │ + 161 out[i][j] = edgel[i] * │ │ │ │ │ + 162 (p1j[i0][0][k]*p1j[i1][0][j] - p1j[i1][0][k]*p1j[i0][0][j]); │ │ │ │ │ + 163 } │ │ │ │ │ + 164 } else { │ │ │ │ │ + 165 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ + 166 } │ │ │ │ │ + 167 } │ │ │ │ │ + 168 │ │ │ │ │ +170 std::size_t order () const { return 1; } │ │ │ │ │ + 171 }; │ │ │ │ │ + 172 │ │ │ │ │ + 173 template │ │ │ │ │ + 174 const typename EdgeS0_5Basis::P1LocalBasis& │ │ │ │ │ + 175 EdgeS0_5Basis::p1LocalBasis = P1LocalBasis(); │ │ │ │ │ + 176 │ │ │ │ │ + 177} // namespace Dune │ │ │ │ │ + 178 │ │ │ │ │ + 179#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_BASIS_HH │ │ │ │ │ +localtoglobaladaptors.hh │ │ │ │ │ +common.hh │ │ │ │ │ +lagrangesimplex.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::PowerInterpolation │ │ │ │ │ -Meta-interpolation turning a scalar interpolation into vector-valued │ │ │ │ │ -interpolation. │ │ │ │ │ -Definition meta/power/interpolation.hh:26 │ │ │ │ │ -Dune::PowerInterpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Determine coefficients interpolating a given function. │ │ │ │ │ -Definition meta/power/interpolation.hh:78 │ │ │ │ │ -Dune::PowerInterpolation::Traits │ │ │ │ │ -BasisTraits Traits │ │ │ │ │ -Export basis traits. │ │ │ │ │ -Definition meta/power/interpolation.hh:34 │ │ │ │ │ -Dune::PowerInterpolation::PowerInterpolation │ │ │ │ │ -PowerInterpolation(const Backend &backend_) │ │ │ │ │ -Construct a PowerInterpolation. │ │ │ │ │ -Definition meta/power/interpolation.hh:43 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::ScalarLocalToGlobalBasisAdaptor │ │ │ │ │ +Convert a simple scalar local basis into a global basis. │ │ │ │ │ +Definition localtoglobaladaptors.hh:65 │ │ │ │ │ +Dune::ScalarLocalToGlobalBasisAdaptor::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainLocal &in, std::vector< │ │ │ │ │ +typename Traits::Jacobian > &out) const │ │ │ │ │ +Definition localtoglobaladaptors.hh:125 │ │ │ │ │ +Dune::EdgeS0_5Basis │ │ │ │ │ +Basis for order 0.5 (lowest order) edge elements on simplices. │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:38 │ │ │ │ │ +Dune::EdgeS0_5Basis::EdgeS0_5Basis │ │ │ │ │ +EdgeS0_5Basis(const Geometry &geo, const VertexOrder &vertexOrder) │ │ │ │ │ +Construct an EdgeS0_5Basis. │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:84 │ │ │ │ │ +Dune::EdgeS0_5Basis::evaluateJacobian │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainLocal &, std::vector< │ │ │ │ │ +typename Traits::Jacobian > &out) const │ │ │ │ │ +Evaluate all Jacobians. │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:129 │ │ │ │ │ +Dune::EdgeS0_5Basis::evaluateFunction │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainLocal &xl, std::vector< │ │ │ │ │ +typename Traits::Range > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:109 │ │ │ │ │ +Dune::EdgeS0_5Basis::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:106 │ │ │ │ │ +Dune::EdgeS0_5Basis::partial │ │ │ │ │ +void partial(const std::array< unsigned int, dim > &order, const typename │ │ │ │ │ +Traits::DomainLocal &in, std::vector< typename Traits::Range > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:145 │ │ │ │ │ +Dune::EdgeS0_5Basis::order │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:170 │ │ │ │ │ +Dune::EdgeS0_5Basis::Traits │ │ │ │ │ +export type traits for function signature │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:41 │ │ │ │ │ +Dune::EdgeS0_5Basis::Traits::DomainGlobal │ │ │ │ │ +FieldVector< DomainField, dimDomainGlobal > DomainGlobal │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:46 │ │ │ │ │ +Dune::EdgeS0_5Basis::Traits::dimRange │ │ │ │ │ +static const std::size_t dimRange │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:49 │ │ │ │ │ +Dune::EdgeS0_5Basis::Traits::dimDomainLocal │ │ │ │ │ +static const std::size_t dimDomainLocal │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:43 │ │ │ │ │ +Dune::EdgeS0_5Basis::Traits::Jacobian │ │ │ │ │ +FieldMatrix< RangeField, dimRange, dimDomainGlobal > Jacobian │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:52 │ │ │ │ │ +Dune::EdgeS0_5Basis::Traits::dimDomainGlobal │ │ │ │ │ +static const std::size_t dimDomainGlobal │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:44 │ │ │ │ │ +Dune::EdgeS0_5Basis::Traits::RangeField │ │ │ │ │ +RF RangeField │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:48 │ │ │ │ │ +Dune::EdgeS0_5Basis::Traits::DomainLocal │ │ │ │ │ +FieldVector< DomainField, dimDomainLocal > DomainLocal │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:45 │ │ │ │ │ +Dune::EdgeS0_5Basis::Traits::Range │ │ │ │ │ +FieldVector< RangeField, dimRange > Range │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:50 │ │ │ │ │ +Dune::EdgeS0_5Basis::Traits::DomainField │ │ │ │ │ +Geometry::ctype DomainField │ │ │ │ │ +Definition whitney/edges0.5/basis.hh:42 │ │ │ │ │ +Dune::EdgeS0_5Common │ │ │ │ │ +Common base class for edge elements. │ │ │ │ │ +Definition common.hh:19 │ │ │ │ │ +Dune::EdgeS0_5Common::refelem │ │ │ │ │ +RefElem refelem │ │ │ │ │ +The reference element for this edge element. │ │ │ │ │ +Definition common.hh:26 │ │ │ │ │ +Dune::EdgeS0_5Common::s │ │ │ │ │ +std::size_t s │ │ │ │ │ +The number of base functions. │ │ │ │ │ +Definition common.hh:34 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04479.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interpolation.hh File Reference │ │ │ │ +dune-localfunctions: coefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
interpolation.hh File Reference
│ │ │ │ +
coefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <cstddef>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/localfunctions/whitney/edges0.5/common.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::EdgeS0_5Interpolation< Geometry, Traits_ >
 Interpolation for lowest order edge elements on simplices. More...
class  Dune::PowerCoefficients
 Meta-coefficients turning a scalar coefficients into vector-valued coefficients. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,26 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * whitney │ │ │ │ │ - * edges0.5 │ │ │ │ │ + * meta │ │ │ │ │ + * power │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -interpolation.hh File Reference │ │ │ │ │ +coefficients.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::EdgeS0_5Interpolation<_Geometry,_Traits__> │ │ │ │ │ -  Interpolation for lowest order edge elements on simplices. More... │ │ │ │ │ +class  Dune::PowerCoefficients │ │ │ │ │ +  Meta-coefficients turning a scalar coefficients into vector-valued │ │ │ │ │ + coefficients. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04479_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interpolation.hh Source File │ │ │ │ +dune-localfunctions: coefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,115 +70,75 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
whitney/edges0.5/interpolation.hh
│ │ │ │ +
meta/power/coefficients.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_INTERPOLATION_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_META_POWER_COEFFICIENTS_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_META_POWER_COEFFICIENTS_HH
│ │ │ │
8
│ │ │ │
9#include <cstddef>
│ │ │ │
10#include <vector>
│ │ │ │
11
│ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune {
│ │ │ │ -
16
│ │ │ │ -
18 //
│ │ │ │ -
19 // Interpolation
│ │ │ │ -
20 //
│ │ │ │ -
21
│ │ │ │ -
23
│ │ │ │ -
29 template<class Geometry, class Traits_>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
31 private EdgeS0_5Common<Traits_::dimDomainLocal,
│ │ │ │ -
32 typename Traits_::DomainField>
│ │ │ │ -
33 {
│ │ │ │ -
34 public:
│ │ │ │ -
35 typedef Traits_ Traits;
│ │ │ │ -
36
│ │ │ │ -
37 private:
│ │ │ │ -
38 static const std::size_t dim = Traits::dimDomainLocal;
│ │ │ │ - │ │ │ │ -
40 using Base::refelem;
│ │ │ │ -
41 using Base::s;
│ │ │ │ -
42
│ │ │ │ -
43 std::vector<typename Traits::DomainGlobal> edgev;
│ │ │ │ -
44
│ │ │ │ -
45 public:
│ │ │ │ -
47
│ │ │ │ -
53 template<typename VertexOrder>
│ │ │ │ -
│ │ │ │ -
54 EdgeS0_5Interpolation(const Geometry& geo,
│ │ │ │ -
55 const VertexOrder& vertexOrder) :
│ │ │ │ -
56 edgev(s)
│ │ │ │ -
57 {
│ │ │ │ -
58 for(std::size_t i = 0; i < s; ++i) {
│ │ │ │ -
59 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim);
│ │ │ │ -
60 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim);
│ │ │ │ -
61
│ │ │ │ -
62 edgev[i] = geo.corner(i1);
│ │ │ │ -
63 edgev[i] -= geo.corner(i0);
│ │ │ │ -
64 edgev[i] /= edgev[i].two_norm();
│ │ │ │ -
65
│ │ │ │ -
66 const typename VertexOrder::iterator& edgeVertexOrder =
│ │ │ │ -
67 vertexOrder.begin(dim-1, i);
│ │ │ │ -
68 if(edgeVertexOrder[0] > edgeVertexOrder[1])
│ │ │ │ -
69 edgev[i] *= -1;
│ │ │ │ -
70 }
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
74 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
75 void interpolate(const F& ff, std::vector<C>& out) const {
│ │ │ │ -
76 typename Traits::Range y;
│ │ │ │ -
77
│ │ │ │ -
78 auto&& f = Impl::makeFunctionWithCallOperator<std::decay_t<decltype(refelem.position(0,dim-1))>>(ff);
│ │ │ │ -
79
│ │ │ │ -
80 out.resize(s);
│ │ │ │ -
81
│ │ │ │ -
82 for(std::size_t i = 0; i < s; ++i) {
│ │ │ │ -
83 y = f(refelem.position(i,dim-1));
│ │ │ │ -
84
│ │ │ │ -
85 out[i] = y * edgev[i];
│ │ │ │ -
86 }
│ │ │ │ -
87 }
│ │ │ │ -
│ │ │ │ -
88 };
│ │ │ │ -
│ │ │ │ -
89
│ │ │ │ -
90} // namespace Dune
│ │ │ │ -
91
│ │ │ │ -
92#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH
│ │ │ │ - │ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune {
│ │ │ │ +
15
│ │ │ │ +
18
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 std::vector<LocalKey> keys;
│ │ │ │ +
24
│ │ │ │ +
25 public:
│ │ │ │ +
27
│ │ │ │ +
35 template<class Backend>
│ │ │ │ +
│ │ │ │ +
36 PowerCoefficients(const Backend &backend, std::size_t power) :
│ │ │ │ +
37 keys(backend.size()*power)
│ │ │ │ +
38 {
│ │ │ │ +
39 for(std::size_t i = 0; i < backend.size(); ++i) {
│ │ │ │ +
40 const LocalKey &k = backend.localKey(i);
│ │ │ │ +
41 for(std::size_t d = 0; d < power; ++d)
│ │ │ │ +
42 keys[i+d*backend.size()] =
│ │ │ │ +
43 LocalKey(k.subEntity(), k.codim(), power*k.index() + d);
│ │ │ │ +
44 }
│ │ │ │ +
45 }
│ │ │ │ +
│ │ │ │ +
47 inline std::size_t size() const { return keys.size(); }
│ │ │ │ +
48
│ │ │ │ +
50 inline const LocalKey& localKey(std::size_t i) const { return keys[i]; }
│ │ │ │ +
51 };
│ │ │ │ +
│ │ │ │ +
52
│ │ │ │ +
53} // namespace Dune
│ │ │ │ +
54
│ │ │ │ +
55#endif // DUNE_LOCALFUNCTIONS_META_POWER_COEFFICIENTS_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
│ │ │ │ -
std::size_t s
The number of base functions.
Definition common.hh:34
│ │ │ │ -
Interpolation for lowest order edge elements on simplices.
Definition whitney/edges0.5/interpolation.hh:33
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Interpolation of a function.
Definition whitney/edges0.5/interpolation.hh:75
│ │ │ │ -
Traits_ Traits
Definition whitney/edges0.5/interpolation.hh:35
│ │ │ │ -
EdgeS0_5Interpolation(const Geometry &geo, const VertexOrder &vertexOrder)
constructor
Definition whitney/edges0.5/interpolation.hh:54
│ │ │ │ - │ │ │ │ +
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 codim() const
Return codim of associated entity.
Definition localkey.hh:62
│ │ │ │ +
unsigned int subEntity() const
Return number of associated subentity.
Definition localkey.hh:56
│ │ │ │ +
Meta-coefficients turning a scalar coefficients into vector-valued coefficients.
Definition meta/power/coefficients.hh:22
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition meta/power/coefficients.hh:47
│ │ │ │ +
PowerCoefficients(const Backend &backend, std::size_t power)
Construct a PowerCoefficients object.
Definition meta/power/coefficients.hh:36
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition meta/power/coefficients.hh:50
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,123 +7,89 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * whitney │ │ │ │ │ - * edges0.5 │ │ │ │ │ -whitney/edges0.5/interpolation.hh │ │ │ │ │ + * meta │ │ │ │ │ + * power │ │ │ │ │ +meta/power/coefficients.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_INTERPOLATION_HH │ │ │ │ │ - 7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH │ │ │ │ │ + 6#ifndef DUNE_LOCALFUNCTIONS_META_POWER_COEFFICIENTS_HH │ │ │ │ │ + 7#define DUNE_LOCALFUNCTIONS_META_POWER_COEFFICIENTS_HH │ │ │ │ │ 8 │ │ │ │ │ 9#include │ │ │ │ │ 10#include │ │ │ │ │ 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15namespace Dune { │ │ │ │ │ - 16 │ │ │ │ │ - 18 // │ │ │ │ │ - 19 // Interpolation │ │ │ │ │ - 20 // │ │ │ │ │ - 21 │ │ │ │ │ - 23 │ │ │ │ │ - 29 template │ │ │ │ │ -30 class EdgeS0_5Interpolation : │ │ │ │ │ - 31 private EdgeS0_5Common │ │ │ │ │ - 33 { │ │ │ │ │ - 34 public: │ │ │ │ │ -35 typedef Traits_ Traits; │ │ │ │ │ - 36 │ │ │ │ │ - 37 private: │ │ │ │ │ - 38 static const std::size_t dim = Traits::dimDomainLocal; │ │ │ │ │ - 39 typedef EdgeS0_5Common Base; │ │ │ │ │ - 40 using Base::refelem; │ │ │ │ │ - 41 using Base::s; │ │ │ │ │ - 42 │ │ │ │ │ - 43 std::vector edgev; │ │ │ │ │ - 44 │ │ │ │ │ - 45 public: │ │ │ │ │ - 47 │ │ │ │ │ - 53 template │ │ │ │ │ -54 EdgeS0_5Interpolation(const Geometry& geo, │ │ │ │ │ - 55 const VertexOrder& vertexOrder) : │ │ │ │ │ - 56 edgev(s) │ │ │ │ │ - 57 { │ │ │ │ │ - 58 for(std::size_t i = 0; i < s; ++i) { │ │ │ │ │ - 59 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim); │ │ │ │ │ - 60 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim); │ │ │ │ │ - 61 │ │ │ │ │ - 62 edgev[i] = geo.corner(i1); │ │ │ │ │ - 63 edgev[i] -= geo.corner(i0); │ │ │ │ │ - 64 edgev[i] /= edgev[i].two_norm(); │ │ │ │ │ - 65 │ │ │ │ │ - 66 const typename VertexOrder::iterator& edgeVertexOrder = │ │ │ │ │ - 67 vertexOrder.begin(dim-1, i); │ │ │ │ │ - 68 if(edgeVertexOrder[0] > edgeVertexOrder[1]) │ │ │ │ │ - 69 edgev[i] *= -1; │ │ │ │ │ - 70 } │ │ │ │ │ - 71 } │ │ │ │ │ - 72 │ │ │ │ │ - 74 template │ │ │ │ │ -75 void interpolate(const F& ff, std::vector& out) const { │ │ │ │ │ - 76 typename Traits::Range y; │ │ │ │ │ - 77 │ │ │ │ │ - 78 auto&& f = Impl::makeFunctionWithCallOperator>(ff); │ │ │ │ │ - 79 │ │ │ │ │ - 80 out.resize(s); │ │ │ │ │ - 81 │ │ │ │ │ - 82 for(std::size_t i = 0; i < s; ++i) { │ │ │ │ │ - 83 y = f(refelem.position(i,dim-1)); │ │ │ │ │ - 84 │ │ │ │ │ - 85 out[i] = y * edgev[i]; │ │ │ │ │ - 86 } │ │ │ │ │ - 87 } │ │ │ │ │ - 88 }; │ │ │ │ │ - 89 │ │ │ │ │ - 90} // namespace Dune │ │ │ │ │ - 91 │ │ │ │ │ - 92#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH │ │ │ │ │ -common.hh │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14namespace Dune { │ │ │ │ │ + 15 │ │ │ │ │ + 18 │ │ │ │ │ +22 class PowerCoefficients { │ │ │ │ │ + 23 std::vector keys; │ │ │ │ │ + 24 │ │ │ │ │ + 25 public: │ │ │ │ │ + 27 │ │ │ │ │ + 35 template │ │ │ │ │ +36 PowerCoefficients(const Backend &backend, std::size_t power) : │ │ │ │ │ + 37 keys(backend.size()*power) │ │ │ │ │ + 38 { │ │ │ │ │ + 39 for(std::size_t i = 0; i < backend.size(); ++i) { │ │ │ │ │ + 40 const LocalKey &k = backend.localKey(i); │ │ │ │ │ + 41 for(std::size_t d = 0; d < power; ++d) │ │ │ │ │ + 42 keys[i+d*backend.size()] = │ │ │ │ │ + 43 LocalKey(k.subEntity(), k.codim(), power*k.index() + d); │ │ │ │ │ + 44 } │ │ │ │ │ + 45 } │ │ │ │ │ +47 inline std::size_t size() const { return keys.size(); } │ │ │ │ │ + 48 │ │ │ │ │ +50 inline const LocalKey& localKey(std::size_t i) const { return keys[i]; } │ │ │ │ │ + 51 }; │ │ │ │ │ + 52 │ │ │ │ │ + 53} // namespace Dune │ │ │ │ │ + 54 │ │ │ │ │ + 55#endif // DUNE_LOCALFUNCTIONS_META_POWER_COEFFICIENTS_HH │ │ │ │ │ +localkey.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::EdgeS0_5Common │ │ │ │ │ -Common base class for edge elements. │ │ │ │ │ -Definition common.hh:19 │ │ │ │ │ -Dune::EdgeS0_5Common::refelem │ │ │ │ │ -RefElem refelem │ │ │ │ │ -The reference element for this edge element. │ │ │ │ │ -Definition common.hh:26 │ │ │ │ │ -Dune::EdgeS0_5Common::s │ │ │ │ │ -std::size_t s │ │ │ │ │ -The number of base functions. │ │ │ │ │ -Definition common.hh:34 │ │ │ │ │ -Dune::EdgeS0_5Interpolation │ │ │ │ │ -Interpolation for lowest order edge elements on simplices. │ │ │ │ │ -Definition whitney/edges0.5/interpolation.hh:33 │ │ │ │ │ -Dune::EdgeS0_5Interpolation::interpolate │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Interpolation of a function. │ │ │ │ │ -Definition whitney/edges0.5/interpolation.hh:75 │ │ │ │ │ -Dune::EdgeS0_5Interpolation::Traits │ │ │ │ │ -Traits_ Traits │ │ │ │ │ -Definition whitney/edges0.5/interpolation.hh:35 │ │ │ │ │ -Dune::EdgeS0_5Interpolation::EdgeS0_5Interpolation │ │ │ │ │ -EdgeS0_5Interpolation(const Geometry &geo, const VertexOrder &vertexOrder) │ │ │ │ │ -constructor │ │ │ │ │ -Definition whitney/edges0.5/interpolation.hh:54 │ │ │ │ │ -localinterpolation.hh │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::LocalKey::index │ │ │ │ │ +unsigned int index() const │ │ │ │ │ +Return offset within subentity. │ │ │ │ │ +Definition localkey.hh:68 │ │ │ │ │ +Dune::LocalKey::codim │ │ │ │ │ +unsigned int codim() const │ │ │ │ │ +Return codim of associated entity. │ │ │ │ │ +Definition localkey.hh:62 │ │ │ │ │ +Dune::LocalKey::subEntity │ │ │ │ │ +unsigned int subEntity() const │ │ │ │ │ +Return number of associated subentity. │ │ │ │ │ +Definition localkey.hh:56 │ │ │ │ │ +Dune::PowerCoefficients │ │ │ │ │ +Meta-coefficients turning a scalar coefficients into vector-valued │ │ │ │ │ +coefficients. │ │ │ │ │ +Definition meta/power/coefficients.hh:22 │ │ │ │ │ +Dune::PowerCoefficients::size │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition meta/power/coefficients.hh:47 │ │ │ │ │ +Dune::PowerCoefficients::PowerCoefficients │ │ │ │ │ +PowerCoefficients(const Backend &backend, std::size_t power) │ │ │ │ │ +Construct a PowerCoefficients object. │ │ │ │ │ +Definition meta/power/coefficients.hh:36 │ │ │ │ │ +Dune::PowerCoefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition meta/power/coefficients.hh:50 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04482.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basis.hh File Reference │ │ │ │ +dune-localfunctions: coefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
basis.hh File Reference
│ │ │ │ +
coefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <cstddef>
│ │ │ │ +
#include <cstddef>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/localfunctions/whitney/edges0.5/common.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::PowerBasis< Backend, dimR >
 Meta-basis turning a scalar basis into vector-valued basis. More...
 
struct  Dune::PowerBasis< Backend, dimR >::Traits
 types of domain and range More...
class  Dune::EdgeS0_5Coefficients< dim >
 Coefficients for lowest order edge elements on simplices. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,30 +6,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * meta │ │ │ │ │ - * power │ │ │ │ │ + * whitney │ │ │ │ │ + * edges0.5 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -basis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +coefficients.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ - class  Dune::PowerBasis<_Backend,_dimR_> │ │ │ │ │ -  Meta-basis turning a scalar basis into vector-valued basis. More... │ │ │ │ │ -  │ │ │ │ │ -struct  Dune::PowerBasis<_Backend,_dimR_>::Traits │ │ │ │ │ -  types of domain and range More... │ │ │ │ │ +class  Dune::EdgeS0_5Coefficients<_dim_> │ │ │ │ │ +  Coefficients for lowest order edge elements on simplices. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04482_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basis.hh Source File │ │ │ │ +dune-localfunctions: coefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,124 +70,76 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
meta/power/basis.hh
│ │ │ │ +
whitney/edges0.5/coefficients.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_BASIS_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_META_POWER_BASIS_HH
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COEFFICIENTS_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COEFFICIENTS_HH
│ │ │ │
8
│ │ │ │ -
9#include <numeric>
│ │ │ │ -
10#include <cstddef>
│ │ │ │ -
11#include <vector>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/common/fmatrix.hh>
│ │ │ │ -
14#include <dune/common/fvector.hh>
│ │ │ │ -
15
│ │ │ │ -
16namespace Dune {
│ │ │ │ -
17
│ │ │ │ -
19
│ │ │ │ -
25 template<class Backend, std::size_t dimR>
│ │ │ │ -
│ │ │ │ -
26 class PowerBasis {
│ │ │ │ -
27 static_assert(Backend::Traits::dimRange == 1,
│ │ │ │ -
28 "PowerBasis works only with scalar backends");
│ │ │ │ -
29
│ │ │ │ -
30 // don't use a reference here so this class stays copyable
│ │ │ │ -
31 const Backend *backend;
│ │ │ │ +
9#include <cstddef>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune {
│ │ │ │ +
16
│ │ │ │ +
18 //
│ │ │ │ +
19 // Coefficients
│ │ │ │ +
20 //
│ │ │ │ +
21
│ │ │ │ +
23
│ │ │ │ +
29 template<std::size_t dim>
│ │ │ │ +
│ │ │ │ +
30 class EdgeS0_5Coefficients : private EdgeS0_5Common<dim> {
│ │ │ │ +
31 using EdgeS0_5Common<dim>::s;
│ │ │ │
32
│ │ │ │ -
33 public:
│ │ │ │ -
│ │ │ │ -
35 struct Traits : public Backend::Traits
│ │ │ │ -
36 {
│ │ │ │ -
38 static const std::size_t dimRange = dimR;
│ │ │ │ -
40 typedef FieldVector<typename Traits::RangeField, dimR> Range;
│ │ │ │ +
33 std::vector<LocalKey> li;
│ │ │ │ +
34
│ │ │ │ +
35 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 for(std::size_t i = 0; i < s; i++)
│ │ │ │ +
39 li[i] = LocalKey(i, dim-1, 0);
│ │ │ │ +
40 }
│ │ │ │ +
│ │ │ │
41
│ │ │ │ -
43
│ │ │ │ -
47 typedef FieldMatrix<typename Traits::RangeField, dimR,
│ │ │ │ -
48 Traits::dimDomainGlobal> Jacobian;
│ │ │ │ -
49 };
│ │ │ │ +
43 std::size_t size () const { return s; }
│ │ │ │ +
44
│ │ │ │ +
46 const LocalKey& localKey(std::size_t i) const { return li[i]; }
│ │ │ │ +
47 };
│ │ │ │
│ │ │ │ +
48
│ │ │ │ +
49} // namespace Dune
│ │ │ │
50
│ │ │ │ -
52
│ │ │ │ -
58 PowerBasis(const Backend &backend_) : backend(&backend_) { }
│ │ │ │ -
59
│ │ │ │ -
61 std::size_t size () const { return backend->size()*dimR; }
│ │ │ │ -
63 std::size_t order () const { return backend->order(); }
│ │ │ │ -
64
│ │ │ │ -
│ │ │ │ -
66 void evaluateFunction(const typename Traits::DomainLocal& in,
│ │ │ │ -
67 std::vector<typename Traits::Range>& out) const
│ │ │ │ -
68 {
│ │ │ │ -
69 std::vector<typename Backend::Traits::Range> backendValues;
│ │ │ │ -
70 backend->evaluateFunction(in, backendValues);
│ │ │ │ -
71 out.assign(size(), typename Traits::Range(0));
│ │ │ │ -
72 for(std::size_t d = 0; d < dimR; ++d)
│ │ │ │ -
73 for(std::size_t i = 0; i < backend->size(); ++i)
│ │ │ │ -
74 out[d*backend->size()+i][d] = backendValues[i][0];
│ │ │ │ -
75 }
│ │ │ │ -
│ │ │ │ -
76
│ │ │ │ -
│ │ │ │ -
78 void evaluateJacobian(const typename Traits::DomainLocal& in,
│ │ │ │ -
79 std::vector<typename Traits::Jacobian>& out) const
│ │ │ │ -
80 {
│ │ │ │ -
81 std::vector<typename Backend::Traits::Jacobian> backendValues;
│ │ │ │ -
82 backend->evaluateJacobian(in, backendValues);
│ │ │ │ -
83 out.assign(size(), typename Traits::Jacobian(0));
│ │ │ │ -
84 for(std::size_t d = 0; d < dimR; ++d)
│ │ │ │ -
85 for(std::size_t i = 0; i < backend->size(); ++i)
│ │ │ │ -
86 out[d*backend->size()+i][d] = backendValues[i][0];
│ │ │ │ -
87 }
│ │ │ │ -
│ │ │ │ -
88
│ │ │ │ -
│ │ │ │ -
90 void partial (const std::array<unsigned int, Backend::Traits::dimDomainGlobal>& order,
│ │ │ │ -
91 const typename Traits::DomainLocal& in, // position
│ │ │ │ -
92 std::vector<typename Traits::Range>& out) const // return value
│ │ │ │ -
93 {
│ │ │ │ -
94 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
95 if (totalOrder == 0) {
│ │ │ │ -
96 evaluateFunction(in, out);
│ │ │ │ -
97 } else {
│ │ │ │ -
98 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
99 }
│ │ │ │ -
100 }
│ │ │ │ -
│ │ │ │ -
101 };
│ │ │ │ -
│ │ │ │ -
102
│ │ │ │ -
103} // namespace Dune
│ │ │ │ -
104
│ │ │ │ -
105#endif // DUNE_LOCALFUNCTIONS_META_POWER_BASIS_HH
│ │ │ │ +
51#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COEFFICIENTS_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Meta-basis turning a scalar basis into vector-valued basis.
Definition meta/power/basis.hh:26
│ │ │ │ -
PowerBasis(const Backend &backend_)
Construct a PowerBasis.
Definition meta/power/basis.hh:58
│ │ │ │ -
std::size_t size() const
Number of shape functions.
Definition meta/power/basis.hh:61
│ │ │ │ -
void partial(const std::array< unsigned int, Backend::Traits::dimDomainGlobal > &order, const typename Traits::DomainLocal &in, std::vector< typename Traits::Range > &out) const
Evaluate partial derivatives of all shape functions.
Definition meta/power/basis.hh:90
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainLocal &in, std::vector< typename Traits::Jacobian > &out) const
Evaluate Jacobian of all shape functions at given position.
Definition meta/power/basis.hh:78
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainLocal &in, std::vector< typename Traits::Range > &out) const
Evaluate all shape functions at given position.
Definition meta/power/basis.hh:66
│ │ │ │ -
std::size_t order() const
Polynomial order of the shape functions for quadrature.
Definition meta/power/basis.hh:63
│ │ │ │ -
types of domain and range
Definition meta/power/basis.hh:36
│ │ │ │ -
FieldMatrix< typename Traits::RangeField, dimR, Traits::dimDomainGlobal > Jacobian
Jacobian properties.
Definition meta/power/basis.hh:48
│ │ │ │ -
FieldVector< typename Traits::RangeField, dimR > Range
Type used for range values.
Definition meta/power/basis.hh:40
│ │ │ │ -
static const std::size_t dimRange
Dimension of the range values.
Definition meta/power/basis.hh:38
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Coefficients for lowest order edge elements on simplices.
Definition whitney/edges0.5/coefficients.hh:30
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition whitney/edges0.5/coefficients.hh:46
│ │ │ │ +
EdgeS0_5Coefficients()
Standard constructor.
Definition whitney/edges0.5/coefficients.hh:37
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition whitney/edges0.5/coefficients.hh:43
│ │ │ │ +
Common base class for edge elements.
Definition common.hh:19
│ │ │ │ +
std::size_t s
The number of base functions.
Definition common.hh:34
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,146 +7,85 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * meta │ │ │ │ │ - * power │ │ │ │ │ -meta/power/basis.hh │ │ │ │ │ + * whitney │ │ │ │ │ + * edges0.5 │ │ │ │ │ +whitney/edges0.5/coefficients.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_BASIS_HH │ │ │ │ │ - 7#define DUNE_LOCALFUNCTIONS_META_POWER_BASIS_HH │ │ │ │ │ + 6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COEFFICIENTS_HH │ │ │ │ │ + 7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COEFFICIENTS_HH │ │ │ │ │ 8 │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11#include │ │ │ │ │ - 12 │ │ │ │ │ - 13#include │ │ │ │ │ - 14#include │ │ │ │ │ - 15 │ │ │ │ │ - 16namespace Dune { │ │ │ │ │ - 17 │ │ │ │ │ - 19 │ │ │ │ │ - 25 template │ │ │ │ │ -26 class PowerBasis { │ │ │ │ │ - 27 static_assert(Backend::Traits::dimRange == 1, │ │ │ │ │ - 28 "PowerBasis works only with scalar backends"); │ │ │ │ │ - 29 │ │ │ │ │ - 30 // don't use a reference here so this class stays copyable │ │ │ │ │ - 31 const Backend *backend; │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11 │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune { │ │ │ │ │ + 16 │ │ │ │ │ + 18 // │ │ │ │ │ + 19 // Coefficients │ │ │ │ │ + 20 // │ │ │ │ │ + 21 │ │ │ │ │ + 23 │ │ │ │ │ + 29 template │ │ │ │ │ +30 class EdgeS0_5Coefficients : private EdgeS0_5Common { │ │ │ │ │ + 31 using EdgeS0_5Common::s; │ │ │ │ │ 32 │ │ │ │ │ - 33 public: │ │ │ │ │ -35 struct Traits : public Backend::Traits │ │ │ │ │ - 36 { │ │ │ │ │ -38 static const std::size_t dimRange = dimR; │ │ │ │ │ -40 typedef FieldVector Range; │ │ │ │ │ + 33 std::vector li; │ │ │ │ │ + 34 │ │ │ │ │ + 35 public: │ │ │ │ │ +37 EdgeS0_5Coefficients() : li(s) { │ │ │ │ │ + 38 for(std::size_t i = 0; i < s; i++) │ │ │ │ │ + 39 li[i] = LocalKey(i, dim-1, 0); │ │ │ │ │ + 40 } │ │ │ │ │ 41 │ │ │ │ │ - 43 │ │ │ │ │ - 47 typedef FieldMatrix Jacobian; │ │ │ │ │ - 49 }; │ │ │ │ │ +43 std::size_t size () const { return s; } │ │ │ │ │ + 44 │ │ │ │ │ +46 const LocalKey& localKey(std::size_t i) const { return li[i]; } │ │ │ │ │ + 47 }; │ │ │ │ │ + 48 │ │ │ │ │ + 49} // namespace Dune │ │ │ │ │ 50 │ │ │ │ │ - 52 │ │ │ │ │ -58 PowerBasis(const Backend &backend_) : backend(&backend_) { } │ │ │ │ │ - 59 │ │ │ │ │ -61 std::size_t size () const { return backend->size()*dimR; } │ │ │ │ │ -63 std::size_t order () const { return backend->order(); } │ │ │ │ │ - 64 │ │ │ │ │ -66 void evaluateFunction(const typename Traits::DomainLocal& in, │ │ │ │ │ - 67 std::vector& out) const │ │ │ │ │ - 68 { │ │ │ │ │ - 69 std::vector backendValues; │ │ │ │ │ - 70 backend->evaluateFunction(in, backendValues); │ │ │ │ │ - 71 out.assign(size(), typename Traits::Range(0)); │ │ │ │ │ - 72 for(std::size_t d = 0; d < dimR; ++d) │ │ │ │ │ - 73 for(std::size_t i = 0; i < backend->size(); ++i) │ │ │ │ │ - 74 out[d*backend->size()+i][d] = backendValues[i][0]; │ │ │ │ │ - 75 } │ │ │ │ │ - 76 │ │ │ │ │ -78 void evaluateJacobian(const typename Traits::DomainLocal& in, │ │ │ │ │ - 79 std::vector& out) const │ │ │ │ │ - 80 { │ │ │ │ │ - 81 std::vector backendValues; │ │ │ │ │ - 82 backend->evaluateJacobian(in, backendValues); │ │ │ │ │ - 83 out.assign(size(), typename Traits::Jacobian(0)); │ │ │ │ │ - 84 for(std::size_t d = 0; d < dimR; ++d) │ │ │ │ │ - 85 for(std::size_t i = 0; i < backend->size(); ++i) │ │ │ │ │ - 86 out[d*backend->size()+i][d] = backendValues[i][0]; │ │ │ │ │ - 87 } │ │ │ │ │ - 88 │ │ │ │ │ -90 void partial (const std::array& order, │ │ │ │ │ - 91 const typename Traits::DomainLocal& in, // position │ │ │ │ │ - 92 std::vector& out) const // return value │ │ │ │ │ - 93 { │ │ │ │ │ - 94 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ - 95 if (totalOrder == 0) { │ │ │ │ │ - 96 evaluateFunction(in, out); │ │ │ │ │ - 97 } else { │ │ │ │ │ - 98 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ - 99 } │ │ │ │ │ - 100 } │ │ │ │ │ - 101 }; │ │ │ │ │ - 102 │ │ │ │ │ - 103} // namespace Dune │ │ │ │ │ - 104 │ │ │ │ │ - 105#endif // DUNE_LOCALFUNCTIONS_META_POWER_BASIS_HH │ │ │ │ │ + 51#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COEFFICIENTS_HH │ │ │ │ │ +localkey.hh │ │ │ │ │ +common.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::PowerBasis │ │ │ │ │ -Meta-basis turning a scalar basis into vector-valued basis. │ │ │ │ │ -Definition meta/power/basis.hh:26 │ │ │ │ │ -Dune::PowerBasis::PowerBasis │ │ │ │ │ -PowerBasis(const Backend &backend_) │ │ │ │ │ -Construct a PowerBasis. │ │ │ │ │ -Definition meta/power/basis.hh:58 │ │ │ │ │ -Dune::PowerBasis::size │ │ │ │ │ +Dune::LocalKey │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +Definition localkey.hh:23 │ │ │ │ │ +Dune::EdgeS0_5Coefficients │ │ │ │ │ +Coefficients for lowest order edge elements on simplices. │ │ │ │ │ +Definition whitney/edges0.5/coefficients.hh:30 │ │ │ │ │ +Dune::EdgeS0_5Coefficients::localKey │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +Definition whitney/edges0.5/coefficients.hh:46 │ │ │ │ │ +Dune::EdgeS0_5Coefficients::EdgeS0_5Coefficients │ │ │ │ │ +EdgeS0_5Coefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +Definition whitney/edges0.5/coefficients.hh:37 │ │ │ │ │ +Dune::EdgeS0_5Coefficients::size │ │ │ │ │ std::size_t size() const │ │ │ │ │ -Number of shape functions. │ │ │ │ │ -Definition meta/power/basis.hh:61 │ │ │ │ │ -Dune::PowerBasis::partial │ │ │ │ │ -void partial(const std::array< unsigned int, Backend::Traits::dimDomainGlobal > │ │ │ │ │ -&order, const typename Traits::DomainLocal &in, std::vector< typename Traits:: │ │ │ │ │ -Range > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -Definition meta/power/basis.hh:90 │ │ │ │ │ -Dune::PowerBasis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainLocal &in, std::vector< │ │ │ │ │ -typename Traits::Jacobian > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions at given position. │ │ │ │ │ -Definition meta/power/basis.hh:78 │ │ │ │ │ -Dune::PowerBasis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainLocal &in, std::vector< │ │ │ │ │ -typename Traits::Range > &out) const │ │ │ │ │ -Evaluate all shape functions at given position. │ │ │ │ │ -Definition meta/power/basis.hh:66 │ │ │ │ │ -Dune::PowerBasis::order │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -Polynomial order of the shape functions for quadrature. │ │ │ │ │ -Definition meta/power/basis.hh:63 │ │ │ │ │ -Dune::PowerBasis::Traits │ │ │ │ │ -types of domain and range │ │ │ │ │ -Definition meta/power/basis.hh:36 │ │ │ │ │ -Dune::PowerBasis::Traits::Jacobian │ │ │ │ │ -FieldMatrix< typename Traits::RangeField, dimR, Traits::dimDomainGlobal > │ │ │ │ │ -Jacobian │ │ │ │ │ -Jacobian properties. │ │ │ │ │ -Definition meta/power/basis.hh:48 │ │ │ │ │ -Dune::PowerBasis::Traits::Range │ │ │ │ │ -FieldVector< typename Traits::RangeField, dimR > Range │ │ │ │ │ -Type used for range values. │ │ │ │ │ -Definition meta/power/basis.hh:40 │ │ │ │ │ -Dune::PowerBasis::Traits::dimRange │ │ │ │ │ -static const std::size_t dimRange │ │ │ │ │ -Dimension of the range values. │ │ │ │ │ -Definition meta/power/basis.hh:38 │ │ │ │ │ +number of coefficients │ │ │ │ │ +Definition whitney/edges0.5/coefficients.hh:43 │ │ │ │ │ +Dune::EdgeS0_5Common │ │ │ │ │ +Common base class for edge elements. │ │ │ │ │ +Definition common.hh:19 │ │ │ │ │ +Dune::EdgeS0_5Common::s │ │ │ │ │ +std::size_t s │ │ │ │ │ +The number of base functions. │ │ │ │ │ +Definition common.hh:34 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04485.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basis.hh File Reference │ │ │ │ +dune-localfunctions: interpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,38 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
basis.hh File Reference
│ │ │ │ +
interpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ +
#include <type_traits>
│ │ │ │ +#include <utility>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/localfunctions/common/localtoglobaladaptors.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ -#include <dune/localfunctions/whitney/edges0.5/common.hh>
│ │ │ │ +#include <dune/common/typeutilities.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangecoefficients.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::EdgeS0_5Basis< Geometry, RF >
 Basis for order 0.5 (lowest order) edge elements on simplices. More...
class  Dune::LocalLagrangeInterpolation< LP, dim, F >
 
struct  Dune::EdgeS0_5Basis< Geometry, RF >::Traits
 export type traits for function signature More...
struct  Dune::LagrangeInterpolationFactory< LP, dim, F >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -6,32 +6,28 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * whitney │ │ │ │ │ - * edges0.5 │ │ │ │ │ + * lagrange │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -basis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +interpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ - class  Dune::EdgeS0_5Basis<_Geometry,_RF_> │ │ │ │ │ -  Basis for order 0.5 (lowest order) edge elements on simplices. More... │ │ │ │ │ + class  Dune::LocalLagrangeInterpolation<_LP,_dim,_F_> │ │ │ │ │   │ │ │ │ │ -struct  Dune::EdgeS0_5Basis<_Geometry,_RF_>::Traits │ │ │ │ │ -  export type traits for function signature More... │ │ │ │ │ +struct  Dune::LagrangeInterpolationFactory<_LP,_dim,_F_> │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04485_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basis.hh Source File │ │ │ │ +dune-localfunctions: interpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,217 +70,189 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
whitney/edges0.5/basis.hh
│ │ │ │ +
lagrange/interpolation.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_BASIS_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_BASIS_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <cstddef>
│ │ │ │ +
5#ifndef DUNE_LAGRANGEBASIS_INTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LAGRANGEBASIS_INTERPOLATION_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <type_traits>
│ │ │ │ +
9#include <utility>
│ │ │ │
10#include <vector>
│ │ │ │
11
│ │ │ │ -
12#include <dune/common/fmatrix.hh>
│ │ │ │ -
13#include <dune/common/fvector.hh>
│ │ │ │ -
14
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
18
│ │ │ │ -
19namespace Dune {
│ │ │ │ -
20
│ │ │ │ -
22 //
│ │ │ │ -
23 // Basis
│ │ │ │ -
24 //
│ │ │ │ -
25
│ │ │ │ -
27
│ │ │ │ -
35 template<class Geometry, class RF>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 private EdgeS0_5Common<Geometry::mydimension, typename Geometry::ctype>
│ │ │ │ -
38 {
│ │ │ │ -
39 public:
│ │ │ │ -
│ │ │ │ -
41 struct Traits {
│ │ │ │ -
42 typedef typename Geometry::ctype DomainField;
│ │ │ │ -
43 static const std::size_t dimDomainLocal = Geometry::mydimension;
│ │ │ │ -
44 static const std::size_t dimDomainGlobal = Geometry::coorddimension;
│ │ │ │ -
45 typedef FieldVector<DomainField, dimDomainLocal> DomainLocal;
│ │ │ │ -
46 typedef FieldVector<DomainField, dimDomainGlobal> DomainGlobal;
│ │ │ │ +
12#include <dune/common/typeutilities.hh>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
20 template< template <class,unsigned int> class LP,
│ │ │ │ +
21 unsigned int dim, class F >
│ │ │ │ +
22 struct LagrangeInterpolationFactory;
│ │ │ │ +
23
│ │ │ │ +
24 // LocalLagrangeInterpolation
│ │ │ │ +
25 // --------------------------
│ │ │ │ +
26
│ │ │ │ +
27 template< template <class,unsigned int> class LP, unsigned int dim, class F >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ + │ │ │ │ +
31
│ │ │ │ +
32 public:
│ │ │ │ +
33 typedef LP<F,dim> LagrangePointSet;
│ │ │ │ +
34 typedef typename LagrangePointSet::Field Field;
│ │ │ │ +
35
│ │ │ │ +
36 static const unsigned int dimension = LagrangePointSet::dimension;
│ │ │ │ +
37
│ │ │ │ +
38 private:
│ │ │ │ +
39 friend struct LagrangeInterpolationFactory<LP,dim,F>;
│ │ │ │ +
40 const LagrangePointSet &lagrangePoints_;
│ │ │ │ +
41
│ │ │ │ + │ │ │ │ +
43 : lagrangePoints_( lagrangePoints )
│ │ │ │ +
44 {}
│ │ │ │ +
45
│ │ │ │ +
46 const LagrangePointSet *points () const { return &lagrangePoints_; }
│ │ │ │
47
│ │ │ │ -
48 typedef RF RangeField;
│ │ │ │ -
49 static const std::size_t dimRange = dimDomainLocal;
│ │ │ │ -
50 typedef FieldVector<RangeField, dimRange> Range;
│ │ │ │ -
51
│ │ │ │ -
52 typedef FieldMatrix<RangeField, dimRange, dimDomainGlobal> Jacobian;
│ │ │ │ -
53 };
│ │ │ │ -
│ │ │ │ -
54
│ │ │ │ -
55 private:
│ │ │ │ -
56 typedef Dune::Impl::LagrangeSimplexLocalBasis<typename Traits::DomainField,
│ │ │ │ -
57 typename Traits::RangeField,
│ │ │ │ - │ │ │ │ -
59 1 // Polynomial order
│ │ │ │ -
60 > P1LocalBasis;
│ │ │ │ - │ │ │ │ -
62
│ │ │ │ -
63 static const P1LocalBasis& p1LocalBasis;
│ │ │ │ -
64 static const std::size_t dim = Traits::dimDomainLocal;
│ │ │ │ -
65
│ │ │ │ - │ │ │ │ -
67 using Base::refelem;
│ │ │ │ -
68 using Base::s;
│ │ │ │ -
69
│ │ │ │ -
70 // global values of the Jacobians (gradients) of the p1 basis
│ │ │ │ -
71 std::vector<typename P1Basis::Traits::Jacobian> p1j;
│ │ │ │ -
72 // edge sizes and orientations
│ │ │ │ -
73 std::vector<typename Traits::DomainField> edgel;
│ │ │ │ -
74
│ │ │ │ -
75 public:
│ │ │ │ +
48 template< class Fn, class Vector >
│ │ │ │ +
49 auto interpolate ( const Fn &fn, Vector &coefficients, PriorityTag< 1 > ) const
│ │ │ │ +
50 -> std::enable_if_t< std::is_invocable_v< const Fn &, decltype( this->lagrangePoints_.begin()->point() ) > >
│ │ │ │ +
51 {
│ │ │ │ +
52 unsigned int index = 0;
│ │ │ │ +
53 for( const auto &lp : lagrangePoints_ )
│ │ │ │ +
54 field_cast( fn( lp.point() ), coefficients[ index++ ] );
│ │ │ │ +
55 }
│ │ │ │ +
56 template< class Fn, class Vector >
│ │ │ │ +
57 auto interpolate ( const Fn &fn, Vector &coefficients, PriorityTag< 0 > ) const
│ │ │ │ +
58 -> std::enable_if_t< models<Impl::FunctionWithEvaluate< typename Fn::DomainType, typename Fn::RangeType >, Fn>(), void>
│ │ │ │ +
59 {
│ │ │ │ +
60 unsigned int index = 0;
│ │ │ │ +
61 for( const auto &lp : lagrangePoints_ )
│ │ │ │ +
62 {
│ │ │ │ +
63 typename Fn::RangeType val;
│ │ │ │ +
64 fn.evaluate( field_cast< typename Fn::DomainType::field_type >( lp.point() ), val );
│ │ │ │ +
65 field_cast( val, coefficients[ index++ ] );
│ │ │ │ +
66 }
│ │ │ │ +
67 }
│ │ │ │ +
68
│ │ │ │ +
69 public:
│ │ │ │ +
70 template< class Fn, class Vector >
│ │ │ │ +
│ │ │ │ +
71 auto interpolate ( const Fn &fn, Vector &coefficients ) const
│ │ │ │ +
72 -> std::enable_if_t< std::is_same< decltype(std::declval<Vector>().resize(1) ),void >::value,void>
│ │ │ │ +
73 {
│ │ │ │ +
74 coefficients.resize( lagrangePoints_.size() );
│ │ │ │ +
75 interpolate( fn, coefficients, PriorityTag< 42 >() );
│ │ │ │ +
76 }
│ │ │ │ +
│ │ │ │
77
│ │ │ │ -
83 template<typename VertexOrder>
│ │ │ │ -
│ │ │ │ -
84 EdgeS0_5Basis(const Geometry& geo, const VertexOrder& vertexOrder) :
│ │ │ │ -
85 p1j(s, typename P1Basis::Traits::Jacobian(0)), edgel(s)
│ │ │ │ -
86 {
│ │ │ │ -
87 // use some arbitrary position to evaluate jacobians, they are constant
│ │ │ │ -
88 static const typename Traits::DomainLocal xl(0);
│ │ │ │ +
78 template< class Basis, class Matrix >
│ │ │ │ +
│ │ │ │ +
79 auto interpolate ( const Basis &basis, Matrix &coefficients ) const
│ │ │ │ +
80 -> std::enable_if_t< std::is_same<
│ │ │ │ +
81 decltype(std::declval<Matrix>().rowPtr(0)), typename Matrix::Field* >::value,void>
│ │ │ │ +
82 {
│ │ │ │ +
83 coefficients.resize( lagrangePoints_.size(), basis.size( ) );
│ │ │ │ +
84
│ │ │ │ +
85 unsigned int index = 0;
│ │ │ │ +
86 for( const auto &lp : lagrangePoints_ )
│ │ │ │ +
87 basis.template evaluate< 0 >( lp.point(), coefficients.rowPtr( index++ ) );
│ │ │ │ +
88 }
│ │ │ │ +
│ │ │ │
89
│ │ │ │ -
90 // precompute Jacobian (gradients) of the p1 element
│ │ │ │ -
91 P1Basis(p1LocalBasis, geo).evaluateJacobian(xl, p1j);
│ │ │ │ +
90 const LagrangePointSet &lagrangePoints () const { return lagrangePoints_; }
│ │ │ │ +
91 };
│ │ │ │ +
│ │ │ │
92
│ │ │ │ -
93 // calculate edge sizes and orientations
│ │ │ │ -
94 for(std::size_t i = 0; i < s; ++i) {
│ │ │ │ -
95 edgel[i] = (geo.corner(refelem.subEntity(i,dim-1,0,dim))-
│ │ │ │ -
96 geo.corner(refelem.subEntity(i,dim-1,1,dim))
│ │ │ │ -
97 ).two_norm();
│ │ │ │ -
98 const typename VertexOrder::iterator& edgeVertexOrder =
│ │ │ │ -
99 vertexOrder.begin(dim-1, i);
│ │ │ │ -
100 if(edgeVertexOrder[0] > edgeVertexOrder[1])
│ │ │ │ -
101 edgel[i] *= -1;
│ │ │ │ -
102 }
│ │ │ │ -
103 }
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
106 std::size_t size () const { return s; }
│ │ │ │ -
107
│ │ │ │ -
│ │ │ │ -
109 void evaluateFunction(const typename Traits::DomainLocal& xl,
│ │ │ │ -
110 std::vector<typename Traits::Range>& out) const
│ │ │ │ -
111 {
│ │ │ │ -
112 out.assign(s, typename Traits::Range(0));
│ │ │ │ -
113
│ │ │ │ -
114 // compute p1 values -- use the local basis directly for that, local and
│ │ │ │ -
115 // global values are identical for scalars
│ │ │ │ -
116 std::vector<typename P1LocalBasis::Traits::RangeType> p1v;
│ │ │ │ -
117 p1LocalBasis.evaluateFunction(xl, p1v);
│ │ │ │ -
118
│ │ │ │ -
119 for(std::size_t i = 0; i < s; i++) {
│ │ │ │ -
120 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim);
│ │ │ │ -
121 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim);
│ │ │ │ -
122 out[i].axpy( p1v[i0], p1j[i1][0]);
│ │ │ │ -
123 out[i].axpy(-p1v[i1], p1j[i0][0]);
│ │ │ │ -
124 out[i] *= edgel[i];
│ │ │ │ -
125 }
│ │ │ │ +
93
│ │ │ │ +
94
│ │ │ │ +
95 // LocalLagrangeInterpolationFactory
│ │ │ │ +
96 // ---------------------------------
│ │ │ │ +
97 template< template <class,unsigned int> class LP,
│ │ │ │ +
98 unsigned int dim, class F >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
100 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
103
│ │ │ │ + │ │ │ │ + │ │ │ │ +
106
│ │ │ │ +
107 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
108 static Object *create ( const Key &key )
│ │ │ │ +
109 {
│ │ │ │ +
110 const LagrangePointSet *lagrangeCoeff
│ │ │ │ +
111 = LagrangePointSetFactory::template create< geometryId >( key );
│ │ │ │ +
112 if ( lagrangeCoeff == 0 )
│ │ │ │ +
113 return 0;
│ │ │ │ +
114 else
│ │ │ │ +
115 return new Object( *lagrangeCoeff );
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
117 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
118 static bool supports ( const Key &key )
│ │ │ │ +
119 {
│ │ │ │ +
120 return true;
│ │ │ │ +
121 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
122 static void release( Object *object)
│ │ │ │ +
123 {
│ │ │ │ +
124 LagrangePointSetFactory::release( object->points() );
│ │ │ │ +
125 delete object;
│ │ │ │
126 }
│ │ │ │
│ │ │ │ -
127
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
130 std::vector<typename Traits::Jacobian>& out) const
│ │ │ │ -
131 {
│ │ │ │ -
132 out.resize(s);
│ │ │ │ -
133
│ │ │ │ -
134 for(std::size_t i = 0; i < s; i++) {
│ │ │ │ -
135 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim);
│ │ │ │ -
136 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim);
│ │ │ │ -
137 for(std::size_t j = 0; j < dim; j++)
│ │ │ │ -
138 for(std::size_t k = 0; k < dim; k++)
│ │ │ │ -
139 out[i][j][k] = edgel[i] *
│ │ │ │ -
140 (p1j[i0][0][k]*p1j[i1][0][j]-p1j[i1][0][k]*p1j[i0][0][j]);
│ │ │ │ -
141 }
│ │ │ │ -
142 }
│ │ │ │ -
│ │ │ │ -
143
│ │ │ │ -
│ │ │ │ -
145 void partial (const std::array<unsigned int, dim>& order,
│ │ │ │ -
146 const typename Traits::DomainLocal& in, // position
│ │ │ │ -
147 std::vector<typename Traits::Range>& out) const // return value
│ │ │ │ -
148 {
│ │ │ │ -
149 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
150 if (totalOrder == 0) {
│ │ │ │ -
151 evaluateFunction(in, out);
│ │ │ │ -
152 } else if (totalOrder==1) {
│ │ │ │ -
153 auto const k = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
154 out.resize(size());
│ │ │ │ -
155
│ │ │ │ -
156 for (std::size_t i = 0; i < s; i++)
│ │ │ │ -
157 {
│ │ │ │ -
158 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim);
│ │ │ │ -
159 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim);
│ │ │ │ -
160 for(std::size_t j = 0; j < dim; j++)
│ │ │ │ -
161 out[i][j] = edgel[i] *
│ │ │ │ -
162 (p1j[i0][0][k]*p1j[i1][0][j] - p1j[i1][0][k]*p1j[i0][0][j]);
│ │ │ │ -
163 }
│ │ │ │ -
164 } else {
│ │ │ │ -
165 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
166 }
│ │ │ │ -
167 }
│ │ │ │ -
│ │ │ │ -
168
│ │ │ │ -
170 std::size_t order () const { return 1; }
│ │ │ │ -
171 };
│ │ │ │ -
│ │ │ │ -
172
│ │ │ │ -
173 template<class Geometry, class RF>
│ │ │ │ -
174 const typename EdgeS0_5Basis<Geometry, RF>::P1LocalBasis&
│ │ │ │ -
175 EdgeS0_5Basis<Geometry, RF>::p1LocalBasis = P1LocalBasis();
│ │ │ │ -
176
│ │ │ │ -
177} // namespace Dune
│ │ │ │ -
178
│ │ │ │ -
179#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_BASIS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
127 };
│ │ │ │ +
│ │ │ │ +
128
│ │ │ │ +
129}
│ │ │ │ +
130
│ │ │ │ +
131#endif // #ifndef DUNE_LAGRANGEBASIS_INTERPOLATION_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Convert a simple scalar local basis into a global basis.
Definition localtoglobaladaptors.hh:65
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainLocal &in, std::vector< typename Traits::Jacobian > &out) const
Definition localtoglobaladaptors.hh:125
│ │ │ │ -
Basis for order 0.5 (lowest order) edge elements on simplices.
Definition whitney/edges0.5/basis.hh:38
│ │ │ │ -
EdgeS0_5Basis(const Geometry &geo, const VertexOrder &vertexOrder)
Construct an EdgeS0_5Basis.
Definition whitney/edges0.5/basis.hh:84
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainLocal &, std::vector< typename Traits::Jacobian > &out) const
Evaluate all Jacobians.
Definition whitney/edges0.5/basis.hh:129
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainLocal &xl, std::vector< typename Traits::Range > &out) const
Evaluate all shape functions.
Definition whitney/edges0.5/basis.hh:109
│ │ │ │ -
std::size_t size() const
number of shape functions
Definition whitney/edges0.5/basis.hh:106
│ │ │ │ -
void partial(const std::array< unsigned int, dim > &order, const typename Traits::DomainLocal &in, std::vector< typename Traits::Range > &out) const
Evaluate partial derivatives of all shape functions.
Definition whitney/edges0.5/basis.hh:145
│ │ │ │ -
std::size_t order() const
Polynomial order of the shape functions.
Definition whitney/edges0.5/basis.hh:170
│ │ │ │ -
export type traits for function signature
Definition whitney/edges0.5/basis.hh:41
│ │ │ │ -
FieldVector< DomainField, dimDomainGlobal > DomainGlobal
Definition whitney/edges0.5/basis.hh:46
│ │ │ │ -
static const std::size_t dimRange
Definition whitney/edges0.5/basis.hh:49
│ │ │ │ -
static const std::size_t dimDomainLocal
Definition whitney/edges0.5/basis.hh:43
│ │ │ │ -
FieldMatrix< RangeField, dimRange, dimDomainGlobal > Jacobian
Definition whitney/edges0.5/basis.hh:52
│ │ │ │ -
static const std::size_t dimDomainGlobal
Definition whitney/edges0.5/basis.hh:44
│ │ │ │ -
RF RangeField
Definition whitney/edges0.5/basis.hh:48
│ │ │ │ -
FieldVector< DomainField, dimDomainLocal > DomainLocal
Definition whitney/edges0.5/basis.hh:45
│ │ │ │ -
FieldVector< RangeField, dimRange > Range
Definition whitney/edges0.5/basis.hh:50
│ │ │ │ -
Geometry::ctype DomainField
Definition whitney/edges0.5/basis.hh:42
│ │ │ │ -
Common base class for edge elements.
Definition common.hh:19
│ │ │ │ -
RefElem refelem
The reference element for this edge element.
Definition common.hh:26
│ │ │ │ -
std::size_t s
The number of base functions.
Definition common.hh:34
│ │ │ │ +
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ +
Definition lagrange/interpolation.hh:100
│ │ │ │ +
LagrangeCoefficientsFactory< LP, dim, F > LagrangePointSetFactory
Definition lagrange/interpolation.hh:101
│ │ │ │ +
LagrangePointSetFactory::Object LagrangePointSet
Definition lagrange/interpolation.hh:102
│ │ │ │ +
static bool supports(const Key &key)
Definition lagrange/interpolation.hh:118
│ │ │ │ +
LagrangePointSetFactory::Key Key
Definition lagrange/interpolation.hh:104
│ │ │ │ +
static Object * create(const Key &key)
Definition lagrange/interpolation.hh:108
│ │ │ │ +
static void release(Object *object)
Definition lagrange/interpolation.hh:122
│ │ │ │ +
const LocalLagrangeInterpolation< LP, dim, F > Object
Definition lagrange/interpolation.hh:105
│ │ │ │ +
Definition lagrange/interpolation.hh:29
│ │ │ │ +
LagrangePointSet::Field Field
Definition lagrange/interpolation.hh:34
│ │ │ │ +
const LagrangePointSet & lagrangePoints() const
Definition lagrange/interpolation.hh:90
│ │ │ │ +
static const unsigned int dimension
Definition lagrange/interpolation.hh:36
│ │ │ │ +
LP< F, dim > LagrangePointSet
Definition lagrange/interpolation.hh:33
│ │ │ │ +
auto interpolate(const Fn &fn, Vector &coefficients) const -> std::enable_if_t< std::is_same< decltype(std::declval< Vector >().resize(1)), void >::value, void >
Definition lagrange/interpolation.hh:71
│ │ │ │ +
auto interpolate(const Basis &basis, Matrix &coefficients) const -> std::enable_if_t< std::is_same< decltype(std::declval< Matrix >().rowPtr(0)), typename Matrix::Field * >::value, void >
Definition lagrange/interpolation.hh:79
│ │ │ │ +
Definition lagrangecoefficients.hh:23
│ │ │ │ +
static void release(Object *object)
Definition lagrangecoefficients.hh:42
│ │ │ │ +
const typedef LP< F, dim > Object
Definition lagrangecoefficients.hh:25
│ │ │ │ +
std::size_t Key
Definition lagrangecoefficients.hh:26
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,257 +7,220 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ - * whitney │ │ │ │ │ - * edges0.5 │ │ │ │ │ -whitney/edges0.5/basis.hh │ │ │ │ │ + * lagrange │ │ │ │ │ +lagrange/interpolation.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_BASIS_HH │ │ │ │ │ - 7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_BASIS_HH │ │ │ │ │ - 8 │ │ │ │ │ - 9#include │ │ │ │ │ + 5#ifndef DUNE_LAGRANGEBASIS_INTERPOLATION_HH │ │ │ │ │ + 6#define DUNE_LAGRANGEBASIS_INTERPOLATION_HH │ │ │ │ │ + 7 │ │ │ │ │ + 8#include │ │ │ │ │ + 9#include │ │ │ │ │ 10#include │ │ │ │ │ 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ - 14 │ │ │ │ │ - 15#include │ │ │ │ │ - 16#include │ │ │ │ │ - 17#include │ │ │ │ │ - 18 │ │ │ │ │ - 19namespace Dune { │ │ │ │ │ - 20 │ │ │ │ │ - 22 // │ │ │ │ │ - 23 // Basis │ │ │ │ │ - 24 // │ │ │ │ │ - 25 │ │ │ │ │ - 27 │ │ │ │ │ - 35 template │ │ │ │ │ -36 class EdgeS0_5Basis : │ │ │ │ │ - 37 private EdgeS0_5Common │ │ │ │ │ - 38 { │ │ │ │ │ - 39 public: │ │ │ │ │ -41 struct Traits { │ │ │ │ │ -42 typedef typename Geometry::ctype DomainField; │ │ │ │ │ -43 static const std::size_t dimDomainLocal = Geometry::mydimension; │ │ │ │ │ -44 static const std::size_t dimDomainGlobal = Geometry::coorddimension; │ │ │ │ │ -45 typedef FieldVector DomainLocal; │ │ │ │ │ -46 typedef FieldVector DomainGlobal; │ │ │ │ │ + 12#include │ │ │ │ │ + 13 │ │ │ │ │ + 14#include │ │ │ │ │ + 15#include │ │ │ │ │ + 16 │ │ │ │ │ + 17namespace Dune │ │ │ │ │ + 18{ │ │ │ │ │ + 19 │ │ │ │ │ + 20 template< template class LP, │ │ │ │ │ + 21 unsigned int dim, class F > │ │ │ │ │ + 22 struct LagrangeInterpolationFactory; │ │ │ │ │ + 23 │ │ │ │ │ + 24 // LocalLagrangeInterpolation │ │ │ │ │ + 25 // -------------------------- │ │ │ │ │ + 26 │ │ │ │ │ + 27 template< template class LP, unsigned int dim, class F │ │ │ │ │ +> │ │ │ │ │ +28 class LocalLagrangeInterpolation │ │ │ │ │ + 29 { │ │ │ │ │ + 30 typedef LocalLagrangeInterpolation<_LP,dim,F_> This; │ │ │ │ │ + 31 │ │ │ │ │ + 32 public: │ │ │ │ │ +33 typedef LP LagrangePointSet; │ │ │ │ │ +34 typedef typename LagrangePointSet::Field Field; │ │ │ │ │ + 35 │ │ │ │ │ +36 static const unsigned int dimension = LagrangePointSet::dimension; │ │ │ │ │ + 37 │ │ │ │ │ + 38 private: │ │ │ │ │ + 39 friend struct LagrangeInterpolationFactory; │ │ │ │ │ + 40 const LagrangePointSet &lagrangePoints_; │ │ │ │ │ + 41 │ │ │ │ │ + 42 explicit LocalLagrangeInterpolation ( const LagrangePointSet │ │ │ │ │ +&lagrangePoints ) │ │ │ │ │ + 43 : lagrangePoints_( lagrangePoints ) │ │ │ │ │ + 44 {} │ │ │ │ │ + 45 │ │ │ │ │ + 46 const LagrangePointSet *points () const { return &lagrangePoints_; } │ │ │ │ │ 47 │ │ │ │ │ -48 typedef RF RangeField; │ │ │ │ │ -49 static const std::size_t dimRange = dimDomainLocal; │ │ │ │ │ -50 typedef FieldVector Range; │ │ │ │ │ - 51 │ │ │ │ │ -52 typedef FieldMatrix Jacobian; │ │ │ │ │ - 53 }; │ │ │ │ │ - 54 │ │ │ │ │ - 55 private: │ │ │ │ │ - 56 typedef Dune::Impl::LagrangeSimplexLocalBasis P1LocalBasis; │ │ │ │ │ - 61 typedef ScalarLocalToGlobalBasisAdaptor P1Basis; │ │ │ │ │ - 62 │ │ │ │ │ - 63 static const P1LocalBasis& p1LocalBasis; │ │ │ │ │ - 64 static const std::size_t dim = Traits::dimDomainLocal; │ │ │ │ │ - 65 │ │ │ │ │ - 66 typedef EdgeS0_5Common Base; │ │ │ │ │ - 67 using Base::refelem; │ │ │ │ │ - 68 using Base::s; │ │ │ │ │ - 69 │ │ │ │ │ - 70 // global values of the Jacobians (gradients) of the p1 basis │ │ │ │ │ - 71 std::vector p1j; │ │ │ │ │ - 72 // edge sizes and orientations │ │ │ │ │ - 73 std::vector edgel; │ │ │ │ │ - 74 │ │ │ │ │ - 75 public: │ │ │ │ │ + 48 template< class Fn, class Vector > │ │ │ │ │ + 49 auto interpolate ( const Fn &fn, Vector &coefficients, PriorityTag< 1 > ) │ │ │ │ │ +const │ │ │ │ │ + 50 -> std::enable_if_t< std::is_invocable_v< const Fn &, decltype( this- │ │ │ │ │ +>lagrangePoints_.begin()->point() ) > > │ │ │ │ │ + 51 { │ │ │ │ │ + 52 unsigned int index = 0; │ │ │ │ │ + 53 for( const auto &lp : lagrangePoints_ ) │ │ │ │ │ + 54 field_cast( fn( lp.point() ), coefficients[ index++ ] ); │ │ │ │ │ + 55 } │ │ │ │ │ + 56 template< class Fn, class Vector > │ │ │ │ │ + 57 auto interpolate ( const Fn &fn, Vector &coefficients, PriorityTag< 0 > ) │ │ │ │ │ +const │ │ │ │ │ + 58 -> std::enable_if_t< models, Fn>(), void> │ │ │ │ │ + 59 { │ │ │ │ │ + 60 unsigned int index = 0; │ │ │ │ │ + 61 for( const auto &lp : lagrangePoints_ ) │ │ │ │ │ + 62 { │ │ │ │ │ + 63 typename Fn::RangeType val; │ │ │ │ │ + 64 fn.evaluate( field_cast< typename Fn::DomainType::field_type >( lp.point() │ │ │ │ │ +), val ); │ │ │ │ │ + 65 field_cast( val, coefficients[ index++ ] ); │ │ │ │ │ + 66 } │ │ │ │ │ + 67 } │ │ │ │ │ + 68 │ │ │ │ │ + 69 public: │ │ │ │ │ + 70 template< class Fn, class Vector > │ │ │ │ │ +71 auto interpolate ( const Fn &fn, Vector &coefficients ) const │ │ │ │ │ + 72 -> std::enable_if_t< std::is_same< decltype(std::declval().resize │ │ │ │ │ +(1) ),void >::value,void> │ │ │ │ │ + 73 { │ │ │ │ │ + 74 coefficients.resize( lagrangePoints_.size() ); │ │ │ │ │ + 75 interpolate( fn, coefficients, PriorityTag< 42 >() ); │ │ │ │ │ + 76 } │ │ │ │ │ 77 │ │ │ │ │ - 83 template │ │ │ │ │ -84 EdgeS0_5Basis(const Geometry& geo, const VertexOrder& vertexOrder) : │ │ │ │ │ - 85 p1j(s, typename P1Basis::Traits::Jacobian(0)), edgel(s) │ │ │ │ │ - 86 { │ │ │ │ │ - 87 // use some arbitrary position to evaluate jacobians, they are constant │ │ │ │ │ - 88 static const typename Traits::DomainLocal xl(0); │ │ │ │ │ + 78 template< class Basis, class Matrix > │ │ │ │ │ +79 auto interpolate ( const Basis &basis, Matrix &coefficients ) const │ │ │ │ │ + 80 -> std::enable_if_t< std::is_same< │ │ │ │ │ + 81 decltype(std::declval().rowPtr(0)), typename Matrix::Field* >:: │ │ │ │ │ +value,void> │ │ │ │ │ + 82 { │ │ │ │ │ + 83 coefficients.resize( lagrangePoints_.size(), basis.size( ) ); │ │ │ │ │ + 84 │ │ │ │ │ + 85 unsigned int index = 0; │ │ │ │ │ + 86 for( const auto &lp : lagrangePoints_ ) │ │ │ │ │ + 87 basis.template evaluate< 0 >( lp.point(), coefficients.rowPtr( index++ ) ); │ │ │ │ │ + 88 } │ │ │ │ │ 89 │ │ │ │ │ - 90 // precompute Jacobian (gradients) of the p1 element │ │ │ │ │ - 91 P1Basis(p1LocalBasis, geo).evaluateJacobian(xl, p1j); │ │ │ │ │ +90 const LagrangePointSet &lagrangePoints () const { return lagrangePoints_; } │ │ │ │ │ + 91 }; │ │ │ │ │ 92 │ │ │ │ │ - 93 // calculate edge sizes and orientations │ │ │ │ │ - 94 for(std::size_t i = 0; i < s; ++i) { │ │ │ │ │ - 95 edgel[i] = (geo.corner(refelem.subEntity(i,dim-1,0,dim))- │ │ │ │ │ - 96 geo.corner(refelem.subEntity(i,dim-1,1,dim)) │ │ │ │ │ - 97 ).two_norm(); │ │ │ │ │ - 98 const typename VertexOrder::iterator& edgeVertexOrder = │ │ │ │ │ - 99 vertexOrder.begin(dim-1, i); │ │ │ │ │ - 100 if(edgeVertexOrder[0] > edgeVertexOrder[1]) │ │ │ │ │ - 101 edgel[i] *= -1; │ │ │ │ │ - 102 } │ │ │ │ │ - 103 } │ │ │ │ │ - 104 │ │ │ │ │ -106 std::size_t size () const { return s; } │ │ │ │ │ - 107 │ │ │ │ │ -109 void evaluateFunction(const typename Traits::DomainLocal& xl, │ │ │ │ │ - 110 std::vector& out) const │ │ │ │ │ - 111 { │ │ │ │ │ - 112 out.assign(s, typename Traits::Range(0)); │ │ │ │ │ - 113 │ │ │ │ │ - 114 // compute p1 values -- use the local basis directly for that, local and │ │ │ │ │ - 115 // global values are identical for scalars │ │ │ │ │ - 116 std::vector p1v; │ │ │ │ │ - 117 p1LocalBasis.evaluateFunction(xl, p1v); │ │ │ │ │ - 118 │ │ │ │ │ - 119 for(std::size_t i = 0; i < s; i++) { │ │ │ │ │ - 120 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim); │ │ │ │ │ - 121 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim); │ │ │ │ │ - 122 out[i].axpy( p1v[i0], p1j[i1][0]); │ │ │ │ │ - 123 out[i].axpy(-p1v[i1], p1j[i0][0]); │ │ │ │ │ - 124 out[i] *= edgel[i]; │ │ │ │ │ - 125 } │ │ │ │ │ + 93 │ │ │ │ │ + 94 │ │ │ │ │ + 95 // LocalLagrangeInterpolationFactory │ │ │ │ │ + 96 // --------------------------------- │ │ │ │ │ + 97 template< template class LP, │ │ │ │ │ + 98 unsigned int dim, class F > │ │ │ │ │ +99 struct LagrangeInterpolationFactory │ │ │ │ │ + 100 { │ │ │ │ │ +101 typedef LagrangeCoefficientsFactory LagrangePointSetFactory; │ │ │ │ │ +102 typedef typename LagrangePointSetFactory::Object LagrangePointSet; │ │ │ │ │ + 103 │ │ │ │ │ +104 typedef typename LagrangePointSetFactory::Key Key; │ │ │ │ │ +105 typedef const LocalLagrangeInterpolation<_LP,dim,F_> Object; │ │ │ │ │ + 106 │ │ │ │ │ + 107 template< GeometryType::Id geometryId > │ │ │ │ │ +108 static Object *create ( const Key &key ) │ │ │ │ │ + 109 { │ │ │ │ │ + 110 const LagrangePointSet *lagrangeCoeff │ │ │ │ │ + 111 = LagrangePointSetFactory::template create< geometryId >( key ); │ │ │ │ │ + 112 if ( lagrangeCoeff == 0 ) │ │ │ │ │ + 113 return 0; │ │ │ │ │ + 114 else │ │ │ │ │ + 115 return new Object( *lagrangeCoeff ); │ │ │ │ │ + 116 } │ │ │ │ │ + 117 template< GeometryType::Id geometryId > │ │ │ │ │ +118 static bool supports ( const Key &key ) │ │ │ │ │ + 119 { │ │ │ │ │ + 120 return true; │ │ │ │ │ + 121 } │ │ │ │ │ +122 static void release( Object *object) │ │ │ │ │ + 123 { │ │ │ │ │ + 124 LagrangePointSetFactory::release( object->points() ); │ │ │ │ │ + 125 delete object; │ │ │ │ │ 126 } │ │ │ │ │ - 127 │ │ │ │ │ -129 void evaluateJacobian(const typename Traits::DomainLocal&, │ │ │ │ │ - 130 std::vector& out) const │ │ │ │ │ - 131 { │ │ │ │ │ - 132 out.resize(s); │ │ │ │ │ - 133 │ │ │ │ │ - 134 for(std::size_t i = 0; i < s; i++) { │ │ │ │ │ - 135 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim); │ │ │ │ │ - 136 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim); │ │ │ │ │ - 137 for(std::size_t j = 0; j < dim; j++) │ │ │ │ │ - 138 for(std::size_t k = 0; k < dim; k++) │ │ │ │ │ - 139 out[i][j][k] = edgel[i] * │ │ │ │ │ - 140 (p1j[i0][0][k]*p1j[i1][0][j]-p1j[i1][0][k]*p1j[i0][0][j]); │ │ │ │ │ - 141 } │ │ │ │ │ - 142 } │ │ │ │ │ - 143 │ │ │ │ │ -145 void partial (const std::array& order, │ │ │ │ │ - 146 const typename Traits::DomainLocal& in, // position │ │ │ │ │ - 147 std::vector& out) const // return value │ │ │ │ │ - 148 { │ │ │ │ │ - 149 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ - 150 if (totalOrder == 0) { │ │ │ │ │ - 151 evaluateFunction(in, out); │ │ │ │ │ - 152 } else if (totalOrder==1) { │ │ │ │ │ - 153 auto const k = std::distance(order.begin(), std::find(order.begin(), │ │ │ │ │ -order.end(), 1)); │ │ │ │ │ - 154 out.resize(size()); │ │ │ │ │ - 155 │ │ │ │ │ - 156 for (std::size_t i = 0; i < s; i++) │ │ │ │ │ - 157 { │ │ │ │ │ - 158 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim); │ │ │ │ │ - 159 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim); │ │ │ │ │ - 160 for(std::size_t j = 0; j < dim; j++) │ │ │ │ │ - 161 out[i][j] = edgel[i] * │ │ │ │ │ - 162 (p1j[i0][0][k]*p1j[i1][0][j] - p1j[i1][0][k]*p1j[i0][0][j]); │ │ │ │ │ - 163 } │ │ │ │ │ - 164 } else { │ │ │ │ │ - 165 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ - 166 } │ │ │ │ │ - 167 } │ │ │ │ │ - 168 │ │ │ │ │ -170 std::size_t order () const { return 1; } │ │ │ │ │ - 171 }; │ │ │ │ │ - 172 │ │ │ │ │ - 173 template │ │ │ │ │ - 174 const typename EdgeS0_5Basis::P1LocalBasis& │ │ │ │ │ - 175 EdgeS0_5Basis::p1LocalBasis = P1LocalBasis(); │ │ │ │ │ - 176 │ │ │ │ │ - 177} // namespace Dune │ │ │ │ │ - 178 │ │ │ │ │ - 179#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_BASIS_HH │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ -localtoglobaladaptors.hh │ │ │ │ │ -common.hh │ │ │ │ │ + 127 }; │ │ │ │ │ + 128 │ │ │ │ │ + 129} │ │ │ │ │ + 130 │ │ │ │ │ + 131#endif // #ifndef DUNE_LAGRANGEBASIS_INTERPOLATION_HH │ │ │ │ │ +lagrangecoefficients.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::ScalarLocalToGlobalBasisAdaptor │ │ │ │ │ -Convert a simple scalar local basis into a global basis. │ │ │ │ │ -Definition localtoglobaladaptors.hh:65 │ │ │ │ │ -Dune::ScalarLocalToGlobalBasisAdaptor::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainLocal &in, std::vector< │ │ │ │ │ -typename Traits::Jacobian > &out) const │ │ │ │ │ -Definition localtoglobaladaptors.hh:125 │ │ │ │ │ -Dune::EdgeS0_5Basis │ │ │ │ │ -Basis for order 0.5 (lowest order) edge elements on simplices. │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:38 │ │ │ │ │ -Dune::EdgeS0_5Basis::EdgeS0_5Basis │ │ │ │ │ -EdgeS0_5Basis(const Geometry &geo, const VertexOrder &vertexOrder) │ │ │ │ │ -Construct an EdgeS0_5Basis. │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:84 │ │ │ │ │ -Dune::EdgeS0_5Basis::evaluateJacobian │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainLocal &, std::vector< │ │ │ │ │ -typename Traits::Jacobian > &out) const │ │ │ │ │ -Evaluate all Jacobians. │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:129 │ │ │ │ │ -Dune::EdgeS0_5Basis::evaluateFunction │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainLocal &xl, std::vector< │ │ │ │ │ -typename Traits::Range > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:109 │ │ │ │ │ -Dune::EdgeS0_5Basis::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:106 │ │ │ │ │ -Dune::EdgeS0_5Basis::partial │ │ │ │ │ -void partial(const std::array< unsigned int, dim > &order, const typename │ │ │ │ │ -Traits::DomainLocal &in, std::vector< typename Traits::Range > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:145 │ │ │ │ │ -Dune::EdgeS0_5Basis::order │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:170 │ │ │ │ │ -Dune::EdgeS0_5Basis::Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:41 │ │ │ │ │ -Dune::EdgeS0_5Basis::Traits::DomainGlobal │ │ │ │ │ -FieldVector< DomainField, dimDomainGlobal > DomainGlobal │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:46 │ │ │ │ │ -Dune::EdgeS0_5Basis::Traits::dimRange │ │ │ │ │ -static const std::size_t dimRange │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:49 │ │ │ │ │ -Dune::EdgeS0_5Basis::Traits::dimDomainLocal │ │ │ │ │ -static const std::size_t dimDomainLocal │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:43 │ │ │ │ │ -Dune::EdgeS0_5Basis::Traits::Jacobian │ │ │ │ │ -FieldMatrix< RangeField, dimRange, dimDomainGlobal > Jacobian │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:52 │ │ │ │ │ -Dune::EdgeS0_5Basis::Traits::dimDomainGlobal │ │ │ │ │ -static const std::size_t dimDomainGlobal │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:44 │ │ │ │ │ -Dune::EdgeS0_5Basis::Traits::RangeField │ │ │ │ │ -RF RangeField │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:48 │ │ │ │ │ -Dune::EdgeS0_5Basis::Traits::DomainLocal │ │ │ │ │ -FieldVector< DomainField, dimDomainLocal > DomainLocal │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:45 │ │ │ │ │ -Dune::EdgeS0_5Basis::Traits::Range │ │ │ │ │ -FieldVector< RangeField, dimRange > Range │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:50 │ │ │ │ │ -Dune::EdgeS0_5Basis::Traits::DomainField │ │ │ │ │ -Geometry::ctype DomainField │ │ │ │ │ -Definition whitney/edges0.5/basis.hh:42 │ │ │ │ │ -Dune::EdgeS0_5Common │ │ │ │ │ -Common base class for edge elements. │ │ │ │ │ -Definition common.hh:19 │ │ │ │ │ -Dune::EdgeS0_5Common::refelem │ │ │ │ │ -RefElem refelem │ │ │ │ │ -The reference element for this edge element. │ │ │ │ │ -Definition common.hh:26 │ │ │ │ │ -Dune::EdgeS0_5Common::s │ │ │ │ │ -std::size_t s │ │ │ │ │ -The number of base functions. │ │ │ │ │ -Definition common.hh:34 │ │ │ │ │ +Dune::field_cast │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +Definition field.hh:159 │ │ │ │ │ +Dune::LagrangeInterpolationFactory │ │ │ │ │ +Definition lagrange/interpolation.hh:100 │ │ │ │ │ +Dune::LagrangeInterpolationFactory::LagrangePointSetFactory │ │ │ │ │ +LagrangeCoefficientsFactory< LP, dim, F > LagrangePointSetFactory │ │ │ │ │ +Definition lagrange/interpolation.hh:101 │ │ │ │ │ +Dune::LagrangeInterpolationFactory::LagrangePointSet │ │ │ │ │ +LagrangePointSetFactory::Object LagrangePointSet │ │ │ │ │ +Definition lagrange/interpolation.hh:102 │ │ │ │ │ +Dune::LagrangeInterpolationFactory::supports │ │ │ │ │ +static bool supports(const Key &key) │ │ │ │ │ +Definition lagrange/interpolation.hh:118 │ │ │ │ │ +Dune::LagrangeInterpolationFactory::Key │ │ │ │ │ +LagrangePointSetFactory::Key Key │ │ │ │ │ +Definition lagrange/interpolation.hh:104 │ │ │ │ │ +Dune::LagrangeInterpolationFactory::create │ │ │ │ │ +static Object * create(const Key &key) │ │ │ │ │ +Definition lagrange/interpolation.hh:108 │ │ │ │ │ +Dune::LagrangeInterpolationFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition lagrange/interpolation.hh:122 │ │ │ │ │ +Dune::LagrangeInterpolationFactory::Object │ │ │ │ │ +const LocalLagrangeInterpolation< LP, dim, F > Object │ │ │ │ │ +Definition lagrange/interpolation.hh:105 │ │ │ │ │ +Dune::LocalLagrangeInterpolation │ │ │ │ │ +Definition lagrange/interpolation.hh:29 │ │ │ │ │ +Dune::LocalLagrangeInterpolation::Field │ │ │ │ │ +LagrangePointSet::Field Field │ │ │ │ │ +Definition lagrange/interpolation.hh:34 │ │ │ │ │ +Dune::LocalLagrangeInterpolation::lagrangePoints │ │ │ │ │ +const LagrangePointSet & lagrangePoints() const │ │ │ │ │ +Definition lagrange/interpolation.hh:90 │ │ │ │ │ +Dune::LocalLagrangeInterpolation::dimension │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +Definition lagrange/interpolation.hh:36 │ │ │ │ │ +Dune::LocalLagrangeInterpolation::LagrangePointSet │ │ │ │ │ +LP< F, dim > LagrangePointSet │ │ │ │ │ +Definition lagrange/interpolation.hh:33 │ │ │ │ │ +Dune::LocalLagrangeInterpolation::interpolate │ │ │ │ │ +auto interpolate(const Fn &fn, Vector &coefficients) const -> std::enable_if_t< │ │ │ │ │ +std::is_same< decltype(std::declval< Vector >().resize(1)), void >::value, void │ │ │ │ │ +> │ │ │ │ │ +Definition lagrange/interpolation.hh:71 │ │ │ │ │ +Dune::LocalLagrangeInterpolation::interpolate │ │ │ │ │ +auto interpolate(const Basis &basis, Matrix &coefficients) const -> std:: │ │ │ │ │ +enable_if_t< std::is_same< decltype(std::declval< Matrix >().rowPtr(0)), │ │ │ │ │ +typename Matrix::Field * >::value, void > │ │ │ │ │ +Definition lagrange/interpolation.hh:79 │ │ │ │ │ +Dune::LagrangeCoefficientsFactory │ │ │ │ │ +Definition lagrangecoefficients.hh:23 │ │ │ │ │ +Dune::LagrangeCoefficientsFactory::release │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +Definition lagrangecoefficients.hh:42 │ │ │ │ │ +Dune::LagrangeCoefficientsFactory::Object │ │ │ │ │ +const typedef LP< F, dim > Object │ │ │ │ │ +Definition lagrangecoefficients.hh:25 │ │ │ │ │ +Dune::LagrangeCoefficientsFactory::Key │ │ │ │ │ +std::size_t Key │ │ │ │ │ +Definition lagrangecoefficients.hh:26 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04488.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: coefficients.hh File Reference │ │ │ │ +dune-localfunctions: interpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,27 +72,29 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
coefficients.hh File Reference
│ │ │ │ +
interpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ +
#include <algorithm>
│ │ │ │ +#include <cassert>
│ │ │ │ +#include <cstddef>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::PowerCoefficients
 Meta-coefficients turning a scalar coefficients into vector-valued coefficients. More...
class  Dune::PowerInterpolation< Backend, BasisTraits >
 Meta-interpolation turning a scalar interpolation into vector-valued interpolation. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -9,23 +9,25 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * meta │ │ │ │ │ * power │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -coefficients.hh File Reference │ │ │ │ │ +interpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::PowerCoefficients │ │ │ │ │ -  Meta-coefficients turning a scalar coefficients into vector-valued │ │ │ │ │ - coefficients. More... │ │ │ │ │ +class  Dune::PowerInterpolation<_Backend,_BasisTraits_> │ │ │ │ │ +  Meta-interpolation turning a scalar interpolation into vector-valued │ │ │ │ │ + interpolation. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04488_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: coefficients.hh Source File │ │ │ │ +dune-localfunctions: interpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,71 +74,106 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
meta/power/coefficients.hh
│ │ │ │ +
meta/power/interpolation.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_COEFFICIENTS_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_META_POWER_COEFFICIENTS_HH
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_META_POWER_INTERPOLATION_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_META_POWER_INTERPOLATION_HH
│ │ │ │
8
│ │ │ │ -
9#include <cstddef>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune {
│ │ │ │ -
15
│ │ │ │ -
18
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
23 std::vector<LocalKey> keys;
│ │ │ │ -
24
│ │ │ │ -
25 public:
│ │ │ │ -
27
│ │ │ │ -
35 template<class Backend>
│ │ │ │ -
│ │ │ │ -
36 PowerCoefficients(const Backend &backend, std::size_t power) :
│ │ │ │ -
37 keys(backend.size()*power)
│ │ │ │ -
38 {
│ │ │ │ -
39 for(std::size_t i = 0; i < backend.size(); ++i) {
│ │ │ │ -
40 const LocalKey &k = backend.localKey(i);
│ │ │ │ -
41 for(std::size_t d = 0; d < power; ++d)
│ │ │ │ -
42 keys[i+d*backend.size()] =
│ │ │ │ -
43 LocalKey(k.subEntity(), k.codim(), power*k.index() + d);
│ │ │ │ -
44 }
│ │ │ │ -
45 }
│ │ │ │ -
│ │ │ │ -
47 inline std::size_t size() const { return keys.size(); }
│ │ │ │ -
48
│ │ │ │ -
50 inline const LocalKey& localKey(std::size_t i) const { return keys[i]; }
│ │ │ │ -
51 };
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
53} // namespace Dune
│ │ │ │ -
54
│ │ │ │ -
55#endif // DUNE_LOCALFUNCTIONS_META_POWER_COEFFICIENTS_HH
│ │ │ │ - │ │ │ │ +
9#include <algorithm>
│ │ │ │ +
10#include <cassert>
│ │ │ │ +
11#include <cstddef>
│ │ │ │ +
12#include <vector>
│ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune {
│ │ │ │ +
16
│ │ │ │ +
19
│ │ │ │ +
25 template<class Backend, class BasisTraits>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
27 static_assert(Backend::Traits::dimRange == 1,
│ │ │ │ +
28 "PowerInterpolation works only with scalar backends");
│ │ │ │ +
29
│ │ │ │ +
30 const Backend *backend;
│ │ │ │ +
31
│ │ │ │ +
32 public:
│ │ │ │ +
34 typedef BasisTraits Traits;
│ │ │ │ +
35
│ │ │ │ +
37
│ │ │ │ +
43 PowerInterpolation(const Backend &backend_) : backend(&backend_) { }
│ │ │ │ +
44
│ │ │ │ +
45 private:
│ │ │ │ +
46 template<class F>
│ │ │ │ +
47 class ComponentEvaluator
│ │ │ │ +
48 {
│ │ │ │ +
49 const F &f;
│ │ │ │ +
50 std::size_t comp;
│ │ │ │ +
51
│ │ │ │ +
52 public:
│ │ │ │ +
53 ComponentEvaluator(const F &f_, std::size_t comp_) :
│ │ │ │ +
54 f(f_), comp(comp_)
│ │ │ │ +
55 { }
│ │ │ │ +
56
│ │ │ │ +
57 typename Backend::Traits::Range operator()(const typename Backend::Traits::DomainLocal &x) const
│ │ │ │ +
58 {
│ │ │ │ +
59 typename Traits::Range fy = f(x);
│ │ │ │ +
60 typename Backend::Traits::Range y;
│ │ │ │ +
61 y[0] = fy[comp];
│ │ │ │ +
62 return y;
│ │ │ │ +
63 }
│ │ │ │ +
64 };
│ │ │ │ +
65
│ │ │ │ +
66 public:
│ │ │ │ +
68
│ │ │ │ +
77 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
78 void interpolate(const F& ff, std::vector<C>& out) const {
│ │ │ │ +
79
│ │ │ │ +
80 auto&& f = Impl::makeFunctionWithCallOperator<typename Backend::Traits::DomainLocal>(ff);
│ │ │ │ +
81
│ │ │ │ +
82
│ │ │ │ +
83 out.clear();
│ │ │ │ +
84 std::vector<C> cout;
│ │ │ │ +
85 for(std::size_t d = 0; d < Traits::dimRange; ++d) {
│ │ │ │ +
86 // When dropping support for `evaluate()` we can simply use a lambda
│ │ │ │ +
87 // instead of ComponentEvaluator. But changing this now would break
│ │ │ │ +
88 // PowerInterpolation for FE-implementation outside of dune-localfunctions
│ │ │ │ +
89 // which may not have been adjusted so far.
│ │ │ │ +
90 backend->interpolate(ComponentEvaluator<std::decay_t<decltype(f)>>(f, d), cout);
│ │ │ │ +
91 if(d == 0)
│ │ │ │ +
92 out.resize(cout.size()*Traits::dimRange);
│ │ │ │ +
93 // make sure the size of cout does not change surprisingly
│ │ │ │ +
94 assert(out.size() == cout.size()*Traits::dimRange);
│ │ │ │ +
95 std::copy(cout.begin(), cout.end(), out.begin() + d*cout.size());
│ │ │ │ +
96 }
│ │ │ │ +
97 }
│ │ │ │ +
│ │ │ │ +
98 };
│ │ │ │ +
│ │ │ │ +
99
│ │ │ │ +
100} // namespace Dune
│ │ │ │ +
101
│ │ │ │ +
102#endif // DUNE_LOCALFUNCTIONS_META_POWER_INTERPOLATION_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
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 codim() const
Return codim of associated entity.
Definition localkey.hh:62
│ │ │ │ -
unsigned int subEntity() const
Return number of associated subentity.
Definition localkey.hh:56
│ │ │ │ -
Meta-coefficients turning a scalar coefficients into vector-valued coefficients.
Definition meta/power/coefficients.hh:22
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition meta/power/coefficients.hh:47
│ │ │ │ -
PowerCoefficients(const Backend &backend, std::size_t power)
Construct a PowerCoefficients object.
Definition meta/power/coefficients.hh:36
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition meta/power/coefficients.hh:50
│ │ │ │ +
Meta-interpolation turning a scalar interpolation into vector-valued interpolation.
Definition meta/power/interpolation.hh:26
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Determine coefficients interpolating a given function.
Definition meta/power/interpolation.hh:78
│ │ │ │ +
BasisTraits Traits
Export basis traits.
Definition meta/power/interpolation.hh:34
│ │ │ │ +
PowerInterpolation(const Backend &backend_)
Construct a PowerInterpolation.
Definition meta/power/interpolation.hh:43
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -9,87 +9,114 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * meta │ │ │ │ │ * power │ │ │ │ │ -meta/power/coefficients.hh │ │ │ │ │ +meta/power/interpolation.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_COEFFICIENTS_HH │ │ │ │ │ - 7#define DUNE_LOCALFUNCTIONS_META_POWER_COEFFICIENTS_HH │ │ │ │ │ + 6#ifndef DUNE_LOCALFUNCTIONS_META_POWER_INTERPOLATION_HH │ │ │ │ │ + 7#define DUNE_LOCALFUNCTIONS_META_POWER_INTERPOLATION_HH │ │ │ │ │ 8 │ │ │ │ │ - 9#include │ │ │ │ │ - 10#include │ │ │ │ │ - 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13 │ │ │ │ │ - 14namespace Dune { │ │ │ │ │ - 15 │ │ │ │ │ - 18 │ │ │ │ │ -22 class PowerCoefficients { │ │ │ │ │ - 23 std::vector keys; │ │ │ │ │ - 24 │ │ │ │ │ - 25 public: │ │ │ │ │ - 27 │ │ │ │ │ - 35 template │ │ │ │ │ -36 PowerCoefficients(const Backend &backend, std::size_t power) : │ │ │ │ │ - 37 keys(backend.size()*power) │ │ │ │ │ - 38 { │ │ │ │ │ - 39 for(std::size_t i = 0; i < backend.size(); ++i) { │ │ │ │ │ - 40 const LocalKey &k = backend.localKey(i); │ │ │ │ │ - 41 for(std::size_t d = 0; d < power; ++d) │ │ │ │ │ - 42 keys[i+d*backend.size()] = │ │ │ │ │ - 43 LocalKey(k.subEntity(), k.codim(), power*k.index() + d); │ │ │ │ │ - 44 } │ │ │ │ │ - 45 } │ │ │ │ │ -47 inline std::size_t size() const { return keys.size(); } │ │ │ │ │ - 48 │ │ │ │ │ -50 inline const LocalKey& localKey(std::size_t i) const { return keys[i]; } │ │ │ │ │ - 51 }; │ │ │ │ │ - 52 │ │ │ │ │ - 53} // namespace Dune │ │ │ │ │ - 54 │ │ │ │ │ - 55#endif // DUNE_LOCALFUNCTIONS_META_POWER_COEFFICIENTS_HH │ │ │ │ │ -localkey.hh │ │ │ │ │ + 9#include │ │ │ │ │ + 10#include │ │ │ │ │ + 11#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ + 14 │ │ │ │ │ + 15namespace Dune { │ │ │ │ │ + 16 │ │ │ │ │ + 19 │ │ │ │ │ + 25 template │ │ │ │ │ +26 class PowerInterpolation { │ │ │ │ │ + 27 static_assert(Backend::Traits::dimRange == 1, │ │ │ │ │ + 28 "PowerInterpolation works only with scalar backends"); │ │ │ │ │ + 29 │ │ │ │ │ + 30 const Backend *backend; │ │ │ │ │ + 31 │ │ │ │ │ + 32 public: │ │ │ │ │ +34 typedef BasisTraits Traits; │ │ │ │ │ + 35 │ │ │ │ │ + 37 │ │ │ │ │ +43 PowerInterpolation(const Backend &backend_) : backend(&backend_) { } │ │ │ │ │ + 44 │ │ │ │ │ + 45 private: │ │ │ │ │ + 46 template │ │ │ │ │ + 47 class ComponentEvaluator │ │ │ │ │ + 48 { │ │ │ │ │ + 49 const F &f; │ │ │ │ │ + 50 std::size_t comp; │ │ │ │ │ + 51 │ │ │ │ │ + 52 public: │ │ │ │ │ + 53 ComponentEvaluator(const F &f_, std::size_t comp_) : │ │ │ │ │ + 54 f(f_), comp(comp_) │ │ │ │ │ + 55 { } │ │ │ │ │ + 56 │ │ │ │ │ + 57 typename Backend::Traits::Range operator()(const typename Backend::Traits:: │ │ │ │ │ +DomainLocal &x) const │ │ │ │ │ + 58 { │ │ │ │ │ + 59 typename Traits::Range fy = f(x); │ │ │ │ │ + 60 typename Backend::Traits::Range y; │ │ │ │ │ + 61 y[0] = fy[comp]; │ │ │ │ │ + 62 return y; │ │ │ │ │ + 63 } │ │ │ │ │ + 64 }; │ │ │ │ │ + 65 │ │ │ │ │ + 66 public: │ │ │ │ │ + 68 │ │ │ │ │ + 77 template │ │ │ │ │ +78 void interpolate(const F& ff, std::vector& out) const { │ │ │ │ │ + 79 │ │ │ │ │ + 80 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ + 81 │ │ │ │ │ + 82 │ │ │ │ │ + 83 out.clear(); │ │ │ │ │ + 84 std::vector cout; │ │ │ │ │ + 85 for(std::size_t d = 0; d < Traits::dimRange; ++d) { │ │ │ │ │ + 86 // When dropping support for `evaluate()` we can simply use a lambda │ │ │ │ │ + 87 // instead of ComponentEvaluator. But changing this now would break │ │ │ │ │ + 88 // PowerInterpolation for FE-implementation outside of dune-localfunctions │ │ │ │ │ + 89 // which may not have been adjusted so far. │ │ │ │ │ + 90 backend->interpolate(ComponentEvaluator>(f, d), │ │ │ │ │ +cout); │ │ │ │ │ + 91 if(d == 0) │ │ │ │ │ + 92 out.resize(cout.size()*Traits::dimRange); │ │ │ │ │ + 93 // make sure the size of cout does not change surprisingly │ │ │ │ │ + 94 assert(out.size() == cout.size()*Traits::dimRange); │ │ │ │ │ + 95 std::copy(cout.begin(), cout.end(), out.begin() + d*cout.size()); │ │ │ │ │ + 96 } │ │ │ │ │ + 97 } │ │ │ │ │ + 98 }; │ │ │ │ │ + 99 │ │ │ │ │ + 100} // namespace Dune │ │ │ │ │ + 101 │ │ │ │ │ + 102#endif // DUNE_LOCALFUNCTIONS_META_POWER_INTERPOLATION_HH │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::LocalKey::index │ │ │ │ │ -unsigned int index() const │ │ │ │ │ -Return offset within subentity. │ │ │ │ │ -Definition localkey.hh:68 │ │ │ │ │ -Dune::LocalKey::codim │ │ │ │ │ -unsigned int codim() const │ │ │ │ │ -Return codim of associated entity. │ │ │ │ │ -Definition localkey.hh:62 │ │ │ │ │ -Dune::LocalKey::subEntity │ │ │ │ │ -unsigned int subEntity() const │ │ │ │ │ -Return number of associated subentity. │ │ │ │ │ -Definition localkey.hh:56 │ │ │ │ │ -Dune::PowerCoefficients │ │ │ │ │ -Meta-coefficients turning a scalar coefficients into vector-valued │ │ │ │ │ -coefficients. │ │ │ │ │ -Definition meta/power/coefficients.hh:22 │ │ │ │ │ -Dune::PowerCoefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition meta/power/coefficients.hh:47 │ │ │ │ │ -Dune::PowerCoefficients::PowerCoefficients │ │ │ │ │ -PowerCoefficients(const Backend &backend, std::size_t power) │ │ │ │ │ -Construct a PowerCoefficients object. │ │ │ │ │ -Definition meta/power/coefficients.hh:36 │ │ │ │ │ -Dune::PowerCoefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition meta/power/coefficients.hh:50 │ │ │ │ │ +Dune::PowerInterpolation │ │ │ │ │ +Meta-interpolation turning a scalar interpolation into vector-valued │ │ │ │ │ +interpolation. │ │ │ │ │ +Definition meta/power/interpolation.hh:26 │ │ │ │ │ +Dune::PowerInterpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Determine coefficients interpolating a given function. │ │ │ │ │ +Definition meta/power/interpolation.hh:78 │ │ │ │ │ +Dune::PowerInterpolation::Traits │ │ │ │ │ +BasisTraits Traits │ │ │ │ │ +Export basis traits. │ │ │ │ │ +Definition meta/power/interpolation.hh:34 │ │ │ │ │ +Dune::PowerInterpolation::PowerInterpolation │ │ │ │ │ +PowerInterpolation(const Backend &backend_) │ │ │ │ │ +Construct a PowerInterpolation. │ │ │ │ │ +Definition meta/power/interpolation.hh:43 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04491.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: coefficients.hh File Reference │ │ │ │ +dune-localfunctions: interpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,28 +72,28 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
coefficients.hh File Reference
│ │ │ │ +
interpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <cstddef>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ -#include <dune/localfunctions/whitney/edges0.5/common.hh>
│ │ │ │ +#include <dune/localfunctions/whitney/edges0.5/common.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::EdgeS0_5Coefficients< dim >
 Coefficients for lowest order edge elements on simplices. More...
class  Dune::EdgeS0_5Interpolation< Geometry, Traits_ >
 Interpolation for lowest order edge elements on simplices. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -9,23 +9,23 @@ │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * whitney │ │ │ │ │ * edges0.5 │ │ │ │ │ Classes | Namespaces │ │ │ │ │ -coefficients.hh File Reference │ │ │ │ │ +interpolation.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -class  Dune::EdgeS0_5Coefficients<_dim_> │ │ │ │ │ -  Coefficients for lowest order edge elements on simplices. More... │ │ │ │ │ +class  Dune::EdgeS0_5Interpolation<_Geometry,_Traits__> │ │ │ │ │ +  Interpolation for lowest order edge elements on simplices. More... │ │ │ │ │   │ │ │ │ │ Namespaces │ │ │ │ │ namespace  Dune │ │ │ │ │   │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04491_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: coefficients.hh Source File │ │ │ │ +dune-localfunctions: interpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,72 +74,111 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
whitney/edges0.5/coefficients.hh
│ │ │ │ +
whitney/edges0.5/interpolation.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_COEFFICIENTS_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COEFFICIENTS_HH
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH
│ │ │ │
8
│ │ │ │
9#include <cstddef>
│ │ │ │
10#include <vector>
│ │ │ │
11
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │
15namespace Dune {
│ │ │ │
16
│ │ │ │
18 //
│ │ │ │ -
19 // Coefficients
│ │ │ │ +
19 // Interpolation
│ │ │ │
20 //
│ │ │ │
21
│ │ │ │
23
│ │ │ │ -
29 template<std::size_t dim>
│ │ │ │ +
29 template<class Geometry, class Traits_>
│ │ │ │
│ │ │ │ -
30 class EdgeS0_5Coefficients : private EdgeS0_5Common<dim> {
│ │ │ │ -
31 using EdgeS0_5Common<dim>::s;
│ │ │ │ -
32
│ │ │ │ -
33 std::vector<LocalKey> li;
│ │ │ │ -
34
│ │ │ │ -
35 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 for(std::size_t i = 0; i < s; i++)
│ │ │ │ -
39 li[i] = LocalKey(i, dim-1, 0);
│ │ │ │ -
40 }
│ │ │ │ -
│ │ │ │ -
41
│ │ │ │ -
43 std::size_t size () const { return s; }
│ │ │ │ + │ │ │ │ +
31 private EdgeS0_5Common<Traits_::dimDomainLocal,
│ │ │ │ +
32 typename Traits_::DomainField>
│ │ │ │ +
33 {
│ │ │ │ +
34 public:
│ │ │ │ +
35 typedef Traits_ Traits;
│ │ │ │ +
36
│ │ │ │ +
37 private:
│ │ │ │ +
38 static const std::size_t dim = Traits::dimDomainLocal;
│ │ │ │ + │ │ │ │ +
40 using Base::refelem;
│ │ │ │ +
41 using Base::s;
│ │ │ │ +
42
│ │ │ │ +
43 std::vector<typename Traits::DomainGlobal> edgev;
│ │ │ │
44
│ │ │ │ -
46 const LocalKey& localKey(std::size_t i) const { return li[i]; }
│ │ │ │ -
47 };
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
49} // namespace Dune
│ │ │ │ -
50
│ │ │ │ -
51#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COEFFICIENTS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
45 public:
│ │ │ │ +
47
│ │ │ │ +
53 template<typename VertexOrder>
│ │ │ │ +
│ │ │ │ +
54 EdgeS0_5Interpolation(const Geometry& geo,
│ │ │ │ +
55 const VertexOrder& vertexOrder) :
│ │ │ │ +
56 edgev(s)
│ │ │ │ +
57 {
│ │ │ │ +
58 for(std::size_t i = 0; i < s; ++i) {
│ │ │ │ +
59 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim);
│ │ │ │ +
60 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim);
│ │ │ │ +
61
│ │ │ │ +
62 edgev[i] = geo.corner(i1);
│ │ │ │ +
63 edgev[i] -= geo.corner(i0);
│ │ │ │ +
64 edgev[i] /= edgev[i].two_norm();
│ │ │ │ +
65
│ │ │ │ +
66 const typename VertexOrder::iterator& edgeVertexOrder =
│ │ │ │ +
67 vertexOrder.begin(dim-1, i);
│ │ │ │ +
68 if(edgeVertexOrder[0] > edgeVertexOrder[1])
│ │ │ │ +
69 edgev[i] *= -1;
│ │ │ │ +
70 }
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
74 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
75 void interpolate(const F& ff, std::vector<C>& out) const {
│ │ │ │ +
76 typename Traits::Range y;
│ │ │ │ +
77
│ │ │ │ +
78 auto&& f = Impl::makeFunctionWithCallOperator<std::decay_t<decltype(refelem.position(0,dim-1))>>(ff);
│ │ │ │ +
79
│ │ │ │ +
80 out.resize(s);
│ │ │ │ +
81
│ │ │ │ +
82 for(std::size_t i = 0; i < s; ++i) {
│ │ │ │ +
83 y = f(refelem.position(i,dim-1));
│ │ │ │ +
84
│ │ │ │ +
85 out[i] = y * edgev[i];
│ │ │ │ +
86 }
│ │ │ │ +
87 }
│ │ │ │ +
│ │ │ │ +
88 };
│ │ │ │ +
│ │ │ │ +
89
│ │ │ │ +
90} // namespace Dune
│ │ │ │ +
91
│ │ │ │ +
92#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
Coefficients for lowest order edge elements on simplices.
Definition whitney/edges0.5/coefficients.hh:30
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition whitney/edges0.5/coefficients.hh:46
│ │ │ │ -
EdgeS0_5Coefficients()
Standard constructor.
Definition whitney/edges0.5/coefficients.hh:37
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition whitney/edges0.5/coefficients.hh:43
│ │ │ │
Common base class for edge elements.
Definition common.hh:19
│ │ │ │ +
RefElem refelem
The reference element for this edge element.
Definition common.hh:26
│ │ │ │
std::size_t s
The number of base functions.
Definition common.hh:34
│ │ │ │ +
Interpolation for lowest order edge elements on simplices.
Definition whitney/edges0.5/interpolation.hh:33
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Interpolation of a function.
Definition whitney/edges0.5/interpolation.hh:75
│ │ │ │ +
Traits_ Traits
Definition whitney/edges0.5/interpolation.hh:35
│ │ │ │ +
EdgeS0_5Interpolation(const Geometry &geo, const VertexOrder &vertexOrder)
constructor
Definition whitney/edges0.5/interpolation.hh:54
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -9,83 +9,121 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * dune │ │ │ │ │ * localfunctions │ │ │ │ │ * whitney │ │ │ │ │ * edges0.5 │ │ │ │ │ -whitney/edges0.5/coefficients.hh │ │ │ │ │ +whitney/edges0.5/interpolation.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_COEFFICIENTS_HH │ │ │ │ │ - 7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COEFFICIENTS_HH │ │ │ │ │ + 6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH │ │ │ │ │ + 7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH │ │ │ │ │ 8 │ │ │ │ │ 9#include │ │ │ │ │ 10#include │ │ │ │ │ 11 │ │ │ │ │ - 12#include │ │ │ │ │ - 13#include │ │ │ │ │ + 12#include │ │ │ │ │ + 13#include │ │ │ │ │ 14 │ │ │ │ │ 15namespace Dune { │ │ │ │ │ 16 │ │ │ │ │ 18 // │ │ │ │ │ - 19 // Coefficients │ │ │ │ │ + 19 // Interpolation │ │ │ │ │ 20 // │ │ │ │ │ 21 │ │ │ │ │ 23 │ │ │ │ │ - 29 template │ │ │ │ │ -30 class EdgeS0_5Coefficients : private EdgeS0_5Common { │ │ │ │ │ - 31 using EdgeS0_5Common::s; │ │ │ │ │ - 32 │ │ │ │ │ - 33 std::vector li; │ │ │ │ │ - 34 │ │ │ │ │ - 35 public: │ │ │ │ │ -37 EdgeS0_5Coefficients() : li(s) { │ │ │ │ │ - 38 for(std::size_t i = 0; i < s; i++) │ │ │ │ │ - 39 li[i] = LocalKey(i, dim-1, 0); │ │ │ │ │ - 40 } │ │ │ │ │ - 41 │ │ │ │ │ -43 std::size_t size () const { return s; } │ │ │ │ │ + 29 template │ │ │ │ │ +30 class EdgeS0_5Interpolation : │ │ │ │ │ + 31 private EdgeS0_5Common │ │ │ │ │ + 33 { │ │ │ │ │ + 34 public: │ │ │ │ │ +35 typedef Traits_ Traits; │ │ │ │ │ + 36 │ │ │ │ │ + 37 private: │ │ │ │ │ + 38 static const std::size_t dim = Traits::dimDomainLocal; │ │ │ │ │ + 39 typedef EdgeS0_5Common Base; │ │ │ │ │ + 40 using Base::refelem; │ │ │ │ │ + 41 using Base::s; │ │ │ │ │ + 42 │ │ │ │ │ + 43 std::vector edgev; │ │ │ │ │ 44 │ │ │ │ │ -46 const LocalKey& localKey(std::size_t i) const { return li[i]; } │ │ │ │ │ - 47 }; │ │ │ │ │ - 48 │ │ │ │ │ - 49} // namespace Dune │ │ │ │ │ - 50 │ │ │ │ │ - 51#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COEFFICIENTS_HH │ │ │ │ │ -localkey.hh │ │ │ │ │ + 45 public: │ │ │ │ │ + 47 │ │ │ │ │ + 53 template │ │ │ │ │ +54 EdgeS0_5Interpolation(const Geometry& geo, │ │ │ │ │ + 55 const VertexOrder& vertexOrder) : │ │ │ │ │ + 56 edgev(s) │ │ │ │ │ + 57 { │ │ │ │ │ + 58 for(std::size_t i = 0; i < s; ++i) { │ │ │ │ │ + 59 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim); │ │ │ │ │ + 60 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim); │ │ │ │ │ + 61 │ │ │ │ │ + 62 edgev[i] = geo.corner(i1); │ │ │ │ │ + 63 edgev[i] -= geo.corner(i0); │ │ │ │ │ + 64 edgev[i] /= edgev[i].two_norm(); │ │ │ │ │ + 65 │ │ │ │ │ + 66 const typename VertexOrder::iterator& edgeVertexOrder = │ │ │ │ │ + 67 vertexOrder.begin(dim-1, i); │ │ │ │ │ + 68 if(edgeVertexOrder[0] > edgeVertexOrder[1]) │ │ │ │ │ + 69 edgev[i] *= -1; │ │ │ │ │ + 70 } │ │ │ │ │ + 71 } │ │ │ │ │ + 72 │ │ │ │ │ + 74 template │ │ │ │ │ +75 void interpolate(const F& ff, std::vector& out) const { │ │ │ │ │ + 76 typename Traits::Range y; │ │ │ │ │ + 77 │ │ │ │ │ + 78 auto&& f = Impl::makeFunctionWithCallOperator>(ff); │ │ │ │ │ + 79 │ │ │ │ │ + 80 out.resize(s); │ │ │ │ │ + 81 │ │ │ │ │ + 82 for(std::size_t i = 0; i < s; ++i) { │ │ │ │ │ + 83 y = f(refelem.position(i,dim-1)); │ │ │ │ │ + 84 │ │ │ │ │ + 85 out[i] = y * edgev[i]; │ │ │ │ │ + 86 } │ │ │ │ │ + 87 } │ │ │ │ │ + 88 }; │ │ │ │ │ + 89 │ │ │ │ │ + 90} // namespace Dune │ │ │ │ │ + 91 │ │ │ │ │ + 92#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH │ │ │ │ │ common.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ -Dune::LocalKey │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -Definition localkey.hh:23 │ │ │ │ │ -Dune::EdgeS0_5Coefficients │ │ │ │ │ -Coefficients for lowest order edge elements on simplices. │ │ │ │ │ -Definition whitney/edges0.5/coefficients.hh:30 │ │ │ │ │ -Dune::EdgeS0_5Coefficients::localKey │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -Definition whitney/edges0.5/coefficients.hh:46 │ │ │ │ │ -Dune::EdgeS0_5Coefficients::EdgeS0_5Coefficients │ │ │ │ │ -EdgeS0_5Coefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -Definition whitney/edges0.5/coefficients.hh:37 │ │ │ │ │ -Dune::EdgeS0_5Coefficients::size │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -Definition whitney/edges0.5/coefficients.hh:43 │ │ │ │ │ Dune::EdgeS0_5Common │ │ │ │ │ Common base class for edge elements. │ │ │ │ │ Definition common.hh:19 │ │ │ │ │ +Dune::EdgeS0_5Common::refelem │ │ │ │ │ +RefElem refelem │ │ │ │ │ +The reference element for this edge element. │ │ │ │ │ +Definition common.hh:26 │ │ │ │ │ Dune::EdgeS0_5Common::s │ │ │ │ │ std::size_t s │ │ │ │ │ The number of base functions. │ │ │ │ │ Definition common.hh:34 │ │ │ │ │ +Dune::EdgeS0_5Interpolation │ │ │ │ │ +Interpolation for lowest order edge elements on simplices. │ │ │ │ │ +Definition whitney/edges0.5/interpolation.hh:33 │ │ │ │ │ +Dune::EdgeS0_5Interpolation::interpolate │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolation of a function. │ │ │ │ │ +Definition whitney/edges0.5/interpolation.hh:75 │ │ │ │ │ +Dune::EdgeS0_5Interpolation::Traits │ │ │ │ │ +Traits_ Traits │ │ │ │ │ +Definition whitney/edges0.5/interpolation.hh:35 │ │ │ │ │ +Dune::EdgeS0_5Interpolation::EdgeS0_5Interpolation │ │ │ │ │ +EdgeS0_5Interpolation(const Geometry &geo, const VertexOrder &vertexOrder) │ │ │ │ │ +constructor │ │ │ │ │ +Definition whitney/edges0.5/interpolation.hh:54 │ │ │ │ │ +localinterpolation.hh │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04494.html │ │ │ │ @@ -76,18 +76,18 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
rannacherturek.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include "rannachertureklocalbasis.hh"
│ │ │ │ -#include "rannachertureklocalcoefficients.hh"
│ │ │ │ -#include "rannachertureklocalinterpolation.hh"
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include "rannachertureklocalbasis.hh"
│ │ │ │ +#include "rannachertureklocalcoefficients.hh"
│ │ │ │ +#include "rannachertureklocalinterpolation.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04494_source.html │ │ │ │ @@ -86,19 +86,19 @@ │ │ │ │
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_LOCALFINITEELEMENT_HH
│ │ │ │
6#define DUNE_RANNACHER_TUREK_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │
8#include <dune/geometry/type.hh>
│ │ │ │
9
│ │ │ │ - │ │ │ │ + │ │ │ │
11
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
15
│ │ │ │
16namespace Dune
│ │ │ │
17{
│ │ │ │
18
│ │ │ │
28 template< class D, class R, unsigned int d >
│ │ │ │
│ │ │ │ │ │ │ │ @@ -149,18 +149,18 @@ │ │ │ │
70 typename Traits::LocalInterpolationType localInterpolation_;
│ │ │ │
71 };
│ │ │ │
│ │ │ │
72
│ │ │ │
73} // namespace Dune
│ │ │ │
74
│ │ │ │
75#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALFINITEELEMENT_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
│ │ │ │
Rannacher-Turek shape functions.
Definition rannacherturek/rannacherturek.hh:30
│ │ │ │
unsigned int size() const
Number of shape functions in this finite element.
Definition rannacherturek/rannacherturek.hh:56
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -72,17 +72,17 @@ │ │ │ │ │ 70 typename Traits::LocalInterpolationType localInterpolation_; │ │ │ │ │ 71 }; │ │ │ │ │ 72 │ │ │ │ │ 73} // namespace Dune │ │ │ │ │ 74 │ │ │ │ │ 75#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALFINITEELEMENT_HH │ │ │ │ │ localfiniteelementtraits.hh │ │ │ │ │ -rannachertureklocalbasis.hh │ │ │ │ │ rannachertureklocalcoefficients.hh │ │ │ │ │ rannachertureklocalinterpolation.hh │ │ │ │ │ +rannachertureklocalbasis.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalFiniteElementTraits │ │ │ │ │ traits helper struct │ │ │ │ │ Definition localfiniteelementtraits.hh:13 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ LB LocalBasisType │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04497.html │ │ │ │ @@ -77,17 +77,17 @@ │ │ │ │ Classes | │ │ │ │ Namespaces │ │ │ │
localfiniteelement.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <dune/geometry/type.hh>
│ │ │ │ #include <dune/geometry/typeindex.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/utility/l2interpolation.hh>
│ │ │ │ -#include <dune/localfunctions/utility/dglocalcoefficients.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include <dune/localfunctions/utility/l2interpolation.hh>
│ │ │ │ +#include <dune/localfunctions/utility/dglocalcoefficients.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

struct  Dune::RannacherTurekLocalFiniteElement< D, R, d >
 Rannacher-Turek shape functions. More...
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04497_source.html │ │ │ │ @@ -87,17 +87,17 @@ │ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
5#ifndef DUNE_GENERIC_LOCALFINITEELEMENT_HH
│ │ │ │
6#define DUNE_GENERIC_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │
8#include <dune/geometry/type.hh>
│ │ │ │
9#include <dune/geometry/typeindex.hh>
│ │ │ │
10
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │
15namespace Dune
│ │ │ │
16{
│ │ │ │
23 template< class BasisF, class CoeffF, class InterpolF>
│ │ │ │
│ │ │ │ │ │ │ │
25 {
│ │ │ │ @@ -257,17 +257,17 @@ │ │ │ │
184 {}
│ │ │ │
│ │ │ │
185 };
│ │ │ │ │ │ │ │
186}
│ │ │ │
187
│ │ │ │
188#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
│ │ │ │
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
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -169,17 +169,17 @@ │ │ │ │ │ &key ) │ │ │ │ │ 183 : Base( gt, key ) │ │ │ │ │ 184 {} │ │ │ │ │ 185 }; │ │ │ │ │ 186} │ │ │ │ │ 187 │ │ │ │ │ 188#endif │ │ │ │ │ +localfiniteelementtraits.hh │ │ │ │ │ l2interpolation.hh │ │ │ │ │ dglocalcoefficients.hh │ │ │ │ │ -localfiniteelementtraits.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::LocalFiniteElementTraits │ │ │ │ │ traits helper struct │ │ │ │ │ Definition localfiniteelementtraits.hh:13 │ │ │ │ │ Dune::LocalFiniteElementTraits::LocalBasisType │ │ │ │ │ LB LocalBasisType │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04500.html │ │ │ │ @@ -77,16 +77,16 @@ │ │ │ │ Namespaces | │ │ │ │ Functions │ │ │ │
localfiniteelement.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <dune/python/pybind11/pybind11.h>
│ │ │ │ #include <dune/common/visibility.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ -#include <dune/localfunctions/common/virtualinterface.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/localfunctions/common/virtualinterface.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

struct  Dune::GenericLocalFiniteElement< BasisF, CoeffF, InterpolF >
 A LocalFiniteElement implementation based on three TopologyFactories providing the LocalBasis, LocalCoefficients, and LocalInterpolations. Note the key type for all three factories must coincide. More...
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04500_source.html │ │ │ │ @@ -85,16 +85,16 @@ │ │ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
3#ifndef DUNE_PYTHON_LOCALFUNCTIONS_LOCALFINITEELEMENT_HH
│ │ │ │
4#define DUNE_PYTHON_LOCALFUNCTIONS_LOCALFINITEELEMENT_HH
│ │ │ │
5
│ │ │ │
6#include <dune/python/pybind11/pybind11.h>
│ │ │ │
7
│ │ │ │
8#include <dune/common/visibility.hh>
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
11
│ │ │ │
12namespace Dune {
│ │ │ │
│ │ │ │
13namespace Python {
│ │ │ │
14
│ │ │ │
15namespace detail {
│ │ │ │
16
│ │ │ │ @@ -156,16 +156,16 @@ │ │ │ │
70
│ │ │ │
71
│ │ │ │
72} /* namespace Python */
│ │ │ │
│ │ │ │
73} /* namespace Dune */
│ │ │ │
74
│ │ │ │
75#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │
DUNE_EXPORT auto registerLocalFiniteElement(pybind11::handle scope, const char *name="LocalFiniteElement")
Definition python/localfunctions/localfiniteelement.hh:56
│ │ │ │
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 codim() const
Return codim of associated entity.
Definition localkey.hh:62
│ │ │ │
unsigned int subEntity() const
Return number of associated subentity.
Definition localkey.hh:56
│ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -94,16 +94,16 @@ │ │ │ │ │ 69} │ │ │ │ │ 70 │ │ │ │ │ 71 │ │ │ │ │ 72} /* namespace Python */ │ │ │ │ │ 73} /* namespace Dune */ │ │ │ │ │ 74 │ │ │ │ │ 75#endif │ │ │ │ │ -virtualinterface.hh │ │ │ │ │ localkey.hh │ │ │ │ │ +virtualinterface.hh │ │ │ │ │ Dune │ │ │ │ │ Definition bdfmcube.hh:18 │ │ │ │ │ Dune::Python::registerLocalFiniteElement │ │ │ │ │ DUNE_EXPORT auto registerLocalFiniteElement(pybind11::handle scope, const char │ │ │ │ │ *name="LocalFiniteElement") │ │ │ │ │ Definition python/localfunctions/localfiniteelement.hh:56 │ │ │ │ │ Dune::LocalKey │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000000_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

brezzidouglasfortinmarini → common Relation

│ │ │ │ Namespaces

namespace  Dune
 
File in dune/localfunctions/brezzidouglasfortinmariniIncludes file in dune/localfunctions/common
bdfmcube.hhlocalfiniteelementtraits.hh
cube / brezzidouglasfortinmarini/cube/localbasis.hhcommon/localbasis.hh
cube / localcoefficients.hhlocalkey.hh
cube / brezzidouglasfortinmarini/cube/localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

brezzidouglasfortinmarini → common Relation

File in dune/localfunctions/brezzidouglasfortinmariniIncludes file in dune/localfunctions/common
bdfmcube.hhlocalfiniteelementtraits.hh
cube / brezzidouglasfortinmarini/cube/localbasis.hhcommon/localbasis.hh
cube / localcoefficients.hhlocalkey.hh
cube / brezzidouglasfortinmarini/cube/localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000000_000009.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

brezzidouglasfortinmarini → cube Relation

File in dune/localfunctions/brezzidouglasfortinmariniIncludes file in dune/localfunctions/brezzidouglasfortinmarini/cube
bdfmcube.hhbrezzidouglasfortinmarini/cube/localbasis.hh
bdfmcube.hhbrezzidouglasfortinmarini/cube/localinterpolation.hh
bdfmcube.hhlocalcoefficients.hh
│ │ │ │ +

brezzidouglasfortinmarini → cube Relation

File in dune/localfunctions/brezzidouglasfortinmariniIncludes file in dune/localfunctions/brezzidouglasfortinmarini/cube
bdfmcube.hhbrezzidouglasfortinmarini/cube/localbasis.hh
bdfmcube.hhbrezzidouglasfortinmarini/cube/localinterpolation.hh
bdfmcube.hhlocalcoefficients.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000001_000002.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

brezzidouglasmarini → brezzidouglasmarini1cube2d Relation

File in dune/localfunctions/brezzidouglasmariniIncludes file in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2d
brezzidouglasmarini1cube2d.hhbrezzidouglasmarini1cube2dlocalbasis.hh
brezzidouglasmarini1cube2d.hhbrezzidouglasmarini1cube2dlocalcoefficients.hh
brezzidouglasmarini1cube2d.hhbrezzidouglasmarini1cube2dlocalinterpolation.hh
│ │ │ │ +

brezzidouglasmarini → brezzidouglasmarini1cube2d Relation

File in dune/localfunctions/brezzidouglasmariniIncludes file in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2d
brezzidouglasmarini1cube2d.hhbrezzidouglasmarini1cube2dlocalbasis.hh
brezzidouglasmarini1cube2d.hhbrezzidouglasmarini1cube2dlocalcoefficients.hh
brezzidouglasmarini1cube2d.hhbrezzidouglasmarini1cube2dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000001_000003.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

brezzidouglasmarini → brezzidouglasmarini1cube3d Relation

File in dune/localfunctions/brezzidouglasmariniIncludes file in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3d
brezzidouglasmarini1cube3d.hhbrezzidouglasmarini1cube3dlocalbasis.hh
brezzidouglasmarini1cube3d.hhbrezzidouglasmarini1cube3dlocalcoefficients.hh
brezzidouglasmarini1cube3d.hhbrezzidouglasmarini1cube3dlocalinterpolation.hh
│ │ │ │ +

brezzidouglasmarini → brezzidouglasmarini1cube3d Relation

File in dune/localfunctions/brezzidouglasmariniIncludes file in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3d
brezzidouglasmarini1cube3d.hhbrezzidouglasmarini1cube3dlocalbasis.hh
brezzidouglasmarini1cube3d.hhbrezzidouglasmarini1cube3dlocalcoefficients.hh
brezzidouglasmarini1cube3d.hhbrezzidouglasmarini1cube3dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000001_000004.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

brezzidouglasmarini → brezzidouglasmarini1simplex2d Relation

File in dune/localfunctions/brezzidouglasmariniIncludes file in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2d
brezzidouglasmarini1simplex2d.hhbrezzidouglasmarini1simplex2dlocalbasis.hh
brezzidouglasmarini1simplex2d.hhbrezzidouglasmarini1simplex2dlocalcoefficients.hh
brezzidouglasmarini1simplex2d.hhbrezzidouglasmarini1simplex2dlocalinterpolation.hh
│ │ │ │ +

brezzidouglasmarini → brezzidouglasmarini1simplex2d Relation

File in dune/localfunctions/brezzidouglasmariniIncludes file in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2d
brezzidouglasmarini1simplex2d.hhbrezzidouglasmarini1simplex2dlocalbasis.hh
brezzidouglasmarini1simplex2d.hhbrezzidouglasmarini1simplex2dlocalcoefficients.hh
brezzidouglasmarini1simplex2d.hhbrezzidouglasmarini1simplex2dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000001_000005.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

brezzidouglasmarini → brezzidouglasmarini2cube2d Relation

File in dune/localfunctions/brezzidouglasmariniIncludes file in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2d
brezzidouglasmarini2cube2d.hhbrezzidouglasmarini2cube2dlocalbasis.hh
brezzidouglasmarini2cube2d.hhbrezzidouglasmarini2cube2dlocalcoefficients.hh
brezzidouglasmarini2cube2d.hhbrezzidouglasmarini2cube2dlocalinterpolation.hh
│ │ │ │ +

brezzidouglasmarini → brezzidouglasmarini2cube2d Relation

File in dune/localfunctions/brezzidouglasmariniIncludes file in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2d
brezzidouglasmarini2cube2d.hhbrezzidouglasmarini2cube2dlocalbasis.hh
brezzidouglasmarini2cube2d.hhbrezzidouglasmarini2cube2dlocalcoefficients.hh
brezzidouglasmarini2cube2d.hhbrezzidouglasmarini2cube2dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000001_000006.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

brezzidouglasmarini → brezzidouglasmarini2simplex2d Relation

File in dune/localfunctions/brezzidouglasmariniIncludes file in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2d
brezzidouglasmarini2simplex2d.hhbrezzidouglasmarini2simplex2dlocalbasis.hh
brezzidouglasmarini2simplex2d.hhbrezzidouglasmarini2simplex2dlocalcoefficients.hh
brezzidouglasmarini2simplex2d.hhbrezzidouglasmarini2simplex2dlocalinterpolation.hh
│ │ │ │ +

brezzidouglasmarini → brezzidouglasmarini2simplex2d Relation

File in dune/localfunctions/brezzidouglasmariniIncludes file in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2d
brezzidouglasmarini2simplex2d.hhbrezzidouglasmarini2simplex2dlocalbasis.hh
brezzidouglasmarini2simplex2d.hhbrezzidouglasmarini2simplex2dlocalcoefficients.hh
brezzidouglasmarini2simplex2d.hhbrezzidouglasmarini2simplex2dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000001_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

brezzidouglasmarini → common Relation

File in dune/localfunctions/brezzidouglasmariniIncludes file in dune/localfunctions/common
brezzidouglasmarini1cube2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini1cube3d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini1simplex2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini2cube2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini2simplex2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

brezzidouglasmarini → common Relation

File in dune/localfunctions/brezzidouglasmariniIncludes file in dune/localfunctions/common
brezzidouglasmarini1cube2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini1cube3d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini1simplex2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini2cube2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini2simplex2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000002_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

brezzidouglasmarini1cube2d → common Relation

File in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2dIncludes file in dune/localfunctions/common
brezzidouglasmarini1cube2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini1cube2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini1cube2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

brezzidouglasmarini1cube2d → common Relation

File in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2dIncludes file in dune/localfunctions/common
brezzidouglasmarini1cube2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini1cube2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini1cube2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000003_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

brezzidouglasmarini1cube3d → common Relation

File in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3dIncludes file in dune/localfunctions/common
brezzidouglasmarini1cube3dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini1cube3dlocalcoefficients.hhlocalkey.hh
│ │ │ │ +

brezzidouglasmarini1cube3d → common Relation

File in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3dIncludes file in dune/localfunctions/common
brezzidouglasmarini1cube3dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini1cube3dlocalcoefficients.hhlocalkey.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000004_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

brezzidouglasmarini1simplex2d → common Relation

File in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2dIncludes file in dune/localfunctions/common
brezzidouglasmarini1simplex2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini1simplex2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini1simplex2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

brezzidouglasmarini1simplex2d → common Relation

File in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2dIncludes file in dune/localfunctions/common
brezzidouglasmarini1simplex2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini1simplex2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini1simplex2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000005_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

brezzidouglasmarini2cube2d → common Relation

File in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2dIncludes file in dune/localfunctions/common
brezzidouglasmarini2cube2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini2cube2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini2cube2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

brezzidouglasmarini2cube2d → common Relation

File in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2dIncludes file in dune/localfunctions/common
brezzidouglasmarini2cube2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini2cube2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini2cube2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000006_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

brezzidouglasmarini2simplex2d → common Relation

File in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2dIncludes file in dune/localfunctions/common
brezzidouglasmarini2simplex2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini2simplex2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini2simplex2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

brezzidouglasmarini2simplex2d → common Relation

File in dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2dIncludes file in dune/localfunctions/common
brezzidouglasmarini2simplex2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini2simplex2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini2simplex2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000008_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

common → common Relation

File in dune/localfunctions/refined/commonIncludes file in dune/localfunctions/common
refinedsimplexlocalbasis.hhcommon/localbasis.hh
│ │ │ │ +

common → common Relation

File in dune/localfunctions/refined/commonIncludes file in dune/localfunctions/common
refinedsimplexlocalbasis.hhcommon/localbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000009_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

cube → common Relation

File in dune/localfunctions/brezzidouglasfortinmarini/cubeIncludes file in dune/localfunctions/common
brezzidouglasfortinmarini/cube/localbasis.hhcommon/localbasis.hh
brezzidouglasfortinmarini/cube/localinterpolation.hhcommon/localinterpolation.hh
localcoefficients.hhlocalkey.hh
│ │ │ │ +

cube → common Relation

File in dune/localfunctions/brezzidouglasfortinmarini/cubeIncludes file in dune/localfunctions/common
brezzidouglasfortinmarini/cube/localbasis.hhcommon/localbasis.hh
brezzidouglasfortinmarini/cube/localinterpolation.hhcommon/localinterpolation.hh
localcoefficients.hhlocalkey.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000012_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

dualmortarbasis → common Relation

File in dune/localfunctions/dualmortarbasisIncludes file in dune/localfunctions/common
dualp1.hhlocalfiniteelementtraits.hh
dualpq1factory.hhvirtualinterface.hh
dualpq1factory.hhvirtualwrappers.hh
dualq1.hhlocalfiniteelementtraits.hh
dualp1 / dualp1localbasis.hhcommon/localbasis.hh
dualp1 / dualp1localcoefficients.hhlocalkey.hh
dualp1 / dualp1localinterpolation.hhcommon/localinterpolation.hh
dualq1 / dualq1localbasis.hhcommon/localbasis.hh
dualq1 / dualq1localcoefficients.hhlocalkey.hh
dualq1 / dualq1localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000012_000013.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

dualmortarbasis → dualp1 Relation

File in dune/localfunctions/dualmortarbasisIncludes file in dune/localfunctions/dualmortarbasis/dualp1
dualp1.hhdualp1localbasis.hh
dualp1.hhdualp1localcoefficients.hh
dualp1.hhdualp1localinterpolation.hh
│ │ │ │ +

dualmortarbasis → dualp1 Relation

File in dune/localfunctions/dualmortarbasisIncludes file in dune/localfunctions/dualmortarbasis/dualp1
dualp1.hhdualp1localbasis.hh
dualp1.hhdualp1localcoefficients.hh
dualp1.hhdualp1localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000012_000014.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

dualmortarbasis → dualq1 Relation

File in dune/localfunctions/dualmortarbasisIncludes file in dune/localfunctions/dualmortarbasis/dualq1
dualq1.hhdualq1localbasis.hh
dualq1.hhdualq1localcoefficients.hh
dualq1.hhdualq1localinterpolation.hh
│ │ │ │ +

dualmortarbasis → dualq1 Relation

File in dune/localfunctions/dualmortarbasisIncludes file in dune/localfunctions/dualmortarbasis/dualq1
dualq1.hhdualq1localbasis.hh
dualq1.hhdualq1localcoefficients.hh
dualq1.hhdualq1localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000012_000021.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

dualmortarbasis → lagrange Relation

File in dune/localfunctions/dualmortarbasisIncludes file in dune/localfunctions/lagrange
dualq1.hhlagrangecube.hh
│ │ │ │ +

dualmortarbasis → lagrange Relation

File in dune/localfunctions/dualmortarbasisIncludes file in dune/localfunctions/lagrange
dualq1.hhlagrangecube.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000013_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

dualp1 → common Relation

File in dune/localfunctions/dualmortarbasis/dualp1Includes file in dune/localfunctions/common
dualp1localbasis.hhcommon/localbasis.hh
dualp1localcoefficients.hhlocalkey.hh
dualp1localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

dualp1 → common Relation

File in dune/localfunctions/dualmortarbasis/dualp1Includes file in dune/localfunctions/common
dualp1localbasis.hhcommon/localbasis.hh
dualp1localcoefficients.hhlocalkey.hh
dualp1localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000014_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

dualq1 → common Relation

File in dune/localfunctions/dualmortarbasis/dualq1Includes file in dune/localfunctions/common
dualq1localbasis.hhcommon/localbasis.hh
dualq1localcoefficients.hhlocalkey.hh
dualq1localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

dualq1 → common Relation

File in dune/localfunctions/dualmortarbasis/dualq1Includes file in dune/localfunctions/common
dualq1localbasis.hhcommon/localbasis.hh
dualq1localcoefficients.hhlocalkey.hh
dualq1localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000016_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

edges0.5 → common Relation

File in dune/localfunctions/whitney/edges0.5Includes file in dune/localfunctions/common
whitney/edges0.5/basis.hhlocaltoglobaladaptors.hh
whitney/edges0.5/coefficients.hhlocalkey.hh
whitney/edges0.5/interpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

edges0.5 → common Relation

File in dune/localfunctions/whitney/edges0.5Includes file in dune/localfunctions/common
whitney/edges0.5/basis.hhlocaltoglobaladaptors.hh
whitney/edges0.5/coefficients.hhlocalkey.hh
whitney/edges0.5/interpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000016_000021.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

edges0.5 → lagrange Relation

File in dune/localfunctions/whitney/edges0.5Includes file in dune/localfunctions/lagrange
whitney/edges0.5/basis.hhlagrangesimplex.hh
│ │ │ │ +

edges0.5 → lagrange Relation

File in dune/localfunctions/whitney/edges0.5Includes file in dune/localfunctions/lagrange
whitney/edges0.5/basis.hhlagrangesimplex.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000017_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

hierarchical → common Relation

File in dune/localfunctions/hierarchicalIncludes file in dune/localfunctions/common
hierarchicalp2.hhlocalfiniteelementtraits.hh
hierarchicalp2withelementbubble.hhlocalfiniteelementtraits.hh
hierarchicalprismp2.hhlocalfiniteelementtraits.hh
hierarchicalp2 / hierarchicalsimplexp2localbasis.hhcommon/localbasis.hh
hierarchicalp2 / hierarchicalsimplexp2localinterpolation.hhcommon/localinterpolation.hh
hierarchicalp2withelementbubble / hierarchicalsimplexp2withelementbubble.hhcommon/localbasis.hh
hierarchicalp2withelementbubble / hierarchicalsimplexp2withelementbubble.hhlocalkey.hh
hierarchicalp2withelementbubble / hierarchicalsimplexp2withelementbubble.hhcommon/localinterpolation.hh
hierarchicalprismp2 / hierarchicalprismp2localbasis.hhcommon/localbasis.hh
hierarchicalprismp2 / hierarchicalprismp2localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000017_000018.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

hierarchical → hierarchicalp2 Relation

File in dune/localfunctions/hierarchicalIncludes file in dune/localfunctions/hierarchical/hierarchicalp2
hierarchicalp2.hhhierarchicalsimplexp2localbasis.hh
hierarchicalp2.hhhierarchicalsimplexp2localinterpolation.hh
│ │ │ │ +

hierarchical → hierarchicalp2 Relation

File in dune/localfunctions/hierarchicalIncludes file in dune/localfunctions/hierarchical/hierarchicalp2
hierarchicalp2.hhhierarchicalsimplexp2localbasis.hh
hierarchicalp2.hhhierarchicalsimplexp2localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000017_000019.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

hierarchical → hierarchicalp2withelementbubble Relation

File in dune/localfunctions/hierarchicalIncludes file in dune/localfunctions/hierarchical/hierarchicalp2withelementbubble
hierarchicalp2withelementbubble.hhhierarchicalsimplexp2withelementbubble.hh
│ │ │ │ +

hierarchical → hierarchicalp2withelementbubble Relation

File in dune/localfunctions/hierarchicalIncludes file in dune/localfunctions/hierarchical/hierarchicalp2withelementbubble
hierarchicalp2withelementbubble.hhhierarchicalsimplexp2withelementbubble.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000017_000020.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

hierarchical → hierarchicalprismp2 Relation

File in dune/localfunctions/hierarchicalIncludes file in dune/localfunctions/hierarchical/hierarchicalprismp2
hierarchicalprismp2.hhhierarchicalprismp2localbasis.hh
hierarchicalprismp2.hhhierarchicalprismp2localinterpolation.hh
│ │ │ │ +

hierarchical → hierarchicalprismp2 Relation

File in dune/localfunctions/hierarchicalIncludes file in dune/localfunctions/hierarchical/hierarchicalprismp2
hierarchicalprismp2.hhhierarchicalprismp2localbasis.hh
hierarchicalprismp2.hhhierarchicalprismp2localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000017_000021.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

hierarchical → lagrange Relation

File in dune/localfunctions/hierarchicalIncludes file in dune/localfunctions/lagrange
hierarchicalp2.hhlagrangesimplex.hh
hierarchicalprismp2.hhlagrangeprism.hh
│ │ │ │ +

hierarchical → lagrange Relation

File in dune/localfunctions/hierarchicalIncludes file in dune/localfunctions/lagrange
hierarchicalp2.hhlagrangesimplex.hh
hierarchicalprismp2.hhlagrangeprism.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000018_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

hierarchicalp2 → common Relation

File in dune/localfunctions/hierarchical/hierarchicalp2Includes file in dune/localfunctions/common
hierarchicalsimplexp2localbasis.hhcommon/localbasis.hh
hierarchicalsimplexp2localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

hierarchicalp2 → common Relation

File in dune/localfunctions/hierarchical/hierarchicalp2Includes file in dune/localfunctions/common
hierarchicalsimplexp2localbasis.hhcommon/localbasis.hh
hierarchicalsimplexp2localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000019_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

hierarchicalp2withelementbubble → common Relation

File in dune/localfunctions/hierarchical/hierarchicalp2withelementbubbleIncludes file in dune/localfunctions/common
hierarchicalsimplexp2withelementbubble.hhcommon/localbasis.hh
hierarchicalsimplexp2withelementbubble.hhcommon/localinterpolation.hh
hierarchicalsimplexp2withelementbubble.hhlocalkey.hh
│ │ │ │ +

hierarchicalp2withelementbubble → common Relation

File in dune/localfunctions/hierarchical/hierarchicalp2withelementbubbleIncludes file in dune/localfunctions/common
hierarchicalsimplexp2withelementbubble.hhcommon/localbasis.hh
hierarchicalsimplexp2withelementbubble.hhcommon/localinterpolation.hh
hierarchicalsimplexp2withelementbubble.hhlocalkey.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000020_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

hierarchicalprismp2 → common Relation

File in dune/localfunctions/hierarchical/hierarchicalprismp2Includes file in dune/localfunctions/common
hierarchicalprismp2localbasis.hhcommon/localbasis.hh
hierarchicalprismp2localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

hierarchicalprismp2 → common Relation

File in dune/localfunctions/hierarchical/hierarchicalprismp2Includes file in dune/localfunctions/common
hierarchicalprismp2localbasis.hhcommon/localbasis.hh
hierarchicalprismp2localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000021_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

lagrange → common Relation

File in dune/localfunctions/lagrangeIncludes file in dune/localfunctions/common
emptypoints.hhlocalkey.hh
lagrange/interpolation.hhcommon/localinterpolation.hh
lagrangecoefficients.hhlocalkey.hh
lagrangecube.hhcommon/localbasis.hh
lagrangecube.hhcommon/localinterpolation.hh
lagrangecube.hhlocalfiniteelementtraits.hh
lagrangecube.hhlocalkey.hh
lagrangelfecache.hhlocalfiniteelementvariantcache.hh
lagrangeprism.hhcommon/localbasis.hh
lagrangeprism.hhcommon/localinterpolation.hh
lagrangeprism.hhlocalfiniteelementtraits.hh
lagrangeprism.hhlocalkey.hh
lagrangepyramid.hhcommon/localbasis.hh
lagrangepyramid.hhcommon/localinterpolation.hh
lagrangepyramid.hhlocalfiniteelementtraits.hh
lagrangepyramid.hhlocalkey.hh
lagrangesimplex.hhcommon/localbasis.hh
lagrangesimplex.hhcommon/localinterpolation.hh
lagrangesimplex.hhlocalfiniteelementtraits.hh
lagrangesimplex.hhlocalkey.hh
p0.hhlocalfiniteelementtraits.hh
pk1d.hhlocalfiniteelementtraits.hh
pk1d.hhlocaltoglobaladaptors.hh
pk2d.hhlocalfiniteelementtraits.hh
pk2d.hhlocaltoglobaladaptors.hh
pq22d.hhlocalfiniteelementvariant.hh
pqkfactory.hhvirtualinterface.hh
pqkfactory.hhvirtualwrappers.hh
q1.hhlocalfiniteelementtraits.hh
q1.hhlocaltoglobaladaptors.hh
q2.hhlocalfiniteelementtraits.hh
q2.hhlocaltoglobaladaptors.hh
p0 / p0localbasis.hhcommon/localbasis.hh
p0 / p0localcoefficients.hhlocalkey.hh
p0 / p0localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000021_000030.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

lagrange → p0 Relation

File in dune/localfunctions/lagrangeIncludes file in dune/localfunctions/lagrange/p0
p0.hhp0localbasis.hh
p0.hhp0localcoefficients.hh
p0.hhp0localinterpolation.hh
│ │ │ │ +

lagrange → p0 Relation

File in dune/localfunctions/lagrangeIncludes file in dune/localfunctions/lagrange/p0
p0.hhp0localbasis.hh
p0.hhp0localcoefficients.hh
p0.hhp0localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000021_000053.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

lagrange → utility Relation

File in dune/localfunctions/lagrangeIncludes file in dune/localfunctions/utility
equidistantpoints.hhfield.hh
lagrangebasis.hhdefaultbasisfactory.hh
lagrangebasis.hhmonomialbasis.hh
lagrangecoefficients.hhfield.hh
│ │ │ │ +

lagrange → utility Relation

File in dune/localfunctions/lagrangeIncludes file in dune/localfunctions/utility
equidistantpoints.hhfield.hh
lagrangebasis.hhdefaultbasisfactory.hh
lagrangebasis.hhmonomialbasis.hh
lagrangecoefficients.hhfield.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000022_000001.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

localfunctions → brezzidouglasmarini Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/brezzidouglasmarini
brezzidouglasmarini.hhbrezzidouglasmarinicube.hh
brezzidouglasmarini.hhbrezzidouglasmarinisimplex.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d.hhbrezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalbasis.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d.hhbrezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalcoefficients.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d.hhbrezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini1cube3d.hhbrezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalbasis.hh
brezzidouglasmarini / brezzidouglasmarini1cube3d.hhbrezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalcoefficients.hh
brezzidouglasmarini / brezzidouglasmarini1cube3d.hhbrezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d.hhbrezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalbasis.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d.hhbrezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalcoefficients.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d.hhbrezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d.hhbrezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalbasis.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d.hhbrezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalcoefficients.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d.hhbrezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d.hhbrezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalbasis.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d.hhbrezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalcoefficients.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d.hhbrezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalinterpolation.hh
│ │ │ │ +

localfunctions → brezzidouglasmarini Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/brezzidouglasmarini
brezzidouglasmarini.hhbrezzidouglasmarinicube.hh
brezzidouglasmarini.hhbrezzidouglasmarinisimplex.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d.hhbrezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalbasis.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d.hhbrezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalcoefficients.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d.hhbrezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini1cube3d.hhbrezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalbasis.hh
brezzidouglasmarini / brezzidouglasmarini1cube3d.hhbrezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalcoefficients.hh
brezzidouglasmarini / brezzidouglasmarini1cube3d.hhbrezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d.hhbrezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalbasis.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d.hhbrezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalcoefficients.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d.hhbrezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d.hhbrezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalbasis.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d.hhbrezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalcoefficients.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d.hhbrezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d.hhbrezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalbasis.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d.hhbrezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalcoefficients.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d.hhbrezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000022_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

localfunctions → common Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/common
brezzidouglasfortinmarini / bdfmcube.hhlocalfiniteelementtraits.hh
brezzidouglasfortinmarini / cube / brezzidouglasfortinmarini/cube/localbasis.hhcommon/localbasis.hh
brezzidouglasfortinmarini / cube / brezzidouglasfortinmarini/cube/localinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini1cube3d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini / brezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini / brezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalinterpolation.hhcommon/localinterpolation.hh
crouzeixraviart.hhcommon/localbasis.hh
crouzeixraviart.hhcommon/localinterpolation.hh
crouzeixraviart.hhlocalfiniteelementtraits.hh
crouzeixraviart.hhlocalkey.hh
dualmortarbasis / dualp1.hhlocalfiniteelementtraits.hh
dualmortarbasis / dualp1 / dualp1localbasis.hhcommon/localbasis.hh
dualmortarbasis / dualp1 / dualp1localcoefficients.hhlocalkey.hh
dualmortarbasis / dualp1 / dualp1localinterpolation.hhcommon/localinterpolation.hh
dualmortarbasis / dualpq1factory.hhvirtualinterface.hh
dualmortarbasis / dualpq1factory.hhvirtualwrappers.hh
dualmortarbasis / dualq1.hhlocalfiniteelementtraits.hh
dualmortarbasis / dualq1 / dualq1localbasis.hhcommon/localbasis.hh
dualmortarbasis / dualq1 / dualq1localcoefficients.hhlocalkey.hh
dualmortarbasis / dualq1 / dualq1localinterpolation.hhcommon/localinterpolation.hh
lagrange / emptypoints.hhlocalkey.hh
hierarchical / hierarchicalp2.hhlocalfiniteelementtraits.hh
hierarchical / hierarchicalp2withelementbubble.hhlocalfiniteelementtraits.hh
hierarchical / hierarchicalprismp2.hhlocalfiniteelementtraits.hh
hierarchical / hierarchicalprismp2 / hierarchicalprismp2localbasis.hhcommon/localbasis.hh
hierarchical / hierarchicalprismp2 / hierarchicalprismp2localinterpolation.hhcommon/localinterpolation.hh
hierarchical / hierarchicalp2 / hierarchicalsimplexp2localbasis.hhcommon/localbasis.hh
hierarchical / hierarchicalp2 / hierarchicalsimplexp2localinterpolation.hhcommon/localinterpolation.hh
hierarchical / hierarchicalp2withelementbubble / hierarchicalsimplexp2withelementbubble.hhcommon/localbasis.hh
hierarchical / hierarchicalp2withelementbubble / hierarchicalsimplexp2withelementbubble.hhcommon/localinterpolation.hh
hierarchical / hierarchicalp2withelementbubble / hierarchicalsimplexp2withelementbubble.hhlocalkey.hh
lagrange / lagrange/interpolation.hhcommon/localinterpolation.hh
lagrange / lagrangecoefficients.hhlocalkey.hh
lagrange / lagrangecube.hhcommon/localbasis.hh
lagrange / lagrangecube.hhcommon/localinterpolation.hh
lagrange / lagrangecube.hhlocalfiniteelementtraits.hh
lagrange / lagrangecube.hhlocalkey.hh
lagrange / lagrangelfecache.hhlocalfiniteelementvariantcache.hh
lagrange / lagrangeprism.hhcommon/localbasis.hh
lagrange / lagrangeprism.hhcommon/localinterpolation.hh
lagrange / lagrangeprism.hhlocalfiniteelementtraits.hh
lagrange / lagrangeprism.hhlocalkey.hh
lagrange / lagrangepyramid.hhcommon/localbasis.hh
lagrange / lagrangepyramid.hhcommon/localinterpolation.hh
lagrange / lagrangepyramid.hhlocalfiniteelementtraits.hh
lagrange / lagrangepyramid.hhlocalkey.hh
lagrange / lagrangesimplex.hhcommon/localbasis.hh
lagrange / lagrangesimplex.hhcommon/localinterpolation.hh
lagrange / lagrangesimplex.hhlocalfiniteelementtraits.hh
lagrange / lagrangesimplex.hhlocalkey.hh
brezzidouglasfortinmarini / cube / localcoefficients.hhlocalkey.hh
mimetic.hhlocalfiniteelementtraits.hh
monomial.hhlocalfiniteelementtraits.hh
monomial.hhlocaltoglobaladaptors.hh
lagrange / p0.hhlocalfiniteelementtraits.hh
lagrange / pk1d.hhlocalfiniteelementtraits.hh
lagrange / pk1d.hhlocaltoglobaladaptors.hh
lagrange / pk2d.hhlocalfiniteelementtraits.hh
lagrange / pk2d.hhlocaltoglobaladaptors.hh
lagrange / pq22d.hhlocalfiniteelementvariant.hh
lagrange / pqkfactory.hhvirtualinterface.hh
lagrange / pqkfactory.hhvirtualwrappers.hh
lagrange / q1.hhlocalfiniteelementtraits.hh
lagrange / q1.hhlocaltoglobaladaptors.hh
lagrange / q2.hhlocalfiniteelementtraits.hh
lagrange / q2.hhlocaltoglobaladaptors.hh
refined / common / refinedsimplexlocalbasis.hhcommon/localbasis.hh
whitney / edges0.5 / whitney/edges0.5/basis.hhlocaltoglobaladaptors.hh
whitney / edges0.5 / whitney/edges0.5/coefficients.hhlocalkey.hh
whitney / edges0.5 / whitney/edges0.5/interpolation.hhcommon/localinterpolation.hh
mimetic / mimeticall.hhcommon/localbasis.hh
mimetic / mimeticall.hhlocalkey.hh
monomial / monomiallocalbasis.hhcommon/localbasis.hh
monomial / monomiallocalcoefficients.hhlocalkey.hh
monomial / monomiallocalinterpolation.hhcommon/localinterpolation.hh
nedelec / nedelec1stkindcube.hhcommon/localbasis.hh
nedelec / nedelec1stkindcube.hhlocalfiniteelementtraits.hh
nedelec / nedelec1stkindcube.hhcommon/localinterpolation.hh
nedelec / nedelec1stkindcube.hhlocalkey.hh
nedelec / nedelec1stkindsimplex.hhcommon/localbasis.hh
nedelec / nedelec1stkindsimplex.hhlocalfiniteelementtraits.hh
nedelec / nedelec1stkindsimplex.hhcommon/localinterpolation.hh
nedelec / nedelec1stkindsimplex.hhlocalkey.hh
nedelec / nedelecsimplex / nedelecsimplexinterpolation.hhlocalkey.hh
lagrange / p0 / p0localbasis.hhcommon/localbasis.hh
lagrange / p0 / p0localcoefficients.hhlocalkey.hh
lagrange / p0 / p0localinterpolation.hhcommon/localinterpolation.hh
meta / power / meta/power/coefficients.hhlocalkey.hh
meta / power / meta/power/interpolation.hhcommon/localinterpolation.hh
rannacherturek / rannacherturek/rannacherturek.hhlocalfiniteelementtraits.hh
rannacherturek / rannachertureklocalcoefficients.hhlocalkey.hh
rannacherturek / rannachertureklocalinterpolation.hhcommon/localbasis.hh
rannacherturek / rannachertureklocalinterpolation.hhcommon/localinterpolation.hh
rannacherturek / rannacherturek2d / rannacherturek2dlocalbasis.hhcommon/localbasis.hh
rannacherturek / rannacherturek3d / rannacherturek3dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas02d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas03d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas0cube2d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas0cube3d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas0prism.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas0pyramid.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas12d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas1cube2d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas1cube3d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas2cube2d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas3cube2d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas4cube2d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomaslfecache.hhlocalfiniteelementvariantcache.hh
raviartthomas / raviartthomas02d / raviartthomas02dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas02d / raviartthomas02dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas02d / raviartthomas02dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas03d / raviartthomas03dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas03d / raviartthomas03dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas03d / raviartthomas03dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas0cube2d / raviartthomas0cube2dall.hhcommon/localbasis.hh
raviartthomas / raviartthomas0cube2d / raviartthomas0cube2dall.hhlocalkey.hh
raviartthomas / raviartthomas0cube2d / raviartthomas0cube2dall.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas0cube3d / raviartthomas0cube3dall.hhcommon/localbasis.hh
raviartthomas / raviartthomas0cube3d / raviartthomas0cube3dall.hhlocalkey.hh
raviartthomas / raviartthomas0cube3d / raviartthomas0cube3dall.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas0prism / raviartthomas0prismlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas0prism / raviartthomas0prismlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas0prism / raviartthomas0prismlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas0pyramid / raviartthomas0pyramidlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas0pyramid / raviartthomas0pyramidlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas0pyramid / raviartthomas0pyramidlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas12d / raviartthomas12dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas12d / raviartthomas12dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas12d / raviartthomas12dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas1cube2d / raviartthomas1cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas1cube2d / raviartthomas1cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas1cube2d / raviartthomas1cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas1cube3d / raviartthomas1cube3dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas1cube3d / raviartthomas1cube3dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas1cube3d / raviartthomas1cube3dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas2cube2d / raviartthomas2cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas2cube2d / raviartthomas2cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas2cube2d / raviartthomas2cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas3cube2d / raviartthomas3cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas3cube2d / raviartthomas3cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas3cube2d / raviartthomas3cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas4cube2d / raviartthomas4cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas4cube2d / raviartthomas4cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas4cube2d / raviartthomas4cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomassimplex / raviartthomassimplexinterpolation.hhlocalkey.hh
refined / refinedp0.hhlocalfiniteelementtraits.hh
refined / refinedp1.hhlocalfiniteelementtraits.hh
refined / refinedp0 / refinedp0localbasis.hhcommon/localbasis.hh
refined / refinedp0 / refinedp0localcoefficients.hhlocalkey.hh
refined / refinedp0 / refinedp0localinterpolation.hhcommon/localinterpolation.hh
utility / dglocalcoefficients.hhlocalkey.hh
utility / interpolationhelper.hhcommon/localinterpolation.hh
utility / l2interpolation.hhcommon/localinterpolation.hh
utility / localfunctions/utility/localfiniteelement.hhlocalfiniteelementtraits.hh
utility / polynomialbasis.hhcommon/localbasis.hh
│ │ │ │ +

localfunctions → common Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/common
brezzidouglasfortinmarini / bdfmcube.hhlocalfiniteelementtraits.hh
brezzidouglasfortinmarini / cube / brezzidouglasfortinmarini/cube/localbasis.hhcommon/localbasis.hh
brezzidouglasfortinmarini / cube / brezzidouglasfortinmarini/cube/localinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini / brezzidouglasmarini1cube2d / brezzidouglasmarini1cube2dlocalinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini1cube3d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini / brezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini / brezzidouglasmarini1cube3d / brezzidouglasmarini1cube3dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini / brezzidouglasmarini1simplex2d / brezzidouglasmarini1simplex2dlocalinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini / brezzidouglasmarini2cube2d / brezzidouglasmarini2cube2dlocalinterpolation.hhcommon/localinterpolation.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d.hhlocalfiniteelementtraits.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalbasis.hhcommon/localbasis.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalcoefficients.hhlocalkey.hh
brezzidouglasmarini / brezzidouglasmarini2simplex2d / brezzidouglasmarini2simplex2dlocalinterpolation.hhcommon/localinterpolation.hh
crouzeixraviart.hhcommon/localbasis.hh
crouzeixraviart.hhcommon/localinterpolation.hh
crouzeixraviart.hhlocalfiniteelementtraits.hh
crouzeixraviart.hhlocalkey.hh
dualmortarbasis / dualp1.hhlocalfiniteelementtraits.hh
dualmortarbasis / dualp1 / dualp1localbasis.hhcommon/localbasis.hh
dualmortarbasis / dualp1 / dualp1localcoefficients.hhlocalkey.hh
dualmortarbasis / dualp1 / dualp1localinterpolation.hhcommon/localinterpolation.hh
dualmortarbasis / dualpq1factory.hhvirtualinterface.hh
dualmortarbasis / dualpq1factory.hhvirtualwrappers.hh
dualmortarbasis / dualq1.hhlocalfiniteelementtraits.hh
dualmortarbasis / dualq1 / dualq1localbasis.hhcommon/localbasis.hh
dualmortarbasis / dualq1 / dualq1localcoefficients.hhlocalkey.hh
dualmortarbasis / dualq1 / dualq1localinterpolation.hhcommon/localinterpolation.hh
lagrange / emptypoints.hhlocalkey.hh
hierarchical / hierarchicalp2.hhlocalfiniteelementtraits.hh
hierarchical / hierarchicalp2withelementbubble.hhlocalfiniteelementtraits.hh
hierarchical / hierarchicalprismp2.hhlocalfiniteelementtraits.hh
hierarchical / hierarchicalprismp2 / hierarchicalprismp2localbasis.hhcommon/localbasis.hh
hierarchical / hierarchicalprismp2 / hierarchicalprismp2localinterpolation.hhcommon/localinterpolation.hh
hierarchical / hierarchicalp2 / hierarchicalsimplexp2localbasis.hhcommon/localbasis.hh
hierarchical / hierarchicalp2 / hierarchicalsimplexp2localinterpolation.hhcommon/localinterpolation.hh
hierarchical / hierarchicalp2withelementbubble / hierarchicalsimplexp2withelementbubble.hhcommon/localbasis.hh
hierarchical / hierarchicalp2withelementbubble / hierarchicalsimplexp2withelementbubble.hhcommon/localinterpolation.hh
hierarchical / hierarchicalp2withelementbubble / hierarchicalsimplexp2withelementbubble.hhlocalkey.hh
lagrange / lagrange/interpolation.hhcommon/localinterpolation.hh
lagrange / lagrangecoefficients.hhlocalkey.hh
lagrange / lagrangecube.hhcommon/localbasis.hh
lagrange / lagrangecube.hhcommon/localinterpolation.hh
lagrange / lagrangecube.hhlocalfiniteelementtraits.hh
lagrange / lagrangecube.hhlocalkey.hh
lagrange / lagrangelfecache.hhlocalfiniteelementvariantcache.hh
lagrange / lagrangeprism.hhcommon/localbasis.hh
lagrange / lagrangeprism.hhcommon/localinterpolation.hh
lagrange / lagrangeprism.hhlocalfiniteelementtraits.hh
lagrange / lagrangeprism.hhlocalkey.hh
lagrange / lagrangepyramid.hhcommon/localbasis.hh
lagrange / lagrangepyramid.hhcommon/localinterpolation.hh
lagrange / lagrangepyramid.hhlocalfiniteelementtraits.hh
lagrange / lagrangepyramid.hhlocalkey.hh
lagrange / lagrangesimplex.hhcommon/localbasis.hh
lagrange / lagrangesimplex.hhcommon/localinterpolation.hh
lagrange / lagrangesimplex.hhlocalfiniteelementtraits.hh
lagrange / lagrangesimplex.hhlocalkey.hh
brezzidouglasfortinmarini / cube / localcoefficients.hhlocalkey.hh
mimetic.hhlocalfiniteelementtraits.hh
monomial.hhlocalfiniteelementtraits.hh
monomial.hhlocaltoglobaladaptors.hh
lagrange / p0.hhlocalfiniteelementtraits.hh
lagrange / pk1d.hhlocalfiniteelementtraits.hh
lagrange / pk1d.hhlocaltoglobaladaptors.hh
lagrange / pk2d.hhlocalfiniteelementtraits.hh
lagrange / pk2d.hhlocaltoglobaladaptors.hh
lagrange / pq22d.hhlocalfiniteelementvariant.hh
lagrange / pqkfactory.hhvirtualinterface.hh
lagrange / pqkfactory.hhvirtualwrappers.hh
lagrange / q1.hhlocalfiniteelementtraits.hh
lagrange / q1.hhlocaltoglobaladaptors.hh
lagrange / q2.hhlocalfiniteelementtraits.hh
lagrange / q2.hhlocaltoglobaladaptors.hh
refined / common / refinedsimplexlocalbasis.hhcommon/localbasis.hh
whitney / edges0.5 / whitney/edges0.5/basis.hhlocaltoglobaladaptors.hh
whitney / edges0.5 / whitney/edges0.5/coefficients.hhlocalkey.hh
whitney / edges0.5 / whitney/edges0.5/interpolation.hhcommon/localinterpolation.hh
mimetic / mimeticall.hhcommon/localbasis.hh
mimetic / mimeticall.hhlocalkey.hh
monomial / monomiallocalbasis.hhcommon/localbasis.hh
monomial / monomiallocalcoefficients.hhlocalkey.hh
monomial / monomiallocalinterpolation.hhcommon/localinterpolation.hh
nedelec / nedelec1stkindcube.hhcommon/localbasis.hh
nedelec / nedelec1stkindcube.hhlocalfiniteelementtraits.hh
nedelec / nedelec1stkindcube.hhcommon/localinterpolation.hh
nedelec / nedelec1stkindcube.hhlocalkey.hh
nedelec / nedelec1stkindsimplex.hhcommon/localbasis.hh
nedelec / nedelec1stkindsimplex.hhlocalfiniteelementtraits.hh
nedelec / nedelec1stkindsimplex.hhcommon/localinterpolation.hh
nedelec / nedelec1stkindsimplex.hhlocalkey.hh
nedelec / nedelecsimplex / nedelecsimplexinterpolation.hhlocalkey.hh
lagrange / p0 / p0localbasis.hhcommon/localbasis.hh
lagrange / p0 / p0localcoefficients.hhlocalkey.hh
lagrange / p0 / p0localinterpolation.hhcommon/localinterpolation.hh
meta / power / meta/power/coefficients.hhlocalkey.hh
meta / power / meta/power/interpolation.hhcommon/localinterpolation.hh
rannacherturek / rannacherturek/rannacherturek.hhlocalfiniteelementtraits.hh
rannacherturek / rannachertureklocalcoefficients.hhlocalkey.hh
rannacherturek / rannachertureklocalinterpolation.hhcommon/localbasis.hh
rannacherturek / rannachertureklocalinterpolation.hhcommon/localinterpolation.hh
rannacherturek / rannacherturek2d / rannacherturek2dlocalbasis.hhcommon/localbasis.hh
rannacherturek / rannacherturek3d / rannacherturek3dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas02d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas03d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas0cube2d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas0cube3d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas0prism.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas0pyramid.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas12d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas1cube2d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas1cube3d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas2cube2d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas3cube2d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomas4cube2d.hhlocalfiniteelementtraits.hh
raviartthomas / raviartthomaslfecache.hhlocalfiniteelementvariantcache.hh
raviartthomas / raviartthomas02d / raviartthomas02dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas02d / raviartthomas02dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas02d / raviartthomas02dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas03d / raviartthomas03dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas03d / raviartthomas03dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas03d / raviartthomas03dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas0cube2d / raviartthomas0cube2dall.hhcommon/localbasis.hh
raviartthomas / raviartthomas0cube2d / raviartthomas0cube2dall.hhlocalkey.hh
raviartthomas / raviartthomas0cube2d / raviartthomas0cube2dall.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas0cube3d / raviartthomas0cube3dall.hhcommon/localbasis.hh
raviartthomas / raviartthomas0cube3d / raviartthomas0cube3dall.hhlocalkey.hh
raviartthomas / raviartthomas0cube3d / raviartthomas0cube3dall.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas0prism / raviartthomas0prismlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas0prism / raviartthomas0prismlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas0prism / raviartthomas0prismlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas0pyramid / raviartthomas0pyramidlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas0pyramid / raviartthomas0pyramidlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas0pyramid / raviartthomas0pyramidlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas12d / raviartthomas12dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas12d / raviartthomas12dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas12d / raviartthomas12dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas1cube2d / raviartthomas1cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas1cube2d / raviartthomas1cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas1cube2d / raviartthomas1cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas1cube3d / raviartthomas1cube3dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas1cube3d / raviartthomas1cube3dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas1cube3d / raviartthomas1cube3dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas2cube2d / raviartthomas2cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas2cube2d / raviartthomas2cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas2cube2d / raviartthomas2cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas3cube2d / raviartthomas3cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas3cube2d / raviartthomas3cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas3cube2d / raviartthomas3cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomas4cube2d / raviartthomas4cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas / raviartthomas4cube2d / raviartthomas4cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas / raviartthomas4cube2d / raviartthomas4cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas / raviartthomassimplex / raviartthomassimplexinterpolation.hhlocalkey.hh
refined / refinedp0.hhlocalfiniteelementtraits.hh
refined / refinedp1.hhlocalfiniteelementtraits.hh
refined / refinedp0 / refinedp0localbasis.hhcommon/localbasis.hh
refined / refinedp0 / refinedp0localcoefficients.hhlocalkey.hh
refined / refinedp0 / refinedp0localinterpolation.hhcommon/localinterpolation.hh
utility / dglocalcoefficients.hhlocalkey.hh
utility / interpolationhelper.hhcommon/localinterpolation.hh
utility / l2interpolation.hhcommon/localinterpolation.hh
utility / localfunctions/utility/localfiniteelement.hhlocalfiniteelementtraits.hh
utility / polynomialbasis.hhcommon/localbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000022_000012.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

localfunctions → dualmortarbasis Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/dualmortarbasis
dualmortarbasis.hhdualp1.hh
dualmortarbasis.hhdualq1.hh
dualmortarbasis / dualp1.hhdualp1 / dualp1localbasis.hh
dualmortarbasis / dualp1.hhdualp1 / dualp1localcoefficients.hh
dualmortarbasis / dualp1.hhdualp1 / dualp1localinterpolation.hh
dualmortarbasis / dualq1.hhdualq1 / dualq1localbasis.hh
dualmortarbasis / dualq1.hhdualq1 / dualq1localcoefficients.hh
dualmortarbasis / dualq1.hhdualq1 / dualq1localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000022_000017.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

localfunctions → hierarchical Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/hierarchical
hierarchical.hhhierarchicalp2.hh
hierarchical.hhhierarchicalp2withelementbubble.hh
hierarchical.hhhierarchicalprismp2.hh
hierarchical / hierarchicalp2.hhhierarchicalp2 / hierarchicalsimplexp2localbasis.hh
hierarchical / hierarchicalp2.hhhierarchicalp2 / hierarchicalsimplexp2localinterpolation.hh
hierarchical / hierarchicalp2withelementbubble.hhhierarchicalp2withelementbubble / hierarchicalsimplexp2withelementbubble.hh
hierarchical / hierarchicalprismp2.hhhierarchicalprismp2 / hierarchicalprismp2localbasis.hh
hierarchical / hierarchicalprismp2.hhhierarchicalprismp2 / hierarchicalprismp2localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000022_000021.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

localfunctions → lagrange Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/lagrange
dualmortarbasis / dualq1.hhlagrangecube.hh
hierarchical / hierarchicalp2.hhlagrangesimplex.hh
hierarchical / hierarchicalprismp2.hhlagrangeprism.hh
lagrange.hhlagrange/interpolation.hh
lagrange.hhlagrangebasis.hh
lagrange.hhlagrangecoefficients.hh
lagrange.hhlagrangecube.hh
lagrange.hhlagrangeprism.hh
lagrange.hhlagrangepyramid.hh
lagrange.hhlagrangesimplex.hh
lagrange.hhp0.hh
lagrange.hhpq22d.hh
lagrange / p0.hhp0 / p0localbasis.hh
lagrange / p0.hhp0 / p0localcoefficients.hh
lagrange / p0.hhp0 / p0localinterpolation.hh
whitney / edges0.5 / whitney/edges0.5/basis.hhlagrangesimplex.hh
refined / refinedp0.hhp0.hh
refined / refinedp1.hhp0.hh
refined / refinedp1.hhlagrangesimplex.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000022_000025.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

localfunctions → mimetic Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/mimetic
mimetic.hhmimeticall.hh
│ │ │ │ +

localfunctions → mimetic Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/mimetic
mimetic.hhmimeticall.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000022_000026.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

localfunctions → monomial Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/monomial
monomial.hhmonomiallocalbasis.hh
monomial.hhmonomiallocalcoefficients.hh
monomial.hhmonomiallocalinterpolation.hh
│ │ │ │ +

localfunctions → monomial Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/monomial
monomial.hhmonomiallocalbasis.hh
monomial.hhmonomiallocalcoefficients.hh
monomial.hhmonomiallocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000022_000027.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

localfunctions → nedelec Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/nedelec
nedelec.hhnedelec1stkindcube.hh
nedelec.hhnedelec1stkindsimplex.hh
│ │ │ │ +

localfunctions → nedelec Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/nedelec
nedelec.hhnedelec1stkindcube.hh
nedelec.hhnedelec1stkindsimplex.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000022_000029.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

localfunctions → orthonormal Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/orthonormal
orthonormal.hhorthonormalbasis.hh
nedelec / nedelecsimplex / nedelecsimplexinterpolation.hhorthonormalbasis.hh
raviartthomas / raviartthomassimplex / raviartthomassimplexinterpolation.hhorthonormalbasis.hh
│ │ │ │ +

localfunctions → orthonormal Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/orthonormal
orthonormal.hhorthonormalbasis.hh
nedelec / nedelecsimplex / nedelecsimplexinterpolation.hhorthonormalbasis.hh
raviartthomas / raviartthomassimplex / raviartthomassimplexinterpolation.hhorthonormalbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000022_000033.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

localfunctions → rannacherturek Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/rannacherturek
rannacherturek.hhrannacherturek/rannacherturek.hh
rannacherturek / rannachertureklocalbasis.hhrannacherturek2d / rannacherturek2dlocalbasis.hh
rannacherturek / rannachertureklocalbasis.hhrannacherturek3d / rannacherturek3dlocalbasis.hh
│ │ │ │ +

localfunctions → rannacherturek Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/rannacherturek
rannacherturek.hhrannacherturek/rannacherturek.hh
rannacherturek / rannachertureklocalbasis.hhrannacherturek2d / rannacherturek2dlocalbasis.hh
rannacherturek / rannachertureklocalbasis.hhrannacherturek3d / rannacherturek3dlocalbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000022_000036.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

localfunctions → raviartthomas Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/raviartthomas
raviartthomas.hhraviartthomas02d.hh
raviartthomas.hhraviartthomas03d.hh
raviartthomas.hhraviartthomas0cube2d.hh
raviartthomas.hhraviartthomas0cube3d.hh
raviartthomas.hhraviartthomas0prism.hh
raviartthomas.hhraviartthomas0pyramid.hh
raviartthomas.hhraviartthomas12d.hh
raviartthomas.hhraviartthomas1cube2d.hh
raviartthomas.hhraviartthomas1cube3d.hh
raviartthomas.hhraviartthomas2cube2d.hh
raviartthomas.hhraviartthomas3cube2d.hh
raviartthomas.hhraviartthomascube.hh
raviartthomas.hhraviartthomassimplex.hh
raviartthomas / raviartthomas02d.hhraviartthomas02d / raviartthomas02dlocalbasis.hh
raviartthomas / raviartthomas02d.hhraviartthomas02d / raviartthomas02dlocalcoefficients.hh
raviartthomas / raviartthomas02d.hhraviartthomas02d / raviartthomas02dlocalinterpolation.hh
raviartthomas / raviartthomas03d.hhraviartthomas03d / raviartthomas03dlocalbasis.hh
raviartthomas / raviartthomas03d.hhraviartthomas03d / raviartthomas03dlocalcoefficients.hh
raviartthomas / raviartthomas03d.hhraviartthomas03d / raviartthomas03dlocalinterpolation.hh
raviartthomas / raviartthomas0cube2d.hhraviartthomas0cube2d / raviartthomas0cube2dall.hh
raviartthomas / raviartthomas0cube3d.hhraviartthomas0cube3d / raviartthomas0cube3dall.hh
raviartthomas / raviartthomas0prism.hhraviartthomas0prism / raviartthomas0prismlocalbasis.hh
raviartthomas / raviartthomas0prism.hhraviartthomas0prism / raviartthomas0prismlocalcoefficients.hh
raviartthomas / raviartthomas0prism.hhraviartthomas0prism / raviartthomas0prismlocalinterpolation.hh
raviartthomas / raviartthomas0pyramid.hhraviartthomas0pyramid / raviartthomas0pyramidlocalbasis.hh
raviartthomas / raviartthomas0pyramid.hhraviartthomas0pyramid / raviartthomas0pyramidlocalcoefficients.hh
raviartthomas / raviartthomas0pyramid.hhraviartthomas0pyramid / raviartthomas0pyramidlocalinterpolation.hh
raviartthomas / raviartthomas12d.hhraviartthomas12d / raviartthomas12dlocalbasis.hh
raviartthomas / raviartthomas12d.hhraviartthomas12d / raviartthomas12dlocalcoefficients.hh
raviartthomas / raviartthomas12d.hhraviartthomas12d / raviartthomas12dlocalinterpolation.hh
raviartthomas / raviartthomas1cube2d.hhraviartthomas1cube2d / raviartthomas1cube2dlocalbasis.hh
raviartthomas / raviartthomas1cube2d.hhraviartthomas1cube2d / raviartthomas1cube2dlocalinterpolation.hh
raviartthomas / raviartthomas1cube2d.hhraviartthomas1cube2d / raviartthomas1cube2dlocalcoefficients.hh
raviartthomas / raviartthomas1cube3d.hhraviartthomas1cube3d / raviartthomas1cube3dlocalbasis.hh
raviartthomas / raviartthomas1cube3d.hhraviartthomas1cube3d / raviartthomas1cube3dlocalcoefficients.hh
raviartthomas / raviartthomas1cube3d.hhraviartthomas1cube3d / raviartthomas1cube3dlocalinterpolation.hh
raviartthomas / raviartthomas2cube2d.hhraviartthomas2cube2d / raviartthomas2cube2dlocalbasis.hh
raviartthomas / raviartthomas2cube2d.hhraviartthomas2cube2d / raviartthomas2cube2dlocalcoefficients.hh
raviartthomas / raviartthomas2cube2d.hhraviartthomas2cube2d / raviartthomas2cube2dlocalinterpolation.hh
raviartthomas / raviartthomas3cube2d.hhraviartthomas3cube2d / raviartthomas3cube2dlocalbasis.hh
raviartthomas / raviartthomas3cube2d.hhraviartthomas3cube2d / raviartthomas3cube2dlocalcoefficients.hh
raviartthomas / raviartthomas3cube2d.hhraviartthomas3cube2d / raviartthomas3cube2dlocalinterpolation.hh
raviartthomas / raviartthomas4cube2d.hhraviartthomas4cube2d / raviartthomas4cube2dlocalbasis.hh
raviartthomas / raviartthomas4cube2d.hhraviartthomas4cube2d / raviartthomas4cube2dlocalcoefficients.hh
raviartthomas / raviartthomas4cube2d.hhraviartthomas4cube2d / raviartthomas4cube2dlocalinterpolation.hh
raviartthomas / raviartthomassimplex.hhraviartthomassimplex / raviartthomassimplexbasis.hh
│ │ │ │ +

localfunctions → raviartthomas Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/raviartthomas
raviartthomas.hhraviartthomas02d.hh
raviartthomas.hhraviartthomas03d.hh
raviartthomas.hhraviartthomas0cube2d.hh
raviartthomas.hhraviartthomas0cube3d.hh
raviartthomas.hhraviartthomas0prism.hh
raviartthomas.hhraviartthomas0pyramid.hh
raviartthomas.hhraviartthomas12d.hh
raviartthomas.hhraviartthomas1cube2d.hh
raviartthomas.hhraviartthomas1cube3d.hh
raviartthomas.hhraviartthomas2cube2d.hh
raviartthomas.hhraviartthomas3cube2d.hh
raviartthomas.hhraviartthomascube.hh
raviartthomas.hhraviartthomassimplex.hh
raviartthomas / raviartthomas02d.hhraviartthomas02d / raviartthomas02dlocalbasis.hh
raviartthomas / raviartthomas02d.hhraviartthomas02d / raviartthomas02dlocalcoefficients.hh
raviartthomas / raviartthomas02d.hhraviartthomas02d / raviartthomas02dlocalinterpolation.hh
raviartthomas / raviartthomas03d.hhraviartthomas03d / raviartthomas03dlocalbasis.hh
raviartthomas / raviartthomas03d.hhraviartthomas03d / raviartthomas03dlocalcoefficients.hh
raviartthomas / raviartthomas03d.hhraviartthomas03d / raviartthomas03dlocalinterpolation.hh
raviartthomas / raviartthomas0cube2d.hhraviartthomas0cube2d / raviartthomas0cube2dall.hh
raviartthomas / raviartthomas0cube3d.hhraviartthomas0cube3d / raviartthomas0cube3dall.hh
raviartthomas / raviartthomas0prism.hhraviartthomas0prism / raviartthomas0prismlocalbasis.hh
raviartthomas / raviartthomas0prism.hhraviartthomas0prism / raviartthomas0prismlocalcoefficients.hh
raviartthomas / raviartthomas0prism.hhraviartthomas0prism / raviartthomas0prismlocalinterpolation.hh
raviartthomas / raviartthomas0pyramid.hhraviartthomas0pyramid / raviartthomas0pyramidlocalbasis.hh
raviartthomas / raviartthomas0pyramid.hhraviartthomas0pyramid / raviartthomas0pyramidlocalcoefficients.hh
raviartthomas / raviartthomas0pyramid.hhraviartthomas0pyramid / raviartthomas0pyramidlocalinterpolation.hh
raviartthomas / raviartthomas12d.hhraviartthomas12d / raviartthomas12dlocalbasis.hh
raviartthomas / raviartthomas12d.hhraviartthomas12d / raviartthomas12dlocalcoefficients.hh
raviartthomas / raviartthomas12d.hhraviartthomas12d / raviartthomas12dlocalinterpolation.hh
raviartthomas / raviartthomas1cube2d.hhraviartthomas1cube2d / raviartthomas1cube2dlocalbasis.hh
raviartthomas / raviartthomas1cube2d.hhraviartthomas1cube2d / raviartthomas1cube2dlocalinterpolation.hh
raviartthomas / raviartthomas1cube2d.hhraviartthomas1cube2d / raviartthomas1cube2dlocalcoefficients.hh
raviartthomas / raviartthomas1cube3d.hhraviartthomas1cube3d / raviartthomas1cube3dlocalbasis.hh
raviartthomas / raviartthomas1cube3d.hhraviartthomas1cube3d / raviartthomas1cube3dlocalcoefficients.hh
raviartthomas / raviartthomas1cube3d.hhraviartthomas1cube3d / raviartthomas1cube3dlocalinterpolation.hh
raviartthomas / raviartthomas2cube2d.hhraviartthomas2cube2d / raviartthomas2cube2dlocalbasis.hh
raviartthomas / raviartthomas2cube2d.hhraviartthomas2cube2d / raviartthomas2cube2dlocalcoefficients.hh
raviartthomas / raviartthomas2cube2d.hhraviartthomas2cube2d / raviartthomas2cube2dlocalinterpolation.hh
raviartthomas / raviartthomas3cube2d.hhraviartthomas3cube2d / raviartthomas3cube2dlocalbasis.hh
raviartthomas / raviartthomas3cube2d.hhraviartthomas3cube2d / raviartthomas3cube2dlocalcoefficients.hh
raviartthomas / raviartthomas3cube2d.hhraviartthomas3cube2d / raviartthomas3cube2dlocalinterpolation.hh
raviartthomas / raviartthomas4cube2d.hhraviartthomas4cube2d / raviartthomas4cube2dlocalbasis.hh
raviartthomas / raviartthomas4cube2d.hhraviartthomas4cube2d / raviartthomas4cube2dlocalcoefficients.hh
raviartthomas / raviartthomas4cube2d.hhraviartthomas4cube2d / raviartthomas4cube2dlocalinterpolation.hh
raviartthomas / raviartthomassimplex.hhraviartthomassimplex / raviartthomassimplexbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000022_000050.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

localfunctions → refined Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/refined
refined.hhrefinedp0.hh
refined.hhrefinedp1.hh
refined / refinedp0.hhrefinedp0 / refinedp0localbasis.hh
refined / refinedp0.hhrefinedp0 / refinedp0localcoefficients.hh
refined / refinedp0.hhrefinedp0 / refinedp0localinterpolation.hh
refined / refinedp1.hhrefinedp1 / refinedp1localbasis.hh
refined / refinedp0 / refinedp0localbasis.hhcommon / refinedsimplexlocalbasis.hh
refined / refinedp1 / refinedp1localbasis.hhcommon / refinedsimplexlocalbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000022_000053.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

localfunctions → utility Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/utility
lagrange / equidistantpoints.hhfield.hh
lagrange.hhdglocalcoefficients.hh
lagrange.hhlocalfunctions/utility/localfiniteelement.hh
lagrange / lagrangebasis.hhdefaultbasisfactory.hh
lagrange / lagrangebasis.hhmonomialbasis.hh
lagrange / lagrangecoefficients.hhfield.hh
orthonormal.hhdglocalcoefficients.hh
orthonormal.hhl2interpolation.hh
orthonormal.hhlocalfunctions/utility/localfiniteelement.hh
nedelec / nedelecsimplex / nedelecsimplexbasis.hhdefaultbasisfactory.hh
nedelec / nedelecsimplex / nedelecsimplexinterpolation.hhinterpolationhelper.hh
nedelec / nedelecsimplex / nedelecsimplexinterpolation.hhpolynomialbasis.hh
nedelec / nedelecsimplex / nedelecsimplexprebasis.hhpolynomialbasis.hh
orthonormal / orthonormalbasis.hhpolynomialbasis.hh
orthonormal / orthonormalcompute.hhfield.hh
orthonormal / orthonormalcompute.hhlfematrix.hh
orthonormal / orthonormalcompute.hhmonomialbasis.hh
orthonormal / orthonormalcompute.hhmultiindex.hh
raviartthomas / raviartthomassimplex.hhlocalfunctions/utility/localfiniteelement.hh
raviartthomas / raviartthomassimplex / raviartthomassimplexbasis.hhdefaultbasisfactory.hh
raviartthomas / raviartthomassimplex / raviartthomassimplexinterpolation.hhinterpolationhelper.hh
raviartthomas / raviartthomassimplex / raviartthomassimplexinterpolation.hhpolynomialbasis.hh
raviartthomas / raviartthomassimplex / raviartthomassimplexprebasis.hhpolynomialbasis.hh
│ │ │ │ +

localfunctions → utility Relation

File in dune/localfunctionsIncludes file in dune/localfunctions/utility
lagrange / equidistantpoints.hhfield.hh
lagrange.hhdglocalcoefficients.hh
lagrange.hhlocalfunctions/utility/localfiniteelement.hh
lagrange / lagrangebasis.hhdefaultbasisfactory.hh
lagrange / lagrangebasis.hhmonomialbasis.hh
lagrange / lagrangecoefficients.hhfield.hh
orthonormal.hhdglocalcoefficients.hh
orthonormal.hhl2interpolation.hh
orthonormal.hhlocalfunctions/utility/localfiniteelement.hh
nedelec / nedelecsimplex / nedelecsimplexbasis.hhdefaultbasisfactory.hh
nedelec / nedelecsimplex / nedelecsimplexinterpolation.hhinterpolationhelper.hh
nedelec / nedelecsimplex / nedelecsimplexinterpolation.hhpolynomialbasis.hh
nedelec / nedelecsimplex / nedelecsimplexprebasis.hhpolynomialbasis.hh
orthonormal / orthonormalbasis.hhpolynomialbasis.hh
orthonormal / orthonormalcompute.hhfield.hh
orthonormal / orthonormalcompute.hhlfematrix.hh
orthonormal / orthonormalcompute.hhmonomialbasis.hh
orthonormal / orthonormalcompute.hhmultiindex.hh
raviartthomas / raviartthomassimplex.hhlocalfunctions/utility/localfiniteelement.hh
raviartthomas / raviartthomassimplex / raviartthomassimplexbasis.hhdefaultbasisfactory.hh
raviartthomas / raviartthomassimplex / raviartthomassimplexinterpolation.hhinterpolationhelper.hh
raviartthomas / raviartthomassimplex / raviartthomassimplexinterpolation.hhpolynomialbasis.hh
raviartthomas / raviartthomassimplex / raviartthomassimplexprebasis.hhpolynomialbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000023_000022.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

localfunctions → localfunctions Relation

File in dune/python/localfunctionsIncludes file in dune/localfunctions
python/localfunctions/localfiniteelement.hhcommon / localkey.hh
python/localfunctions/localfiniteelement.hhcommon / virtualinterface.hh
│ │ │ │ +

localfunctions → localfunctions Relation

File in dune/python/localfunctionsIncludes file in dune/localfunctions
python/localfunctions/localfiniteelement.hhcommon / localkey.hh
python/localfunctions/localfiniteelement.hhcommon / virtualinterface.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000024_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

meta → common Relation

File in dune/localfunctions/metaIncludes file in dune/localfunctions/common
power / meta/power/coefficients.hhlocalkey.hh
power / meta/power/interpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

meta → common Relation

File in dune/localfunctions/metaIncludes file in dune/localfunctions/common
power / meta/power/coefficients.hhlocalkey.hh
power / meta/power/interpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000024_000031.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

meta → power Relation

File in dune/localfunctions/metaIncludes file in dune/localfunctions/meta/power
power.hhmeta/power/basis.hh
power.hhmeta/power/coefficients.hh
power.hhmeta/power/interpolation.hh
│ │ │ │ +

meta → power Relation

File in dune/localfunctions/metaIncludes file in dune/localfunctions/meta/power
power.hhmeta/power/basis.hh
power.hhmeta/power/coefficients.hh
power.hhmeta/power/interpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000025_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

mimetic → common Relation

File in dune/localfunctions/mimeticIncludes file in dune/localfunctions/common
mimeticall.hhcommon/localbasis.hh
mimeticall.hhlocalkey.hh
│ │ │ │ +

mimetic → common Relation

File in dune/localfunctions/mimeticIncludes file in dune/localfunctions/common
mimeticall.hhcommon/localbasis.hh
mimeticall.hhlocalkey.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000026_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

monomial → common Relation

File in dune/localfunctions/monomialIncludes file in dune/localfunctions/common
monomiallocalbasis.hhcommon/localbasis.hh
monomiallocalcoefficients.hhlocalkey.hh
monomiallocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

monomial → common Relation

File in dune/localfunctions/monomialIncludes file in dune/localfunctions/common
monomiallocalbasis.hhcommon/localbasis.hh
monomiallocalcoefficients.hhlocalkey.hh
monomiallocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000027_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

nedelec → common Relation

File in dune/localfunctions/nedelecIncludes file in dune/localfunctions/common
nedelec1stkindcube.hhcommon/localbasis.hh
nedelec1stkindcube.hhcommon/localinterpolation.hh
nedelec1stkindcube.hhlocalfiniteelementtraits.hh
nedelec1stkindcube.hhlocalkey.hh
nedelec1stkindsimplex.hhcommon/localbasis.hh
nedelec1stkindsimplex.hhcommon/localinterpolation.hh
nedelec1stkindsimplex.hhlocalfiniteelementtraits.hh
nedelec1stkindsimplex.hhlocalkey.hh
nedelecsimplex / nedelecsimplexinterpolation.hhlocalkey.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000027_000029.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

nedelec → orthonormal Relation

File in dune/localfunctions/nedelecIncludes file in dune/localfunctions/orthonormal
nedelecsimplex / nedelecsimplexinterpolation.hhorthonormalbasis.hh
│ │ │ │ +

nedelec → orthonormal Relation

File in dune/localfunctions/nedelecIncludes file in dune/localfunctions/orthonormal
nedelecsimplex / nedelecsimplexinterpolation.hhorthonormalbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000027_000053.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

nedelec → utility Relation

File in dune/localfunctions/nedelecIncludes file in dune/localfunctions/utility
nedelecsimplex / nedelecsimplexbasis.hhdefaultbasisfactory.hh
nedelecsimplex / nedelecsimplexinterpolation.hhinterpolationhelper.hh
nedelecsimplex / nedelecsimplexinterpolation.hhpolynomialbasis.hh
nedelecsimplex / nedelecsimplexprebasis.hhpolynomialbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000028_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

nedelecsimplex → common Relation

File in dune/localfunctions/nedelec/nedelecsimplexIncludes file in dune/localfunctions/common
nedelecsimplexinterpolation.hhlocalkey.hh
│ │ │ │ +

nedelecsimplex → common Relation

File in dune/localfunctions/nedelec/nedelecsimplexIncludes file in dune/localfunctions/common
nedelecsimplexinterpolation.hhlocalkey.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000028_000029.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

nedelecsimplex → orthonormal Relation

File in dune/localfunctions/nedelec/nedelecsimplexIncludes file in dune/localfunctions/orthonormal
nedelecsimplexinterpolation.hhorthonormalbasis.hh
│ │ │ │ +

nedelecsimplex → orthonormal Relation

File in dune/localfunctions/nedelec/nedelecsimplexIncludes file in dune/localfunctions/orthonormal
nedelecsimplexinterpolation.hhorthonormalbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000028_000053.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

nedelecsimplex → utility Relation

File in dune/localfunctions/nedelec/nedelecsimplexIncludes file in dune/localfunctions/utility
nedelecsimplexbasis.hhdefaultbasisfactory.hh
nedelecsimplexinterpolation.hhinterpolationhelper.hh
nedelecsimplexinterpolation.hhpolynomialbasis.hh
nedelecsimplexprebasis.hhpolynomialbasis.hh
│ │ │ │ +

nedelecsimplex → utility Relation

File in dune/localfunctions/nedelec/nedelecsimplexIncludes file in dune/localfunctions/utility
nedelecsimplexbasis.hhdefaultbasisfactory.hh
nedelecsimplexinterpolation.hhinterpolationhelper.hh
nedelecsimplexinterpolation.hhpolynomialbasis.hh
nedelecsimplexprebasis.hhpolynomialbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000029_000053.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

orthonormal → utility Relation

File in dune/localfunctions/orthonormalIncludes file in dune/localfunctions/utility
orthonormalbasis.hhpolynomialbasis.hh
orthonormalcompute.hhfield.hh
orthonormalcompute.hhlfematrix.hh
orthonormalcompute.hhmonomialbasis.hh
orthonormalcompute.hhmultiindex.hh
│ │ │ │ +

orthonormal → utility Relation

File in dune/localfunctions/orthonormalIncludes file in dune/localfunctions/utility
orthonormalbasis.hhpolynomialbasis.hh
orthonormalcompute.hhfield.hh
orthonormalcompute.hhlfematrix.hh
orthonormalcompute.hhmonomialbasis.hh
orthonormalcompute.hhmultiindex.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000030_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

p0 → common Relation

File in dune/localfunctions/lagrange/p0Includes file in dune/localfunctions/common
p0localbasis.hhcommon/localbasis.hh
p0localcoefficients.hhlocalkey.hh
p0localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

p0 → common Relation

File in dune/localfunctions/lagrange/p0Includes file in dune/localfunctions/common
p0localbasis.hhcommon/localbasis.hh
p0localcoefficients.hhlocalkey.hh
p0localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000031_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

power → common Relation

File in dune/localfunctions/meta/powerIncludes file in dune/localfunctions/common
meta/power/coefficients.hhlocalkey.hh
meta/power/interpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

power → common Relation

File in dune/localfunctions/meta/powerIncludes file in dune/localfunctions/common
meta/power/coefficients.hhlocalkey.hh
meta/power/interpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000032_000022.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

python → localfunctions Relation

File in dune/pythonIncludes file in dune/localfunctions
localfunctions / python/localfunctions/localfiniteelement.hhcommon / localkey.hh
localfunctions / python/localfunctions/localfiniteelement.hhcommon / virtualinterface.hh
│ │ │ │ +

python → localfunctions Relation

File in dune/pythonIncludes file in dune/localfunctions
localfunctions / python/localfunctions/localfiniteelement.hhcommon / localkey.hh
localfunctions / python/localfunctions/localfiniteelement.hhcommon / virtualinterface.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000033_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

rannacherturek → common Relation

File in dune/localfunctions/rannacherturekIncludes file in dune/localfunctions/common
rannacherturek/rannacherturek.hhlocalfiniteelementtraits.hh
rannachertureklocalcoefficients.hhlocalkey.hh
rannachertureklocalinterpolation.hhcommon/localbasis.hh
rannachertureklocalinterpolation.hhcommon/localinterpolation.hh
rannacherturek2d / rannacherturek2dlocalbasis.hhcommon/localbasis.hh
rannacherturek3d / rannacherturek3dlocalbasis.hhcommon/localbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000033_000034.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

rannacherturek → rannacherturek2d Relation

File in dune/localfunctions/rannacherturekIncludes file in dune/localfunctions/rannacherturek/rannacherturek2d
rannachertureklocalbasis.hhrannacherturek2dlocalbasis.hh
│ │ │ │ +

rannacherturek → rannacherturek2d Relation

File in dune/localfunctions/rannacherturekIncludes file in dune/localfunctions/rannacherturek/rannacherturek2d
rannachertureklocalbasis.hhrannacherturek2dlocalbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000033_000035.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

rannacherturek → rannacherturek3d Relation

File in dune/localfunctions/rannacherturekIncludes file in dune/localfunctions/rannacherturek/rannacherturek3d
rannachertureklocalbasis.hhrannacherturek3dlocalbasis.hh
│ │ │ │ +

rannacherturek → rannacherturek3d Relation

File in dune/localfunctions/rannacherturekIncludes file in dune/localfunctions/rannacherturek/rannacherturek3d
rannachertureklocalbasis.hhrannacherturek3dlocalbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000034_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

rannacherturek2d → common Relation

File in dune/localfunctions/rannacherturek/rannacherturek2dIncludes file in dune/localfunctions/common
rannacherturek2dlocalbasis.hhcommon/localbasis.hh
│ │ │ │ +

rannacherturek2d → common Relation

File in dune/localfunctions/rannacherturek/rannacherturek2dIncludes file in dune/localfunctions/common
rannacherturek2dlocalbasis.hhcommon/localbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000035_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

rannacherturek3d → common Relation

File in dune/localfunctions/rannacherturek/rannacherturek3dIncludes file in dune/localfunctions/common
rannacherturek3dlocalbasis.hhcommon/localbasis.hh
│ │ │ │ +

rannacherturek3d → common Relation

File in dune/localfunctions/rannacherturek/rannacherturek3dIncludes file in dune/localfunctions/common
rannacherturek3dlocalbasis.hhcommon/localbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → common Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/common
raviartthomas02d.hhlocalfiniteelementtraits.hh
raviartthomas03d.hhlocalfiniteelementtraits.hh
raviartthomas0cube2d.hhlocalfiniteelementtraits.hh
raviartthomas0cube3d.hhlocalfiniteelementtraits.hh
raviartthomas0prism.hhlocalfiniteelementtraits.hh
raviartthomas0pyramid.hhlocalfiniteelementtraits.hh
raviartthomas12d.hhlocalfiniteelementtraits.hh
raviartthomas1cube2d.hhlocalfiniteelementtraits.hh
raviartthomas1cube3d.hhlocalfiniteelementtraits.hh
raviartthomas2cube2d.hhlocalfiniteelementtraits.hh
raviartthomas3cube2d.hhlocalfiniteelementtraits.hh
raviartthomas4cube2d.hhlocalfiniteelementtraits.hh
raviartthomaslfecache.hhlocalfiniteelementvariantcache.hh
raviartthomas02d / raviartthomas02dlocalbasis.hhcommon/localbasis.hh
raviartthomas02d / raviartthomas02dlocalcoefficients.hhlocalkey.hh
raviartthomas02d / raviartthomas02dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas03d / raviartthomas03dlocalbasis.hhcommon/localbasis.hh
raviartthomas03d / raviartthomas03dlocalcoefficients.hhlocalkey.hh
raviartthomas03d / raviartthomas03dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas0cube2d / raviartthomas0cube2dall.hhcommon/localbasis.hh
raviartthomas0cube2d / raviartthomas0cube2dall.hhlocalkey.hh
raviartthomas0cube2d / raviartthomas0cube2dall.hhcommon/localinterpolation.hh
raviartthomas0cube3d / raviartthomas0cube3dall.hhcommon/localbasis.hh
raviartthomas0cube3d / raviartthomas0cube3dall.hhlocalkey.hh
raviartthomas0cube3d / raviartthomas0cube3dall.hhcommon/localinterpolation.hh
raviartthomas0prism / raviartthomas0prismlocalbasis.hhcommon/localbasis.hh
raviartthomas0prism / raviartthomas0prismlocalcoefficients.hhlocalkey.hh
raviartthomas0prism / raviartthomas0prismlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas0pyramid / raviartthomas0pyramidlocalbasis.hhcommon/localbasis.hh
raviartthomas0pyramid / raviartthomas0pyramidlocalcoefficients.hhlocalkey.hh
raviartthomas0pyramid / raviartthomas0pyramidlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas12d / raviartthomas12dlocalbasis.hhcommon/localbasis.hh
raviartthomas12d / raviartthomas12dlocalcoefficients.hhlocalkey.hh
raviartthomas12d / raviartthomas12dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas1cube2d / raviartthomas1cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas1cube2d / raviartthomas1cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas1cube2d / raviartthomas1cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas1cube3d / raviartthomas1cube3dlocalbasis.hhcommon/localbasis.hh
raviartthomas1cube3d / raviartthomas1cube3dlocalcoefficients.hhlocalkey.hh
raviartthomas1cube3d / raviartthomas1cube3dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas2cube2d / raviartthomas2cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas2cube2d / raviartthomas2cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas2cube2d / raviartthomas2cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas3cube2d / raviartthomas3cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas3cube2d / raviartthomas3cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas3cube2d / raviartthomas3cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas4cube2d / raviartthomas4cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas4cube2d / raviartthomas4cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas4cube2d / raviartthomas4cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomassimplex / raviartthomassimplexinterpolation.hhlocalkey.hh
│ │ │ │ +

raviartthomas → common Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/common
raviartthomas02d.hhlocalfiniteelementtraits.hh
raviartthomas03d.hhlocalfiniteelementtraits.hh
raviartthomas0cube2d.hhlocalfiniteelementtraits.hh
raviartthomas0cube3d.hhlocalfiniteelementtraits.hh
raviartthomas0prism.hhlocalfiniteelementtraits.hh
raviartthomas0pyramid.hhlocalfiniteelementtraits.hh
raviartthomas12d.hhlocalfiniteelementtraits.hh
raviartthomas1cube2d.hhlocalfiniteelementtraits.hh
raviartthomas1cube3d.hhlocalfiniteelementtraits.hh
raviartthomas2cube2d.hhlocalfiniteelementtraits.hh
raviartthomas3cube2d.hhlocalfiniteelementtraits.hh
raviartthomas4cube2d.hhlocalfiniteelementtraits.hh
raviartthomaslfecache.hhlocalfiniteelementvariantcache.hh
raviartthomas02d / raviartthomas02dlocalbasis.hhcommon/localbasis.hh
raviartthomas02d / raviartthomas02dlocalcoefficients.hhlocalkey.hh
raviartthomas02d / raviartthomas02dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas03d / raviartthomas03dlocalbasis.hhcommon/localbasis.hh
raviartthomas03d / raviartthomas03dlocalcoefficients.hhlocalkey.hh
raviartthomas03d / raviartthomas03dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas0cube2d / raviartthomas0cube2dall.hhcommon/localbasis.hh
raviartthomas0cube2d / raviartthomas0cube2dall.hhlocalkey.hh
raviartthomas0cube2d / raviartthomas0cube2dall.hhcommon/localinterpolation.hh
raviartthomas0cube3d / raviartthomas0cube3dall.hhcommon/localbasis.hh
raviartthomas0cube3d / raviartthomas0cube3dall.hhlocalkey.hh
raviartthomas0cube3d / raviartthomas0cube3dall.hhcommon/localinterpolation.hh
raviartthomas0prism / raviartthomas0prismlocalbasis.hhcommon/localbasis.hh
raviartthomas0prism / raviartthomas0prismlocalcoefficients.hhlocalkey.hh
raviartthomas0prism / raviartthomas0prismlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas0pyramid / raviartthomas0pyramidlocalbasis.hhcommon/localbasis.hh
raviartthomas0pyramid / raviartthomas0pyramidlocalcoefficients.hhlocalkey.hh
raviartthomas0pyramid / raviartthomas0pyramidlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas12d / raviartthomas12dlocalbasis.hhcommon/localbasis.hh
raviartthomas12d / raviartthomas12dlocalcoefficients.hhlocalkey.hh
raviartthomas12d / raviartthomas12dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas1cube2d / raviartthomas1cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas1cube2d / raviartthomas1cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas1cube2d / raviartthomas1cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas1cube3d / raviartthomas1cube3dlocalbasis.hhcommon/localbasis.hh
raviartthomas1cube3d / raviartthomas1cube3dlocalcoefficients.hhlocalkey.hh
raviartthomas1cube3d / raviartthomas1cube3dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas2cube2d / raviartthomas2cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas2cube2d / raviartthomas2cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas2cube2d / raviartthomas2cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas3cube2d / raviartthomas3cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas3cube2d / raviartthomas3cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas3cube2d / raviartthomas3cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomas4cube2d / raviartthomas4cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas4cube2d / raviartthomas4cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas4cube2d / raviartthomas4cube2dlocalinterpolation.hhcommon/localinterpolation.hh
raviartthomassimplex / raviartthomassimplexinterpolation.hhlocalkey.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000029.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → orthonormal Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/orthonormal
raviartthomassimplex / raviartthomassimplexinterpolation.hhorthonormalbasis.hh
│ │ │ │ +

raviartthomas → orthonormal Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/orthonormal
raviartthomassimplex / raviartthomassimplexinterpolation.hhorthonormalbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000037.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → raviartthomas02d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas02d
raviartthomas02d.hhraviartthomas02dlocalbasis.hh
raviartthomas02d.hhraviartthomas02dlocalcoefficients.hh
raviartthomas02d.hhraviartthomas02dlocalinterpolation.hh
│ │ │ │ +

raviartthomas → raviartthomas02d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas02d
raviartthomas02d.hhraviartthomas02dlocalbasis.hh
raviartthomas02d.hhraviartthomas02dlocalcoefficients.hh
raviartthomas02d.hhraviartthomas02dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000038.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → raviartthomas03d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas03d
raviartthomas03d.hhraviartthomas03dlocalbasis.hh
raviartthomas03d.hhraviartthomas03dlocalcoefficients.hh
raviartthomas03d.hhraviartthomas03dlocalinterpolation.hh
│ │ │ │ +

raviartthomas → raviartthomas03d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas03d
raviartthomas03d.hhraviartthomas03dlocalbasis.hh
raviartthomas03d.hhraviartthomas03dlocalcoefficients.hh
raviartthomas03d.hhraviartthomas03dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000039.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → raviartthomas0cube2d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas0cube2d
raviartthomas0cube2d.hhraviartthomas0cube2dall.hh
│ │ │ │ +

raviartthomas → raviartthomas0cube2d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas0cube2d
raviartthomas0cube2d.hhraviartthomas0cube2dall.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000040.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → raviartthomas0cube3d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas0cube3d
raviartthomas0cube3d.hhraviartthomas0cube3dall.hh
│ │ │ │ +

raviartthomas → raviartthomas0cube3d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas0cube3d
raviartthomas0cube3d.hhraviartthomas0cube3dall.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000041.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → raviartthomas0prism Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas0prism
raviartthomas0prism.hhraviartthomas0prismlocalbasis.hh
raviartthomas0prism.hhraviartthomas0prismlocalcoefficients.hh
raviartthomas0prism.hhraviartthomas0prismlocalinterpolation.hh
│ │ │ │ +

raviartthomas → raviartthomas0prism Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas0prism
raviartthomas0prism.hhraviartthomas0prismlocalbasis.hh
raviartthomas0prism.hhraviartthomas0prismlocalcoefficients.hh
raviartthomas0prism.hhraviartthomas0prismlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000042.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → raviartthomas0pyramid Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas0pyramid
raviartthomas0pyramid.hhraviartthomas0pyramidlocalbasis.hh
raviartthomas0pyramid.hhraviartthomas0pyramidlocalcoefficients.hh
raviartthomas0pyramid.hhraviartthomas0pyramidlocalinterpolation.hh
│ │ │ │ +

raviartthomas → raviartthomas0pyramid Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas0pyramid
raviartthomas0pyramid.hhraviartthomas0pyramidlocalbasis.hh
raviartthomas0pyramid.hhraviartthomas0pyramidlocalcoefficients.hh
raviartthomas0pyramid.hhraviartthomas0pyramidlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000043.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → raviartthomas12d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas12d
raviartthomas12d.hhraviartthomas12dlocalbasis.hh
raviartthomas12d.hhraviartthomas12dlocalcoefficients.hh
raviartthomas12d.hhraviartthomas12dlocalinterpolation.hh
│ │ │ │ +

raviartthomas → raviartthomas12d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas12d
raviartthomas12d.hhraviartthomas12dlocalbasis.hh
raviartthomas12d.hhraviartthomas12dlocalcoefficients.hh
raviartthomas12d.hhraviartthomas12dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000044.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → raviartthomas1cube2d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas1cube2d
raviartthomas1cube2d.hhraviartthomas1cube2dlocalbasis.hh
raviartthomas1cube2d.hhraviartthomas1cube2dlocalcoefficients.hh
raviartthomas1cube2d.hhraviartthomas1cube2dlocalinterpolation.hh
│ │ │ │ +

raviartthomas → raviartthomas1cube2d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas1cube2d
raviartthomas1cube2d.hhraviartthomas1cube2dlocalbasis.hh
raviartthomas1cube2d.hhraviartthomas1cube2dlocalcoefficients.hh
raviartthomas1cube2d.hhraviartthomas1cube2dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000045.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → raviartthomas1cube3d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas1cube3d
raviartthomas1cube3d.hhraviartthomas1cube3dlocalbasis.hh
raviartthomas1cube3d.hhraviartthomas1cube3dlocalcoefficients.hh
raviartthomas1cube3d.hhraviartthomas1cube3dlocalinterpolation.hh
│ │ │ │ +

raviartthomas → raviartthomas1cube3d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas1cube3d
raviartthomas1cube3d.hhraviartthomas1cube3dlocalbasis.hh
raviartthomas1cube3d.hhraviartthomas1cube3dlocalcoefficients.hh
raviartthomas1cube3d.hhraviartthomas1cube3dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000046.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → raviartthomas2cube2d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas2cube2d
raviartthomas2cube2d.hhraviartthomas2cube2dlocalbasis.hh
raviartthomas2cube2d.hhraviartthomas2cube2dlocalcoefficients.hh
raviartthomas2cube2d.hhraviartthomas2cube2dlocalinterpolation.hh
│ │ │ │ +

raviartthomas → raviartthomas2cube2d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas2cube2d
raviartthomas2cube2d.hhraviartthomas2cube2dlocalbasis.hh
raviartthomas2cube2d.hhraviartthomas2cube2dlocalcoefficients.hh
raviartthomas2cube2d.hhraviartthomas2cube2dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000047.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → raviartthomas3cube2d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas3cube2d
raviartthomas3cube2d.hhraviartthomas3cube2dlocalbasis.hh
raviartthomas3cube2d.hhraviartthomas3cube2dlocalcoefficients.hh
raviartthomas3cube2d.hhraviartthomas3cube2dlocalinterpolation.hh
│ │ │ │ +

raviartthomas → raviartthomas3cube2d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas3cube2d
raviartthomas3cube2d.hhraviartthomas3cube2dlocalbasis.hh
raviartthomas3cube2d.hhraviartthomas3cube2dlocalcoefficients.hh
raviartthomas3cube2d.hhraviartthomas3cube2dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000048.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → raviartthomas4cube2d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas4cube2d
raviartthomas4cube2d.hhraviartthomas4cube2dlocalbasis.hh
raviartthomas4cube2d.hhraviartthomas4cube2dlocalcoefficients.hh
raviartthomas4cube2d.hhraviartthomas4cube2dlocalinterpolation.hh
│ │ │ │ +

raviartthomas → raviartthomas4cube2d Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomas4cube2d
raviartthomas4cube2d.hhraviartthomas4cube2dlocalbasis.hh
raviartthomas4cube2d.hhraviartthomas4cube2dlocalcoefficients.hh
raviartthomas4cube2d.hhraviartthomas4cube2dlocalinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000049.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas → raviartthomassimplex Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomassimplex
raviartthomassimplex.hhraviartthomassimplexbasis.hh
│ │ │ │ +

raviartthomas → raviartthomassimplex Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/raviartthomas/raviartthomassimplex
raviartthomassimplex.hhraviartthomassimplexbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000036_000053.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

raviartthomas → utility Relation

File in dune/localfunctions/raviartthomasIncludes file in dune/localfunctions/utility
raviartthomassimplex.hhlocalfunctions/utility/localfiniteelement.hh
raviartthomassimplex / raviartthomassimplexbasis.hhdefaultbasisfactory.hh
raviartthomassimplex / raviartthomassimplexinterpolation.hhinterpolationhelper.hh
raviartthomassimplex / raviartthomassimplexinterpolation.hhpolynomialbasis.hh
raviartthomassimplex / raviartthomassimplexprebasis.hhpolynomialbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000037_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas02d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas02dIncludes file in dune/localfunctions/common
raviartthomas02dlocalbasis.hhcommon/localbasis.hh
raviartthomas02dlocalcoefficients.hhlocalkey.hh
raviartthomas02dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

raviartthomas02d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas02dIncludes file in dune/localfunctions/common
raviartthomas02dlocalbasis.hhcommon/localbasis.hh
raviartthomas02dlocalcoefficients.hhlocalkey.hh
raviartthomas02dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000038_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas03d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas03dIncludes file in dune/localfunctions/common
raviartthomas03dlocalbasis.hhcommon/localbasis.hh
raviartthomas03dlocalcoefficients.hhlocalkey.hh
raviartthomas03dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

raviartthomas03d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas03dIncludes file in dune/localfunctions/common
raviartthomas03dlocalbasis.hhcommon/localbasis.hh
raviartthomas03dlocalcoefficients.hhlocalkey.hh
raviartthomas03dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000039_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas0cube2d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas0cube2dIncludes file in dune/localfunctions/common
raviartthomas0cube2dall.hhcommon/localbasis.hh
raviartthomas0cube2dall.hhcommon/localinterpolation.hh
raviartthomas0cube2dall.hhlocalkey.hh
│ │ │ │ +

raviartthomas0cube2d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas0cube2dIncludes file in dune/localfunctions/common
raviartthomas0cube2dall.hhcommon/localbasis.hh
raviartthomas0cube2dall.hhcommon/localinterpolation.hh
raviartthomas0cube2dall.hhlocalkey.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000040_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas0cube3d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas0cube3dIncludes file in dune/localfunctions/common
raviartthomas0cube3dall.hhcommon/localbasis.hh
raviartthomas0cube3dall.hhcommon/localinterpolation.hh
raviartthomas0cube3dall.hhlocalkey.hh
│ │ │ │ +

raviartthomas0cube3d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas0cube3dIncludes file in dune/localfunctions/common
raviartthomas0cube3dall.hhcommon/localbasis.hh
raviartthomas0cube3dall.hhcommon/localinterpolation.hh
raviartthomas0cube3dall.hhlocalkey.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000041_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas0prism → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas0prismIncludes file in dune/localfunctions/common
raviartthomas0prismlocalbasis.hhcommon/localbasis.hh
raviartthomas0prismlocalcoefficients.hhlocalkey.hh
raviartthomas0prismlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

raviartthomas0prism → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas0prismIncludes file in dune/localfunctions/common
raviartthomas0prismlocalbasis.hhcommon/localbasis.hh
raviartthomas0prismlocalcoefficients.hhlocalkey.hh
raviartthomas0prismlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000042_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas0pyramid → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas0pyramidIncludes file in dune/localfunctions/common
raviartthomas0pyramidlocalbasis.hhcommon/localbasis.hh
raviartthomas0pyramidlocalcoefficients.hhlocalkey.hh
raviartthomas0pyramidlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

raviartthomas0pyramid → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas0pyramidIncludes file in dune/localfunctions/common
raviartthomas0pyramidlocalbasis.hhcommon/localbasis.hh
raviartthomas0pyramidlocalcoefficients.hhlocalkey.hh
raviartthomas0pyramidlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000043_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas12d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas12dIncludes file in dune/localfunctions/common
raviartthomas12dlocalbasis.hhcommon/localbasis.hh
raviartthomas12dlocalcoefficients.hhlocalkey.hh
raviartthomas12dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

raviartthomas12d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas12dIncludes file in dune/localfunctions/common
raviartthomas12dlocalbasis.hhcommon/localbasis.hh
raviartthomas12dlocalcoefficients.hhlocalkey.hh
raviartthomas12dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000044_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas1cube2d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas1cube2dIncludes file in dune/localfunctions/common
raviartthomas1cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas1cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas1cube2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

raviartthomas1cube2d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas1cube2dIncludes file in dune/localfunctions/common
raviartthomas1cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas1cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas1cube2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000045_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas1cube3d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas1cube3dIncludes file in dune/localfunctions/common
raviartthomas1cube3dlocalbasis.hhcommon/localbasis.hh
raviartthomas1cube3dlocalcoefficients.hhlocalkey.hh
raviartthomas1cube3dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

raviartthomas1cube3d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas1cube3dIncludes file in dune/localfunctions/common
raviartthomas1cube3dlocalbasis.hhcommon/localbasis.hh
raviartthomas1cube3dlocalcoefficients.hhlocalkey.hh
raviartthomas1cube3dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000046_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas2cube2d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas2cube2dIncludes file in dune/localfunctions/common
raviartthomas2cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas2cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas2cube2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

raviartthomas2cube2d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas2cube2dIncludes file in dune/localfunctions/common
raviartthomas2cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas2cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas2cube2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000047_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas3cube2d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas3cube2dIncludes file in dune/localfunctions/common
raviartthomas3cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas3cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas3cube2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

raviartthomas3cube2d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas3cube2dIncludes file in dune/localfunctions/common
raviartthomas3cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas3cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas3cube2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000048_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomas4cube2d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas4cube2dIncludes file in dune/localfunctions/common
raviartthomas4cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas4cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas4cube2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

raviartthomas4cube2d → common Relation

File in dune/localfunctions/raviartthomas/raviartthomas4cube2dIncludes file in dune/localfunctions/common
raviartthomas4cube2dlocalbasis.hhcommon/localbasis.hh
raviartthomas4cube2dlocalcoefficients.hhlocalkey.hh
raviartthomas4cube2dlocalinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000049_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomassimplex → common Relation

File in dune/localfunctions/raviartthomas/raviartthomassimplexIncludes file in dune/localfunctions/common
raviartthomassimplexinterpolation.hhlocalkey.hh
│ │ │ │ +

raviartthomassimplex → common Relation

File in dune/localfunctions/raviartthomas/raviartthomassimplexIncludes file in dune/localfunctions/common
raviartthomassimplexinterpolation.hhlocalkey.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000049_000029.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomassimplex → orthonormal Relation

File in dune/localfunctions/raviartthomas/raviartthomassimplexIncludes file in dune/localfunctions/orthonormal
raviartthomassimplexinterpolation.hhorthonormalbasis.hh
│ │ │ │ +

raviartthomassimplex → orthonormal Relation

File in dune/localfunctions/raviartthomas/raviartthomassimplexIncludes file in dune/localfunctions/orthonormal
raviartthomassimplexinterpolation.hhorthonormalbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000049_000053.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

raviartthomassimplex → utility Relation

File in dune/localfunctions/raviartthomas/raviartthomassimplexIncludes file in dune/localfunctions/utility
raviartthomassimplexbasis.hhdefaultbasisfactory.hh
raviartthomassimplexinterpolation.hhinterpolationhelper.hh
raviartthomassimplexinterpolation.hhpolynomialbasis.hh
raviartthomassimplexprebasis.hhpolynomialbasis.hh
│ │ │ │ +

raviartthomassimplex → utility Relation

File in dune/localfunctions/raviartthomas/raviartthomassimplexIncludes file in dune/localfunctions/utility
raviartthomassimplexbasis.hhdefaultbasisfactory.hh
raviartthomassimplexinterpolation.hhinterpolationhelper.hh
raviartthomassimplexinterpolation.hhpolynomialbasis.hh
raviartthomassimplexprebasis.hhpolynomialbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000050_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

refined → common Relation

File in dune/localfunctions/refinedIncludes file in dune/localfunctions/common
refinedp0.hhlocalfiniteelementtraits.hh
refinedp1.hhlocalfiniteelementtraits.hh
common / refinedsimplexlocalbasis.hhcommon/localbasis.hh
refinedp0 / refinedp0localbasis.hhcommon/localbasis.hh
refinedp0 / refinedp0localcoefficients.hhlocalkey.hh
refinedp0 / refinedp0localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000050_000021.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

refined → lagrange Relation

File in dune/localfunctions/refinedIncludes file in dune/localfunctions/lagrange
refinedp0.hhp0.hh
refinedp1.hhlagrangesimplex.hh
refinedp1.hhp0.hh
│ │ │ │ +

refined → lagrange Relation

File in dune/localfunctions/refinedIncludes file in dune/localfunctions/lagrange
refinedp0.hhp0.hh
refinedp1.hhlagrangesimplex.hh
refinedp1.hhp0.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000050_000051.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

refined → refinedp0 Relation

File in dune/localfunctions/refinedIncludes file in dune/localfunctions/refined/refinedp0
refinedp0.hhrefinedp0localbasis.hh
refinedp0.hhrefinedp0localcoefficients.hh
refinedp0.hhrefinedp0localinterpolation.hh
│ │ │ │ +

refined → refinedp0 Relation

File in dune/localfunctions/refinedIncludes file in dune/localfunctions/refined/refinedp0
refinedp0.hhrefinedp0localbasis.hh
refinedp0.hhrefinedp0localcoefficients.hh
refinedp0.hhrefinedp0localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000050_000052.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

refined → refinedp1 Relation

File in dune/localfunctions/refinedIncludes file in dune/localfunctions/refined/refinedp1
refinedp1.hhrefinedp1localbasis.hh
│ │ │ │ +

refined → refinedp1 Relation

File in dune/localfunctions/refinedIncludes file in dune/localfunctions/refined/refinedp1
refinedp1.hhrefinedp1localbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000051_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

refinedp0 → common Relation

File in dune/localfunctions/refined/refinedp0Includes file in dune/localfunctions/common
refinedp0localbasis.hhcommon/localbasis.hh
refinedp0localcoefficients.hhlocalkey.hh
refinedp0localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

refinedp0 → common Relation

File in dune/localfunctions/refined/refinedp0Includes file in dune/localfunctions/common
refinedp0localbasis.hhcommon/localbasis.hh
refinedp0localcoefficients.hhlocalkey.hh
refinedp0localinterpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000051_000008.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

refinedp0 → common Relation

File in dune/localfunctions/refined/refinedp0Includes file in dune/localfunctions/refined/common
refinedp0localbasis.hhrefinedsimplexlocalbasis.hh
│ │ │ │ +

refinedp0 → common Relation

File in dune/localfunctions/refined/refinedp0Includes file in dune/localfunctions/refined/common
refinedp0localbasis.hhrefinedsimplexlocalbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000052_000008.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

refinedp1 → common Relation

File in dune/localfunctions/refined/refinedp1Includes file in dune/localfunctions/refined/common
refinedp1localbasis.hhrefinedsimplexlocalbasis.hh
│ │ │ │ +

refinedp1 → common Relation

File in dune/localfunctions/refined/refinedp1Includes file in dune/localfunctions/refined/common
refinedp1localbasis.hhrefinedsimplexlocalbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000053_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

utility → common Relation

File in dune/localfunctions/utilityIncludes file in dune/localfunctions/common
dglocalcoefficients.hhlocalkey.hh
interpolationhelper.hhcommon/localinterpolation.hh
l2interpolation.hhcommon/localinterpolation.hh
localfunctions/utility/localfiniteelement.hhlocalfiniteelementtraits.hh
polynomialbasis.hhcommon/localbasis.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000054_000007.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

whitney → common Relation

File in dune/localfunctions/whitneyIncludes file in dune/localfunctions/common
edges0.5 / whitney/edges0.5/basis.hhlocaltoglobaladaptors.hh
edges0.5 / whitney/edges0.5/coefficients.hhlocalkey.hh
edges0.5 / whitney/edges0.5/interpolation.hhcommon/localinterpolation.hh
│ │ │ │ +

whitney → common Relation

File in dune/localfunctions/whitneyIncludes file in dune/localfunctions/common
edges0.5 / whitney/edges0.5/basis.hhlocaltoglobaladaptors.hh
edges0.5 / whitney/edges0.5/coefficients.hhlocalkey.hh
edges0.5 / whitney/edges0.5/interpolation.hhcommon/localinterpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000054_000016.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

whitney → edges0.5 Relation

File in dune/localfunctions/whitneyIncludes file in dune/localfunctions/whitney/edges0.5
edges0.5.hhwhitney/edges0.5/basis.hh
edges0.5.hhwhitney/edges0.5/coefficients.hh
edges0.5.hhwhitney/edges0.5/interpolation.hh
│ │ │ │ +

whitney → edges0.5 Relation

File in dune/localfunctions/whitneyIncludes file in dune/localfunctions/whitney/edges0.5
edges0.5.hhwhitney/edges0.5/basis.hh
edges0.5.hhwhitney/edges0.5/coefficients.hh
edges0.5.hhwhitney/edges0.5/interpolation.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_000054_000021.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

whitney → lagrange Relation

File in dune/localfunctions/whitneyIncludes file in dune/localfunctions/lagrange
edges0.5 / whitney/edges0.5/basis.hhlagrangesimplex.hh
│ │ │ │ +

whitney → lagrange Relation

File in dune/localfunctions/whitneyIncludes file in dune/localfunctions/lagrange
edges0.5 / whitney/edges0.5/basis.hhlagrangesimplex.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_00f4c9da8ab215917e2238f0b0796258.html │ │ │ │ @@ -87,19 +87,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 raviartthomas12dlocalbasis.hh
 raviartthomas12dlocalbasis.hh
 
 raviartthomas12dlocalcoefficients.hh
 raviartthomas12dlocalcoefficients.hh
 
 raviartthomas12dlocalinterpolation.hh
 raviartthomas12dlocalinterpolation.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_04dab32f204170fce2c957668ac3e5f5.html │ │ │ │ @@ -87,19 +87,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 basis.hh
 basis.hh
 
 coefficients.hh
 coefficients.hh
 
 interpolation.hh
 interpolation.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_074cf607d40aa196487128d1cd4b7c2b.html │ │ │ │ @@ -93,19 +93,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 raviartthomassimplexbasis.hh
 raviartthomassimplexbasis.hh
 
 raviartthomassimplexinterpolation.hh
 raviartthomassimplexinterpolation.hh
 
 raviartthomassimplexprebasis.hh
 raviartthomassimplexprebasis.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_143be598d26ab497b1cf2bfe80fc7779.html │ │ │ │ @@ -87,16 +87,16 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 hierarchicalsimplexp2withelementbubble.hh
 Hierarchical p2 shape functions for the simplex.
 hierarchicalsimplexp2withelementbubble.hh
 Hierarchical p2 shape functions for the simplex.
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_15eac88247e25f0f27b13d32b73d619c.html │ │ │ │ @@ -87,16 +87,16 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 refinedsimplexlocalbasis.hh
 Contains a base class for LocalBasis classes based on uniform refinement.
 refinedsimplexlocalbasis.hh
 Contains a base class for LocalBasis classes based on uniform refinement.
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_1827d78335859fc5128ae8554d7cfd8a.html │ │ │ │ @@ -101,17 +101,17 @@ │ │ │ │

│ │ │ │ Directories

│ │ │ │  nedelecsimplex │ │ │ │   │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 nedelec1stkindcube.hh
 nedelec1stkindcube.hh
 
 nedelec1stkindsimplex.hh
 nedelec1stkindsimplex.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_1f1a538a498ce02a82be88987c51ab5d.html │ │ │ │ @@ -87,15 +87,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 rannacherturek2dlocalbasis.hh
 rannacherturek2dlocalbasis.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_21dddee0a34e22148b82b7f55eaf3cdb.html │ │ │ │ @@ -87,19 +87,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 raviartthomas2cube2dlocalbasis.hh
 raviartthomas2cube2dlocalbasis.hh
 
 raviartthomas2cube2dlocalcoefficients.hh
 raviartthomas2cube2dlocalcoefficients.hh
 
 raviartthomas2cube2dlocalinterpolation.hh
 raviartthomas2cube2dlocalinterpolation.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_22a3622bb91f1bf42dc2704315301344.html │ │ │ │ @@ -87,19 +87,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 brezzidouglasmarini1cube3dlocalbasis.hh
 brezzidouglasmarini1cube3dlocalbasis.hh
 
 brezzidouglasmarini1cube3dlocalcoefficients.hh
 brezzidouglasmarini1cube3dlocalcoefficients.hh
 
 brezzidouglasmarini1cube3dlocalinterpolation.hh
 brezzidouglasmarini1cube3dlocalinterpolation.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_28824a0ee22611676c14160ba27dca19.html │ │ │ │ @@ -95,15 +95,15 @@ │ │ │ │

│ │ │ │ Directories

│ │ │ │  power │ │ │ │   │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 power.hh
 power.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_30041f0f075e04eba93c1e90a93bda5c.html │ │ │ │ @@ -209,41 +209,41 @@ │ │ │ │  utility │ │ │ │   │ │ │ │  whitney │ │ │ │   │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 brezzidouglasmarini.hh
 brezzidouglasmarini.hh
 
 crouzeixraviart.hh
 crouzeixraviart.hh
 
 dualmortarbasis.hh
 dualmortarbasis.hh
 
 hierarchical.hh
 Convenience header that includes all available hierarchical LocalFiniteElements.
 hierarchical.hh
 Convenience header that includes all available hierarchical LocalFiniteElements.
 
 lagrange.hh
 Convenience header that includes all implementations of Lagrange finite elements.
 lagrange.hh
 Convenience header that includes all implementations of Lagrange finite elements.
 
 mimetic.hh
 mimetic.hh
 
 monomial.hh
 monomial.hh
 
 nedelec.hh
 nedelec.hh
 
 orthonormal.hh
 orthonormal.hh
 
 rannacherturek.hh
 Convenience header that includes all available Rannacher-Turek LocalFiniteElements.
 rannacherturek.hh
 Convenience header that includes all available Rannacher-Turek LocalFiniteElements.
 
 raviartthomas.hh
 raviartthomas.hh
 
 refined.hh
 Convenience header that includes all available LocalFiniteElements based on uniform element refinement.
 refined.hh
 Convenience header that includes all available LocalFiniteElements based on uniform element refinement.
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_382f55a8cedaec4f6094a1f9a7ac5b41.html │ │ │ │ @@ -87,19 +87,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 raviartthomas4cube2dlocalbasis.hh
 raviartthomas4cube2dlocalbasis.hh
 
 raviartthomas4cube2dlocalcoefficients.hh
 raviartthomas4cube2dlocalcoefficients.hh
 
 raviartthomas4cube2dlocalinterpolation.hh
 raviartthomas4cube2dlocalinterpolation.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_386a5b330ea6d6e23e2617c849e344e3.html │ │ │ │ @@ -87,19 +87,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 raviartthomas0prismlocalbasis.hh
 raviartthomas0prismlocalbasis.hh
 
 raviartthomas0prismlocalcoefficients.hh
 raviartthomas0prismlocalcoefficients.hh
 
 raviartthomas0prismlocalinterpolation.hh
 raviartthomas0prismlocalinterpolation.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_4009bb7c6c39619515ed15f75465c5da.html │ │ │ │ @@ -87,19 +87,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 raviartthomas02dlocalbasis.hh
 raviartthomas02dlocalbasis.hh
 
 raviartthomas02dlocalcoefficients.hh
 raviartthomas02dlocalcoefficients.hh
 
 raviartthomas02dlocalinterpolation.hh
 raviartthomas02dlocalinterpolation.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_421d79ad4cafaafb52a5003304930aac.html │ │ │ │ @@ -90,21 +90,21 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 basis.hh
 basis.hh
 
 coefficients.hh
 coefficients.hh
 
 common.hh
 common.hh
 
 interpolation.hh
 interpolation.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_4378156c656f282b787cb904a0df684d.html │ │ │ │ @@ -114,18 +114,18 @@ │ │ │ │  refinedp0 │ │ │ │   │ │ │ │  refinedp1 │ │ │ │   │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 refinedp0.hh
 Piecewise P0 finite element.
 refinedp0.hh
 Piecewise P0 finite element.
 
 refinedp1.hh
 refinedp1.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_49183f7e7ccd69590c9095f18e69e645.html │ │ │ │ @@ -93,19 +93,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 nedelecsimplexbasis.hh
 nedelecsimplexbasis.hh
 
 nedelecsimplexinterpolation.hh
 nedelecsimplexinterpolation.hh
 
 nedelecsimplexprebasis.hh
 nedelecsimplexprebasis.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_53596036ac495f55b7fa1caaab1fea96.html │ │ │ │ @@ -97,15 +97,15 @@ │ │ │ │

│ │ │ │ Directories

│ │ │ │  cube │ │ │ │   │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 bdfmcube.hh
 bdfmcube.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_5678718b81d350908b34fc61eb04cbcd.html │ │ │ │ @@ -87,19 +87,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 dualp1localbasis.hh
 dualp1localbasis.hh
 
 dualp1localcoefficients.hh
 dualp1localcoefficients.hh
 
 dualp1localinterpolation.hh
 dualp1localinterpolation.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_585f2e0fbd475e320aabbc7f7e68ccdc.html │ │ │ │ @@ -107,19 +107,19 @@ │ │ │ │  dualp1 │ │ │ │   │ │ │ │  dualq1 │ │ │ │   │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 dualp1.hh
 dualp1.hh
 
 dualpq1factory.hh
 dualpq1factory.hh
 
 dualq1.hh
 dualq1.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_5bc7e90abcdd1dc5d315f05df75ca74d.html │ │ │ │ @@ -87,43 +87,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

 basisevaluator.hh
 basisevaluator.hh
 
 basismatrix.hh
 basismatrix.hh
 
 basisprint.hh
 basisprint.hh
 
 coeffmatrix.hh
 coeffmatrix.hh
 
 defaultbasisfactory.hh
 defaultbasisfactory.hh
 
 dglocalcoefficients.hh
 dglocalcoefficients.hh
 
 field.hh
 field.hh
 
 interpolationhelper.hh
 interpolationhelper.hh
 
 l2interpolation.hh
 l2interpolation.hh
 
 lfematrix.hh
 lfematrix.hh
 
 localfiniteelement.hh
 
 monomialbasis.hh
 monomialbasis.hh
 
 multiindex.hh
 multiindex.hh
 
 polynomialbasis.hh
 polynomialbasis.hh
 
 tensor.hh
 tensor.hh
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/dir_67d9ae42291990d542a2d8fc663c58f1.html │ │ │ │ @@ -89,15 +89,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Files

 localbasis.hh
 
 localcoefficients.hh
 localcoefficients.hh
 
 localinterpolation.hh
 
│ │ │ │ │ │ │ │ │ │ │ │