--- /srv/rebuilderd/tmp/rebuilderdOF5ZZT/inputs/libdune-geometry-doc_2.11.0-1_all.deb +++ /srv/rebuilderd/tmp/rebuilderdOF5ZZT/out/libdune-geometry-doc_2.11.0-1_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2026-02-06 14:57:55.000000 debian-binary │ --rw-r--r-- 0 0 0 16760 2026-02-06 14:57:55.000000 control.tar.xz │ --rw-r--r-- 0 0 0 2510912 2026-02-06 14:57:55.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 16796 2026-02-06 14:57:55.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 2511776 2026-02-06 14:57:55.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ │ │ │ ├── line order │ │ │ │ @@ -8,15 +8,15 @@ │ │ │ │ usr/share/doc/libdune-geometry-doc/appl/refelements/gg_quadrilateral.png │ │ │ │ usr/share/doc/libdune-geometry-doc/appl/refelements/gg_tetrahedron.png │ │ │ │ usr/share/doc/libdune-geometry-doc/appl/refelements/gg_tetrahedron_edges.png │ │ │ │ usr/share/doc/libdune-geometry-doc/appl/refelements/gg_triangle.png │ │ │ │ usr/share/doc/libdune-geometry-doc/changelog.Debian.gz │ │ │ │ usr/share/doc/libdune-geometry-doc/changelog.gz │ │ │ │ usr/share/doc/libdune-geometry-doc/copyright │ │ │ │ -usr/share/doc/libdune-geometry-doc/doxygen/a00002.html │ │ │ │ +usr/share/doc/libdune-geometry-doc/doxygen/a00128.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00164.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00167.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00170.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00170_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00173.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00173_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00176.html │ │ │ │ @@ -26,15 +26,14 @@ │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00182.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00182_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00185.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00185_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00188.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00188_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00191.html │ │ │ │ -usr/share/doc/libdune-geometry-doc/doxygen/a00191_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00194.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00194_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00197.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00197_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00200.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00200_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00203.html │ │ │ │ @@ -48,14 +47,15 @@ │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00215.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00215_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00218.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00218_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00221.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00221_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00224.html │ │ │ │ +usr/share/doc/libdune-geometry-doc/doxygen/a00224_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00227.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00227_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00230.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00230_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00233.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00233_source.html │ │ │ │ usr/share/doc/libdune-geometry-doc/doxygen/a00236.html ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -16,72 +16,72 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 29836 2025-12-11 14:18:43.000000 ./usr/share/doc/libdune-geometry-doc/appl/refelements/gg_tetrahedron.png │ │ │ -rw-r--r-- 0 root (0) root (0) 22586 2025-12-11 14:18:43.000000 ./usr/share/doc/libdune-geometry-doc/appl/refelements/gg_tetrahedron_edges.png │ │ │ -rw-r--r-- 0 root (0) root (0) 6480 2025-12-11 14:18:43.000000 ./usr/share/doc/libdune-geometry-doc/appl/refelements/gg_triangle.png │ │ │ -rw-r--r-- 0 root (0) root (0) 1287 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/changelog.Debian.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 3720 2025-12-11 14:18:43.000000 ./usr/share/doc/libdune-geometry-doc/changelog.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 2567 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/copyright │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/ │ │ │ --rw-r--r-- 0 root (0) root (0) 3080 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00002.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3080 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00128.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3054 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00164.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3052 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00167.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7307 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00170.html │ │ │ -rw-r--r-- 0 root (0) root (0) 29447 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00170_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13397 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00173.html │ │ │ -rw-r--r-- 0 root (0) root (0) 166135 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00173_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4934 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00176.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16080 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00176_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4119 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00179.html │ │ │ --rw-r--r-- 0 root (0) root (0) 66278 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00179_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4028 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00182.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6822 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00182_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4530 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00185.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17940 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00185_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5635 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00188.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29696 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00188_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16232 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00191.html │ │ │ --rw-r--r-- 0 root (0) root (0) 92722 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00191_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5868 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00194.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36321 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00194_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13309 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00197.html │ │ │ --rw-r--r-- 0 root (0) root (0) 123208 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00197_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12581 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00200.html │ │ │ --rw-r--r-- 0 root (0) root (0) 115124 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00200_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12518 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00203.html │ │ │ --rw-r--r-- 0 root (0) root (0) 114732 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00203_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12263 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00206.html │ │ │ --rw-r--r-- 0 root (0) root (0) 113889 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00206_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5868 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00176.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36321 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00176_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5643 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00179.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 45682 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00179_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16232 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00182.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 92722 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00182_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9874 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00185.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 46080 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00185_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6672 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00188.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 34584 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00188_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4169 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00191.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12518 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00194.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 114732 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00194_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10835 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00197.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35073 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00197_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13309 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00200.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 123208 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00200_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12263 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00203.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 113889 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00203_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12581 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00206.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 115124 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00206_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11037 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00209.html │ │ │ -rw-r--r-- 0 root (0) root (0) 89483 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00209_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10835 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00212.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35073 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00212_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4513 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00215.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7981 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00215_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9874 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00218.html │ │ │ --rw-r--r-- 0 root (0) root (0) 46080 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00218_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5161 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00221.html │ │ │ --rw-r--r-- 0 root (0) root (0) 113421 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00221_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4169 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00224.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5643 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00227.html │ │ │ --rw-r--r-- 0 root (0) root (0) 45682 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00227_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15224 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00230.html │ │ │ --rw-r--r-- 0 root (0) root (0) 98891 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00230_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8537 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00233.html │ │ │ --rw-r--r-- 0 root (0) root (0) 172375 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00233_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7483 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00236.html │ │ │ --rw-r--r-- 0 root (0) root (0) 65109 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00236_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8902 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00239.html │ │ │ --rw-r--r-- 0 root (0) root (0) 86953 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00239_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6672 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00242.html │ │ │ --rw-r--r-- 0 root (0) root (0) 34584 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00242_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5030 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00245.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9137 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00245_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5451 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00248.html │ │ │ --rw-r--r-- 0 root (0) root (0) 68256 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00248_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5650 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00251.html │ │ │ --rw-r--r-- 0 root (0) root (0) 52667 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00251_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4028 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00212.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6822 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00212_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4934 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00215.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16080 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00215_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4530 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00218.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17940 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00218_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4119 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00221.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 66278 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00221_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15224 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00224.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98891 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00224_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8537 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00227.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 172375 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00227_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5650 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00230.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 52667 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00230_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5451 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00233.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 68256 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00233_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5161 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00236.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 113421 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00236_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4513 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00239.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7981 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00239_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8902 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00242.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 86953 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00242_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7483 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00245.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 65109 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00245_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5030 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00248.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9137 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00248_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5635 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00251.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29696 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00251_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4898 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00254.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11097 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00254.png │ │ │ -rw-r--r-- 0 root (0) root (0) 24674 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00255.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3897 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00255.png │ │ │ -rw-r--r-- 0 root (0) root (0) 57938 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00256.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3638 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00256.png │ │ │ -rw-r--r-- 0 root (0) root (0) 3496 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/a00257.html │ │ │ @@ -345,15 +345,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 7064 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dir_b609f53bbb5e26b8e9292001c59476a3.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2620 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dir_b609f53bbb5e26b8e9292001c59476a3_dep.png │ │ │ -rw-r--r-- 0 root (0) root (0) 4013 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dir_de8ef2d1b4283b99fcb86ec9d2fa66db.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2142 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dir_de8ef2d1b4283b99fcb86ec9d2fa66db_dep.png │ │ │ -rw-r--r-- 0 root (0) root (0) 3947 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dir_e68e8157741866f444e17edd764ebbae.html │ │ │ -rw-r--r-- 0 root (0) root (0) 54624 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/doxygen.css │ │ │ -rw-r--r-- 0 root (0) root (0) 52496 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/doxygen_crawl.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29755 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dune-geometry.tag.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 29760 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dune-geometry.tag.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 7707 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/dynsections.js │ │ │ -rw-r--r-- 0 root (0) root (0) 16486 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/files.html │ │ │ -rw-r--r-- 0 root (0) root (0) 836 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/form_0.png │ │ │ -rw-r--r-- 0 root (0) root (0) 929 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/form_0_dark.png │ │ │ -rw-r--r-- 0 root (0) root (0) 2571 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/form_1.png │ │ │ -rw-r--r-- 0 root (0) root (0) 1159 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/form_10.png │ │ │ -rw-r--r-- 0 root (0) root (0) 726 2026-02-06 14:57:55.000000 ./usr/share/doc/libdune-geometry-doc/doxygen/form_100.png │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00170.html │ │ │ @@ -83,16 +83,16 @@ │ │ │ │ │ │
│ │ │ │ │ │

This file contains the virtual wrapper around refinement. │ │ │ More...

│ │ │
#include <vector>
│ │ │ #include <dune/common/fvector.hh>
│ │ │ -#include "refinement.hh"
│ │ │ -#include "type.hh"
│ │ │ +#include "refinement.hh"
│ │ │ +#include "type.hh"
│ │ │ #include "virtualrefinement.cc"
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00170_source.html │ │ │ @@ -87,16 +87,16 @@ │ │ │
7
│ │ │
13
│ │ │
256
│ │ │
257#include <vector>
│ │ │
258
│ │ │
259#include <dune/common/fvector.hh>
│ │ │
260
│ │ │ -
261#include "refinement.hh"
│ │ │ -
262#include "type.hh"
│ │ │ +
261#include "refinement.hh"
│ │ │ +
262#include "type.hh"
│ │ │
263
│ │ │
264namespace Dune
│ │ │
265{
│ │ │
266 // //////////////////////////////////////////
│ │ │
267 //
│ │ │
268 // The virtual base class and its iterators
│ │ │
269 //
│ │ │ @@ -168,16 +168,16 @@ │ │ │
379
│ │ │
380} // namespace Dune
│ │ │
381
│ │ │
382#include "virtualrefinement.cc"
│ │ │
383
│ │ │
384#endif // DUNE_GEOMETRY_VIRTUALREFINEMENT_HH
│ │ │
This file contains the virtual wrapper around refinement.
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ -
This file simply includes all Refinement implementations so you don't have to do them separately.
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ +
This file simply includes all Refinement implementations so you don't have to do them separately.
│ │ │
Definition affinegeometry.hh:22
│ │ │
VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType geometryType, GeometryType coerceTo)
return a reference to the VirtualRefinement according to the parameters
Definition virtualrefinement.cc:504
│ │ │
Holds the number of refined intervals per axis needed for virtual and static refinement.
Definition base.cc:94
│ │ │
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │
Definition virtualrefinement.cc:232
│ │ │
VirtualRefinement base class.
Definition virtualrefinement.hh:283
│ │ │
SubEntityIteratorBack< dimension > VertexIteratorBack
Definition virtualrefinement.hh:307
│ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00173.html │ │ │ @@ -87,16 +87,16 @@ │ │ │

This file contains the virtual wrapper around refinement. │ │ │ More...

│ │ │
#include <cassert>
│ │ │ #include <typeinfo>
│ │ │ #include <dune/common/exceptions.hh>
│ │ │ #include <dune/common/fvector.hh>
│ │ │ #include <dune/common/iteratorfacades.hh>
│ │ │ -#include "type.hh"
│ │ │ -#include "refinement.hh"
│ │ │ +#include "type.hh"
│ │ │ +#include "refinement.hh"
│ │ │
│ │ │

Go to the source code of this file.

│ │ │

│ │ │ Classes

class  Dune::VirtualRefinement< dimension, CoordType >
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00173_source.html │ │ │ @@ -90,16 +90,16 @@ │ │ │
14#include <cassert>
│ │ │
15#include <typeinfo>
│ │ │
16
│ │ │
17#include <dune/common/exceptions.hh>
│ │ │
18#include <dune/common/fvector.hh>
│ │ │
19#include <dune/common/iteratorfacades.hh>
│ │ │
20
│ │ │ -
21#include "type.hh"
│ │ │ -
22#include "refinement.hh"
│ │ │ +
21#include "type.hh"
│ │ │ +
22#include "refinement.hh"
│ │ │
23
│ │ │
24namespace Dune
│ │ │
25{
│ │ │
26 // //////////////////////////////////////////
│ │ │
27 //
│ │ │
28 // The virtual base class and its iterators
│ │ │
29 //
│ │ │ @@ -815,16 +815,16 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ -
This file simply includes all Refinement implementations so you don't have to do them separately.
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ +
This file simply includes all Refinement implementations so you don't have to do them separately.
│ │ │
constexpr GeometryType cube(unsigned int dim)
Returns a GeometryType representing a hypercube of dimension dim.
Definition type.hh:462
│ │ │
constexpr GeometryType prism
GeometryType representing a 3D prism.
Definition type.hh:528
│ │ │
constexpr GeometryType pyramid
GeometryType representing a 3D pyramid.
Definition type.hh:522
│ │ │
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition type.hh:453
│ │ │
Definition affinegeometry.hh:22
│ │ │
VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType geometryType, GeometryType coerceTo)
return a reference to the VirtualRefinement according to the parameters
Definition virtualrefinement.cc:504
│ │ │
Static tag representing a codimension.
Definition dimension.hh:24
│ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00176.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: typefromvertexcount.hh File Reference │ │ │ +dune-geometry: topologyfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,37 +66,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
typefromvertexcount.hh File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
topologyfactory.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/geometry/type.hh>
│ │ │ +
#include <cassert>
│ │ │ +#include <array>
│ │ │ +#include <map>
│ │ │ +#include <memory>
│ │ │ +#include <type_traits>
│ │ │ +#include <vector>
│ │ │ +#include <dune/geometry/type.hh>
│ │ │ +#include <dune/geometry/typeindex.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │

│ │ │ Classes

class  Dune::VirtualRefinementSubEntityIteratorSpecial< dimension, CoordType, dimension >
class  Dune::VirtualRefinementSubEntityIteratorSpecial< dimension, CoordType, 0 >
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

struct  Dune::TopologyFactory< Traits >
 Provide a factory over the generic topologies. More...
struct  Dune::TopologySingletonFactory< Factory >
 A wrapper for a TopologyFactory providing singleton storage. Same usage as TopologyFactory but with empty release method an internal storage. More...
│ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Functions

GeometryType Dune::geometryTypeFromVertexCount (unsigned int dim, unsigned int vertices)
 Utility function to construct the correct geometry type given the dimension and the number of vertices.
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,20 +1,28 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -typefromvertexcount.hh File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +topologyfactory.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_i_n_d_e_x_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_<_ _T_r_a_i_t_s_ _> │ │ │ │ +  Provide a factory over the generic topologies. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_<_ _F_a_c_t_o_r_y_ _> │ │ │ │ + A wrapper for a _T_o_p_o_l_o_g_y_F_a_c_t_o_r_y providing singleton storage. Same │ │ │ │ +  usage as _T_o_p_o_l_o_g_y_F_a_c_t_o_r_y but with empty release method an internal │ │ │ │ + storage. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -_G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_g_e_o_m_e_t_r_y_T_y_p_e_F_r_o_m_V_e_r_t_e_x_C_o_u_n_t (unsigned int dim, unsigned int │ │ │ │ - vertices) │ │ │ │ -  Utility function to construct the correct geometry type given the │ │ │ │ - dimension and the number of vertices. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00176_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: typefromvertexcount.hh Source File │ │ │ +dune-geometry: topologyfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,86 +66,200 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
typefromvertexcount.hh
│ │ │ +
topologyfactory.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH
│ │ │ -
6#define DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH
│ │ │ +
5#ifndef DUNE_GEOMETRY_TOPOLOGYFACTORY_HH
│ │ │ +
6#define DUNE_GEOMETRY_TOPOLOGYFACTORY_HH
│ │ │
7
│ │ │ - │ │ │ +
8#include <cassert>
│ │ │
9
│ │ │ -
10namespace Dune {
│ │ │ -
11
│ │ │ -
16 inline
│ │ │ -
│ │ │ -
17 GeometryType geometryTypeFromVertexCount(unsigned int dim, unsigned int vertices)
│ │ │ -
18 {
│ │ │ -
19 switch (dim)
│ │ │ -
20 {
│ │ │ -
21 case 0 :
│ │ │ - │ │ │ -
23 case 1 :
│ │ │ - │ │ │ -
25 case 2 :
│ │ │ -
26 switch (vertices) {
│ │ │ -
27 case 3 :
│ │ │ - │ │ │ -
29 case 4 :
│ │ │ - │ │ │ -
31 default :
│ │ │ -
32 DUNE_THROW(NotImplemented, "2d elements with " << vertices << " corners are not supported!");
│ │ │ -
33 }
│ │ │ -
34 case 3 :
│ │ │ -
35 switch (vertices) {
│ │ │ -
36 case 4 :
│ │ │ - │ │ │ -
38 case 5 :
│ │ │ - │ │ │ -
40 case 6 :
│ │ │ - │ │ │ -
42 case 8 :
│ │ │ - │ │ │ -
44 default :
│ │ │ -
45 DUNE_THROW(NotImplemented, "3d elements with " << vertices << " corners are not supported!");
│ │ │ -
46 }
│ │ │ -
47 default :
│ │ │ -
48 DUNE_THROW(NotImplemented, "geometryTypeFromVertexCount works only up to dim=3");
│ │ │ -
49 }
│ │ │ -
50 }
│ │ │ -
│ │ │ -
51
│ │ │ -
52}
│ │ │ -
53
│ │ │ -
54#endif // DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ -
constexpr GeometryType line
GeometryType representing a line.
Definition type.hh:498
│ │ │ -
constexpr GeometryType prism
GeometryType representing a 3D prism.
Definition type.hh:528
│ │ │ -
constexpr GeometryType triangle
GeometryType representing a triangle.
Definition type.hh:504
│ │ │ -
constexpr GeometryType quadrilateral
GeometryType representing a quadrilateral (a square).
Definition type.hh:510
│ │ │ -
constexpr GeometryType hexahedron
GeometryType representing a hexahedron.
Definition type.hh:534
│ │ │ -
constexpr GeometryType pyramid
GeometryType representing a 3D pyramid.
Definition type.hh:522
│ │ │ -
constexpr GeometryType tetrahedron
GeometryType representing a tetrahedron.
Definition type.hh:516
│ │ │ -
constexpr GeometryType vertex
GeometryType representing a vertex.
Definition type.hh:492
│ │ │ +
10#include <array>
│ │ │ +
11#include <map>
│ │ │ +
12#include <memory>
│ │ │ +
13#include <type_traits>
│ │ │ +
14#include <vector>
│ │ │ +
15
│ │ │ +
16#include <dune/geometry/type.hh>
│ │ │ + │ │ │ +
18
│ │ │ +
19namespace Dune
│ │ │ +
20{
│ │ │ +
21
│ │ │ +
40 template <class Traits>
│ │ │ +
│ │ │ + │ │ │ +
42 {
│ │ │ +
43 // extract types from Traits class
│ │ │ +
44 static const unsigned int dimension = Traits::dimension;
│ │ │ +
45 typedef typename Traits::Key Key;
│ │ │ +
46 typedef typename Traits::Object Object;
│ │ │ +
47 typedef typename Traits::Factory Factory;
│ │ │ +
48
│ │ │ +
│ │ │ +
50 static Object *create ( const Dune::GeometryType &gt, const Key &key )
│ │ │ +
51 {
│ │ │ +
52 return Impl::toGeometryTypeIdConstant<dimension>(gt, [&](auto id) {
│ │ │ + │ │ │ +
54 });
│ │ │ +
55 }
│ │ │ +
│ │ │ +
56
│ │ │ +
57 template< GeometryType::Id geometryId >
│ │ │ +
│ │ │ +
58 static Object *create ( const Key &key )
│ │ │ +
59 {
│ │ │ +
60 return Factory::template createObject< geometryId >( key );
│ │ │ +
61 }
│ │ │ +
│ │ │ +
62
│ │ │ +
64 template< class Topology >
│ │ │ +
│ │ │ +
65 static Object *create ( const Key &key )
│ │ │ +
66 {
│ │ │ +
67 return Factory::template createObject< Topology >( key );
│ │ │ +
68 }
│ │ │ +
│ │ │ +
69
│ │ │ +
71 static void release( Object *object ) { delete object; }
│ │ │ +
72 };
│ │ │ +
│ │ │ +
73
│ │ │ +
74
│ │ │ +
75
│ │ │ +
80 template <class Factory>
│ │ │ +
│ │ │ +
81 struct TopologySingletonFactory
│ │ │ +
82 {
│ │ │ +
83 static const unsigned int dimension = Factory::dimension;
│ │ │ +
84 typedef typename Factory::Key Key;
│ │ │ +
85 typedef const typename Factory::Object Object;
│ │ │ +
86
│ │ │ +
│ │ │ +
88 static Object *create ( const Dune::GeometryType &gt, const Key &key )
│ │ │ +
89 {
│ │ │ +
90 assert( gt.id() < numTopologies );
│ │ │ +
91 return instance().getObject( gt, key );
│ │ │ +
92 }
│ │ │ +
│ │ │ +
93
│ │ │ +
94 template< GeometryType::Id geometryId >
│ │ │ +
│ │ │ +
95 static auto create ( const Key &key )
│ │ │ +
96 -> std::enable_if_t< static_cast<GeometryType>(geometryId).dim() == dimension, Object * >
│ │ │ +
97 {
│ │ │ +
98 return instance().template getObject< geometryId >( key );
│ │ │ +
99 }
│ │ │ +
│ │ │ +
100
│ │ │ +
102 template< class Topology >
│ │ │ +
│ │ │ +
103 static auto create ( const Key &key )
│ │ │ +
104 -> std::enable_if_t< Topology::dimension == dimension, Object * >
│ │ │ +
105 {
│ │ │ +
106 return instance().template getObject< Topology >( key );
│ │ │ +
107 }
│ │ │ +
│ │ │ +
108
│ │ │ +
│ │ │ +
110 static void release ( Object *object )
│ │ │ +
111 {}
│ │ │ +
│ │ │ +
112
│ │ │ +
113 private:
│ │ │ +
114 struct ObjectDeleter
│ │ │ +
115 {
│ │ │ +
116 void operator() ( Object *ptr ) const { Factory::release( ptr ); }
│ │ │ +
117 };
│ │ │ +
118
│ │ │ +
119 static TopologySingletonFactory &instance ()
│ │ │ +
120 {
│ │ │ +
121 static TopologySingletonFactory instance;
│ │ │ +
122 return instance;
│ │ │ +
123 }
│ │ │ +
124
│ │ │ +
125 static const unsigned int numTopologies = (1 << dimension);
│ │ │ +
126 typedef std::array< std::unique_ptr< Object, ObjectDeleter >, numTopologies > Array;
│ │ │ +
127 typedef std::map< Key, Array > Storage;
│ │ │ +
128
│ │ │ +
129 TopologySingletonFactory () = default;
│ │ │ +
130
│ │ │ +
131 std::unique_ptr< Object, ObjectDeleter > &find ( const unsigned int topologyId, const Key &key )
│ │ │ +
132 {
│ │ │ +
133 return storage_[ key ][ topologyId ];
│ │ │ +
134 }
│ │ │ +
135
│ │ │ +
136 Object *getObject ( const Dune::GeometryType &gt, const Key &key )
│ │ │ +
137 {
│ │ │ +
138 auto &object = find( gt.id(), key );
│ │ │ +
139 if( !object )
│ │ │ +
140 object.reset( Factory::create( gt, key ) );
│ │ │ +
141 return object.get();
│ │ │ +
142 }
│ │ │ +
143
│ │ │ +
144 template< GeometryType::Id geometryId >
│ │ │ +
145 Object *getObject ( const Key &key )
│ │ │ +
146 {
│ │ │ +
147 static constexpr GeometryType geometry = geometryId;
│ │ │ +
148 auto &object = find( geometry.id(), key );
│ │ │ +
149 if( !object )
│ │ │ +
150 object.reset( Factory::template create< geometry >( key ) );
│ │ │ +
151 return object.get();
│ │ │ +
152 }
│ │ │ +
153
│ │ │ +
154 template< class Topology >
│ │ │ +
155 Object *getObject ( const Key &key )
│ │ │ +
156 {
│ │ │ +
157 auto &object = find( Topology::id, key );
│ │ │ +
158 if( !object )
│ │ │ +
159 object.reset( Factory::template create< Topology >( key ) );
│ │ │ +
160 return object.get();
│ │ │ +
161 }
│ │ │ +
162
│ │ │ +
163 Storage storage_;
│ │ │ +
164 };
│ │ │ +
│ │ │ +
165
│ │ │ +
166}
│ │ │ +
167
│ │ │ +
168#endif // #ifndef DUNE_GEOMETRY_TOPOLOGYFACTORY_HH
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ +
Helper classes to provide indices for geometrytypes for use in a vector.
│ │ │
Definition affinegeometry.hh:22
│ │ │ -
GeometryType geometryTypeFromVertexCount(unsigned int dim, unsigned int vertices)
Utility function to construct the correct geometry type given the dimension and the number of vertice...
Definition typefromvertexcount.hh:17
│ │ │ +
Provide a factory over the generic topologies.
Definition topologyfactory.hh:42
│ │ │ +
Traits::Factory Factory
Definition topologyfactory.hh:47
│ │ │ +
static Object * create(const Dune::GeometryType &gt, const Key &key)
dynamically create objects
Definition topologyfactory.hh:50
│ │ │ +
static const unsigned int dimension
Definition topologyfactory.hh:44
│ │ │ +
static Object * create(const Key &key)
statically create objects
Definition topologyfactory.hh:58
│ │ │ +
static void release(Object *object)
release the object returned by the create methods
Definition topologyfactory.hh:71
│ │ │ +
Traits::Key Key
Definition topologyfactory.hh:45
│ │ │ +
Traits::Object Object
Definition topologyfactory.hh:46
│ │ │ +
static auto create(const Key &key) -> std::enable_if_t< Topology::dimension==dimension, Object * >
Definition topologyfactory.hh:103
│ │ │ +
static Object * create(const Dune::GeometryType &gt, const Key &key)
Definition topologyfactory.hh:88
│ │ │ +
static void release(Object *object)
release the object returned by the create methods
Definition topologyfactory.hh:110
│ │ │ +
const Factory::Object Object
Definition topologyfactory.hh:85
│ │ │ +
Factory::Key Key
Definition topologyfactory.hh:84
│ │ │ +
static auto create(const Key &key) -> std::enable_if_t< static_cast< GeometryType >(geometryId).dim()==dimension, Object * >
Definition topologyfactory.hh:95
│ │ │ +
static const unsigned int dimension
Definition topologyfactory.hh:83
│ │ │
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ +
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:365
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,111 +1,218 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ -typefromvertexcount.hh │ │ │ │ +topologyfactory.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH │ │ │ │ -6#define DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH │ │ │ │ +5#ifndef DUNE_GEOMETRY_TOPOLOGYFACTORY_HH │ │ │ │ +6#define DUNE_GEOMETRY_TOPOLOGYFACTORY_HH │ │ │ │ 7 │ │ │ │ -8#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +8#include │ │ │ │ 9 │ │ │ │ -10namespace _D_u_n_e { │ │ │ │ -11 │ │ │ │ -16 inline │ │ │ │ -_1_7 _G_e_o_m_e_t_r_y_T_y_p_e _g_e_o_m_e_t_r_y_T_y_p_e_F_r_o_m_V_e_r_t_e_x_C_o_u_n_t(unsigned int dim, unsigned int │ │ │ │ -vertices) │ │ │ │ -18 { │ │ │ │ -19 switch (dim) │ │ │ │ -20 { │ │ │ │ -21 case 0 : │ │ │ │ -22 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x; │ │ │ │ -23 case 1 : │ │ │ │ -24 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_l_i_n_e; │ │ │ │ -25 case 2 : │ │ │ │ -26 switch (vertices) { │ │ │ │ -27 case 3 : │ │ │ │ -28 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_r_i_a_n_g_l_e; │ │ │ │ -29 case 4 : │ │ │ │ -30 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_q_u_a_d_r_i_l_a_t_e_r_a_l; │ │ │ │ -31 default : │ │ │ │ -32 DUNE_THROW(NotImplemented, "2d elements with " << vertices << " corners are │ │ │ │ -not supported!"); │ │ │ │ -33 } │ │ │ │ -34 case 3 : │ │ │ │ -35 switch (vertices) { │ │ │ │ -36 case 4 : │ │ │ │ -37 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_e_t_r_a_h_e_d_r_o_n; │ │ │ │ -38 case 5 : │ │ │ │ -39 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_y_r_a_m_i_d; │ │ │ │ -40 case 6 : │ │ │ │ -41 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m; │ │ │ │ -42 case 8 : │ │ │ │ -43 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_h_e_x_a_h_e_d_r_o_n; │ │ │ │ -44 default : │ │ │ │ -45 DUNE_THROW(NotImplemented, "3d elements with " << vertices << " corners are │ │ │ │ -not supported!"); │ │ │ │ -46 } │ │ │ │ -47 default : │ │ │ │ -48 DUNE_THROW(NotImplemented, "geometryTypeFromVertexCount works only up to │ │ │ │ -dim=3"); │ │ │ │ -49 } │ │ │ │ -50 } │ │ │ │ -51 │ │ │ │ -52} │ │ │ │ -53 │ │ │ │ -54#endif // DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13#include │ │ │ │ +14#include │ │ │ │ +15 │ │ │ │ +16#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +17#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_i_n_d_e_x_._h_h> │ │ │ │ +18 │ │ │ │ +19namespace _D_u_n_e │ │ │ │ +20{ │ │ │ │ +21 │ │ │ │ +40 template │ │ │ │ +_4_1 struct _T_o_p_o_l_o_g_y_F_a_c_t_o_r_y │ │ │ │ +42 { │ │ │ │ +43 // extract types from Traits class │ │ │ │ +_4_4 static const unsigned int _d_i_m_e_n_s_i_o_n = Traits::dimension; │ │ │ │ +_4_5 typedef typename Traits::Key _K_e_y; │ │ │ │ +_4_6 typedef typename Traits::Object _O_b_j_e_c_t; │ │ │ │ +_4_7 typedef typename Traits::Factory _F_a_c_t_o_r_y; │ │ │ │ +48 │ │ │ │ +_5_0 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e >, const _K_e_y &key ) │ │ │ │ +51 { │ │ │ │ +52 return Impl::toGeometryTypeIdConstant(gt, [&](auto id) { │ │ │ │ +53 return _c_r_e_a_t_e_<_d_e_c_l_t_y_p_e_(_i_d_)_:_:_v_a_l_u_e_>(key); │ │ │ │ +54 }); │ │ │ │ +55 } │ │ │ │ +56 │ │ │ │ +57 template< GeometryType::Id geometryId > │ │ │ │ +_5_8 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ +59 { │ │ │ │ +60 return Factory::template createObject< geometryId >( key ); │ │ │ │ +61 } │ │ │ │ +62 │ │ │ │ +64 template< class Topology > │ │ │ │ +_6_5 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ +66 { │ │ │ │ +67 return Factory::template createObject< Topology >( key ); │ │ │ │ +68 } │ │ │ │ +69 │ │ │ │ +_7_1 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ +72 }; │ │ │ │ +73 │ │ │ │ +74 │ │ │ │ +75 │ │ │ │ +80 template │ │ │ │ +_8_1 struct TopologySingletonFactory │ │ │ │ +82 { │ │ │ │ +_8_3 static const unsigned int _d_i_m_e_n_s_i_o_n = Factory::dimension; │ │ │ │ +_8_4 typedef typename Factory::Key _K_e_y; │ │ │ │ +_8_5 typedef const typename Factory::Object _O_b_j_e_c_t; │ │ │ │ +86 │ │ │ │ +_8_8 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e >, const _K_e_y &key ) │ │ │ │ +89 { │ │ │ │ +90 assert( gt._i_d() < numTopologies ); │ │ │ │ +91 return instance().getObject( gt, key ); │ │ │ │ +92 } │ │ │ │ +93 │ │ │ │ +94 template< GeometryType::Id geometryId > │ │ │ │ +_9_5 static auto _c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ +96 -> std::enable_if_t< static_cast(geometryId).dim() == │ │ │ │ +_d_i_m_e_n_s_i_o_n, _O_b_j_e_c_t * > │ │ │ │ +97 { │ │ │ │ +98 return instance().template getObject< geometryId >( key ); │ │ │ │ +99 } │ │ │ │ +100 │ │ │ │ +102 template< class Topology > │ │ │ │ +_1_0_3 static auto _c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ +104 -> std::enable_if_t< Topology::dimension == dimension, Object * > │ │ │ │ +105 { │ │ │ │ +106 return instance().template getObject< Topology >( key ); │ │ │ │ +107 } │ │ │ │ +108 │ │ │ │ +_1_1_0 static void _r_e_l_e_a_s_e ( _O_b_j_e_c_t *object ) │ │ │ │ +111 {} │ │ │ │ +112 │ │ │ │ +113 private: │ │ │ │ +114 struct ObjectDeleter │ │ │ │ +115 { │ │ │ │ +116 void operator() ( _O_b_j_e_c_t *ptr ) const { Factory::release( ptr ); } │ │ │ │ +117 }; │ │ │ │ +118 │ │ │ │ +119 static TopologySingletonFactory &instance () │ │ │ │ +120 { │ │ │ │ +121 static TopologySingletonFactory instance; │ │ │ │ +122 return instance; │ │ │ │ +123 } │ │ │ │ +124 │ │ │ │ +125 static const unsigned int numTopologies = (1 << _d_i_m_e_n_s_i_o_n); │ │ │ │ +126 typedef std::array< std::unique_ptr< Object, ObjectDeleter >, numTopologies │ │ │ │ +> Array; │ │ │ │ +127 typedef std::map< Key, Array > Storage; │ │ │ │ +128 │ │ │ │ +129 TopologySingletonFactory () = default; │ │ │ │ +130 │ │ │ │ +131 std::unique_ptr< Object, ObjectDeleter > &find ( const unsigned int │ │ │ │ +topologyId, const _K_e_y &key ) │ │ │ │ +132 { │ │ │ │ +133 return storage_[ key ][ topologyId ]; │ │ │ │ +134 } │ │ │ │ +135 │ │ │ │ +136 _O_b_j_e_c_t *getObject ( const Dune::GeometryType >, const _K_e_y &key ) │ │ │ │ +137 { │ │ │ │ +138 auto &object = find( gt._i_d(), key ); │ │ │ │ +139 if( !object ) │ │ │ │ +140 object.reset( Factory::create( gt, key ) ); │ │ │ │ +141 return object.get(); │ │ │ │ +142 } │ │ │ │ +143 │ │ │ │ +144 template< GeometryType::Id geometryId > │ │ │ │ +145 _O_b_j_e_c_t *getObject ( const _K_e_y &key ) │ │ │ │ +146 { │ │ │ │ +147 static constexpr GeometryType geometry = geometryId; │ │ │ │ +148 auto &object = find( geometry.id(), key ); │ │ │ │ +149 if( !object ) │ │ │ │ +150 object.reset( Factory::template _c_r_e_a_t_e_<_ _g_e_o_m_e_t_r_y_ _>( key ) ); │ │ │ │ +151 return object.get(); │ │ │ │ +152 } │ │ │ │ +153 │ │ │ │ +154 template< class Topology > │ │ │ │ +155 _O_b_j_e_c_t *getObject ( const _K_e_y &key ) │ │ │ │ +156 { │ │ │ │ +157 auto &object = find( Topology::id, key ); │ │ │ │ +158 if( !object ) │ │ │ │ +159 object.reset( Factory::template _c_r_e_a_t_e_<_ _T_o_p_o_l_o_g_y_ _>( key ) ); │ │ │ │ +160 return object.get(); │ │ │ │ +161 } │ │ │ │ +162 │ │ │ │ +163 Storage storage_; │ │ │ │ +164 }; │ │ │ │ +165 │ │ │ │ +166} │ │ │ │ +167 │ │ │ │ +168#endif // #ifndef DUNE_GEOMETRY_TOPOLOGYFACTORY_HH │ │ │ │ _t_y_p_e_._h_h │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_l_i_n_e │ │ │ │ -constexpr GeometryType line │ │ │ │ -GeometryType representing a line. │ │ │ │ -DDeeffiinniittiioonn type.hh:498 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m │ │ │ │ -constexpr GeometryType prism │ │ │ │ -GeometryType representing a 3D prism. │ │ │ │ -DDeeffiinniittiioonn type.hh:528 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_r_i_a_n_g_l_e │ │ │ │ -constexpr GeometryType triangle │ │ │ │ -GeometryType representing a triangle. │ │ │ │ -DDeeffiinniittiioonn type.hh:504 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_q_u_a_d_r_i_l_a_t_e_r_a_l │ │ │ │ -constexpr GeometryType quadrilateral │ │ │ │ -GeometryType representing a quadrilateral (a square). │ │ │ │ -DDeeffiinniittiioonn type.hh:510 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_h_e_x_a_h_e_d_r_o_n │ │ │ │ -constexpr GeometryType hexahedron │ │ │ │ -GeometryType representing a hexahedron. │ │ │ │ -DDeeffiinniittiioonn type.hh:534 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_y_r_a_m_i_d │ │ │ │ -constexpr GeometryType pyramid │ │ │ │ -GeometryType representing a 3D pyramid. │ │ │ │ -DDeeffiinniittiioonn type.hh:522 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_e_t_r_a_h_e_d_r_o_n │ │ │ │ -constexpr GeometryType tetrahedron │ │ │ │ -GeometryType representing a tetrahedron. │ │ │ │ -DDeeffiinniittiioonn type.hh:516 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x │ │ │ │ -constexpr GeometryType vertex │ │ │ │ -GeometryType representing a vertex. │ │ │ │ -DDeeffiinniittiioonn type.hh:492 │ │ │ │ +_t_y_p_e_i_n_d_e_x_._h_h │ │ │ │ +Helper classes to provide indices for geometrytypes for use in a vector. │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_g_e_o_m_e_t_r_y_T_y_p_e_F_r_o_m_V_e_r_t_e_x_C_o_u_n_t │ │ │ │ -GeometryType geometryTypeFromVertexCount(unsigned int dim, unsigned int │ │ │ │ -vertices) │ │ │ │ -Utility function to construct the correct geometry type given the dimension and │ │ │ │ -the number of vertice... │ │ │ │ -DDeeffiinniittiioonn typefromvertexcount.hh:17 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y │ │ │ │ +Provide a factory over the generic topologies. │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:42 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_F_a_c_t_o_r_y │ │ │ │ +Traits::Factory Factory │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:47 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ +static Object * create(const Dune::GeometryType >, const Key &key) │ │ │ │ +dynamically create objects │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:50 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ +static const unsigned int dimension │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:44 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ +static Object * create(const Key &key) │ │ │ │ +statically create objects │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:58 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ +static void release(Object *object) │ │ │ │ +release the object returned by the create methods │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:71 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ +Traits::Key Key │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:45 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ +Traits::Object Object │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:46 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ +static auto create(const Key &key) -> std::enable_if_t< Topology:: │ │ │ │ +dimension==dimension, Object * > │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:103 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ +static Object * create(const Dune::GeometryType >, const Key &key) │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:88 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ +static void release(Object *object) │ │ │ │ +release the object returned by the create methods │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:110 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ +const Factory::Object Object │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:85 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ +Factory::Key Key │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:84 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ +static auto create(const Key &key) -> std::enable_if_t< static_cast< │ │ │ │ +GeometryType >(geometryId).dim()==dimension, Object * > │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:95 │ │ │ │ +_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ +static const unsigned int dimension │ │ │ │ +DDeeffiinniittiioonn topologyfactory.hh:83 │ │ │ │ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ DDeeffiinniittiioonn type.hh:114 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_d │ │ │ │ +constexpr unsigned int id() const │ │ │ │ +Return the topology id of the type. │ │ │ │ +DDeeffiinniittiioonn type.hh:365 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00179.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: defaultmatrixhelper.hh File Reference │ │ │ +dune-geometry: referenceelement.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,33 +66,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces
│ │ │ -
defaultmatrixhelper.hh File Reference
│ │ │ +
referenceelement.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <cmath>
│ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ -#include <dune/common/fvector.hh>
│ │ │ +
#include <dune/geometry/type.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ +Classes

class  Dune::Geo::ReferenceElement< Implementation >
 This class provides access to geometric and topological properties of a reference element. More...
struct  Dune::Geo::ReferenceElement< Implementation >::Codim< codim >
 Collection of types depending on the codimension. More...
│ │ │ │ │ │ │ │ │ + │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::Geo
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,17 +1,21 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -defaultmatrixhelper.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +referenceelement.hh File Reference │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_ _> │ │ │ │ +  This class provides access to geometric and topological properties of │ │ │ │ + a reference element. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_ _> │ │ │ │ +  Collection of types depending on the codimension. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ +namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00179_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: defaultmatrixhelper.hh Source File │ │ │ +dune-geometry: referenceelement.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,450 +66,268 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
defaultmatrixhelper.hh
│ │ │ +
referenceelement.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_UTILITY_DEFAULTMATRIXHELPER_HH
│ │ │ -
6#define DUNE_GEOMETRY_UTILITY_DEFAULTMATRIXHELPER_HH
│ │ │ +
5#ifndef DUNE_GEOMETRY_REFERENCEELEMENT_HH
│ │ │ +
6#define DUNE_GEOMETRY_REFERENCEELEMENT_HH
│ │ │
7
│ │ │ -
8#include <cmath>
│ │ │ + │ │ │
9
│ │ │ -
10#include <dune/common/fmatrix.hh>
│ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ +
10namespace Dune {
│ │ │ +
11 namespace Geo {
│ │ │
12
│ │ │ -
13namespace Dune {
│ │ │ -
14namespace Impl {
│ │ │ -
15
│ │ │ -
16// FieldMatrixHelper
│ │ │ -
17// -----------------
│ │ │ +
13 namespace Impl {
│ │ │ +
14
│ │ │ +
15 // forward declaration for friend declaration
│ │ │ +
16 template<typename ctype, int dim>
│ │ │ +
17 class ReferenceElementContainer;
│ │ │
18
│ │ │ -
19template< class ct >
│ │ │ -
20struct FieldMatrixHelper
│ │ │ -
21{
│ │ │ -
22 using ctype = ct;
│ │ │ -
23
│ │ │ -
25 template< int m, int n >
│ │ │ -
26 [[ deprecated("Use A.mv(x,y) instead.") ]]
│ │ │ -
27 static void Ax ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, n > &x, FieldVector< ctype, m > &ret )
│ │ │ -
28 {
│ │ │ -
29 A.mv(x,ret);
│ │ │ -
30 }
│ │ │ +
19 }
│ │ │ +
20
│ │ │ +
21 // forward declaration for constructing default reference element type
│ │ │ +
22 template<typename ctype, int dim>
│ │ │ + │ │ │ +
24
│ │ │ +
25 // forward declaration for backwards compatibility conversion
│ │ │ +
26 template<typename ctype, int dim>
│ │ │ +
27 struct ReferenceElements;
│ │ │ +
28
│ │ │ +
29 // ReferenceElement
│ │ │ +
30 // ----------------
│ │ │
31
│ │ │ -
33 template< int m, int n >
│ │ │ -
34 [[ deprecated("Use A.mtv(x,y) instead.") ]]
│ │ │ -
35 static void ATx ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, m > &x, FieldVector< ctype, n > &ret )
│ │ │ -
36 {
│ │ │ -
37 A.mtv(x,ret);
│ │ │ -
38 }
│ │ │ -
39
│ │ │ -
41 template< int m, int n, int p >
│ │ │ -
42 [[ deprecated("Use FMatrixHelp::multMatrix(A,B,ret)") ]]
│ │ │ -
43 static void AB ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< ctype, n, p > &B, FieldMatrix< ctype, m, p > &ret )
│ │ │ -
44 {
│ │ │ -
45 FMatrixHelp::multMatrix(A,B,ret);
│ │ │ -
46 }
│ │ │ -
47
│ │ │ -
49 template< int m, int n, int p >
│ │ │ -
50 static void ATBT ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< ctype, p, m > &B, FieldMatrix< ctype, n, p > &ret )
│ │ │ -
51 {
│ │ │ -
52 for( int i = 0; i < n; ++i )
│ │ │ -
53 {
│ │ │ -
54 for( int j = 0; j < p; ++j )
│ │ │ -
55 {
│ │ │ -
56 ret[ i ][ j ] = ctype( 0 );
│ │ │ -
57 for( int k = 0; k < m; ++k )
│ │ │ -
58 ret[ i ][ j ] += A[ k ][ i ] * B[ j ][ k ];
│ │ │ -
59 }
│ │ │ -
60 }
│ │ │ -
61 }
│ │ │ -
62
│ │ │ -
64 template< int m, int n >
│ │ │ -
65 static void ATA_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, n > &ret )
│ │ │ -
66 {
│ │ │ -
67 for( int i = 0; i < n; ++i )
│ │ │ -
68 {
│ │ │ -
69 for( int j = 0; j <= i; ++j )
│ │ │ -
70 {
│ │ │ -
71 ret[ i ][ j ] = ctype( 0 );
│ │ │ -
72 for( int k = 0; k < m; ++k )
│ │ │ -
73 ret[ i ][ j ] += A[ k ][ i ] * A[ k ][ j ];
│ │ │ -
74 }
│ │ │ -
75 }
│ │ │ -
76 }
│ │ │ -
77
│ │ │ -
79 template< int m, int n >
│ │ │ -
80 [[ deprecated("Use FMatrixHelp::multTransposedMatrix(A,ret)") ]]
│ │ │ -
81 static void ATA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, n > &ret )
│ │ │ -
82 {
│ │ │ -
83 return FMatrixHelp::multTransposedMatrix(A,ret);
│ │ │ -
84 }
│ │ │ +
50 template<typename Implementation>
│ │ │ +
│ │ │ + │ │ │ +
52 {
│ │ │ +
53
│ │ │ +
54 public:
│ │ │ +
55
│ │ │ +
56#ifndef DOXYGEN
│ │ │ +
57
│ │ │ +
59 template<int codim>
│ │ │ +
60 using Codim = typename Implementation::template Codim<codim>;
│ │ │ +
61
│ │ │ +
62#else
│ │ │ +
63
│ │ │ +
65 template< int codim >
│ │ │ +
│ │ │ +
66 struct Codim
│ │ │ +
67 {
│ │ │ +
69 using Geometry = implementation-defined;
│ │ │ +
70 };
│ │ │ +
│ │ │ +
71
│ │ │ +
72#endif // DOXYGEN
│ │ │ +
73
│ │ │ +
75 using ctype = typename Implementation::ctype;
│ │ │ +
76
│ │ │ + │ │ │ +
79
│ │ │ +
81 using Coordinate = typename Implementation::Coordinate;
│ │ │ +
82
│ │ │ +
84 typedef ctype Volume;
│ │ │
85
│ │ │ -
87 template< int m, int n >
│ │ │ -
88 static void AAT_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, m, m > &ret )
│ │ │ -
89 {
│ │ │ -
90 for( int i = 0; i < m; ++i )
│ │ │ -
91 {
│ │ │ -
92 for( int j = 0; j <= i; ++j )
│ │ │ -
93 {
│ │ │ -
94 ctype &retij = ret[ i ][ j ];
│ │ │ -
95 retij = A[ i ][ 0 ] * A[ j ][ 0 ];
│ │ │ -
96 for( int k = 1; k < n; ++k )
│ │ │ -
97 retij += A[ i ][ k ] * A[ j ][ k ];
│ │ │ -
98 }
│ │ │ -
99 }
│ │ │ -
100 }
│ │ │ -
101
│ │ │ -
103 template< int m, int n >
│ │ │ -
104 static void AAT ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, m, m > &ret )
│ │ │ -
105 {
│ │ │ -
106 for( int i = 0; i < m; ++i )
│ │ │ -
107 {
│ │ │ -
108 for( int j = 0; j < i; ++j )
│ │ │ -
109 {
│ │ │ -
110 ret[ i ][ j ] = ctype( 0 );
│ │ │ -
111 for( int k = 0; k < n; ++k )
│ │ │ -
112 ret[ i ][ j ] += A[ i ][ k ] * A[ j ][ k ];
│ │ │ -
113 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ +
87 static constexpr int dimension = Implementation::dimension;
│ │ │ +
88
│ │ │ +
89
│ │ │ +
│ │ │ +
94 int size(int c) const
│ │ │ +
95 {
│ │ │ +
96 return _impl->size(c);
│ │ │ +
97 }
│ │ │ +
│ │ │ +
98
│ │ │ +
99
│ │ │ +
│ │ │ +
111 int size(int i, int c, int cc) const
│ │ │ +
112 {
│ │ │ +
113 return _impl->size(i,c,cc);
│ │ │
114 }
│ │ │ -
115 ret[ i ][ i ] = ctype( 0 );
│ │ │ -
116 for( int k = 0; k < n; ++k )
│ │ │ -
117 ret[ i ][ i ] += A[ i ][ k ] * A[ i ][ k ];
│ │ │ -
118 }
│ │ │ -
119 }
│ │ │ -
120
│ │ │ -
122 // [[ expects: L is lower triangular ]]
│ │ │ -
123 template< int n >
│ │ │ -
124 static void Lx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< ctype, n > &x, FieldVector< ctype, n > &ret )
│ │ │ -
125 {
│ │ │ -
126 for( int i = 0; i < n; ++i )
│ │ │ -
127 {
│ │ │ -
128 ret[ i ] = ctype( 0 );
│ │ │ -
129 for( int j = 0; j <= i; ++j )
│ │ │ -
130 ret[ i ] += L[ i ][ j ] * x[ j ];
│ │ │ -
131 }
│ │ │ -
132 }
│ │ │ -
133
│ │ │ -
135 // [[ expects: L is lower triangular ]]
│ │ │ -
136 template< int n >
│ │ │ -
137 static void LTx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< ctype, n > &x, FieldVector< ctype, n > &ret )
│ │ │ -
138 {
│ │ │ -
139 for( int i = 0; i < n; ++i )
│ │ │ -
140 {
│ │ │ -
141 ret[ i ] = ctype( 0 );
│ │ │ -
142 for( int j = i; j < n; ++j )
│ │ │ -
143 ret[ i ] += L[ j ][ i ] * x[ j ];
│ │ │ -
144 }
│ │ │ -
145 }
│ │ │ -
146
│ │ │ -
148 // [[ expects: L is lower triangular ]]
│ │ │ -
149 template< int n >
│ │ │ -
150 static void LTL ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, n, n > &ret )
│ │ │ -
151 {
│ │ │ -
152 for( int i = 0; i < n; ++i )
│ │ │ -
153 {
│ │ │ -
154 for( int j = 0; j < i; ++j )
│ │ │ -
155 {
│ │ │ -
156 ret[ i ][ j ] = ctype( 0 );
│ │ │ -
157 for( int k = i; k < n; ++k )
│ │ │ -
158 ret[ i ][ j ] += L[ k ][ i ] * L[ k ][ j ];
│ │ │ -
159 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ -
160 }
│ │ │ -
161 ret[ i ][ i ] = ctype( 0 );
│ │ │ -
162 for( int k = i; k < n; ++k )
│ │ │ -
163 ret[ i ][ i ] += L[ k ][ i ] * L[ k ][ i ];
│ │ │ -
164 }
│ │ │ -
165 }
│ │ │ -
166
│ │ │ -
168 // [[ expects: L is lower triangular ]]
│ │ │ -
169 template< int n >
│ │ │ -
170 static void LLT ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, n, n > &ret )
│ │ │ -
171 {
│ │ │ -
172 for( int i = 0; i < n; ++i )
│ │ │ -
173 {
│ │ │ -
174 for( int j = 0; j < i; ++j )
│ │ │ -
175 {
│ │ │ -
176 ret[ i ][ j ] = ctype( 0 );
│ │ │ -
177 for( int k = 0; k <= j; ++k )
│ │ │ -
178 ret[ i ][ j ] += L[ i ][ k ] * L[ j ][ k ];
│ │ │ -
179 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ -
180 }
│ │ │ -
181 ret[ i ][ i ] = ctype( 0 );
│ │ │ -
182 for( int k = 0; k <= i; ++k )
│ │ │ -
183 ret[ i ][ i ] += L[ i ][ k ] * L[ i ][ k ];
│ │ │ -
184 }
│ │ │ -
185 }
│ │ │ -
186
│ │ │ -
189 // [[ expects: A is spd ]]
│ │ │ -
190 template< int n >
│ │ │ -
191 static bool cholesky_L ( const FieldMatrix< ctype, n, n > &A, FieldMatrix< ctype, n, n > &ret, const bool checkSingular = false )
│ │ │ -
192 {
│ │ │ -
193 using std::sqrt;
│ │ │ -
194 for( int i = 0; i < n; ++i )
│ │ │ -
195 {
│ │ │ -
196 ctype &rii = ret[ i ][ i ];
│ │ │ -
197
│ │ │ -
198 ctype xDiag = A[ i ][ i ];
│ │ │ -
199 for( int j = 0; j < i; ++j )
│ │ │ -
200 xDiag -= ret[ i ][ j ] * ret[ i ][ j ];
│ │ │ -
201
│ │ │ -
202 // in some cases A can be singular, e.g. when checking local for
│ │ │ -
203 // outside points during checkInside
│ │ │ -
204 if( checkSingular && ! ( xDiag > ctype( 0 )) )
│ │ │ -
205 return false ;
│ │ │ -
206
│ │ │ -
207 // otherwise this should be true always
│ │ │ -
208 assert( xDiag > ctype( 0 ) );
│ │ │ -
209 rii = sqrt( xDiag );
│ │ │ -
210
│ │ │ -
211 ctype invrii = ctype( 1 ) / rii;
│ │ │ -
212 for( int k = i+1; k < n; ++k )
│ │ │ -
213 {
│ │ │ -
214 ctype x = A[ k ][ i ];
│ │ │ -
215 for( int j = 0; j < i; ++j )
│ │ │ -
216 x -= ret[ i ][ j ] * ret[ k ][ j ];
│ │ │ -
217 ret[ k ][ i ] = invrii * x;
│ │ │ -
218 }
│ │ │ -
219 }
│ │ │ -
220
│ │ │ -
221 // return true for meaning A is non-singular
│ │ │ -
222 return true;
│ │ │ -
223 }
│ │ │ -
224
│ │ │ -
226 // [[ expects: L is lower triangular ]]
│ │ │ -
227 template< int n >
│ │ │ -
228 static ctype detL ( const FieldMatrix< ctype, n, n > &L )
│ │ │ -
229 {
│ │ │ -
230 ctype det( 1 );
│ │ │ -
231 for( int i = 0; i < n; ++i )
│ │ │ -
232 det *= L[ i ][ i ];
│ │ │ -
233 return det;
│ │ │ -
234 }
│ │ │ -
235
│ │ │ -
237 // [[ expects: L is lower triangular ]]
│ │ │ -
238 template< int n >
│ │ │ -
239 static ctype invL ( FieldMatrix< ctype, n, n > &L )
│ │ │ -
240 {
│ │ │ -
241 ctype det( 1 );
│ │ │ -
242 for( int i = 0; i < n; ++i )
│ │ │ -
243 {
│ │ │ -
244 ctype &lii = L[ i ][ i ];
│ │ │ -
245 det *= lii;
│ │ │ -
246 lii = ctype( 1 ) / lii;
│ │ │ -
247 for( int j = 0; j < i; ++j )
│ │ │ -
248 {
│ │ │ -
249 ctype &lij = L[ i ][ j ];
│ │ │ -
250 ctype x = lij * L[ j ][ j ];
│ │ │ -
251 for( int k = j+1; k < i; ++k )
│ │ │ -
252 x += L[ i ][ k ] * L[ k ][ j ];
│ │ │ -
253 lij = (-lii) * x;
│ │ │ -
254 }
│ │ │ -
255 }
│ │ │ -
256 return det;
│ │ │ -
257 }
│ │ │ -
258
│ │ │ -
260 // [[ expects: L is lower triangular ]]
│ │ │ -
261 template< int n >
│ │ │ -
262 static void invLx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > &x )
│ │ │ -
263 {
│ │ │ -
264 for( int i = 0; i < n; ++i )
│ │ │ -
265 {
│ │ │ -
266 for( int j = 0; j < i; ++j )
│ │ │ -
267 x[ i ] -= L[ i ][ j ] * x[ j ];
│ │ │ -
268 x[ i ] /= L[ i ][ i ];
│ │ │ -
269 }
│ │ │ -
270 }
│ │ │ -
271
│ │ │ -
273 // [[ expects: L is lower triangular ]]
│ │ │ -
274 template< int n >
│ │ │ -
275 static void invLTx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > &x )
│ │ │ -
276 {
│ │ │ -
277 for( int i = n; i > 0; --i )
│ │ │ -
278 {
│ │ │ -
279 for( int j = i; j < n; ++j )
│ │ │ -
280 x[ i-1 ] -= L[ j ][ i-1 ] * x[ j ];
│ │ │ -
281 x[ i-1 ] /= L[ i-1 ][ i-1 ];
│ │ │ -
282 }
│ │ │ -
283 }
│ │ │ -
284
│ │ │ -
286 // [[ expects: A is spd ]]
│ │ │ -
287 template< int n >
│ │ │ -
288 static ctype spdDetA ( const FieldMatrix< ctype, n, n > &A )
│ │ │ -
289 {
│ │ │ -
290 FieldMatrix< ctype, n, n > L;
│ │ │ -
291 cholesky_L( A, L );
│ │ │ -
292 return detL( L );
│ │ │ -
293 }
│ │ │ -
294
│ │ │ -
296 // [[ expects: A is spd ]]
│ │ │ -
297 template< int n >
│ │ │ -
298 static ctype spdInvA ( FieldMatrix< ctype, n, n > &A )
│ │ │ -
299 {
│ │ │ -
300 FieldMatrix< ctype, n, n > L;
│ │ │ -
301 cholesky_L( A, L );
│ │ │ -
302 const ctype det = invL( L );
│ │ │ -
303 LTL( L, A );
│ │ │ -
304 return det;
│ │ │ -
305 }
│ │ │ -
306
│ │ │ -
308 // [[ expects: A is spd ]]
│ │ │ -
309 template< int n >
│ │ │ -
310 static bool spdInvAx ( FieldMatrix< ctype, n, n > &A, FieldVector< ctype, n > &x, const bool checkSingular = false )
│ │ │ -
311 {
│ │ │ -
312 FieldMatrix< ctype, n, n > L;
│ │ │ -
313 const bool invertible = cholesky_L( A, L, checkSingular );
│ │ │ -
314 if( ! invertible ) return invertible ;
│ │ │ -
315 invLx( L, x );
│ │ │ -
316 invLTx( L, x );
│ │ │ -
317 return invertible;
│ │ │ -
318 }
│ │ │ -
319
│ │ │ -
321 template< int m, int n >
│ │ │ -
322 static ctype detATA ( const FieldMatrix< ctype, m, n > &A )
│ │ │ -
323 {
│ │ │ -
324 if constexpr( m >= n )
│ │ │ -
325 {
│ │ │ -
326 FieldMatrix< ctype, n, n > ata;
│ │ │ -
327 ATA_L( A, ata );
│ │ │ -
328 return spdDetA( ata );
│ │ │ -
329 }
│ │ │ -
330 else
│ │ │ -
331 return ctype( 0 );
│ │ │ -
332 }
│ │ │ -
333
│ │ │ -
339 template< int m, int n >
│ │ │ -
340 static ctype sqrtDetAAT ( const FieldMatrix< ctype, m, n > &A )
│ │ │ -
341 {
│ │ │ -
342 using std::abs;
│ │ │ -
343 using std::sqrt;
│ │ │ -
344 // These special cases are here not only for speed reasons:
│ │ │ -
345 // The general implementation aborts if the matrix is almost singular,
│ │ │ -
346 // and the special implementation provide a stable way to handle that case.
│ │ │ -
347 if constexpr( (n == 2) && (m == 2) )
│ │ │ -
348 {
│ │ │ -
349 // Special implementation for 2x2 matrices: faster and more stable
│ │ │ -
350 return abs( A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ] );
│ │ │ -
351 }
│ │ │ -
352 else if constexpr( (n == 3) && (m == 3) )
│ │ │ -
353 {
│ │ │ -
354 // Special implementation for 3x3 matrices
│ │ │ -
355 const ctype v0 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 1 ][ 1 ] * A[ 0 ][ 2 ];
│ │ │ -
356 const ctype v1 = A[ 0 ][ 2 ] * A[ 1 ][ 0 ] - A[ 1 ][ 2 ] * A[ 0 ][ 0 ];
│ │ │ -
357 const ctype v2 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 1 ][ 0 ] * A[ 0 ][ 1 ];
│ │ │ -
358 return abs( v0 * A[ 2 ][ 0 ] + v1 * A[ 2 ][ 1 ] + v2 * A[ 2 ][ 2 ] );
│ │ │ -
359 }
│ │ │ -
360 else if constexpr( (n == 3) && (m == 2) )
│ │ │ -
361 {
│ │ │ -
362 // Special implementation for 2x3 matrices
│ │ │ -
363 const ctype v0 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 0 ][ 1 ] * A[ 1 ][ 0 ];
│ │ │ -
364 const ctype v1 = A[ 0 ][ 0 ] * A[ 1 ][ 2 ] - A[ 1 ][ 0 ] * A[ 0 ][ 2 ];
│ │ │ -
365 const ctype v2 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 0 ][ 2 ] * A[ 1 ][ 1 ];
│ │ │ -
366 return sqrt( v0*v0 + v1*v1 + v2*v2);
│ │ │ -
367 }
│ │ │ -
368 else if constexpr( n >= m )
│ │ │ -
369 {
│ │ │ -
370 // General case
│ │ │ -
371 FieldMatrix< ctype, m, m > aat;
│ │ │ -
372 AAT_L( A, aat );
│ │ │ -
373 return spdDetA( aat );
│ │ │ -
374 }
│ │ │ -
375 else
│ │ │ -
376 return ctype( 0 );
│ │ │ -
377 }
│ │ │ -
378
│ │ │ -
380 // => A^{-1}_L A = I
│ │ │ -
381 template< int m, int n >
│ │ │ -
382 static ctype leftInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, m > &ret )
│ │ │ -
383 {
│ │ │ -
384 using std::abs;
│ │ │ -
385 if constexpr( (n == 2) && (m == 2) )
│ │ │ -
386 {
│ │ │ -
387 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]);
│ │ │ -
388 const ctype detInv = ctype( 1 ) / det;
│ │ │ -
389 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv;
│ │ │ -
390 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv;
│ │ │ -
391 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv;
│ │ │ -
392 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv;
│ │ │ -
393 return abs( det );
│ │ │ -
394 }
│ │ │ -
395 else
│ │ │ -
396 {
│ │ │ -
397 FieldMatrix< ctype, n, n > ata;
│ │ │ -
398 ATA_L( A, ata );
│ │ │ -
399 const ctype det = spdInvA( ata );
│ │ │ -
400 ATBT( ata, A, ret );
│ │ │ -
401 return det;
│ │ │ -
402 }
│ │ │ -
403 }
│ │ │ -
404
│ │ │ -
406 template< int m, int n >
│ │ │ -
407 static bool leftInvAx ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, m > &x, FieldVector< ctype, n > &y )
│ │ │ -
408 {
│ │ │ -
409 static_assert((m >= n), "Matrix has no left inverse.");
│ │ │ -
410 FieldMatrix< ctype, n, n > ata;
│ │ │ -
411 A.mtv(x, y);
│ │ │ -
412 ATA_L( A, ata );
│ │ │ -
413 return spdInvAx( ata, y, true );
│ │ │ -
414 }
│ │ │ -
415
│ │ │ -
417 template< int m, int n >
│ │ │ -
418 static ctype rightInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, m > &ret )
│ │ │ -
419 {
│ │ │ -
420 static_assert((n >= m), "Matrix has no right inverse.");
│ │ │ -
421 using std::abs;
│ │ │ -
422 if constexpr( (n == 2) && (m == 2) )
│ │ │ -
423 {
│ │ │ -
424 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]);
│ │ │ -
425 const ctype detInv = ctype( 1 ) / det;
│ │ │ -
426 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv;
│ │ │ -
427 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv;
│ │ │ -
428 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv;
│ │ │ -
429 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv;
│ │ │ -
430 return abs( det );
│ │ │ -
431 }
│ │ │ -
432 else
│ │ │ -
433 {
│ │ │ -
434 FieldMatrix< ctype, m , m > aat;
│ │ │ -
435 AAT_L( A, aat );
│ │ │ -
436 const ctype det = spdInvA( aat );
│ │ │ -
437 ATBT( A , aat , ret );
│ │ │ -
438 return det;
│ │ │ -
439 }
│ │ │ -
440 }
│ │ │ -
441
│ │ │ -
443 template< int m, int n >
│ │ │ -
444 static bool xTRightInvA ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, n > &x, FieldVector< ctype, m > &y )
│ │ │ -
445 {
│ │ │ -
446 static_assert((n >= m), "Matrix has no right inverse.");
│ │ │ -
447 FieldMatrix< ctype, m, m > aat;
│ │ │ -
448 A.mv(x, y);
│ │ │ -
449 AAT_L( A, aat );
│ │ │ -
450 // check whether aat is singular and return true if non-singular
│ │ │ -
451 return spdInvAx( aat, y, true );
│ │ │ -
452 }
│ │ │ -
453};
│ │ │ -
454
│ │ │ -
455} // namespace Impl
│ │ │ -
456} // namespace Dune
│ │ │ -
457
│ │ │ -
458#endif // DUNE_GEOMETRY_UTILITY_DEFAULTMATRIXHELPER_HH
│ │ │ +
│ │ │ +
115
│ │ │ +
116
│ │ │ +
│ │ │ +
130 int subEntity(int i, int c, int ii, int cc) const
│ │ │ +
131 {
│ │ │ +
132 return _impl->subEntity(i,c,ii,cc);
│ │ │ +
133 }
│ │ │ +
│ │ │ +
134
│ │ │ +
│ │ │ +
153 auto subEntities ( int i, int c, int cc ) const
│ │ │ +
154 {
│ │ │ +
155 return _impl->subEntities(i,c,cc);
│ │ │ +
156 }
│ │ │ +
│ │ │ +
157
│ │ │ +
158
│ │ │ +
│ │ │ +
167 GeometryType type(int i, int c) const
│ │ │ +
168 {
│ │ │ +
169 return _impl->type(i,c);
│ │ │ +
170 }
│ │ │ +
│ │ │ +
171
│ │ │ +
172
│ │ │ +
│ │ │ + │ │ │ +
176 {
│ │ │ +
177 return _impl->type();
│ │ │ +
178 }
│ │ │ +
│ │ │ +
179
│ │ │ +
180
│ │ │ +
│ │ │ +
190 Coordinate position(int i, int c) const
│ │ │ +
191 {
│ │ │ +
192 return _impl->position(i,c);
│ │ │ +
193 }
│ │ │ +
│ │ │ +
194
│ │ │ +
195
│ │ │ +
│ │ │ +
203 bool checkInside(const Coordinate& local) const
│ │ │ +
204 {
│ │ │ +
205 return _impl->checkInside(local);
│ │ │ +
206 }
│ │ │ +
│ │ │ +
207
│ │ │ +
208
│ │ │ +
220 template<int codim>
│ │ │ +
│ │ │ +
221 typename Codim<codim>::Geometry geometry(int i) const
│ │ │ +
222 {
│ │ │ +
223 return _impl->template geometry<codim>(i);
│ │ │ +
224 }
│ │ │ +
│ │ │ +
225
│ │ │ +
226
│ │ │ +
│ │ │ + │ │ │ +
229 {
│ │ │ +
230 return _impl->volume();
│ │ │ +
231 }
│ │ │ +
│ │ │ +
232
│ │ │ +
233
│ │ │ +
│ │ │ + │ │ │ +
242 {
│ │ │ +
243 return _impl->integrationOuterNormal(face);
│ │ │ +
244 }
│ │ │ +
│ │ │ +
245
│ │ │ +
246
│ │ │ +
│ │ │ + │ │ │ +
255 : _impl(nullptr)
│ │ │ +
256 {}
│ │ │ +
│ │ │ +
257
│ │ │ +
│ │ │ +
263 const Implementation& impl() const
│ │ │ +
264 {
│ │ │ +
265 return *_impl;
│ │ │ +
266 }
│ │ │ +
│ │ │ +
267
│ │ │ +
│ │ │ +
269 bool operator==(const ReferenceElement& r) const
│ │ │ +
270 {
│ │ │ +
271 return _impl == r._impl;
│ │ │ +
272 }
│ │ │ +
│ │ │ +
273
│ │ │ +
│ │ │ +
275 bool operator!=(const ReferenceElement& r) const
│ │ │ +
276 {
│ │ │ +
277 return not (*this == r);
│ │ │ +
278 }
│ │ │ +
│ │ │ +
279
│ │ │ +
│ │ │ +
281 friend std::size_t hash_value(const ReferenceElement& r)
│ │ │ +
282 {
│ │ │ +
283 return reinterpret_cast<std::size_t>(r._impl);
│ │ │ +
284 }
│ │ │ +
│ │ │ +
285
│ │ │ +
286 private:
│ │ │ +
287
│ │ │ +
288 // The implementation must be a friend to construct a wrapper around itself.
│ │ │ +
289 friend Implementation;
│ │ │ +
290
│ │ │ +
291 // The reference container is a friend to be able to call setImplementation.
│ │ │ +
292 friend class Impl::ReferenceElementContainer<ctype,dimension>;
│ │ │ +
293
│ │ │ +
294 // Constructor for wrapping an implementation reference (required internally by the default implementation)
│ │ │ +
295 ReferenceElement(const Implementation& impl)
│ │ │ +
296 : _impl(&impl)
│ │ │ +
297 {}
│ │ │ +
298
│ │ │ +
299 void setImplementation(const Implementation& impl)
│ │ │ +
300 {
│ │ │ +
301 _impl = &impl;
│ │ │ +
302 }
│ │ │ +
303
│ │ │ +
304 const Implementation* _impl;
│ │ │ +
305
│ │ │ +
306 };
│ │ │ +
│ │ │ +
307
│ │ │ +
308 }
│ │ │ +
309
│ │ │ +
310}
│ │ │ +
311
│ │ │ +
312
│ │ │ +
313#endif // DUNE_GEOMETRY_REFERENCEELEMENT_HH
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │
Definition affinegeometry.hh:22
│ │ │ +
Definition affinegeometry.hh:28
│ │ │ +
CoordinateField volume() const
obtain the volume of the reference element
Definition referenceelement.hh:228
│ │ │ +
GeometryType type(int i, int c) const
obtain the type of subentity (i,c)
Definition referenceelement.hh:167
│ │ │ +
ReferenceElement()
Constructs an empty reference element.
Definition referenceelement.hh:254
│ │ │ +
bool operator!=(const ReferenceElement &r) const
Compares for inequality with another reference element.
Definition referenceelement.hh:275
│ │ │ +
Coordinate position(int i, int c) const
position of the barycenter of entity (i,c)
Definition referenceelement.hh:190
│ │ │ +
typename Geo::ReferenceElementImplementation< ctype, mydimension >::Coordinate Coordinate
Definition referenceelement.hh:81
│ │ │ +
Codim< codim >::Geometry geometry(int i) const
obtain the embedding of subentity (i,codim) into the reference element
Definition referenceelement.hh:221
│ │ │ + │ │ │ +
int size(int i, int c, int cc) const
number of subentities of codimension cc of subentity (i,c)
Definition referenceelement.hh:111
│ │ │ +
int subEntity(int i, int c, int ii, int cc) const
obtain number of ii-th subentity with codim cc of (i,c)
Definition referenceelement.hh:130
│ │ │ +
typename Geo::ReferenceElementImplementation< ctype, mydimension >::ctype ctype
Definition referenceelement.hh:75
│ │ │ +
int size(int c) const
number of subentities of codimension c
Definition referenceelement.hh:94
│ │ │ +
GeometryType type() const
obtain the type of this reference element
Definition referenceelement.hh:175
│ │ │ +
const Implementation & impl() const
Returns a reference to the internal implementation object.
Definition referenceelement.hh:263
│ │ │ +
bool checkInside(const Coordinate &local) const
check if a coordinate is in the reference element
Definition referenceelement.hh:203
│ │ │ +
Coordinate integrationOuterNormal(int face) const
obtain the integration outer normal of the reference element
Definition referenceelement.hh:241
│ │ │ + │ │ │ +
bool operator==(const ReferenceElement &r) const
Compares for equality with another reference element.
Definition referenceelement.hh:269
│ │ │ +
friend std::size_t hash_value(const ReferenceElement &r)
Yields a hash value suitable for storing the reference element a in hash table.
Definition referenceelement.hh:281
│ │ │ +
auto subEntities(int i, int c, int cc) const
Obtain the range of numbers of subentities with codim cc of (i,c).
Definition referenceelement.hh:153
│ │ │ + │ │ │ +
Definition affinegeometry.hh:34
│ │ │ +
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │ +
Collection of types depending on the codimension.
Definition referenceelement.hh:67
│ │ │ +
implementation-defined Geometry
type of geometry embedding a subentity into the reference element
Definition referenceelement.hh:69
│ │ │ +
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,461 +1,301 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ -defaultmatrixhelper.hh │ │ │ │ +referenceelement.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_UTILITY_DEFAULTMATRIXHELPER_HH │ │ │ │ -6#define DUNE_GEOMETRY_UTILITY_DEFAULTMATRIXHELPER_HH │ │ │ │ +5#ifndef DUNE_GEOMETRY_REFERENCEELEMENT_HH │ │ │ │ +6#define DUNE_GEOMETRY_REFERENCEELEMENT_HH │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ +8#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ 9 │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ +10namespace _D_u_n_e { │ │ │ │ +11 namespace _G_e_o { │ │ │ │ 12 │ │ │ │ -13namespace _D_u_n_e { │ │ │ │ -14namespace Impl { │ │ │ │ -15 │ │ │ │ -16// FieldMatrixHelper │ │ │ │ -17// ----------------- │ │ │ │ +13 namespace Impl { │ │ │ │ +14 │ │ │ │ +15 // forward declaration for friend declaration │ │ │ │ +16 template │ │ │ │ +17 class ReferenceElementContainer; │ │ │ │ 18 │ │ │ │ -19template< class ct > │ │ │ │ -20struct FieldMatrixHelper │ │ │ │ -21{ │ │ │ │ -22 using ctype = ct; │ │ │ │ -23 │ │ │ │ -25 template< int m, int n > │ │ │ │ -26 [[ deprecated("Use A.mv(x,y) instead.") ]] │ │ │ │ -27 static void Ax ( const FieldMatrix< ctype, m, n > &A, const FieldVector< │ │ │ │ -ctype, n > &x, FieldVector< ctype, m > &ret ) │ │ │ │ -28 { │ │ │ │ -29 A.mv(x,ret); │ │ │ │ -30 } │ │ │ │ +19 } │ │ │ │ +20 │ │ │ │ +21 // forward declaration for constructing default reference element type │ │ │ │ +22 template │ │ │ │ +23 class _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n; │ │ │ │ +24 │ │ │ │ +25 // forward declaration for backwards compatibility conversion │ │ │ │ +26 template │ │ │ │ +27 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ +28 │ │ │ │ +29 // ReferenceElement │ │ │ │ +30 // ---------------- │ │ │ │ 31 │ │ │ │ -33 template< int m, int n > │ │ │ │ -34 [[ deprecated("Use A.mtv(x,y) instead.") ]] │ │ │ │ -35 static void ATx ( const FieldMatrix< ctype, m, n > &A, const FieldVector< │ │ │ │ -ctype, m > &x, FieldVector< ctype, n > &ret ) │ │ │ │ -36 { │ │ │ │ -37 A.mtv(x,ret); │ │ │ │ -38 } │ │ │ │ -39 │ │ │ │ -41 template< int m, int n, int p > │ │ │ │ -42 [[ deprecated("Use FMatrixHelp::multMatrix(A,B,ret)") ]] │ │ │ │ -43 static void AB ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< │ │ │ │ -ctype, n, p > &B, FieldMatrix< ctype, m, p > &ret ) │ │ │ │ -44 { │ │ │ │ -45 FMatrixHelp::multMatrix(A,B,ret); │ │ │ │ -46 } │ │ │ │ -47 │ │ │ │ -49 template< int m, int n, int p > │ │ │ │ -50 static void ATBT ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< │ │ │ │ -ctype, p, m > &B, FieldMatrix< ctype, n, p > &ret ) │ │ │ │ -51 { │ │ │ │ -52 for( int i = 0; i < n; ++i ) │ │ │ │ -53 { │ │ │ │ -54 for( int j = 0; j < p; ++j ) │ │ │ │ -55 { │ │ │ │ -56 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ -57 for( int k = 0; k < m; ++k ) │ │ │ │ -58 ret[ i ][ j ] += A[ k ][ i ] * B[ j ][ k ]; │ │ │ │ -59 } │ │ │ │ -60 } │ │ │ │ -61 } │ │ │ │ -62 │ │ │ │ -64 template< int m, int n > │ │ │ │ -65 static void ATA_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, │ │ │ │ -n, n > &ret ) │ │ │ │ -66 { │ │ │ │ -67 for( int i = 0; i < n; ++i ) │ │ │ │ -68 { │ │ │ │ -69 for( int j = 0; j <= i; ++j ) │ │ │ │ -70 { │ │ │ │ -71 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ -72 for( int k = 0; k < m; ++k ) │ │ │ │ -73 ret[ i ][ j ] += A[ k ][ i ] * A[ k ][ j ]; │ │ │ │ -74 } │ │ │ │ -75 } │ │ │ │ -76 } │ │ │ │ -77 │ │ │ │ -79 template< int m, int n > │ │ │ │ -80 [[ deprecated("Use FMatrixHelp::multTransposedMatrix(A,ret)") ]] │ │ │ │ -81 static void ATA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, │ │ │ │ -n, n > &ret ) │ │ │ │ -82 { │ │ │ │ -83 return FMatrixHelp::multTransposedMatrix(A,ret); │ │ │ │ -84 } │ │ │ │ +50 template │ │ │ │ +_5_1 class _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +52 { │ │ │ │ +53 │ │ │ │ +54 public: │ │ │ │ +55 │ │ │ │ +56#ifndef DOXYGEN │ │ │ │ +57 │ │ │ │ +59 template │ │ │ │ +60 using _C_o_d_i_m = typename Implementation::template _C_o_d_i_m_<_c_o_d_i_m_>; │ │ │ │ +61 │ │ │ │ +62#else │ │ │ │ +63 │ │ │ │ +65 template< int codim > │ │ │ │ +_6_6 struct _C_o_d_i_m │ │ │ │ +67 { │ │ │ │ +_6_9 using _G_e_o_m_e_t_r_y = implementation-defined; │ │ │ │ +70 }; │ │ │ │ +71 │ │ │ │ +72#endif // DOXYGEN │ │ │ │ +73 │ │ │ │ +_7_5 using _c_t_y_p_e = typename Implementation::ctype; │ │ │ │ +76 │ │ │ │ +_7_8 using _C_o_o_r_d_i_n_a_t_e_F_i_e_l_d = _c_t_y_p_e; │ │ │ │ +79 │ │ │ │ +_8_1 using _C_o_o_r_d_i_n_a_t_e = typename Implementation::Coordinate; │ │ │ │ +82 │ │ │ │ +_8_4 typedef _c_t_y_p_e _V_o_l_u_m_e; │ │ │ │ 85 │ │ │ │ -87 template< int m, int n > │ │ │ │ -88 static void AAT_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, │ │ │ │ -m, m > &ret ) │ │ │ │ -89 { │ │ │ │ -90 for( int i = 0; i < m; ++i ) │ │ │ │ -91 { │ │ │ │ -92 for( int j = 0; j <= i; ++j ) │ │ │ │ -93 { │ │ │ │ -94 ctype &retij = ret[ i ][ j ]; │ │ │ │ -95 retij = A[ i ][ 0 ] * A[ j ][ 0 ]; │ │ │ │ -96 for( int k = 1; k < n; ++k ) │ │ │ │ -97 retij += A[ i ][ k ] * A[ j ][ k ]; │ │ │ │ -98 } │ │ │ │ -99 } │ │ │ │ -100 } │ │ │ │ -101 │ │ │ │ -103 template< int m, int n > │ │ │ │ -104 static void AAT ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, │ │ │ │ -m, m > &ret ) │ │ │ │ -105 { │ │ │ │ -106 for( int i = 0; i < m; ++i ) │ │ │ │ -107 { │ │ │ │ -108 for( int j = 0; j < i; ++j ) │ │ │ │ -109 { │ │ │ │ -110 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ -111 for( int k = 0; k < n; ++k ) │ │ │ │ -112 ret[ i ][ j ] += A[ i ][ k ] * A[ j ][ k ]; │ │ │ │ -113 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ +_8_7 static constexpr int _d_i_m_e_n_s_i_o_n = Implementation::dimension; │ │ │ │ +88 │ │ │ │ +89 │ │ │ │ +_9_4 int _s_i_z_e(int c) const │ │ │ │ +95 { │ │ │ │ +96 return _impl->size(c); │ │ │ │ +97 } │ │ │ │ +98 │ │ │ │ +99 │ │ │ │ +_1_1_1 int _s_i_z_e(int i, int c, int cc) const │ │ │ │ +112 { │ │ │ │ +113 return _impl->size(i,c,cc); │ │ │ │ 114 } │ │ │ │ -115 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ -116 for( int k = 0; k < n; ++k ) │ │ │ │ -117 ret[ i ][ i ] += A[ i ][ k ] * A[ i ][ k ]; │ │ │ │ -118 } │ │ │ │ -119 } │ │ │ │ -120 │ │ │ │ -122 // [[ expects: L is lower triangular ]] │ │ │ │ -123 template< int n > │ │ │ │ -124 static void Lx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< │ │ │ │ -ctype, n > &x, FieldVector< ctype, n > &ret ) │ │ │ │ -125 { │ │ │ │ -126 for( int i = 0; i < n; ++i ) │ │ │ │ -127 { │ │ │ │ -128 ret[ i ] = ctype( 0 ); │ │ │ │ -129 for( int j = 0; j <= i; ++j ) │ │ │ │ -130 ret[ i ] += L[ i ][ j ] * x[ j ]; │ │ │ │ -131 } │ │ │ │ -132 } │ │ │ │ -133 │ │ │ │ -135 // [[ expects: L is lower triangular ]] │ │ │ │ -136 template< int n > │ │ │ │ -137 static void LTx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< │ │ │ │ -ctype, n > &x, FieldVector< ctype, n > &ret ) │ │ │ │ -138 { │ │ │ │ -139 for( int i = 0; i < n; ++i ) │ │ │ │ -140 { │ │ │ │ -141 ret[ i ] = ctype( 0 ); │ │ │ │ -142 for( int j = i; j < n; ++j ) │ │ │ │ -143 ret[ i ] += L[ j ][ i ] * x[ j ]; │ │ │ │ -144 } │ │ │ │ -145 } │ │ │ │ -146 │ │ │ │ -148 // [[ expects: L is lower triangular ]] │ │ │ │ -149 template< int n > │ │ │ │ -150 static void LTL ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, │ │ │ │ -n, n > &ret ) │ │ │ │ -151 { │ │ │ │ -152 for( int i = 0; i < n; ++i ) │ │ │ │ -153 { │ │ │ │ -154 for( int j = 0; j < i; ++j ) │ │ │ │ -155 { │ │ │ │ -156 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ -157 for( int k = i; k < n; ++k ) │ │ │ │ -158 ret[ i ][ j ] += L[ k ][ i ] * L[ k ][ j ]; │ │ │ │ -159 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ -160 } │ │ │ │ -161 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ -162 for( int k = i; k < n; ++k ) │ │ │ │ -163 ret[ i ][ i ] += L[ k ][ i ] * L[ k ][ i ]; │ │ │ │ -164 } │ │ │ │ -165 } │ │ │ │ -166 │ │ │ │ -168 // [[ expects: L is lower triangular ]] │ │ │ │ -169 template< int n > │ │ │ │ -170 static void LLT ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, │ │ │ │ -n, n > &ret ) │ │ │ │ -171 { │ │ │ │ -172 for( int i = 0; i < n; ++i ) │ │ │ │ -173 { │ │ │ │ -174 for( int j = 0; j < i; ++j ) │ │ │ │ -175 { │ │ │ │ -176 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ -177 for( int k = 0; k <= j; ++k ) │ │ │ │ -178 ret[ i ][ j ] += L[ i ][ k ] * L[ j ][ k ]; │ │ │ │ -179 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ -180 } │ │ │ │ -181 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ -182 for( int k = 0; k <= i; ++k ) │ │ │ │ -183 ret[ i ][ i ] += L[ i ][ k ] * L[ i ][ k ]; │ │ │ │ -184 } │ │ │ │ -185 } │ │ │ │ -186 │ │ │ │ -189 // [[ expects: A is spd ]] │ │ │ │ -190 template< int n > │ │ │ │ -191 static bool cholesky_L ( const FieldMatrix< ctype, n, n > &A, FieldMatrix< │ │ │ │ -ctype, n, n > &ret, const bool checkSingular = false ) │ │ │ │ -192 { │ │ │ │ -193 using std::sqrt; │ │ │ │ -194 for( int i = 0; i < n; ++i ) │ │ │ │ -195 { │ │ │ │ -196 ctype &rii = ret[ i ][ i ]; │ │ │ │ -197 │ │ │ │ -198 ctype xDiag = A[ i ][ i ]; │ │ │ │ -199 for( int j = 0; j < i; ++j ) │ │ │ │ -200 xDiag -= ret[ i ][ j ] * ret[ i ][ j ]; │ │ │ │ -201 │ │ │ │ -202 // in some cases A can be singular, e.g. when checking local for │ │ │ │ -203 // outside points during checkInside │ │ │ │ -204 if( checkSingular && ! ( xDiag > ctype( 0 )) ) │ │ │ │ -205 return false ; │ │ │ │ -206 │ │ │ │ -207 // otherwise this should be true always │ │ │ │ -208 assert( xDiag > ctype( 0 ) ); │ │ │ │ -209 rii = sqrt( xDiag ); │ │ │ │ -210 │ │ │ │ -211 ctype invrii = ctype( 1 ) / rii; │ │ │ │ -212 for( int k = i+1; k < n; ++k ) │ │ │ │ -213 { │ │ │ │ -214 ctype x = A[ k ][ i ]; │ │ │ │ -215 for( int j = 0; j < i; ++j ) │ │ │ │ -216 x -= ret[ i ][ j ] * ret[ k ][ j ]; │ │ │ │ -217 ret[ k ][ i ] = invrii * x; │ │ │ │ -218 } │ │ │ │ -219 } │ │ │ │ -220 │ │ │ │ -221 // return true for meaning A is non-singular │ │ │ │ -222 return true; │ │ │ │ -223 } │ │ │ │ -224 │ │ │ │ -226 // [[ expects: L is lower triangular ]] │ │ │ │ -227 template< int n > │ │ │ │ -228 static ctype detL ( const FieldMatrix< ctype, n, n > &L ) │ │ │ │ +115 │ │ │ │ +116 │ │ │ │ +_1_3_0 int _s_u_b_E_n_t_i_t_y(int i, int c, int ii, int cc) const │ │ │ │ +131 { │ │ │ │ +132 return _impl->subEntity(i,c,ii,cc); │ │ │ │ +133 } │ │ │ │ +134 │ │ │ │ +_1_5_3 auto _s_u_b_E_n_t_i_t_i_e_s ( int i, int c, int cc ) const │ │ │ │ +154 { │ │ │ │ +155 return _impl->subEntities(i,c,cc); │ │ │ │ +156 } │ │ │ │ +157 │ │ │ │ +158 │ │ │ │ +_1_6_7 _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e(int i, int c) const │ │ │ │ +168 { │ │ │ │ +169 return _impl->type(i,c); │ │ │ │ +170 } │ │ │ │ +171 │ │ │ │ +172 │ │ │ │ +_1_7_5 _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e() const │ │ │ │ +176 { │ │ │ │ +177 return _impl->type(); │ │ │ │ +178 } │ │ │ │ +179 │ │ │ │ +180 │ │ │ │ +_1_9_0 _C_o_o_r_d_i_n_a_t_e _p_o_s_i_t_i_o_n(int i, int c) const │ │ │ │ +191 { │ │ │ │ +192 return _impl->position(i,c); │ │ │ │ +193 } │ │ │ │ +194 │ │ │ │ +195 │ │ │ │ +_2_0_3 bool _c_h_e_c_k_I_n_s_i_d_e(const _C_o_o_r_d_i_n_a_t_e& local) const │ │ │ │ +204 { │ │ │ │ +205 return _impl->checkInside(local); │ │ │ │ +206 } │ │ │ │ +207 │ │ │ │ +208 │ │ │ │ +220 template │ │ │ │ +_2_2_1 typename _C_o_d_i_m_<_c_o_d_i_m_>_:_:_G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y(int i) const │ │ │ │ +222 { │ │ │ │ +223 return _impl->template _g_e_o_m_e_t_r_y_<_c_o_d_i_m_>(i); │ │ │ │ +224 } │ │ │ │ +225 │ │ │ │ +226 │ │ │ │ +_2_2_8 _C_o_o_r_d_i_n_a_t_e_F_i_e_l_d _v_o_l_u_m_e() const │ │ │ │ 229 { │ │ │ │ -230 ctype det( 1 ); │ │ │ │ -231 for( int i = 0; i < n; ++i ) │ │ │ │ -232 det *= L[ i ][ i ]; │ │ │ │ -233 return det; │ │ │ │ -234 } │ │ │ │ -235 │ │ │ │ -237 // [[ expects: L is lower triangular ]] │ │ │ │ -238 template< int n > │ │ │ │ -239 static ctype invL ( FieldMatrix< ctype, n, n > &L ) │ │ │ │ -240 { │ │ │ │ -241 ctype det( 1 ); │ │ │ │ -242 for( int i = 0; i < n; ++i ) │ │ │ │ -243 { │ │ │ │ -244 ctype &lii = L[ i ][ i ]; │ │ │ │ -245 det *= lii; │ │ │ │ -246 lii = ctype( 1 ) / lii; │ │ │ │ -247 for( int j = 0; j < i; ++j ) │ │ │ │ -248 { │ │ │ │ -249 ctype &lij = L[ i ][ j ]; │ │ │ │ -250 ctype x = lij * L[ j ][ j ]; │ │ │ │ -251 for( int k = j+1; k < i; ++k ) │ │ │ │ -252 x += L[ i ][ k ] * L[ k ][ j ]; │ │ │ │ -253 lij = (-lii) * x; │ │ │ │ -254 } │ │ │ │ -255 } │ │ │ │ -256 return det; │ │ │ │ -257 } │ │ │ │ -258 │ │ │ │ -260 // [[ expects: L is lower triangular ]] │ │ │ │ -261 template< int n > │ │ │ │ -262 static void invLx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > │ │ │ │ -&x ) │ │ │ │ -263 { │ │ │ │ -264 for( int i = 0; i < n; ++i ) │ │ │ │ -265 { │ │ │ │ -266 for( int j = 0; j < i; ++j ) │ │ │ │ -267 x[ i ] -= L[ i ][ j ] * x[ j ]; │ │ │ │ -268 x[ i ] /= L[ i ][ i ]; │ │ │ │ -269 } │ │ │ │ -270 } │ │ │ │ -271 │ │ │ │ -273 // [[ expects: L is lower triangular ]] │ │ │ │ -274 template< int n > │ │ │ │ -275 static void invLTx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > │ │ │ │ -&x ) │ │ │ │ +230 return _impl->volume(); │ │ │ │ +231 } │ │ │ │ +232 │ │ │ │ +233 │ │ │ │ +_2_4_1 _C_o_o_r_d_i_n_a_t_e _i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l(int face) const │ │ │ │ +242 { │ │ │ │ +243 return _impl->integrationOuterNormal(face); │ │ │ │ +244 } │ │ │ │ +245 │ │ │ │ +246 │ │ │ │ +_2_5_4 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t() │ │ │ │ +255 : _impl(nullptr) │ │ │ │ +256 {} │ │ │ │ +257 │ │ │ │ +_2_6_3 const Implementation& _i_m_p_l() const │ │ │ │ +264 { │ │ │ │ +265 return *_impl; │ │ │ │ +266 } │ │ │ │ +267 │ │ │ │ +_2_6_9 bool _o_p_e_r_a_t_o_r_=_=(const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& r) const │ │ │ │ +270 { │ │ │ │ +271 return _impl == r._impl; │ │ │ │ +272 } │ │ │ │ +273 │ │ │ │ +_2_7_5 bool _o_p_e_r_a_t_o_r_!_=(const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& r) const │ │ │ │ 276 { │ │ │ │ -277 for( int i = n; i > 0; --i ) │ │ │ │ -278 { │ │ │ │ -279 for( int j = i; j < n; ++j ) │ │ │ │ -280 x[ i-1 ] -= L[ j ][ i-1 ] * x[ j ]; │ │ │ │ -281 x[ i-1 ] /= L[ i-1 ][ i-1 ]; │ │ │ │ -282 } │ │ │ │ -283 } │ │ │ │ -284 │ │ │ │ -286 // [[ expects: A is spd ]] │ │ │ │ -287 template< int n > │ │ │ │ -288 static ctype spdDetA ( const FieldMatrix< ctype, n, n > &A ) │ │ │ │ -289 { │ │ │ │ -290 FieldMatrix< ctype, n, n > L; │ │ │ │ -291 cholesky_L( A, L ); │ │ │ │ -292 return detL( L ); │ │ │ │ -293 } │ │ │ │ -294 │ │ │ │ -296 // [[ expects: A is spd ]] │ │ │ │ -297 template< int n > │ │ │ │ -298 static ctype spdInvA ( FieldMatrix< ctype, n, n > &A ) │ │ │ │ -299 { │ │ │ │ -300 FieldMatrix< ctype, n, n > L; │ │ │ │ -301 cholesky_L( A, L ); │ │ │ │ -302 const ctype det = invL( L ); │ │ │ │ -303 LTL( L, A ); │ │ │ │ -304 return det; │ │ │ │ -305 } │ │ │ │ -306 │ │ │ │ -308 // [[ expects: A is spd ]] │ │ │ │ -309 template< int n > │ │ │ │ -310 static bool spdInvAx ( FieldMatrix< ctype, n, n > &A, FieldVector< ctype, n │ │ │ │ -> &x, const bool checkSingular = false ) │ │ │ │ -311 { │ │ │ │ -312 FieldMatrix< ctype, n, n > L; │ │ │ │ -313 const bool invertible = cholesky_L( A, L, checkSingular ); │ │ │ │ -314 if( ! invertible ) return invertible ; │ │ │ │ -315 invLx( L, x ); │ │ │ │ -316 invLTx( L, x ); │ │ │ │ -317 return invertible; │ │ │ │ -318 } │ │ │ │ -319 │ │ │ │ -321 template< int m, int n > │ │ │ │ -322 static ctype detATA ( const FieldMatrix< ctype, m, n > &A ) │ │ │ │ -323 { │ │ │ │ -324 if constexpr( m >= n ) │ │ │ │ -325 { │ │ │ │ -326 FieldMatrix< ctype, n, n > ata; │ │ │ │ -327 ATA_L( A, ata ); │ │ │ │ -328 return spdDetA( ata ); │ │ │ │ -329 } │ │ │ │ -330 else │ │ │ │ -331 return ctype( 0 ); │ │ │ │ -332 } │ │ │ │ -333 │ │ │ │ -339 template< int m, int n > │ │ │ │ -340 static ctype sqrtDetAAT ( const FieldMatrix< ctype, m, n > &A ) │ │ │ │ -341 { │ │ │ │ -342 using std::abs; │ │ │ │ -343 using std::sqrt; │ │ │ │ -344 // These special cases are here not only for speed reasons: │ │ │ │ -345 // The general implementation aborts if the matrix is almost singular, │ │ │ │ -346 // and the special implementation provide a stable way to handle that case. │ │ │ │ -347 if constexpr( (n == 2) && (m == 2) ) │ │ │ │ -348 { │ │ │ │ -349 // Special implementation for 2x2 matrices: faster and more stable │ │ │ │ -350 return abs( A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ] ); │ │ │ │ -351 } │ │ │ │ -352 else if constexpr( (n == 3) && (m == 3) ) │ │ │ │ -353 { │ │ │ │ -354 // Special implementation for 3x3 matrices │ │ │ │ -355 const ctype v0 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 1 ][ 1 ] * A[ 0 ][ 2 ]; │ │ │ │ -356 const ctype v1 = A[ 0 ][ 2 ] * A[ 1 ][ 0 ] - A[ 1 ][ 2 ] * A[ 0 ][ 0 ]; │ │ │ │ -357 const ctype v2 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 1 ][ 0 ] * A[ 0 ][ 1 ]; │ │ │ │ -358 return abs( v0 * A[ 2 ][ 0 ] + v1 * A[ 2 ][ 1 ] + v2 * A[ 2 ][ 2 ] ); │ │ │ │ -359 } │ │ │ │ -360 else if constexpr( (n == 3) && (m == 2) ) │ │ │ │ -361 { │ │ │ │ -362 // Special implementation for 2x3 matrices │ │ │ │ -363 const ctype v0 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 0 ][ 1 ] * A[ 1 ][ 0 ]; │ │ │ │ -364 const ctype v1 = A[ 0 ][ 0 ] * A[ 1 ][ 2 ] - A[ 1 ][ 0 ] * A[ 0 ][ 2 ]; │ │ │ │ -365 const ctype v2 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 0 ][ 2 ] * A[ 1 ][ 1 ]; │ │ │ │ -366 return sqrt( v0*v0 + v1*v1 + v2*v2); │ │ │ │ -367 } │ │ │ │ -368 else if constexpr( n >= m ) │ │ │ │ -369 { │ │ │ │ -370 // General case │ │ │ │ -371 FieldMatrix< ctype, m, m > aat; │ │ │ │ -372 AAT_L( A, aat ); │ │ │ │ -373 return spdDetA( aat ); │ │ │ │ -374 } │ │ │ │ -375 else │ │ │ │ -376 return ctype( 0 ); │ │ │ │ -377 } │ │ │ │ -378 │ │ │ │ -380 // => A^{-1}_L A = I │ │ │ │ -381 template< int m, int n > │ │ │ │ -382 static ctype leftInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< │ │ │ │ -ctype, n, m > &ret ) │ │ │ │ -383 { │ │ │ │ -384 using std::abs; │ │ │ │ -385 if constexpr( (n == 2) && (m == 2) ) │ │ │ │ -386 { │ │ │ │ -387 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]); │ │ │ │ -388 const ctype detInv = ctype( 1 ) / det; │ │ │ │ -389 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv; │ │ │ │ -390 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv; │ │ │ │ -391 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv; │ │ │ │ -392 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv; │ │ │ │ -393 return abs( det ); │ │ │ │ -394 } │ │ │ │ -395 else │ │ │ │ -396 { │ │ │ │ -397 FieldMatrix< ctype, n, n > ata; │ │ │ │ -398 ATA_L( A, ata ); │ │ │ │ -399 const ctype det = spdInvA( ata ); │ │ │ │ -400 ATBT( ata, A, ret ); │ │ │ │ -401 return det; │ │ │ │ -402 } │ │ │ │ -403 } │ │ │ │ -404 │ │ │ │ -406 template< int m, int n > │ │ │ │ -407 static bool leftInvAx ( const FieldMatrix< ctype, m, n > &A, const │ │ │ │ -FieldVector< ctype, m > &x, FieldVector< ctype, n > &y ) │ │ │ │ -408 { │ │ │ │ -409 static_assert((m >= n), "Matrix has no left inverse."); │ │ │ │ -410 FieldMatrix< ctype, n, n > ata; │ │ │ │ -411 A.mtv(x, y); │ │ │ │ -412 ATA_L( A, ata ); │ │ │ │ -413 return spdInvAx( ata, y, true ); │ │ │ │ -414 } │ │ │ │ -415 │ │ │ │ -417 template< int m, int n > │ │ │ │ -418 static ctype rightInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< │ │ │ │ -ctype, n, m > &ret ) │ │ │ │ -419 { │ │ │ │ -420 static_assert((n >= m), "Matrix has no right inverse."); │ │ │ │ -421 using std::abs; │ │ │ │ -422 if constexpr( (n == 2) && (m == 2) ) │ │ │ │ -423 { │ │ │ │ -424 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]); │ │ │ │ -425 const ctype detInv = ctype( 1 ) / det; │ │ │ │ -426 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv; │ │ │ │ -427 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv; │ │ │ │ -428 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv; │ │ │ │ -429 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv; │ │ │ │ -430 return abs( det ); │ │ │ │ -431 } │ │ │ │ -432 else │ │ │ │ -433 { │ │ │ │ -434 FieldMatrix< ctype, m , m > aat; │ │ │ │ -435 AAT_L( A, aat ); │ │ │ │ -436 const ctype det = spdInvA( aat ); │ │ │ │ -437 ATBT( A , aat , ret ); │ │ │ │ -438 return det; │ │ │ │ -439 } │ │ │ │ -440 } │ │ │ │ -441 │ │ │ │ -443 template< int m, int n > │ │ │ │ -444 static bool xTRightInvA ( const FieldMatrix< ctype, m, n > &A, const │ │ │ │ -FieldVector< ctype, n > &x, FieldVector< ctype, m > &y ) │ │ │ │ -445 { │ │ │ │ -446 static_assert((n >= m), "Matrix has no right inverse."); │ │ │ │ -447 FieldMatrix< ctype, m, m > aat; │ │ │ │ -448 A.mv(x, y); │ │ │ │ -449 AAT_L( A, aat ); │ │ │ │ -450 // check whether aat is singular and return true if non-singular │ │ │ │ -451 return spdInvAx( aat, y, true ); │ │ │ │ -452 } │ │ │ │ -453}; │ │ │ │ -454 │ │ │ │ -455} // namespace Impl │ │ │ │ -456} // namespace Dune │ │ │ │ -457 │ │ │ │ -458#endif // DUNE_GEOMETRY_UTILITY_DEFAULTMATRIXHELPER_HH │ │ │ │ +277 return not (*this == r); │ │ │ │ +278 } │ │ │ │ +279 │ │ │ │ +_2_8_1 friend std::size_t _h_a_s_h___v_a_l_u_e(const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& r) │ │ │ │ +282 { │ │ │ │ +283 return reinterpret_cast(r._impl); │ │ │ │ +284 } │ │ │ │ +285 │ │ │ │ +286 private: │ │ │ │ +287 │ │ │ │ +288 // The implementation must be a friend to construct a wrapper around │ │ │ │ +itself. │ │ │ │ +289 friend Implementation; │ │ │ │ +290 │ │ │ │ +291 // The reference container is a friend to be able to call │ │ │ │ +setImplementation. │ │ │ │ +292 friend class Impl::ReferenceElementContainer<_c_t_y_p_e,_d_i_m_e_n_s_i_o_n>; │ │ │ │ +293 │ │ │ │ +294 // Constructor for wrapping an implementation reference (required │ │ │ │ +internally by the default implementation) │ │ │ │ +295 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(const Implementation& _i_m_p_l) │ │ │ │ +296 : _impl(&_i_m_p_l) │ │ │ │ +297 {} │ │ │ │ +298 │ │ │ │ +299 void setImplementation(const Implementation& _i_m_p_l) │ │ │ │ +300 { │ │ │ │ +301 _impl = &_i_m_p_l; │ │ │ │ +302 } │ │ │ │ +303 │ │ │ │ +304 const Implementation* _impl; │ │ │ │ +305 │ │ │ │ +306 }; │ │ │ │ +307 │ │ │ │ +308 } │ │ │ │ +309 │ │ │ │ +310} │ │ │ │ +311 │ │ │ │ +312 │ │ │ │ +313#endif // DUNE_GEOMETRY_REFERENCEELEMENT_HH │ │ │ │ +_t_y_p_e_._h_h │ │ │ │ +A unique label for each type of element that can occur in a grid. │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ +_D_u_n_e_:_:_G_e_o │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:28 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_v_o_l_u_m_e │ │ │ │ +CoordinateField volume() const │ │ │ │ +obtain the volume of the reference element │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:228 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ +GeometryType type(int i, int c) const │ │ │ │ +obtain the type of subentity (i,c) │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:167 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +ReferenceElement() │ │ │ │ +Constructs an empty reference element. │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:254 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ +bool operator!=(const ReferenceElement &r) const │ │ │ │ +Compares for inequality with another reference element. │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:275 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_p_o_s_i_t_i_o_n │ │ │ │ +Coordinate position(int i, int c) const │ │ │ │ +position of the barycenter of entity (i,c) │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:190 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_t_y_p_e_, │ │ │ │ +_m_y_d_i_m_e_n_s_i_o_n_ _>_ _>_:_:_C_o_o_r_d_i_n_a_t_e │ │ │ │ +typename Geo::ReferenceElementImplementation< ctype, mydimension >::Coordinate │ │ │ │ +Coordinate │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:81 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_g_e_o_m_e_t_r_y │ │ │ │ +Codim< codim >::Geometry geometry(int i) const │ │ │ │ +obtain the embedding of subentity (i,codim) into the reference element │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:221 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_t_y_p_e_, │ │ │ │ +_m_y_d_i_m_e_n_s_i_o_n_ _>_ _>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ +static constexpr int dimension │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:87 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ +int size(int i, int c, int cc) const │ │ │ │ +number of subentities of codimension cc of subentity (i,c) │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:111 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_s_u_b_E_n_t_i_t_y │ │ │ │ +int subEntity(int i, int c, int ii, int cc) const │ │ │ │ +obtain number of ii-th subentity with codim cc of (i,c) │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:130 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_t_y_p_e_, │ │ │ │ +_m_y_d_i_m_e_n_s_i_o_n_ _>_ _>_:_:_c_t_y_p_e │ │ │ │ +typename Geo::ReferenceElementImplementation< ctype, mydimension >::ctype ctype │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:75 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ +int size(int c) const │ │ │ │ +number of subentities of codimension c │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:94 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ +GeometryType type() const │ │ │ │ +obtain the type of this reference element │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:175 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_i_m_p_l │ │ │ │ +const Implementation & impl() const │ │ │ │ +Returns a reference to the internal implementation object. │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:263 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_c_h_e_c_k_I_n_s_i_d_e │ │ │ │ +bool checkInside(const Coordinate &local) const │ │ │ │ +check if a coordinate is in the reference element │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:203 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ +Coordinate integrationOuterNormal(int face) const │ │ │ │ +obtain the integration outer normal of the reference element │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:241 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_t_y_p_e_, │ │ │ │ +_m_y_d_i_m_e_n_s_i_o_n_ _>_ _>_:_:_C_o_o_r_d_i_n_a_t_e_F_i_e_l_d │ │ │ │ +ctype CoordinateField │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:78 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +bool operator==(const ReferenceElement &r) const │ │ │ │ +Compares for equality with another reference element. │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:269 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_h_a_s_h___v_a_l_u_e │ │ │ │ +friend std::size_t hash_value(const ReferenceElement &r) │ │ │ │ +Yields a hash value suitable for storing the reference element a in hash table. │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:281 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_s_u_b_E_n_t_i_t_i_e_s │ │ │ │ +auto subEntities(int i, int c, int cc) const │ │ │ │ +Obtain the range of numbers of subentities with codim cc of (i,c). │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:153 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_t_y_p_e_, │ │ │ │ +_m_y_d_i_m_e_n_s_i_o_n_ _>_ _>_:_:_V_o_l_u_m_e │ │ │ │ +ctype Volume │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:84 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:34 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ +Class providing access to the singletons of the reference elements. │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_C_o_d_i_m │ │ │ │ +Collection of types depending on the codimension. │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:67 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_C_o_d_i_m_:_:_G_e_o_m_e_t_r_y │ │ │ │ +implementation-defined Geometry │ │ │ │ +type of geometry embedding a subentity into the reference element │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:69 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ +DDeeffiinniittiioonn type.hh:114 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00182.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: convergence.hh File Reference │ │ │ +dune-geometry: type.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,34 +66,88 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
convergence.hh File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Functions | │ │ │ +Variables
│ │ │ +
type.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <cmath>
│ │ │ -#include <limits>
│ │ │ + │ │ │ +

A unique label for each type of element that can occur in a grid. │ │ │ +More...

│ │ │ +
#include <cassert>
│ │ │ +#include <cstdint>
│ │ │ +#include <string>
│ │ │ +#include <type_traits>
│ │ │ +#include <dune/common/exceptions.hh>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ +#include <dune/common/unused.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ +Classes

class  Dune::GeometryType
 Unique label for each type of entities that can occur in DUNE grids. More...
│ │ │ │ │ │ │ │ │ + │ │ │ + │ │ │ +

│ │ │ Namespaces

namespace  Dune
namespace  Dune::GeometryTypes
 Predefined GeometryTypes for common geometries.
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Functions

std::ostream & Dune::operator<< (std::ostream &s, const GeometryType &a)
 Prints the type to an output stream.
constexpr GeometryType Dune::GeometryTypes::simplex (unsigned int dim)
 Returns a GeometryType representing a simplex of dimension dim.
constexpr GeometryType Dune::GeometryTypes::cube (unsigned int dim)
 Returns a GeometryType representing a hypercube of dimension dim.
constexpr GeometryType Dune::GeometryTypes::none (unsigned int dim)
 Returns a GeometryType representing a singular of dimension dim.
constexpr GeometryType Dune::GeometryTypes::conicalExtension (const GeometryType &gt)
 Return GeometryType of a conical construction with gt as base.
constexpr GeometryType Dune::GeometryTypes::prismaticExtension (const GeometryType &gt)
 Return GeometryType of a prismatic construction with gt as base.
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Variables

constexpr GeometryType Dune::GeometryTypes::vertex = GeometryType(0,0,false)
 GeometryType representing a vertex.
constexpr GeometryType Dune::GeometryTypes::line = GeometryType(0,1,false)
 GeometryType representing a line.
constexpr GeometryType Dune::GeometryTypes::triangle = simplex(2)
 GeometryType representing a triangle.
constexpr GeometryType Dune::GeometryTypes::quadrilateral = cube(2)
 GeometryType representing a quadrilateral (a square).
constexpr GeometryType Dune::GeometryTypes::tetrahedron = simplex(3)
 GeometryType representing a tetrahedron.
constexpr GeometryType Dune::GeometryTypes::pyramid = GeometryType(0b0011,3,false)
 GeometryType representing a 3D pyramid.
constexpr GeometryType Dune::GeometryTypes::prism = GeometryType(0b0101,3,false)
 GeometryType representing a 3D prism.
constexpr GeometryType Dune::GeometryTypes::hexahedron = cube(3)
 GeometryType representing a hexahedron.
│ │ │ -
│ │ │ +

Detailed Description

│ │ │ +

A unique label for each type of element that can occur in a grid.

│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,16 +1,69 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -convergence.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +type.hh File Reference │ │ │ │ +A unique label for each type of element that can occur in a grid. _M_o_r_e_._._. │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +class   _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +  Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ +namespace   _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s │ │ │ │ +  Predefined _G_e_o_m_e_t_r_y_T_y_p_e_s for common geometries. │ │ │ │ +FFuunnccttiioonnss │ │ │ │ + std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, const _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ + &a) │ │ │ │ +  Prints the type to an output stream. │ │ │ │ +constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_s_i_m_p_l_e_x (unsigned int dim) │ │ │ │ +  Returns a _G_e_o_m_e_t_r_y_T_y_p_e representing a simplex of │ │ │ │ + dimension dim. │ │ │ │ +constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_u_b_e (unsigned int dim) │ │ │ │ +  Returns a _G_e_o_m_e_t_r_y_T_y_p_e representing a hypercube of │ │ │ │ + dimension dim. │ │ │ │ +constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_n_o_n_e (unsigned int dim) │ │ │ │ +  Returns a _G_e_o_m_e_t_r_y_T_y_p_e representing a singular of │ │ │ │ + dimension dim. │ │ │ │ +constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_o_n_i_c_a_l_E_x_t_e_n_s_i_o_n (const │ │ │ │ + _G_e_o_m_e_t_r_y_T_y_p_e >) │ │ │ │ +  Return _G_e_o_m_e_t_r_y_T_y_p_e of a conical construction with gt │ │ │ │ + as base. │ │ │ │ +constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m_a_t_i_c_E_x_t_e_n_s_i_o_n (const │ │ │ │ + _G_e_o_m_e_t_r_y_T_y_p_e >) │ │ │ │ +  Return _G_e_o_m_e_t_r_y_T_y_p_e of a prismatic construction with gt │ │ │ │ + as base. │ │ │ │ +VVaarriiaabblleess │ │ │ │ +constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x = _G_e_o_m_e_t_r_y_T_y_p_e(0,0,false) │ │ │ │ +  _G_e_o_m_e_t_r_y_T_y_p_e representing a vertex. │ │ │ │ +constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_l_i_n_e = _G_e_o_m_e_t_r_y_T_y_p_e(0,1,false) │ │ │ │ +  _G_e_o_m_e_t_r_y_T_y_p_e representing a line. │ │ │ │ +constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_r_i_a_n_g_l_e = _s_i_m_p_l_e_x(2) │ │ │ │ +  _G_e_o_m_e_t_r_y_T_y_p_e representing a triangle. │ │ │ │ +constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_q_u_a_d_r_i_l_a_t_e_r_a_l = _c_u_b_e(2) │ │ │ │ +  _G_e_o_m_e_t_r_y_T_y_p_e representing a quadrilateral (a square). │ │ │ │ +constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_e_t_r_a_h_e_d_r_o_n = _s_i_m_p_l_e_x(3) │ │ │ │ +  _G_e_o_m_e_t_r_y_T_y_p_e representing a tetrahedron. │ │ │ │ +constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_y_r_a_m_i_d = _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ + (0b0011,3,false) │ │ │ │ +  _G_e_o_m_e_t_r_y_T_y_p_e representing a 3D pyramid. │ │ │ │ +constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m = _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ + (0b0101,3,false) │ │ │ │ +  _G_e_o_m_e_t_r_y_T_y_p_e representing a 3D prism. │ │ │ │ +constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_h_e_x_a_h_e_d_r_o_n = _c_u_b_e(3) │ │ │ │ +  _G_e_o_m_e_t_r_y_T_y_p_e representing a hexahedron. │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +A unique label for each type of element that can occur in a grid. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00182_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: convergence.hh Source File │ │ │ +dune-geometry: type.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,45 +66,511 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
convergence.hh
│ │ │ +
type.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_UTILITY_CONVERGENCE_HH
│ │ │ -
6#define DUNE_GEOMETRY_UTILITY_CONVERGENCE_HH
│ │ │ -
7
│ │ │ -
8#include <cmath>
│ │ │ -
9#include <limits>
│ │ │ -
10
│ │ │ -
11namespace Dune::Impl {
│ │ │ -
12
│ │ │ -
13template <class R = double>
│ │ │ -
14struct ConvergenceOptions
│ │ │ -
15{
│ │ │ -
17 int maxIt = 100;
│ │ │ -
18
│ │ │ -
20 R absTol = []{ using std::sqrt; return sqrt(std::numeric_limits<R>::epsilon()); }();
│ │ │ -
21};
│ │ │ -
22
│ │ │ -
23} // end namespace Dune::Impl
│ │ │ +
5#ifndef DUNE_GEOMETRY_TYPE_HH
│ │ │ +
6#define DUNE_GEOMETRY_TYPE_HH
│ │ │ +
7
│ │ │ +
11
│ │ │ +
12#include <cassert>
│ │ │ +
13#include <cstdint>
│ │ │ +
14
│ │ │ +
15#include <string>
│ │ │ +
16#include <type_traits>
│ │ │ +
17
│ │ │ +
18#include <dune/common/exceptions.hh>
│ │ │ +
19#include <dune/common/typetraits.hh>
│ │ │ +
20#include <dune/common/unused.hh>
│ │ │ +
21
│ │ │ +
22namespace Dune
│ │ │ +
23{
│ │ │
24
│ │ │ -
25#endif // DUNE_GEOMETRY_UTILITY_CONVERGENCE_HH
│ │ │ +
25 namespace Impl
│ │ │ +
26 {
│ │ │ +
27
│ │ │ +
28 enum TopologyConstruction { pyramidConstruction = 0, prismConstruction = 1 };
│ │ │ +
29
│ │ │ +
30 // Dynamic Topology Properties
│ │ │ +
31 // ---------------------------
│ │ │ +
32
│ │ │ +
41 inline static unsigned int numTopologies ( int dim ) noexcept
│ │ │ +
42 {
│ │ │ +
43 return (1u << dim);
│ │ │ +
44 }
│ │ │ +
45
│ │ │ +
57 inline bool static isPyramid ( unsigned int topologyId, int dim, int codim = 0 ) noexcept
│ │ │ +
58 {
│ │ │ +
59 assert( (dim > 0) && (topologyId < numTopologies( dim )) );
│ │ │ +
60 assert( (0 <= codim) && (codim < dim) );
│ │ │ +
61 return (((topologyId & ~1) & (1u << (dim-codim-1))) == 0);
│ │ │ +
62 }
│ │ │ +
63
│ │ │ +
75 inline static bool isPrism ( unsigned int topologyId, int dim, int codim = 0 ) noexcept
│ │ │ +
76 {
│ │ │ +
77 assert( (dim > 0) && (topologyId < numTopologies( dim )) );
│ │ │ +
78 assert( (0 <= codim) && (codim < dim) );
│ │ │ +
79 return (( (topologyId | 1) & (1u << (dim-codim-1))) != 0);
│ │ │ +
80 }
│ │ │ +
81
│ │ │ +
89 inline static unsigned int baseTopologyId ( unsigned int topologyId, int dim, int codim = 1 ) noexcept
│ │ │ +
90 {
│ │ │ +
91 assert( (dim >= 0) && (topologyId < numTopologies( dim )) );
│ │ │ +
92 assert( (0 <= codim) && (codim <= dim) );
│ │ │ +
93 return topologyId & ((1u << (dim-codim)) - 1);
│ │ │ +
94 }
│ │ │ +
95
│ │ │ +
96 } // namespace Impl
│ │ │ +
97
│ │ │ +
98 // GeometryType
│ │ │ +
99 // -------------
│ │ │ +
100
│ │ │ +
│ │ │ + │ │ │ +
114 {
│ │ │ +
115 public:
│ │ │ +
116
│ │ │ +
│ │ │ +
119 enum
│ │ │ +
120 BasicType {
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
127 };
│ │ │ +
│ │ │ +
128
│ │ │ +
129 private:
│ │ │ +
130
│ │ │ +
132 unsigned char dim_;
│ │ │ +
133
│ │ │ +
135 bool none_;
│ │ │ +
136
│ │ │ +
138 unsigned int topologyId_;
│ │ │ +
139
│ │ │ +
140 // Internal type used for the Id. The exact nature of this type is kept
│ │ │ +
141 // as an implementation detail on purpose. We use a scoped enum here because scoped enums
│ │ │ +
142 // can be used as template parameters, but are not implicitly converted to other integral
│ │ │ +
143 // types by the compiler. That way, we avoid unfortunate implicit conversion chains, e.g.
│ │ │ +
144 // people trying to work with GlobalGeometryTypeIndex, but forgetting to actually call
│ │ │ +
145 // GlobalGeometryTypeIndex::index(gt) and just using gt directly.
│ │ │ +
146 enum class IdType : std::uint64_t
│ │ │ +
147 {};
│ │ │ +
148
│ │ │ +
149 public:
│ │ │ +
150
│ │ │ +
181 using Id = IdType;
│ │ │ +
182
│ │ │ +
│ │ │ +
190 constexpr operator Id() const
│ │ │ +
191 {
│ │ │ +
192 // recreate the exact storage layout that this class is using, making conversion
│ │ │ +
193 // extremely cheap
│ │ │ +
194 std::uint64_t id = dim_ | (std::uint64_t(none_) << 8) | (std::uint64_t(topologyId_) << 32);
│ │ │ +
195 return static_cast<Id>(id);
│ │ │ +
196 }
│ │ │ +
│ │ │ +
197
│ │ │ +
│ │ │ +
210 constexpr Id toId() const
│ │ │ +
211 {
│ │ │ +
212 return static_cast<Id>(*this);
│ │ │ +
213 }
│ │ │ +
│ │ │ +
214
│ │ │ +
│ │ │ +
222 constexpr GeometryType(Id id)
│ │ │ +
223 : dim_(static_cast<std::uint64_t>(id) & 0xFF)
│ │ │ +
224 , none_(static_cast<std::uint64_t>(id) & 0x100)
│ │ │ +
225 , topologyId_(static_cast<std::uint64_t>(id) >> 32)
│ │ │ +
226 {}
│ │ │ +
│ │ │ +
227
│ │ │ +
230
│ │ │ +
│ │ │ +
232 constexpr GeometryType ()
│ │ │ +
233 : dim_(0), none_(true), topologyId_(0)
│ │ │ +
234 {}
│ │ │ +
│ │ │ +
235
│ │ │ +
│ │ │ +
242 constexpr GeometryType(unsigned int topologyId, unsigned int dim, bool isNone)
│ │ │ +
243 : dim_(dim), none_(isNone), topologyId_(topologyId)
│ │ │ +
244 {}
│ │ │ +
│ │ │ +
245
│ │ │ +
│ │ │ +
251 constexpr GeometryType(unsigned int topologyId, unsigned int dim)
│ │ │ +
252 : dim_(dim), none_(false), topologyId_(topologyId)
│ │ │ +
253 {}
│ │ │ +
│ │ │ +
254
│ │ │ +
265 template<class TopologyType,
│ │ │ +
266 class = std::void_t<decltype(TopologyType::dimension), decltype(TopologyType::id)>>
│ │ │ +
│ │ │ +
267 explicit GeometryType(TopologyType t)
│ │ │ +
268 : dim_(TopologyType::dimension), none_(false), topologyId_(TopologyType::id)
│ │ │ +
269 {
│ │ │ +
270 DUNE_UNUSED_PARAMETER(t);
│ │ │ +
271 }
│ │ │ +
│ │ │ +
272
│ │ │ +
274
│ │ │ +
275
│ │ │ +
│ │ │ +
279 constexpr bool isVertex() const {
│ │ │ +
280 return dim_==0;
│ │ │ +
281 }
│ │ │ +
│ │ │ +
282
│ │ │ +
│ │ │ +
284 constexpr bool isLine() const {
│ │ │ +
285 return dim_==1;
│ │ │ +
286 }
│ │ │ +
│ │ │ +
287
│ │ │ +
│ │ │ +
289 constexpr bool isTriangle() const {
│ │ │ +
290 return ! none_ && dim_==2 && (topologyId_ | 1) == 0b0001;
│ │ │ +
291 }
│ │ │ +
│ │ │ +
292
│ │ │ +
│ │ │ +
294 constexpr bool isQuadrilateral() const {
│ │ │ +
295 return ! none_ && dim_==2 && (topologyId_ | 1) == 0b0011;
│ │ │ +
296 }
│ │ │ +
│ │ │ +
297
│ │ │ +
│ │ │ +
299 constexpr bool isTetrahedron() const {
│ │ │ +
300 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0001;
│ │ │ +
301 }
│ │ │ +
│ │ │ +
302
│ │ │ +
│ │ │ +
304 constexpr bool isPyramid() const {
│ │ │ +
305 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0011;
│ │ │ +
306 }
│ │ │ +
│ │ │ +
307
│ │ │ +
│ │ │ +
309 constexpr bool isPrism() const {
│ │ │ +
310 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0101;
│ │ │ +
311 }
│ │ │ +
│ │ │ +
312
│ │ │ +
│ │ │ +
314 constexpr bool isHexahedron() const {
│ │ │ +
315 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0111;
│ │ │ +
316 }
│ │ │ +
│ │ │ +
317
│ │ │ +
│ │ │ +
319 constexpr bool isSimplex() const {
│ │ │ +
320 return ! none_ && (topologyId_ | 1) == 1;
│ │ │ +
321 }
│ │ │ +
│ │ │ +
322
│ │ │ +
│ │ │ +
324 constexpr bool isCube() const {
│ │ │ +
325 return ! none_ && ((topologyId_ ^ ((1 << dim_)-1)) >> 1 == 0);
│ │ │ +
326 }
│ │ │ +
│ │ │ +
327
│ │ │ +
│ │ │ +
329 constexpr bool isConical() const {
│ │ │ +
330 return ! none_ && (((topologyId_ & ~1) & (1u << (dim_-1))) == 0);
│ │ │ +
331 }
│ │ │ +
│ │ │ +
332
│ │ │ +
│ │ │ +
337 constexpr bool isConical(const int& step) const {
│ │ │ +
338 return ! none_ && (((topologyId_ & ~1) & (1u << step)) == 0);
│ │ │ +
339 }
│ │ │ +
│ │ │ +
340
│ │ │ +
│ │ │ +
342 constexpr bool isPrismatic() const {
│ │ │ +
343 return ! none_ && (( (topologyId_ | 1) & (1u << (dim_-1))) != 0);
│ │ │ +
344 }
│ │ │ +
│ │ │ +
345
│ │ │ +
│ │ │ +
350 constexpr bool isPrismatic(const int& step) const {
│ │ │ +
351 return ! none_ && (( (topologyId_ | 1) & (1u << step)) != 0);
│ │ │ +
352 }
│ │ │ +
│ │ │ +
353
│ │ │ +
│ │ │ +
355 constexpr bool isNone() const {
│ │ │ +
356 return none_;
│ │ │ +
357 }
│ │ │ +
│ │ │ +
358
│ │ │ +
│ │ │ +
360 constexpr unsigned int dim() const {
│ │ │ +
361 return dim_;
│ │ │ +
362 }
│ │ │ +
│ │ │ +
363
│ │ │ +
│ │ │ +
365 constexpr unsigned int id() const {
│ │ │ +
366 return topologyId_;
│ │ │ +
367 }
│ │ │ +
│ │ │ +
368
│ │ │ +
370
│ │ │ +
373
│ │ │ +
│ │ │ +
377 constexpr bool operator==(const GeometryType& other) const {
│ │ │ +
378 return ( ( none_ == other.none_ )
│ │ │ +
379 && ( ( none_ == true )
│ │ │ +
380 || ( ( dim_ == other.dim_ )
│ │ │ +
381 && ( (topologyId_ >> 1) == (other.topologyId_ >> 1) )
│ │ │ +
382 )
│ │ │ +
383 )
│ │ │ +
384 );
│ │ │ +
385 }
│ │ │ +
│ │ │ +
386
│ │ │ +
│ │ │ +
388 constexpr bool operator!=(const GeometryType& other) const {
│ │ │ +
389 return ! ((*this)==other);
│ │ │ +
390 }
│ │ │ +
│ │ │ +
391
│ │ │ +
│ │ │ +
393 constexpr bool operator < (const GeometryType& other) const {
│ │ │ +
394 return ( ( none_ < other.none_ )
│ │ │ +
395 || ( !( other.none_ < none_ )
│ │ │ +
396 && ( ( dim_ < other.dim_ )
│ │ │ +
397 || ( (other.dim_ == dim_)
│ │ │ +
398 && ((topologyId_ >> 1) < (other.topologyId_ >> 1) )
│ │ │ +
399 )
│ │ │ +
400 )
│ │ │ +
401 )
│ │ │ +
402 );
│ │ │ +
403 }
│ │ │ +
│ │ │ +
404
│ │ │ +
406
│ │ │ +
407 };
│ │ │ +
│ │ │ +
408
│ │ │ +
│ │ │ +
410 inline std::ostream& operator<< (std::ostream& s, const GeometryType& a)
│ │ │ +
411 {
│ │ │ +
412 if (a.isSimplex())
│ │ │ +
413 {
│ │ │ +
414 s << "(simplex, " << a.dim() << ")";
│ │ │ +
415 return s;
│ │ │ +
416 }
│ │ │ +
417 if (a.isCube())
│ │ │ +
418 {
│ │ │ +
419 s << "(cube, " << a.dim() << ")";
│ │ │ +
420 return s;
│ │ │ +
421 }
│ │ │ +
422 if (a.isPyramid())
│ │ │ +
423 {
│ │ │ +
424 s << "(pyramid, 3)";
│ │ │ +
425 return s;
│ │ │ +
426 }
│ │ │ +
427 if (a.isPrism())
│ │ │ +
428 {
│ │ │ +
429 s << "(prism, 3)";
│ │ │ +
430 return s;
│ │ │ +
431 }
│ │ │ +
432 if (a.isNone())
│ │ │ +
433 {
│ │ │ +
434 s << "(none, " << a.dim() << ")";
│ │ │ +
435 return s;
│ │ │ +
436 }
│ │ │ +
437 s << "(other [" << a.id() << "], " << a.dim() << ")";
│ │ │ +
438 return s;
│ │ │ +
439 }
│ │ │ +
│ │ │ +
440
│ │ │ +
441
│ │ │ +
443
│ │ │ +
│ │ │ +
447 namespace GeometryTypes {
│ │ │ +
448
│ │ │ +
450
│ │ │ +
│ │ │ +
453 inline constexpr GeometryType simplex(unsigned int dim)
│ │ │ +
454 {
│ │ │ +
455 return GeometryType(0,dim,false);
│ │ │ +
456 }
│ │ │ +
│ │ │ +
457
│ │ │ +
459
│ │ │ +
│ │ │ +
462 inline constexpr GeometryType cube(unsigned int dim)
│ │ │ +
463 {
│ │ │ +
464 return GeometryType(((dim>1) ? ((1 << dim) - 1) : 0),dim,false);
│ │ │ +
465 }
│ │ │ +
│ │ │ +
466
│ │ │ +
468
│ │ │ +
│ │ │ +
471 inline constexpr GeometryType none(unsigned int dim)
│ │ │ +
472 {
│ │ │ +
473 return GeometryType(0,dim,true);
│ │ │ +
474 }
│ │ │ +
│ │ │ +
475
│ │ │ +
│ │ │ +
477 inline constexpr GeometryType conicalExtension(const GeometryType& gt)
│ │ │ +
478 {
│ │ │ +
479 return GeometryType(gt.id(), gt.dim()+1, gt.isNone());
│ │ │ +
480 }
│ │ │ +
│ │ │ +
481
│ │ │ +
│ │ │ +
483 inline constexpr GeometryType prismaticExtension(const GeometryType& gt)
│ │ │ +
484 {
│ │ │ +
485 return GeometryType(gt.id() | ((1 << gt.dim())), gt.dim()+1, gt.isNone());
│ │ │ +
486 }
│ │ │ +
│ │ │ +
487
│ │ │ +
489
│ │ │ +
492 inline constexpr GeometryType vertex = GeometryType(0,0,false);
│ │ │ +
493
│ │ │ +
495
│ │ │ +
498 inline constexpr GeometryType line = GeometryType(0,1,false);
│ │ │ +
499
│ │ │ +
501
│ │ │ +
504 inline constexpr GeometryType triangle = simplex(2);
│ │ │ +
505
│ │ │ +
507
│ │ │ +
510 inline constexpr GeometryType quadrilateral = cube(2);
│ │ │ +
511
│ │ │ +
513
│ │ │ +
516 inline constexpr GeometryType tetrahedron = simplex(3);
│ │ │ +
517
│ │ │ +
519
│ │ │ +
522 inline constexpr GeometryType pyramid = GeometryType(0b0011,3,false);
│ │ │ +
523
│ │ │ +
525
│ │ │ +
528 inline constexpr GeometryType prism = GeometryType(0b0101,3,false);
│ │ │ +
529
│ │ │ +
531
│ │ │ +
534 inline constexpr GeometryType hexahedron = cube(3);
│ │ │ +
535
│ │ │ +
536 }
│ │ │ +
│ │ │ +
537
│ │ │ +
538 namespace Impl
│ │ │ +
539 {
│ │ │ +
540
│ │ │ +
542 inline constexpr GeometryType getBase(const GeometryType& gt) {
│ │ │ +
543 return GeometryType(gt.id() & ((1 << (gt.dim()-1))-1), gt.dim()-1, gt.isNone());
│ │ │ +
544 }
│ │ │ +
545
│ │ │ +
546
│ │ │ +
547 // IfGeometryType
│ │ │ +
548 // ----------
│ │ │ +
549
│ │ │ +
550 template< template< GeometryType::Id > class Operation, int dim, GeometryType::Id geometryId = GeometryTypes::vertex >
│ │ │ +
551 struct IfGeometryType
│ │ │ +
552 {
│ │ │ +
553 static constexpr GeometryType geometry = geometryId;
│ │ │ +
554 template< class... Args >
│ │ │ +
555 static auto apply ( GeometryType gt, Args &&... args )
│ │ │ +
556 {
│ │ │ +
557 GeometryType lowerGeometry(gt.id() >>1 , gt.dim()-1, gt.isNone());
│ │ │ +
558
│ │ │ +
559 if( gt.id() & 1 )
│ │ │ +
560 return IfGeometryType< Operation, dim-1, GeometryTypes::prismaticExtension(geometry).toId() >::apply( lowerGeometry, std::forward< Args >( args )... );
│ │ │ +
561 else
│ │ │ +
562 return IfGeometryType< Operation, dim-1, GeometryTypes::conicalExtension(geometry).toId() >::apply( lowerGeometry, std::forward< Args >( args )... );
│ │ │ +
563 }
│ │ │ +
564 };
│ │ │ +
565
│ │ │ +
566 template< template< GeometryType::Id > class Operation, GeometryType::Id geometryId >
│ │ │ +
567 struct IfGeometryType< Operation, 0, geometryId>
│ │ │ +
568 {
│ │ │ +
569 template< class... Args >
│ │ │ +
570 static auto apply ([[maybe_unused]] GeometryType gt, Args &&... args )
│ │ │ +
571 {
│ │ │ +
572 return Operation< geometryId >::apply( std::forward< Args >( args )... );
│ │ │ +
573 }
│ │ │ +
574 };
│ │ │ +
575 } // namespace Impl
│ │ │ +
576} // namespace Dune
│ │ │ +
577
│ │ │ +
578#endif // DUNE_GEOMETRY_TYPE_HH
│ │ │ +
constexpr GeometryType line
GeometryType representing a line.
Definition type.hh:498
│ │ │ +
constexpr GeometryType cube(unsigned int dim)
Returns a GeometryType representing a hypercube of dimension dim.
Definition type.hh:462
│ │ │ +
constexpr GeometryType prism
GeometryType representing a 3D prism.
Definition type.hh:528
│ │ │ +
constexpr GeometryType triangle
GeometryType representing a triangle.
Definition type.hh:504
│ │ │ +
constexpr GeometryType quadrilateral
GeometryType representing a quadrilateral (a square).
Definition type.hh:510
│ │ │ +
constexpr GeometryType hexahedron
GeometryType representing a hexahedron.
Definition type.hh:534
│ │ │ +
constexpr GeometryType pyramid
GeometryType representing a 3D pyramid.
Definition type.hh:522
│ │ │ +
constexpr GeometryType tetrahedron
GeometryType representing a tetrahedron.
Definition type.hh:516
│ │ │ +
constexpr GeometryType none(unsigned int dim)
Returns a GeometryType representing a singular of dimension dim.
Definition type.hh:471
│ │ │ +
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition type.hh:453
│ │ │ +
constexpr GeometryType vertex
GeometryType representing a vertex.
Definition type.hh:492
│ │ │ +
STL namespace.
│ │ │ +
Definition affinegeometry.hh:22
│ │ │ +
std::ostream & operator<<(std::ostream &s, const GeometryType &a)
Prints the type to an output stream.
Definition type.hh:410
│ │ │ +
Predefined GeometryTypes for common geometries.
Definition type.hh:447
│ │ │ +
constexpr GeometryType prismaticExtension(const GeometryType &gt)
Return GeometryType of a prismatic construction with gt as base.
Definition type.hh:483
│ │ │ +
constexpr GeometryType conicalExtension(const GeometryType &gt)
Return GeometryType of a conical construction with gt as base.
Definition type.hh:477
│ │ │ +
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ +
constexpr GeometryType(unsigned int topologyId, unsigned int dim)
Constructor, using the topologyId (integer) and the dimension.
Definition type.hh:251
│ │ │ +
constexpr bool operator<(const GeometryType &other) const
less-than operation for use with maps
Definition type.hh:393
│ │ │ +
constexpr bool operator!=(const GeometryType &other) const
Check for inequality.
Definition type.hh:388
│ │ │ +
constexpr bool isPyramid() const
Return true if entity is a pyramid.
Definition type.hh:304
│ │ │ +
constexpr bool isTetrahedron() const
Return true if entity is a tetrahedron.
Definition type.hh:299
│ │ │ +
constexpr bool isPrism() const
Return true if entity is a prism.
Definition type.hh:309
│ │ │ +
constexpr bool isVertex() const
Return true if entity is a vertex.
Definition type.hh:279
│ │ │ +
constexpr bool operator==(const GeometryType &other) const
Check for equality. This method knows that in dimension 0 and 1 all BasicTypes are equal.
Definition type.hh:377
│ │ │ +
constexpr Id toId() const
Create an Id representation of this GeometryType.
Definition type.hh:210
│ │ │ +
constexpr bool isConical(const int &step) const
Return true if entity was constructed with a conical product in the chosen step.
Definition type.hh:337
│ │ │ +
constexpr unsigned int dim() const
Return dimension of the type.
Definition type.hh:360
│ │ │ +
constexpr bool isPrismatic(const int &step) const
Return true if entity was constructed with a prismatic product in the chosen step.
Definition type.hh:350
│ │ │ +
constexpr bool isTriangle() const
Return true if entity is a triangle.
Definition type.hh:289
│ │ │ +
GeometryType(TopologyType t)
Constructor from static TopologyType class.
Definition type.hh:267
│ │ │ +
constexpr GeometryType(unsigned int topologyId, unsigned int dim, bool isNone)
Constructor, using the topologyId (integer), the dimension and a flag for type none.
Definition type.hh:242
│ │ │ +
BasicType
Each entity can be tagged by one of these basic types plus its space dimension.
Definition type.hh:120
│ │ │ +
@ cube
Cube element in any nonnegative dimension.
Definition type.hh:122
│ │ │ +
@ simplex
Simplicial element in any nonnegative dimension.
Definition type.hh:121
│ │ │ +
@ pyramid
Four sided pyramid in three dimensions.
Definition type.hh:123
│ │ │ +
@ extended
Other, more general topology, representable as topologyId.
Definition type.hh:125
│ │ │ +
@ none
Even more general topology, cannot be specified by a topologyId. Two GeometryTypes with 'none' type a...
Definition type.hh:126
│ │ │ +
@ prism
Prism element in three dimensions.
Definition type.hh:124
│ │ │ +
constexpr GeometryType(Id id)
Reconstruct a Geometry type from a GeometryType::Id.
Definition type.hh:222
│ │ │ +
constexpr bool isCube() const
Return true if entity is a cube of any dimension.
Definition type.hh:324
│ │ │ +
constexpr GeometryType()
Default constructor, not initializing anything.
Definition type.hh:232
│ │ │ +
constexpr bool isConical() const
Return true if entity was constructed with a conical product in the last step.
Definition type.hh:329
│ │ │ +
constexpr bool isLine() const
Return true if entity is a line segment.
Definition type.hh:284
│ │ │ +
constexpr bool isQuadrilateral() const
Return true if entity is a quadrilateral.
Definition type.hh:294
│ │ │ +
constexpr bool isPrismatic() const
Return true if entity was constructed with a prismatic product in the last step.
Definition type.hh:342
│ │ │ +
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:365
│ │ │ +
constexpr bool isNone() const
Return true if entity is a singular of any dimension.
Definition type.hh:355
│ │ │ +
constexpr bool isHexahedron() const
Return true if entity is a hexahedron.
Definition type.hh:314
│ │ │ +
constexpr bool isSimplex() const
Return true if entity is a simplex of any dimension.
Definition type.hh:319
│ │ │ +
IdType Id
An integral id representing a GeometryType.
Definition type.hh:181
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,36 +1,602 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ -convergence.hh │ │ │ │ +type.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_UTILITY_CONVERGENCE_HH │ │ │ │ -6#define DUNE_GEOMETRY_UTILITY_CONVERGENCE_HH │ │ │ │ +5#ifndef DUNE_GEOMETRY_TYPE_HH │ │ │ │ +6#define DUNE_GEOMETRY_TYPE_HH │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ -9#include │ │ │ │ -10 │ │ │ │ -11namespace Dune::Impl { │ │ │ │ -12 │ │ │ │ -13template │ │ │ │ -14struct ConvergenceOptions │ │ │ │ -15{ │ │ │ │ -17 int maxIt = 100; │ │ │ │ -18 │ │ │ │ -20 R absTol = []{ using std::sqrt; return sqrt(std::numeric_limits::epsilon │ │ │ │ -()); }(); │ │ │ │ -21}; │ │ │ │ -22 │ │ │ │ -23} // end namespace Dune::Impl │ │ │ │ +11 │ │ │ │ +12#include │ │ │ │ +13#include │ │ │ │ +14 │ │ │ │ +15#include │ │ │ │ +16#include │ │ │ │ +17 │ │ │ │ +18#include │ │ │ │ +19#include │ │ │ │ +20#include │ │ │ │ +21 │ │ │ │ +22namespace _D_u_n_e │ │ │ │ +23{ │ │ │ │ 24 │ │ │ │ -25#endif // DUNE_GEOMETRY_UTILITY_CONVERGENCE_HH │ │ │ │ +25 namespace Impl │ │ │ │ +26 { │ │ │ │ +27 │ │ │ │ +28 enum TopologyConstruction { pyramidConstruction = 0, prismConstruction = 1 │ │ │ │ +}; │ │ │ │ +29 │ │ │ │ +30 // Dynamic Topology Properties │ │ │ │ +31 // --------------------------- │ │ │ │ +32 │ │ │ │ +41 inline static unsigned int numTopologies ( int dim ) noexcept │ │ │ │ +42 { │ │ │ │ +43 return (1u << dim); │ │ │ │ +44 } │ │ │ │ +45 │ │ │ │ +57 inline bool static isPyramid ( unsigned int topologyId, int dim, int codim = │ │ │ │ +0 ) noexcept │ │ │ │ +58 { │ │ │ │ +59 assert( (dim > 0) && (topologyId < numTopologies( dim )) ); │ │ │ │ +60 assert( (0 <= codim) && (codim < dim) ); │ │ │ │ +61 return (((topologyId & ~1) & (1u << (dim-codim-1))) == 0); │ │ │ │ +62 } │ │ │ │ +63 │ │ │ │ +75 inline static bool isPrism ( unsigned int topologyId, int dim, int codim = 0 │ │ │ │ +) noexcept │ │ │ │ +76 { │ │ │ │ +77 assert( (dim > 0) && (topologyId < numTopologies( dim )) ); │ │ │ │ +78 assert( (0 <= codim) && (codim < dim) ); │ │ │ │ +79 return (( (topologyId | 1) & (1u << (dim-codim-1))) != 0); │ │ │ │ +80 } │ │ │ │ +81 │ │ │ │ +89 inline static unsigned int baseTopologyId ( unsigned int topologyId, int │ │ │ │ +dim, int codim = 1 ) noexcept │ │ │ │ +90 { │ │ │ │ +91 assert( (dim >= 0) && (topologyId < numTopologies( dim )) ); │ │ │ │ +92 assert( (0 <= codim) && (codim <= dim) ); │ │ │ │ +93 return topologyId & ((1u << (dim-codim)) - 1); │ │ │ │ +94 } │ │ │ │ +95 │ │ │ │ +96 } // namespace Impl │ │ │ │ +97 │ │ │ │ +98 // GeometryType │ │ │ │ +99 // ------------- │ │ │ │ +100 │ │ │ │ +_1_1_3 class _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +114 { │ │ │ │ +115 public: │ │ │ │ +116 │ │ │ │ +_1_1_9 enum │ │ │ │ +120 _B_a_s_i_c_T_y_p_e { │ │ │ │ +_1_2_1 _s_i_m_p_l_e_x, │ │ │ │ +_1_2_2 _c_u_b_e, │ │ │ │ +_1_2_3 _p_y_r_a_m_i_d, │ │ │ │ +_1_2_4 _p_r_i_s_m, │ │ │ │ +_1_2_5 _e_x_t_e_n_d_e_d, │ │ │ │ +_1_2_6 _n_o_n_e │ │ │ │ +127 }; │ │ │ │ +128 │ │ │ │ +129 private: │ │ │ │ +130 │ │ │ │ +132 unsigned char dim_; │ │ │ │ +133 │ │ │ │ +135 bool none_; │ │ │ │ +136 │ │ │ │ +138 unsigned int topologyId_; │ │ │ │ +139 │ │ │ │ +140 // Internal type used for the Id. The exact nature of this type is kept │ │ │ │ +141 // as an implementation detail on purpose. We use a scoped enum here │ │ │ │ +because scoped enums │ │ │ │ +142 // can be used as template parameters, but are not implicitly converted to │ │ │ │ +other integral │ │ │ │ +143 // types by the compiler. That way, we avoid unfortunate implicit │ │ │ │ +conversion chains, e.g. │ │ │ │ +144 // people trying to work with GlobalGeometryTypeIndex, but forgetting to │ │ │ │ +actually call │ │ │ │ +145 // GlobalGeometryTypeIndex::index(gt) and just using gt directly. │ │ │ │ +146 enum class IdType : std::uint64_t │ │ │ │ +147 {}; │ │ │ │ +148 │ │ │ │ +149 public: │ │ │ │ +150 │ │ │ │ +_1_8_1 using _I_d = IdType; │ │ │ │ +182 │ │ │ │ +_1_9_0 constexpr operator _I_d() const │ │ │ │ +191 { │ │ │ │ +192 // recreate the exact storage layout that this class is using, making │ │ │ │ +conversion │ │ │ │ +193 // extremely cheap │ │ │ │ +194 std::uint64_t id = dim_ | (std::uint64_t(none_) << 8) | (std::uint64_t │ │ │ │ +(topologyId_) << 32); │ │ │ │ +195 return static_cast<_I_d>(_i_d); │ │ │ │ +196 } │ │ │ │ +197 │ │ │ │ +_2_1_0 constexpr _I_d _t_o_I_d() const │ │ │ │ +211 { │ │ │ │ +212 return static_cast<_I_d>(*this); │ │ │ │ +213 } │ │ │ │ +214 │ │ │ │ +_2_2_2 constexpr _G_e_o_m_e_t_r_y_T_y_p_e(_I_d id) │ │ │ │ +223 : dim_(static_cast<_s_t_d::uint64_t>(_i_d) & 0xFF) │ │ │ │ +224 , none_(static_cast<_s_t_d::uint64_t>(_i_d) & 0x100) │ │ │ │ +225 , topologyId_(static_cast<_s_t_d::uint64_t>(_i_d) >> 32) │ │ │ │ +226 {} │ │ │ │ +227 │ │ │ │ +230 │ │ │ │ +_2_3_2 constexpr _G_e_o_m_e_t_r_y_T_y_p_e () │ │ │ │ +233 : dim_(0), none_(true), topologyId_(0) │ │ │ │ +234 {} │ │ │ │ +235 │ │ │ │ +_2_4_2 constexpr _G_e_o_m_e_t_r_y_T_y_p_e(unsigned int topologyId, unsigned int _d_i_m, bool │ │ │ │ +_i_s_N_o_n_e) │ │ │ │ +243 : dim_(_d_i_m), none_(_i_s_N_o_n_e), topologyId_(topologyId) │ │ │ │ +244 {} │ │ │ │ +245 │ │ │ │ +_2_5_1 constexpr _G_e_o_m_e_t_r_y_T_y_p_e(unsigned int topologyId, unsigned int _d_i_m) │ │ │ │ +252 : dim_(_d_i_m), none_(false), topologyId_(topologyId) │ │ │ │ +253 {} │ │ │ │ +254 │ │ │ │ +265 template> │ │ │ │ +_2_6_7 explicit _G_e_o_m_e_t_r_y_T_y_p_e(TopologyType t) │ │ │ │ +268 : dim_(TopologyType::dimension), none_(false), topologyId_(TopologyType:: │ │ │ │ +_i_d) │ │ │ │ +269 { │ │ │ │ +270 DUNE_UNUSED_PARAMETER(t); │ │ │ │ +271 } │ │ │ │ +272 │ │ │ │ +274 │ │ │ │ +275 │ │ │ │ +_2_7_9 constexpr bool _i_s_V_e_r_t_e_x() const { │ │ │ │ +280 return dim_==0; │ │ │ │ +281 } │ │ │ │ +282 │ │ │ │ +_2_8_4 constexpr bool _i_s_L_i_n_e() const { │ │ │ │ +285 return dim_==1; │ │ │ │ +286 } │ │ │ │ +287 │ │ │ │ +_2_8_9 constexpr bool _i_s_T_r_i_a_n_g_l_e() const { │ │ │ │ +290 return ! none_ && dim_==2 && (topologyId_ | 1) == 0b0001; │ │ │ │ +291 } │ │ │ │ +292 │ │ │ │ +_2_9_4 constexpr bool _i_s_Q_u_a_d_r_i_l_a_t_e_r_a_l() const { │ │ │ │ +295 return ! none_ && dim_==2 && (topologyId_ | 1) == 0b0011; │ │ │ │ +296 } │ │ │ │ +297 │ │ │ │ +_2_9_9 constexpr bool _i_s_T_e_t_r_a_h_e_d_r_o_n() const { │ │ │ │ +300 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0001; │ │ │ │ +301 } │ │ │ │ +302 │ │ │ │ +_3_0_4 constexpr bool _i_s_P_y_r_a_m_i_d() const { │ │ │ │ +305 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0011; │ │ │ │ +306 } │ │ │ │ +307 │ │ │ │ +_3_0_9 constexpr bool _i_s_P_r_i_s_m() const { │ │ │ │ +310 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0101; │ │ │ │ +311 } │ │ │ │ +312 │ │ │ │ +_3_1_4 constexpr bool _i_s_H_e_x_a_h_e_d_r_o_n() const { │ │ │ │ +315 return ! none_ && dim_==3 && (topologyId_ | 1) == 0b0111; │ │ │ │ +316 } │ │ │ │ +317 │ │ │ │ +_3_1_9 constexpr bool _i_s_S_i_m_p_l_e_x() const { │ │ │ │ +320 return ! none_ && (topologyId_ | 1) == 1; │ │ │ │ +321 } │ │ │ │ +322 │ │ │ │ +_3_2_4 constexpr bool _i_s_C_u_b_e() const { │ │ │ │ +325 return ! none_ && ((topologyId_ ^ ((1 << dim_)-1)) >> 1 == 0); │ │ │ │ +326 } │ │ │ │ +327 │ │ │ │ +_3_2_9 constexpr bool _i_s_C_o_n_i_c_a_l() const { │ │ │ │ +330 return ! none_ && (((topologyId_ & ~1) & (1u << (dim_-1))) == 0); │ │ │ │ +331 } │ │ │ │ +332 │ │ │ │ +_3_3_7 constexpr bool _i_s_C_o_n_i_c_a_l(const int& step) const { │ │ │ │ +338 return ! none_ && (((topologyId_ & ~1) & (1u << step)) == 0); │ │ │ │ +339 } │ │ │ │ +340 │ │ │ │ +_3_4_2 constexpr bool _i_s_P_r_i_s_m_a_t_i_c() const { │ │ │ │ +343 return ! none_ && (( (topologyId_ | 1) & (1u << (dim_-1))) != 0); │ │ │ │ +344 } │ │ │ │ +345 │ │ │ │ +_3_5_0 constexpr bool _i_s_P_r_i_s_m_a_t_i_c(const int& step) const { │ │ │ │ +351 return ! none_ && (( (topologyId_ | 1) & (1u << step)) != 0); │ │ │ │ +352 } │ │ │ │ +353 │ │ │ │ +_3_5_5 constexpr bool _i_s_N_o_n_e() const { │ │ │ │ +356 return none_; │ │ │ │ +357 } │ │ │ │ +358 │ │ │ │ +_3_6_0 constexpr unsigned int _d_i_m() const { │ │ │ │ +361 return dim_; │ │ │ │ +362 } │ │ │ │ +363 │ │ │ │ +_3_6_5 constexpr unsigned int _i_d() const { │ │ │ │ +366 return topologyId_; │ │ │ │ +367 } │ │ │ │ +368 │ │ │ │ +370 │ │ │ │ +373 │ │ │ │ +_3_7_7 constexpr bool _o_p_e_r_a_t_o_r_=_=(const _G_e_o_m_e_t_r_y_T_y_p_e& other) const { │ │ │ │ +378 return ( ( none_ == other.none_ ) │ │ │ │ +379 && ( ( none_ == true ) │ │ │ │ +380 || ( ( dim_ == other.dim_ ) │ │ │ │ +381 && ( (topologyId_ >> 1) == (other.topologyId_ >> 1) ) │ │ │ │ +382 ) │ │ │ │ +383 ) │ │ │ │ +384 ); │ │ │ │ +385 } │ │ │ │ +386 │ │ │ │ +_3_8_8 constexpr bool _o_p_e_r_a_t_o_r_!_=(const _G_e_o_m_e_t_r_y_T_y_p_e& other) const { │ │ │ │ +389 return ! ((*this)==other); │ │ │ │ +390 } │ │ │ │ +391 │ │ │ │ +_3_9_3 constexpr bool _o_p_e_r_a_t_o_r_ _<_ (const _G_e_o_m_e_t_r_y_T_y_p_e& other) const { │ │ │ │ +394 return ( ( none_ < other.none_ ) │ │ │ │ +395 || ( !( other.none_ < none_ ) │ │ │ │ +396 && ( ( dim_ < other.dim_ ) │ │ │ │ +397 || ( (other.dim_ == dim_) │ │ │ │ +398 && ((topologyId_ >> 1) < (other.topologyId_ >> 1) ) │ │ │ │ +399 ) │ │ │ │ +400 ) │ │ │ │ +401 ) │ │ │ │ +402 ); │ │ │ │ +403 } │ │ │ │ +404 │ │ │ │ +406 │ │ │ │ +407 }; │ │ │ │ +408 │ │ │ │ +_4_1_0 inline std::ostream& _o_p_e_r_a_t_o_r_<_<_ (std::ostream& s, const _G_e_o_m_e_t_r_y_T_y_p_e& a) │ │ │ │ +411 { │ │ │ │ +412 if (a._i_s_S_i_m_p_l_e_x()) │ │ │ │ +413 { │ │ │ │ +414 s << "(simplex, " << a._d_i_m() << ")"; │ │ │ │ +415 return s; │ │ │ │ +416 } │ │ │ │ +417 if (a._i_s_C_u_b_e()) │ │ │ │ +418 { │ │ │ │ +419 s << "(cube, " << a._d_i_m() << ")"; │ │ │ │ +420 return s; │ │ │ │ +421 } │ │ │ │ +422 if (a._i_s_P_y_r_a_m_i_d()) │ │ │ │ +423 { │ │ │ │ +424 s << "(pyramid, 3)"; │ │ │ │ +425 return s; │ │ │ │ +426 } │ │ │ │ +427 if (a._i_s_P_r_i_s_m()) │ │ │ │ +428 { │ │ │ │ +429 s << "(prism, 3)"; │ │ │ │ +430 return s; │ │ │ │ +431 } │ │ │ │ +432 if (a._i_s_N_o_n_e()) │ │ │ │ +433 { │ │ │ │ +434 s << "(none, " << a._d_i_m() << ")"; │ │ │ │ +435 return s; │ │ │ │ +436 } │ │ │ │ +437 s << "(other [" << a._i_d() << "], " << a._d_i_m() << ")"; │ │ │ │ +438 return s; │ │ │ │ +439 } │ │ │ │ +440 │ │ │ │ +441 │ │ │ │ +443 │ │ │ │ +_4_4_7 namespace _G_e_o_m_e_t_r_y_T_y_p_e_s { │ │ │ │ +448 │ │ │ │ +450 │ │ │ │ +_4_5_3 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e _s_i_m_p_l_e_x(unsigned int dim) │ │ │ │ +454 { │ │ │ │ +455 return _G_e_o_m_e_t_r_y_T_y_p_e(0,dim,false); │ │ │ │ +456 } │ │ │ │ +457 │ │ │ │ +459 │ │ │ │ +_4_6_2 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e _c_u_b_e(unsigned int dim) │ │ │ │ +463 { │ │ │ │ +464 return _G_e_o_m_e_t_r_y_T_y_p_e(((dim>1) ? ((1 << dim) - 1) : 0),dim,false); │ │ │ │ +465 } │ │ │ │ +466 │ │ │ │ +468 │ │ │ │ +_4_7_1 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e _n_o_n_e(unsigned int dim) │ │ │ │ +472 { │ │ │ │ +473 return _G_e_o_m_e_t_r_y_T_y_p_e(0,dim,true); │ │ │ │ +474 } │ │ │ │ +475 │ │ │ │ +_4_7_7 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e _c_o_n_i_c_a_l_E_x_t_e_n_s_i_o_n(const _G_e_o_m_e_t_r_y_T_y_p_e& gt) │ │ │ │ +478 { │ │ │ │ +479 return _G_e_o_m_e_t_r_y_T_y_p_e(gt._i_d(), gt._d_i_m()+1, gt._i_s_N_o_n_e()); │ │ │ │ +480 } │ │ │ │ +481 │ │ │ │ +_4_8_3 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e _p_r_i_s_m_a_t_i_c_E_x_t_e_n_s_i_o_n(const _G_e_o_m_e_t_r_y_T_y_p_e& gt) │ │ │ │ +484 { │ │ │ │ +485 return _G_e_o_m_e_t_r_y_T_y_p_e(gt._i_d() | ((1 << gt._d_i_m())), gt._d_i_m()+1, gt._i_s_N_o_n_e()); │ │ │ │ +486 } │ │ │ │ +487 │ │ │ │ +489 │ │ │ │ +_4_9_2 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e _v_e_r_t_e_x = _G_e_o_m_e_t_r_y_T_y_p_e(0,0,false); │ │ │ │ +493 │ │ │ │ +495 │ │ │ │ +_4_9_8 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e _l_i_n_e = _G_e_o_m_e_t_r_y_T_y_p_e(0,1,false); │ │ │ │ +499 │ │ │ │ +501 │ │ │ │ +_5_0_4 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e _t_r_i_a_n_g_l_e = _s_i_m_p_l_e_x(2); │ │ │ │ +505 │ │ │ │ +507 │ │ │ │ +_5_1_0 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e _q_u_a_d_r_i_l_a_t_e_r_a_l = _c_u_b_e(2); │ │ │ │ +511 │ │ │ │ +513 │ │ │ │ +_5_1_6 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e _t_e_t_r_a_h_e_d_r_o_n = _s_i_m_p_l_e_x(3); │ │ │ │ +517 │ │ │ │ +519 │ │ │ │ +_5_2_2 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e _p_y_r_a_m_i_d = _G_e_o_m_e_t_r_y_T_y_p_e(0b0011,3,false); │ │ │ │ +523 │ │ │ │ +525 │ │ │ │ +_5_2_8 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e _p_r_i_s_m = _G_e_o_m_e_t_r_y_T_y_p_e(0b0101,3,false); │ │ │ │ +529 │ │ │ │ +531 │ │ │ │ +_5_3_4 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e _h_e_x_a_h_e_d_r_o_n = _c_u_b_e(3); │ │ │ │ +535 │ │ │ │ +536 } │ │ │ │ +537 │ │ │ │ +538 namespace Impl │ │ │ │ +539 { │ │ │ │ +540 │ │ │ │ +542 inline constexpr _G_e_o_m_e_t_r_y_T_y_p_e getBase(const _G_e_o_m_e_t_r_y_T_y_p_e& gt) { │ │ │ │ +543 return _G_e_o_m_e_t_r_y_T_y_p_e(gt._i_d() & ((1 << (gt._d_i_m()-1))-1), gt._d_i_m()-1, │ │ │ │ +gt._i_s_N_o_n_e()); │ │ │ │ +544 } │ │ │ │ +545 │ │ │ │ +546 │ │ │ │ +547 // IfGeometryType │ │ │ │ +548 // ---------- │ │ │ │ +549 │ │ │ │ +550 template< template< GeometryType::Id > class Operation, int dim, │ │ │ │ +_G_e_o_m_e_t_r_y_T_y_p_e_:_:_I_d geometryId = _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x > │ │ │ │ +551 struct IfGeometryType │ │ │ │ +552 { │ │ │ │ +553 static constexpr GeometryType geometry = geometryId; │ │ │ │ +554 template< class... Args > │ │ │ │ +555 static auto apply ( GeometryType gt, Args &&... args ) │ │ │ │ +556 { │ │ │ │ +557 GeometryType lowerGeometry(gt.id() >>1 , gt.dim()-1, gt.isNone()); │ │ │ │ +558 │ │ │ │ +559 if( gt.id() & 1 ) │ │ │ │ +560 return IfGeometryType< Operation, dim-1, _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m_a_t_i_c_E_x_t_e_n_s_i_o_n │ │ │ │ +(geometry)._t_o_I_d() >::apply( lowerGeometry, std::forward< Args >( args )... ); │ │ │ │ +561 else │ │ │ │ +562 return IfGeometryType< Operation, dim-1, _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_o_n_i_c_a_l_E_x_t_e_n_s_i_o_n │ │ │ │ +(geometry)._t_o_I_d() >::apply( lowerGeometry, std::forward< Args >( args )... ); │ │ │ │ +563 } │ │ │ │ +564 }; │ │ │ │ +565 │ │ │ │ +566 template< template< GeometryType::Id > class Operation, _G_e_o_m_e_t_r_y_T_y_p_e_:_:_I_d │ │ │ │ +geometryId > │ │ │ │ +567 struct IfGeometryType< Operation, 0, geometryId> │ │ │ │ +568 { │ │ │ │ +569 template< class... Args > │ │ │ │ +570 static auto apply ([[maybe_unused]] GeometryType gt, Args &&... args ) │ │ │ │ +571 { │ │ │ │ +572 return Operation< geometryId >::apply( std::forward< Args >( args )... ); │ │ │ │ +573 } │ │ │ │ +574 }; │ │ │ │ +575 } // namespace Impl │ │ │ │ +576} // namespace Dune │ │ │ │ +577 │ │ │ │ +578#endif // DUNE_GEOMETRY_TYPE_HH │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_l_i_n_e │ │ │ │ +constexpr GeometryType line │ │ │ │ +GeometryType representing a line. │ │ │ │ +DDeeffiinniittiioonn type.hh:498 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_u_b_e │ │ │ │ +constexpr GeometryType cube(unsigned int dim) │ │ │ │ +Returns a GeometryType representing a hypercube of dimension dim. │ │ │ │ +DDeeffiinniittiioonn type.hh:462 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m │ │ │ │ +constexpr GeometryType prism │ │ │ │ +GeometryType representing a 3D prism. │ │ │ │ +DDeeffiinniittiioonn type.hh:528 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_r_i_a_n_g_l_e │ │ │ │ +constexpr GeometryType triangle │ │ │ │ +GeometryType representing a triangle. │ │ │ │ +DDeeffiinniittiioonn type.hh:504 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_q_u_a_d_r_i_l_a_t_e_r_a_l │ │ │ │ +constexpr GeometryType quadrilateral │ │ │ │ +GeometryType representing a quadrilateral (a square). │ │ │ │ +DDeeffiinniittiioonn type.hh:510 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_h_e_x_a_h_e_d_r_o_n │ │ │ │ +constexpr GeometryType hexahedron │ │ │ │ +GeometryType representing a hexahedron. │ │ │ │ +DDeeffiinniittiioonn type.hh:534 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_y_r_a_m_i_d │ │ │ │ +constexpr GeometryType pyramid │ │ │ │ +GeometryType representing a 3D pyramid. │ │ │ │ +DDeeffiinniittiioonn type.hh:522 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_e_t_r_a_h_e_d_r_o_n │ │ │ │ +constexpr GeometryType tetrahedron │ │ │ │ +GeometryType representing a tetrahedron. │ │ │ │ +DDeeffiinniittiioonn type.hh:516 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_n_o_n_e │ │ │ │ +constexpr GeometryType none(unsigned int dim) │ │ │ │ +Returns a GeometryType representing a singular of dimension dim. │ │ │ │ +DDeeffiinniittiioonn type.hh:471 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_s_i_m_p_l_e_x │ │ │ │ +constexpr GeometryType simplex(unsigned int dim) │ │ │ │ +Returns a GeometryType representing a simplex of dimension dim. │ │ │ │ +DDeeffiinniittiioonn type.hh:453 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x │ │ │ │ +constexpr GeometryType vertex │ │ │ │ +GeometryType representing a vertex. │ │ │ │ +DDeeffiinniittiioonn type.hh:492 │ │ │ │ +_s_t_d │ │ │ │ +STL namespace. │ │ │ │ +_D_u_n_e │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ +std::ostream & operator<<(std::ostream &s, const GeometryType &a) │ │ │ │ +Prints the type to an output stream. │ │ │ │ +DDeeffiinniittiioonn type.hh:410 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s │ │ │ │ +Predefined GeometryTypes for common geometries. │ │ │ │ +DDeeffiinniittiioonn type.hh:447 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m_a_t_i_c_E_x_t_e_n_s_i_o_n │ │ │ │ +constexpr GeometryType prismaticExtension(const GeometryType >) │ │ │ │ +Return GeometryType of a prismatic construction with gt as base. │ │ │ │ +DDeeffiinniittiioonn type.hh:483 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_o_n_i_c_a_l_E_x_t_e_n_s_i_o_n │ │ │ │ +constexpr GeometryType conicalExtension(const GeometryType >) │ │ │ │ +Return GeometryType of a conical construction with gt as base. │ │ │ │ +DDeeffiinniittiioonn type.hh:477 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ +DDeeffiinniittiioonn type.hh:114 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +constexpr GeometryType(unsigned int topologyId, unsigned int dim) │ │ │ │ +Constructor, using the topologyId (integer) and the dimension. │ │ │ │ +DDeeffiinniittiioonn type.hh:251 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_o_p_e_r_a_t_o_r_< │ │ │ │ +constexpr bool operator<(const GeometryType &other) const │ │ │ │ +less-than operation for use with maps │ │ │ │ +DDeeffiinniittiioonn type.hh:393 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ +constexpr bool operator!=(const GeometryType &other) const │ │ │ │ +Check for inequality. │ │ │ │ +DDeeffiinniittiioonn type.hh:388 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_P_y_r_a_m_i_d │ │ │ │ +constexpr bool isPyramid() const │ │ │ │ +Return true if entity is a pyramid. │ │ │ │ +DDeeffiinniittiioonn type.hh:304 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_T_e_t_r_a_h_e_d_r_o_n │ │ │ │ +constexpr bool isTetrahedron() const │ │ │ │ +Return true if entity is a tetrahedron. │ │ │ │ +DDeeffiinniittiioonn type.hh:299 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_P_r_i_s_m │ │ │ │ +constexpr bool isPrism() const │ │ │ │ +Return true if entity is a prism. │ │ │ │ +DDeeffiinniittiioonn type.hh:309 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_V_e_r_t_e_x │ │ │ │ +constexpr bool isVertex() const │ │ │ │ +Return true if entity is a vertex. │ │ │ │ +DDeeffiinniittiioonn type.hh:279 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +constexpr bool operator==(const GeometryType &other) const │ │ │ │ +Check for equality. This method knows that in dimension 0 and 1 all BasicTypes │ │ │ │ +are equal. │ │ │ │ +DDeeffiinniittiioonn type.hh:377 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_t_o_I_d │ │ │ │ +constexpr Id toId() const │ │ │ │ +Create an Id representation of this GeometryType. │ │ │ │ +DDeeffiinniittiioonn type.hh:210 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_C_o_n_i_c_a_l │ │ │ │ +constexpr bool isConical(const int &step) const │ │ │ │ +Return true if entity was constructed with a conical product in the chosen │ │ │ │ +step. │ │ │ │ +DDeeffiinniittiioonn type.hh:337 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_d_i_m │ │ │ │ +constexpr unsigned int dim() const │ │ │ │ +Return dimension of the type. │ │ │ │ +DDeeffiinniittiioonn type.hh:360 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_P_r_i_s_m_a_t_i_c │ │ │ │ +constexpr bool isPrismatic(const int &step) const │ │ │ │ +Return true if entity was constructed with a prismatic product in the chosen │ │ │ │ +step. │ │ │ │ +DDeeffiinniittiioonn type.hh:350 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_T_r_i_a_n_g_l_e │ │ │ │ +constexpr bool isTriangle() const │ │ │ │ +Return true if entity is a triangle. │ │ │ │ +DDeeffiinniittiioonn type.hh:289 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +GeometryType(TopologyType t) │ │ │ │ +Constructor from static TopologyType class. │ │ │ │ +DDeeffiinniittiioonn type.hh:267 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +constexpr GeometryType(unsigned int topologyId, unsigned int dim, bool isNone) │ │ │ │ +Constructor, using the topologyId (integer), the dimension and a flag for type │ │ │ │ +none. │ │ │ │ +DDeeffiinniittiioonn type.hh:242 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_B_a_s_i_c_T_y_p_e │ │ │ │ +BasicType │ │ │ │ +Each entity can be tagged by one of these basic types plus its space dimension. │ │ │ │ +DDeeffiinniittiioonn type.hh:120 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_c_u_b_e │ │ │ │ +@ cube │ │ │ │ +Cube element in any nonnegative dimension. │ │ │ │ +DDeeffiinniittiioonn type.hh:122 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_s_i_m_p_l_e_x │ │ │ │ +@ simplex │ │ │ │ +Simplicial element in any nonnegative dimension. │ │ │ │ +DDeeffiinniittiioonn type.hh:121 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_p_y_r_a_m_i_d │ │ │ │ +@ pyramid │ │ │ │ +Four sided pyramid in three dimensions. │ │ │ │ +DDeeffiinniittiioonn type.hh:123 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_e_x_t_e_n_d_e_d │ │ │ │ +@ extended │ │ │ │ +Other, more general topology, representable as topologyId. │ │ │ │ +DDeeffiinniittiioonn type.hh:125 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_n_o_n_e │ │ │ │ +@ none │ │ │ │ +Even more general topology, cannot be specified by a topologyId. Two │ │ │ │ +GeometryTypes with 'none' type a... │ │ │ │ +DDeeffiinniittiioonn type.hh:126 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_p_r_i_s_m │ │ │ │ +@ prism │ │ │ │ +Prism element in three dimensions. │ │ │ │ +DDeeffiinniittiioonn type.hh:124 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +constexpr GeometryType(Id id) │ │ │ │ +Reconstruct a Geometry type from a GeometryType::Id. │ │ │ │ +DDeeffiinniittiioonn type.hh:222 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_C_u_b_e │ │ │ │ +constexpr bool isCube() const │ │ │ │ +Return true if entity is a cube of any dimension. │ │ │ │ +DDeeffiinniittiioonn type.hh:324 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +constexpr GeometryType() │ │ │ │ +Default constructor, not initializing anything. │ │ │ │ +DDeeffiinniittiioonn type.hh:232 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_C_o_n_i_c_a_l │ │ │ │ +constexpr bool isConical() const │ │ │ │ +Return true if entity was constructed with a conical product in the last step. │ │ │ │ +DDeeffiinniittiioonn type.hh:329 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_L_i_n_e │ │ │ │ +constexpr bool isLine() const │ │ │ │ +Return true if entity is a line segment. │ │ │ │ +DDeeffiinniittiioonn type.hh:284 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_Q_u_a_d_r_i_l_a_t_e_r_a_l │ │ │ │ +constexpr bool isQuadrilateral() const │ │ │ │ +Return true if entity is a quadrilateral. │ │ │ │ +DDeeffiinniittiioonn type.hh:294 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_P_r_i_s_m_a_t_i_c │ │ │ │ +constexpr bool isPrismatic() const │ │ │ │ +Return true if entity was constructed with a prismatic product in the last │ │ │ │ +step. │ │ │ │ +DDeeffiinniittiioonn type.hh:342 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_d │ │ │ │ +constexpr unsigned int id() const │ │ │ │ +Return the topology id of the type. │ │ │ │ +DDeeffiinniittiioonn type.hh:365 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_N_o_n_e │ │ │ │ +constexpr bool isNone() const │ │ │ │ +Return true if entity is a singular of any dimension. │ │ │ │ +DDeeffiinniittiioonn type.hh:355 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_H_e_x_a_h_e_d_r_o_n │ │ │ │ +constexpr bool isHexahedron() const │ │ │ │ +Return true if entity is a hexahedron. │ │ │ │ +DDeeffiinniittiioonn type.hh:314 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_S_i_m_p_l_e_x │ │ │ │ +constexpr bool isSimplex() const │ │ │ │ +Return true if entity is a simplex of any dimension. │ │ │ │ +DDeeffiinniittiioonn type.hh:319 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_I_d │ │ │ │ +IdType Id │ │ │ │ +An integral id representing a GeometryType. │ │ │ │ +DDeeffiinniittiioonn type.hh:181 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00185.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: algorithms.hh File Reference │ │ │ +dune-geometry: referenceelements.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,40 +66,72 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
algorithms.hh File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Typedefs | │ │ │ +Functions
│ │ │ +
referenceelements.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <algorithm>
│ │ │ -#include <cmath>
│ │ │ +
#include <cassert>
│ │ │ +#include <algorithm>
│ │ │ #include <limits>
│ │ │ -#include <optional>
│ │ │ -#include <type_traits>
│ │ │ -#include <dune/common/debugstream.hh>
│ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ -#include <dune/common/ftraits.hh>
│ │ │ -#include <dune/common/fvector.hh>
│ │ │ -#include <dune/geometry/utility/defaultmatrixhelper.hh>
│ │ │ +#include <tuple>
│ │ │ +#include <utility>
│ │ │ +#include <vector>
│ │ │ +#include <array>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ +#include <dune/common/std/type_traits.hh>
│ │ │ +#include <dune/common/visibility.hh>
│ │ │ +#include <dune/geometry/dimension.hh>
│ │ │ +#include <dune/geometry/type.hh>
│ │ │ +#include <dune/geometry/referenceelement.hh>
│ │ │ +#include <dune/geometry/referenceelementimplementation.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ +Classes

struct  Dune::Geo::ReferenceElements< ctype_, dim >
 Class providing access to the singletons of the reference elements. More...
struct  Dune::ReferenceElements< ctype_, dim >
 Class providing access to the singletons of the reference elements. More...
│ │ │ │ │ │ │ │ │ + │ │ │ +

│ │ │ Namespaces

namespace  Dune
namespace  Dune::Geo
│ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Typedefs

template<typename... T>
using Dune::ReferenceElement = decltype(referenceElement(std::declval<T>()...))
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

template<typename... T>
unspecified value type Dune::referenceElement (T &&... t)
 Returns a reference element for the objects t....
template<typename T, int dim>
auto Dune::referenceElement (const Dune::GeometryType &gt, Dune::Dim< dim >={})
 Returns a reference element of dimension dim for the given geometry type and coordinate field type.
template<typename T, int dim, std::enable_if_t< IsNumber< std::decay_t< T > >::value, int > = 0>
auto Dune::referenceElement (const T &, const Dune::GeometryType &gt, Dune::Dim< dim >)
 Returns a reference element of dimension dim for the given geometry type and coordinate field type.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,24 +1,54 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -algorithms.hh File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +referenceelements.hh File Reference │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_d_i_m_e_n_s_i_o_n_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_i_m_p_l_e_m_e_n_t_a_t_i_o_n_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e___,_ _d_i_m_ _> │ │ │ │ +  Class providing access to the singletons of the reference elements. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e___,_ _d_i_m_ _> │ │ │ │ +  Class providing access to the singletons of the reference elements. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ +namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +template │ │ │ │ +using  _D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = decltype(_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(std::declval │ │ │ │ + ()...)) │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +unspecified value type  _D_u_n_e_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t (T &&... t) │ │ │ │ +  Returns a reference element for the objects t.... │ │ │ │ +template │ │ │ │ + auto  _D_u_n_e_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t (const _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e >, │ │ │ │ + _D_u_n_e_:_:_D_i_m< dim >={}) │ │ │ │ +  Returns a reference element of dimension dim for the │ │ │ │ + given geometry type and coordinate field type. │ │ │ │ +template │ │ │ │ +>::value, int > = 0> │ │ │ │ + auto  _D_u_n_e_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t (const T &, const _D_u_n_e_:_: │ │ │ │ + _G_e_o_m_e_t_r_y_T_y_p_e >, _D_u_n_e_:_:_D_i_m< dim >) │ │ │ │ +  Returns a reference element of dimension dim for the │ │ │ │ + given geometry type and coordinate field type. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00185_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: algorithms.hh Source File │ │ │ +dune-geometry: referenceelements.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,125 +66,273 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
algorithms.hh
│ │ │ +
referenceelements.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_UTILITY_ALGORITHMS_HH
│ │ │ -
6#define DUNE_GEOMETRY_UTILITY_ALGORITHMS_HH
│ │ │ +
5#ifndef DUNE_GEOMETRY_REFERENCEELEMENTS_HH
│ │ │ +
6#define DUNE_GEOMETRY_REFERENCEELEMENTS_HH
│ │ │
7
│ │ │ -
8#include <algorithm>
│ │ │ -
9#include <cmath>
│ │ │ -
10#include <limits>
│ │ │ -
11#include <optional>
│ │ │ -
12#include <type_traits>
│ │ │ -
13
│ │ │ -
14#include <dune/common/debugstream.hh>
│ │ │ -
15#include <dune/common/fmatrix.hh>
│ │ │ -
16#include <dune/common/ftraits.hh>
│ │ │ -
17#include <dune/common/fvector.hh>
│ │ │ - │ │ │ -
19
│ │ │ -
20namespace Dune {
│ │ │ -
21namespace Impl {
│ │ │ -
22
│ │ │ -
23template <class R = double>
│ │ │ -
24struct GaussNewtonOptions
│ │ │ -
25{
│ │ │ -
27 int maxIt = 100;
│ │ │ -
28
│ │ │ -
30 R absTol = []{ using std::sqrt; return sqrt(std::numeric_limits<R>::epsilon()); }();
│ │ │ -
31
│ │ │ -
33 int maxInnerIt = 10;
│ │ │ -
34
│ │ │ -
36 R theta = 0.5;
│ │ │ -
37};
│ │ │ -
38
│ │ │ -
39
│ │ │ -
41enum class GaussNewtonErrorCode
│ │ │ -
42{
│ │ │ -
43 OK = 0, //< A solution is found
│ │ │ -
44 JACOBIAN_NOT_INVERTIBLE, //< The Jacobian is not invertible at the current point
│ │ │ -
45 STAGNATION, //< No reduction of the residul norm possible
│ │ │ -
46 TOLERANCE_NOT_REACHED //< The break tolerance for the resodual norm is not reached
│ │ │ -
47};
│ │ │ -
48
│ │ │ -
49
│ │ │ -
62template <class F, class DF, class Domain,
│ │ │ -
63 class Range = std::invoke_result_t<F, Domain>,
│ │ │ -
64 class R = typename Dune::FieldTraits<Domain>::real_type>
│ │ │ -
65GaussNewtonErrorCode gaussNewton (const F& f, const DF& df, Range y, Domain& x0,
│ │ │ -
66 GaussNewtonOptions<R> opts = {})
│ │ │ -
67{
│ │ │ -
68 Domain x = x0;
│ │ │ -
69 Domain dx{};
│ │ │ -
70 Range dy = f(x0) - y;
│ │ │ -
71 R resNorm0 = dy.two_norm();
│ │ │ -
72 R resNorm = 0;
│ │ │ +
8#include <cassert>
│ │ │ +
9
│ │ │ +
10#include <algorithm>
│ │ │ +
11#include <limits>
│ │ │ +
12#include <tuple>
│ │ │ +
13#include <utility>
│ │ │ +
14#include <vector>
│ │ │ +
15#include <array>
│ │ │ +
16
│ │ │ +
17#include <dune/common/typetraits.hh>
│ │ │ +
18#include <dune/common/std/type_traits.hh>
│ │ │ +
19#include <dune/common/visibility.hh>
│ │ │ +
20
│ │ │ + │ │ │ +
22#include <dune/geometry/type.hh>
│ │ │ + │ │ │ + │ │ │ +
25
│ │ │ +
26namespace Dune
│ │ │ +
27{
│ │ │ +
28
│ │ │ +
29 namespace Geo
│ │ │ +
30 {
│ │ │ +
31
│ │ │ +
32#ifndef DOXYGEN
│ │ │ +
33
│ │ │ +
34
│ │ │ +
35 namespace Impl
│ │ │ +
36 {
│ │ │ +
37
│ │ │ +
38 // ReferenceElementContainer
│ │ │ +
39 // -------------------------
│ │ │ +
40
│ │ │ +
41 template< class ctype, int dim >
│ │ │ +
42 class ReferenceElementContainer
│ │ │ +
43 {
│ │ │ +
44 static const unsigned int numTopologies = dim >= 0 ? (1u << dim) : 0;
│ │ │ +
45
│ │ │ +
46 using Implementation = ReferenceElementImplementation< ctype, dim >;
│ │ │ +
47
│ │ │ +
48 public:
│ │ │ +
49
│ │ │ +
50 using ReferenceElement = Dune::Geo::ReferenceElement< Implementation >;
│ │ │ +
51 using value_type = ReferenceElement;
│ │ │ +
52 using const_iterator = const value_type*;
│ │ │ +
53
│ │ │ +
54 ReferenceElementContainer ()
│ │ │ +
55 {
│ │ │ +
56 for( unsigned int topologyId = 0; topologyId < numTopologies; ++topologyId )
│ │ │ +
57 {
│ │ │ +
58 implementations_[ topologyId ].initialize( topologyId );
│ │ │ +
59 reference_elements_[ topologyId ].setImplementation( implementations_[ topologyId ] );
│ │ │ +
60 }
│ │ │ +
61 }
│ │ │ +
62
│ │ │ +
63 const ReferenceElement& operator() ( const GeometryType &type ) const
│ │ │ +
64 {
│ │ │ +
65 assert( type.dim() == dim );
│ │ │ +
66 return reference_elements_[ type.id() ];
│ │ │ +
67 }
│ │ │ +
68
│ │ │ +
69 const ReferenceElement& simplex () const
│ │ │ +
70 {
│ │ │ +
71 return reference_elements_[ Dune::GeometryTypes::simplex(dim).id() ];
│ │ │ +
72 }
│ │ │
73
│ │ │ -
74 for (int i = 0; i < opts.maxIt; ++i)
│ │ │ -
75 {
│ │ │ -
76 // Get descent direction dx: (J^T*J)dx = J^T*dy
│ │ │ -
77 const bool invertible = FieldMatrixHelper<R>::xTRightInvA(df(x), dy, dx);
│ │ │ +
74 const ReferenceElement& cube () const
│ │ │ +
75 {
│ │ │ +
76 return reference_elements_[ Dune::GeometryTypes::cube(dim).id() ];
│ │ │ +
77 }
│ │ │
78
│ │ │ -
79 // break if jacobian is not invertible
│ │ │ -
80 if (!invertible)
│ │ │ -
81 return GaussNewtonErrorCode::JACOBIAN_NOT_INVERTIBLE;
│ │ │ -
82
│ │ │ -
83 // line-search procedure to update x with correction dx
│ │ │ -
84 R alpha = 1;
│ │ │ -
85 for (int j = 0; j < opts.maxInnerIt; ++j) {
│ │ │ -
86 x = x0 - alpha * dx;
│ │ │ -
87 dy = f(x) - y;
│ │ │ -
88 resNorm = dy.two_norm();
│ │ │ -
89
│ │ │ -
90 if (resNorm < resNorm0)
│ │ │ -
91 break;
│ │ │ -
92
│ │ │ -
93 alpha *= opts.theta;
│ │ │ -
94 }
│ │ │ -
95
│ │ │ -
96 // cannot reduce the residual
│ │ │ -
97 if (!(resNorm < resNorm0))
│ │ │ -
98 return GaussNewtonErrorCode::STAGNATION;
│ │ │ -
99
│ │ │ -
100 x0 = x;
│ │ │ -
101 resNorm0 = resNorm;
│ │ │ -
102
│ │ │ -
103 // break if tolerance is reached.
│ │ │ -
104 if (resNorm < opts.absTol)
│ │ │ -
105 return GaussNewtonErrorCode::OK;
│ │ │ -
106 }
│ │ │ -
107
│ │ │ -
108 // tolerance could not be reached
│ │ │ -
109 if (!(resNorm < opts.absTol))
│ │ │ -
110 return GaussNewtonErrorCode::TOLERANCE_NOT_REACHED;
│ │ │ +
79 const ReferenceElement& pyramid () const
│ │ │ +
80 {
│ │ │ +
81 return reference_elements_[ Dune::GeometryTypes::pyramid.id() ];
│ │ │ +
82 }
│ │ │ +
83
│ │ │ +
84 const ReferenceElement& prism () const
│ │ │ +
85 {
│ │ │ +
86 return reference_elements_[ Dune::GeometryTypes::prism.id() ];
│ │ │ +
87 }
│ │ │ +
88
│ │ │ +
89 const_iterator begin () const
│ │ │ +
90 {
│ │ │ +
91 return reference_elements_.data();
│ │ │ +
92 }
│ │ │ +
93
│ │ │ +
94 const_iterator end () const
│ │ │ +
95 {
│ │ │ +
96 return reference_elements_.data() + numTopologies;
│ │ │ +
97 }
│ │ │ +
98
│ │ │ +
99 private:
│ │ │ +
100
│ │ │ +
101 std::array<Implementation,numTopologies> implementations_;
│ │ │ +
102 std::array<ReferenceElement,numTopologies> reference_elements_;
│ │ │ +
103
│ │ │ +
104 };
│ │ │ +
105
│ │ │ +
106
│ │ │ +
107 } // namespace Impl
│ │ │ +
108
│ │ │ +
109
│ │ │ +
110#endif // DOXYGEN
│ │ │
111
│ │ │ -
112 return GaussNewtonErrorCode::OK;
│ │ │ -
113}
│ │ │ -
114
│ │ │ -
115} // end namespace Impl
│ │ │ -
116} // end namespace Dune
│ │ │ -
117
│ │ │ -
118#endif // DUNE_GEOMETRY_UTILITY_ALGORITHMS_HH
│ │ │ - │ │ │ +
112
│ │ │ +
113 // ReferenceElements
│ │ │ +
114 // ------------------------
│ │ │ +
115
│ │ │ +
126 template< class ctype_, int dim >
│ │ │ +
│ │ │ + │ │ │ +
128 {
│ │ │ +
129
│ │ │ +
131 using ctype = ctype_;
│ │ │ +
132
│ │ │ + │ │ │ +
135
│ │ │ +
137 static constexpr int dimension = dim;
│ │ │ +
138
│ │ │ +
139 private:
│ │ │ +
140
│ │ │ +
141 using Container = Impl::ReferenceElementContainer< ctype, dim >;
│ │ │ +
142
│ │ │ +
143 public:
│ │ │ +
144
│ │ │ +
146 using ReferenceElement = typename Container::ReferenceElement;
│ │ │ +
147
│ │ │ +
149 using Iterator = typename Container::const_iterator;
│ │ │ +
150
│ │ │ + │ │ │ +
153
│ │ │ +
155 static const ReferenceElement&
│ │ │ +
│ │ │ +
156 general ( const GeometryType& type )
│ │ │ +
157 {
│ │ │ +
158 return container() ( type );
│ │ │ +
159 }
│ │ │ +
│ │ │ +
160
│ │ │ +
│ │ │ +
162 static const ReferenceElement& simplex ()
│ │ │ +
163 {
│ │ │ +
164 return container().simplex();
│ │ │ +
165 }
│ │ │ +
│ │ │ +
166
│ │ │ +
│ │ │ +
168 static const ReferenceElement& cube ()
│ │ │ +
169 {
│ │ │ +
170 return container().cube();
│ │ │ +
171 }
│ │ │ +
│ │ │ +
172
│ │ │ +
│ │ │ +
173 static Iterator begin ()
│ │ │ +
174 {
│ │ │ +
175 return container().begin();
│ │ │ +
176 }
│ │ │ +
│ │ │ +
177
│ │ │ +
│ │ │ +
178 static Iterator end ()
│ │ │ +
179 {
│ │ │ +
180 return container().end();
│ │ │ +
181 }
│ │ │ +
│ │ │ +
182
│ │ │ +
183 private:
│ │ │ +
184
│ │ │ +
185 DUNE_EXPORT static const Container& container ()
│ │ │ +
186 {
│ │ │ +
187 static Container container;
│ │ │ +
188 return container;
│ │ │ +
189 }
│ │ │ +
190 };
│ │ │ +
│ │ │ +
191
│ │ │ +
192 } // namespace Geo
│ │ │ +
193
│ │ │ + │ │ │ +
196
│ │ │ +
197
│ │ │ +
198#ifdef DOXYGEN
│ │ │ +
199
│ │ │ +
201
│ │ │ +
244 template<typename... T>
│ │ │ +
245 unspecified-value-type referenceElement(T&&... t);
│ │ │ +
246
│ │ │ +
247#endif
│ │ │ +
248
│ │ │ +
249
│ │ │ +
251
│ │ │ +
264 template<typename T, int dim>
│ │ │ +
│ │ │ + │ │ │ +
266 {
│ │ │ + │ │ │ +
268 }
│ │ │ +
│ │ │ +
269
│ │ │ +
270
│ │ │ +
272
│ │ │ +
284 template<typename T, int dim, std::enable_if_t<IsNumber<std::decay_t<T>>::value, int> = 0>
│ │ │ +
│ │ │ + │ │ │ +
286 {
│ │ │ + │ │ │ +
288 }
│ │ │ +
│ │ │ +
289
│ │ │ +
290 template<typename... T>
│ │ │ +
291 using ReferenceElement = decltype(referenceElement(std::declval<T>()...));
│ │ │ +
292
│ │ │ +
293} // namespace Dune
│ │ │ +
294
│ │ │ +
295#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTS_HH
│ │ │ + │ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ + │ │ │ + │ │ │ +
constexpr GeometryType cube(unsigned int dim)
Returns a GeometryType representing a hypercube of dimension dim.
Definition type.hh:462
│ │ │ +
constexpr GeometryType prism
GeometryType representing a 3D prism.
Definition type.hh:528
│ │ │ +
constexpr GeometryType pyramid
GeometryType representing a 3D pyramid.
Definition type.hh:522
│ │ │ +
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition type.hh:453
│ │ │ +
unspecified value type referenceElement(T &&... t)
Returns a reference element for the objects t....
│ │ │
Definition affinegeometry.hh:22
│ │ │ +
decltype(referenceElement(std::declval< T >()...)) ReferenceElement
Definition referenceelements.hh:291
│ │ │ +
Definition affinegeometry.hh:28
│ │ │ +
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │ +
static Iterator begin()
Definition referenceelements.hh:173
│ │ │ +
Iterator iterator
Definition referenceelements.hh:152
│ │ │ +
typename Container::ReferenceElement ReferenceElement
Definition referenceelements.hh:146
│ │ │ +
static const ReferenceElement & cube()
get hypercube reference elements
Definition referenceelements.hh:168
│ │ │ +
static Iterator end()
Definition referenceelements.hh:178
│ │ │ +
ctype ctype
Definition referenceelements.hh:131
│ │ │ +
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition referenceelements.hh:156
│ │ │ +
static const ReferenceElement & simplex()
get simplex reference elements
Definition referenceelements.hh:162
│ │ │ +
typename Container::const_iterator Iterator
Definition referenceelements.hh:149
│ │ │ +
static constexpr int dimension
Definition referenceelements.hh:137
│ │ │ +
ctype CoordinateField
Definition referenceelements.hh:134
│ │ │ +
Static tag representing a dimension.
Definition dimension.hh:16
│ │ │ +
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ +
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:365
│ │ │ +
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition referenceelements.hh:156
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,120 +1,305 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ -algorithms.hh │ │ │ │ +referenceelements.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_UTILITY_ALGORITHMS_HH │ │ │ │ -6#define DUNE_GEOMETRY_UTILITY_ALGORITHMS_HH │ │ │ │ +5#ifndef DUNE_GEOMETRY_REFERENCEELEMENTS_HH │ │ │ │ +6#define DUNE_GEOMETRY_REFERENCEELEMENTS_HH │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ -13 │ │ │ │ -14#include │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ -17#include │ │ │ │ -18#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ -19 │ │ │ │ -20namespace _D_u_n_e { │ │ │ │ -21namespace Impl { │ │ │ │ -22 │ │ │ │ -23template │ │ │ │ -24struct GaussNewtonOptions │ │ │ │ -25{ │ │ │ │ -27 int maxIt = 100; │ │ │ │ +8#include │ │ │ │ +9 │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13#include │ │ │ │ +14#include │ │ │ │ +15#include │ │ │ │ +16 │ │ │ │ +17#include │ │ │ │ +18#include │ │ │ │ +19#include │ │ │ │ +20 │ │ │ │ +21#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_d_i_m_e_n_s_i_o_n_._h_h> │ │ │ │ +22#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +23#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h> │ │ │ │ +24#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_i_m_p_l_e_m_e_n_t_a_t_i_o_n_._h_h> │ │ │ │ +25 │ │ │ │ +26namespace _D_u_n_e │ │ │ │ +27{ │ │ │ │ 28 │ │ │ │ -30 R absTol = []{ using std::sqrt; return sqrt(std::numeric_limits::epsilon │ │ │ │ -()); }(); │ │ │ │ +29 namespace _G_e_o │ │ │ │ +30 { │ │ │ │ 31 │ │ │ │ -33 int maxInnerIt = 10; │ │ │ │ +32#ifndef DOXYGEN │ │ │ │ +33 │ │ │ │ 34 │ │ │ │ -36 R theta = 0.5; │ │ │ │ -37}; │ │ │ │ -38 │ │ │ │ -39 │ │ │ │ -41enum class GaussNewtonErrorCode │ │ │ │ -42{ │ │ │ │ -43 OK = 0, //< A solution is found │ │ │ │ -44 JACOBIAN_NOT_INVERTIBLE, //< The Jacobian is not invertible at the current │ │ │ │ -point │ │ │ │ -45 STAGNATION, //< No reduction of the residul norm possible │ │ │ │ -46 TOLERANCE_NOT_REACHED //< The break tolerance for the resodual norm is not │ │ │ │ -reached │ │ │ │ -47}; │ │ │ │ -48 │ │ │ │ +35 namespace Impl │ │ │ │ +36 { │ │ │ │ +37 │ │ │ │ +38 // ReferenceElementContainer │ │ │ │ +39 // ------------------------- │ │ │ │ +40 │ │ │ │ +41 template< class ctype, int dim > │ │ │ │ +42 class ReferenceElementContainer │ │ │ │ +43 { │ │ │ │ +44 static const unsigned int numTopologies = dim >= 0 ? (1u << dim) : 0; │ │ │ │ +45 │ │ │ │ +46 using Implementation = ReferenceElementImplementation< ctype, dim >; │ │ │ │ +47 │ │ │ │ +48 public: │ │ │ │ 49 │ │ │ │ -62template , │ │ │ │ -64 class R = typename Dune::FieldTraits::real_type> │ │ │ │ -65GaussNewtonErrorCode gaussNewton (const F& f, const DF& df, Range y, Domain& │ │ │ │ -x0, │ │ │ │ -66 GaussNewtonOptions opts = {}) │ │ │ │ -67{ │ │ │ │ -68 Domain x = x0; │ │ │ │ -69 Domain dx{}; │ │ │ │ -70 Range dy = f(x0) - y; │ │ │ │ -71 R resNorm0 = dy.two_norm(); │ │ │ │ -72 R resNorm = 0; │ │ │ │ +50 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = Dune::Geo::ReferenceElement< Implementation >; │ │ │ │ +51 using value_type = _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ +52 using const_iterator = const value_type*; │ │ │ │ +53 │ │ │ │ +54 ReferenceElementContainer () │ │ │ │ +55 { │ │ │ │ +56 for( unsigned int topologyId = 0; topologyId < numTopologies; ++topologyId ) │ │ │ │ +57 { │ │ │ │ +58 implementations_[ topologyId ].initialize( topologyId ); │ │ │ │ +59 reference_elements_[ topologyId ].setImplementation( implementations_ │ │ │ │ +[ topologyId ] ); │ │ │ │ +60 } │ │ │ │ +61 } │ │ │ │ +62 │ │ │ │ +63 const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& operator() ( const GeometryType &type ) const │ │ │ │ +64 { │ │ │ │ +65 assert( type.dim() == dim ); │ │ │ │ +66 return reference_elements_[ type.id() ]; │ │ │ │ +67 } │ │ │ │ +68 │ │ │ │ +69 const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _s_i_m_p_l_e_x () const │ │ │ │ +70 { │ │ │ │ +71 return reference_elements_[ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_s_i_m_p_l_e_x(dim)._i_d() ]; │ │ │ │ +72 } │ │ │ │ 73 │ │ │ │ -74 for (int i = 0; i < opts.maxIt; ++i) │ │ │ │ +74 const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _c_u_b_e () const │ │ │ │ 75 { │ │ │ │ -76 // Get descent direction dx: (J^T*J)dx = J^T*dy │ │ │ │ -77 const bool invertible = FieldMatrixHelper::xTRightInvA(df(x), dy, dx); │ │ │ │ +76 return reference_elements_[ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_u_b_e(dim)._i_d() ]; │ │ │ │ +77 } │ │ │ │ 78 │ │ │ │ -79 // break if jacobian is not invertible │ │ │ │ -80 if (!invertible) │ │ │ │ -81 return GaussNewtonErrorCode::JACOBIAN_NOT_INVERTIBLE; │ │ │ │ -82 │ │ │ │ -83 // line-search procedure to update x with correction dx │ │ │ │ -84 R alpha = 1; │ │ │ │ -85 for (int j = 0; j < opts.maxInnerIt; ++j) { │ │ │ │ -86 x = x0 - alpha * dx; │ │ │ │ -87 dy = f(x) - y; │ │ │ │ -88 resNorm = dy.two_norm(); │ │ │ │ -89 │ │ │ │ -90 if (resNorm < resNorm0) │ │ │ │ -91 break; │ │ │ │ -92 │ │ │ │ -93 alpha *= opts.theta; │ │ │ │ -94 } │ │ │ │ -95 │ │ │ │ -96 // cannot reduce the residual │ │ │ │ -97 if (!(resNorm < resNorm0)) │ │ │ │ -98 return GaussNewtonErrorCode::STAGNATION; │ │ │ │ -99 │ │ │ │ -100 x0 = x; │ │ │ │ -101 resNorm0 = resNorm; │ │ │ │ -102 │ │ │ │ -103 // break if tolerance is reached. │ │ │ │ -104 if (resNorm < opts.absTol) │ │ │ │ -105 return GaussNewtonErrorCode::OK; │ │ │ │ -106 } │ │ │ │ -107 │ │ │ │ -108 // tolerance could not be reached │ │ │ │ -109 if (!(resNorm < opts.absTol)) │ │ │ │ -110 return GaussNewtonErrorCode::TOLERANCE_NOT_REACHED; │ │ │ │ +79 const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _p_y_r_a_m_i_d () const │ │ │ │ +80 { │ │ │ │ +81 return reference_elements_[ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_y_r_a_m_i_d._i_d() ]; │ │ │ │ +82 } │ │ │ │ +83 │ │ │ │ +84 const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _p_r_i_s_m () const │ │ │ │ +85 { │ │ │ │ +86 return reference_elements_[ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m._i_d() ]; │ │ │ │ +87 } │ │ │ │ +88 │ │ │ │ +89 const_iterator begin () const │ │ │ │ +90 { │ │ │ │ +91 return reference_elements_.data(); │ │ │ │ +92 } │ │ │ │ +93 │ │ │ │ +94 const_iterator end () const │ │ │ │ +95 { │ │ │ │ +96 return reference_elements_.data() + numTopologies; │ │ │ │ +97 } │ │ │ │ +98 │ │ │ │ +99 private: │ │ │ │ +100 │ │ │ │ +101 std::array implementations_; │ │ │ │ +102 std::array reference_elements_; │ │ │ │ +103 │ │ │ │ +104 }; │ │ │ │ +105 │ │ │ │ +106 │ │ │ │ +107 } // namespace Impl │ │ │ │ +108 │ │ │ │ +109 │ │ │ │ +110#endif // DOXYGEN │ │ │ │ 111 │ │ │ │ -112 return GaussNewtonErrorCode::OK; │ │ │ │ -113} │ │ │ │ -114 │ │ │ │ -115} // end namespace Impl │ │ │ │ -116} // end namespace Dune │ │ │ │ -117 │ │ │ │ -118#endif // DUNE_GEOMETRY_UTILITY_ALGORITHMS_HH │ │ │ │ -_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h │ │ │ │ +112 │ │ │ │ +113 // ReferenceElements │ │ │ │ +114 // ------------------------ │ │ │ │ +115 │ │ │ │ +126 template< class ctype_, int dim > │ │ │ │ +_1_2_7 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ +128 { │ │ │ │ +129 │ │ │ │ +_1_3_1 using _c_t_y_p_e = ctype_; │ │ │ │ +132 │ │ │ │ +_1_3_4 using _C_o_o_r_d_i_n_a_t_e_F_i_e_l_d = _c_t_y_p_e; │ │ │ │ +135 │ │ │ │ +_1_3_7 static constexpr int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ +138 │ │ │ │ +139 private: │ │ │ │ +140 │ │ │ │ +141 using Container = Impl::ReferenceElementContainer< ctype, dim >; │ │ │ │ +142 │ │ │ │ +143 public: │ │ │ │ +144 │ │ │ │ +_1_4_6 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = typename Container::ReferenceElement; │ │ │ │ +147 │ │ │ │ +_1_4_9 using _I_t_e_r_a_t_o_r = typename Container::const_iterator; │ │ │ │ +150 │ │ │ │ +_1_5_2 using _i_t_e_r_a_t_o_r = _I_t_e_r_a_t_o_r; │ │ │ │ +153 │ │ │ │ +155 static const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& │ │ │ │ +_1_5_6 _g_e_n_e_r_a_l ( const _G_e_o_m_e_t_r_y_T_y_p_e& type ) │ │ │ │ +157 { │ │ │ │ +158 return container() ( type ); │ │ │ │ +159 } │ │ │ │ +160 │ │ │ │ +_1_6_2 static const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _s_i_m_p_l_e_x () │ │ │ │ +163 { │ │ │ │ +164 return container().simplex(); │ │ │ │ +165 } │ │ │ │ +166 │ │ │ │ +_1_6_8 static const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _c_u_b_e () │ │ │ │ +169 { │ │ │ │ +170 return container().cube(); │ │ │ │ +171 } │ │ │ │ +172 │ │ │ │ +_1_7_3 static _I_t_e_r_a_t_o_r _b_e_g_i_n () │ │ │ │ +174 { │ │ │ │ +175 return container().begin(); │ │ │ │ +176 } │ │ │ │ +177 │ │ │ │ +_1_7_8 static _I_t_e_r_a_t_o_r _e_n_d () │ │ │ │ +179 { │ │ │ │ +180 return container().end(); │ │ │ │ +181 } │ │ │ │ +182 │ │ │ │ +183 private: │ │ │ │ +184 │ │ │ │ +185 DUNE_EXPORT static const Container& container () │ │ │ │ +186 { │ │ │ │ +187 static Container container; │ │ │ │ +188 return container; │ │ │ │ +189 } │ │ │ │ +190 }; │ │ │ │ +191 │ │ │ │ +192 } // namespace Geo │ │ │ │ +193 │ │ │ │ +195 using _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ +196 │ │ │ │ +197 │ │ │ │ +198#ifdef DOXYGEN │ │ │ │ +199 │ │ │ │ +201 │ │ │ │ +244 template │ │ │ │ +_2_4_5 unspecified-value-type _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(T&&... t); │ │ │ │ +246 │ │ │ │ +247#endif │ │ │ │ +248 │ │ │ │ +249 │ │ │ │ +251 │ │ │ │ +264 template │ │ │ │ +_2_6_5 auto _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(const _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e& gt, _D_u_n_e_:_:_D_i_m_<_d_i_m_> = {}) │ │ │ │ +266 { │ │ │ │ +267 return _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_T_,_d_i_m_>_:_:_g_e_n_e_r_a_l(gt); │ │ │ │ +268 } │ │ │ │ +269 │ │ │ │ +270 │ │ │ │ +272 │ │ │ │ +284 template>:: │ │ │ │ +value, int> = 0> │ │ │ │ +_2_8_5 auto _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(const T&, const _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e& gt, _D_u_n_e_:_: │ │ │ │ +_D_i_m_<_d_i_m_>) │ │ │ │ +286 { │ │ │ │ +287 return _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_T_,_d_i_m_>_:_:_g_e_n_e_r_a_l(gt); │ │ │ │ +288 } │ │ │ │ +289 │ │ │ │ +290 template │ │ │ │ +_2_9_1 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = decltype(_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(std::declval()...)); │ │ │ │ +292 │ │ │ │ +293} // namespace Dune │ │ │ │ +294 │ │ │ │ +295#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTS_HH │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h │ │ │ │ +_t_y_p_e_._h_h │ │ │ │ +A unique label for each type of element that can occur in a grid. │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_i_m_p_l_e_m_e_n_t_a_t_i_o_n_._h_h │ │ │ │ +_d_i_m_e_n_s_i_o_n_._h_h │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_u_b_e │ │ │ │ +constexpr GeometryType cube(unsigned int dim) │ │ │ │ +Returns a GeometryType representing a hypercube of dimension dim. │ │ │ │ +DDeeffiinniittiioonn type.hh:462 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m │ │ │ │ +constexpr GeometryType prism │ │ │ │ +GeometryType representing a 3D prism. │ │ │ │ +DDeeffiinniittiioonn type.hh:528 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_y_r_a_m_i_d │ │ │ │ +constexpr GeometryType pyramid │ │ │ │ +GeometryType representing a 3D pyramid. │ │ │ │ +DDeeffiinniittiioonn type.hh:522 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_s_i_m_p_l_e_x │ │ │ │ +constexpr GeometryType simplex(unsigned int dim) │ │ │ │ +Returns a GeometryType representing a simplex of dimension dim. │ │ │ │ +DDeeffiinniittiioonn type.hh:453 │ │ │ │ +_D_u_n_e_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +unspecified value type referenceElement(T &&... t) │ │ │ │ +Returns a reference element for the objects t.... │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ +_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +decltype(referenceElement(std::declval< T >()...)) ReferenceElement │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:291 │ │ │ │ +_D_u_n_e_:_:_G_e_o │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:28 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ +Class providing access to the singletons of the reference elements. │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_b_e_g_i_n │ │ │ │ +static Iterator begin() │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:173 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _>_:_:_i_t_e_r_a_t_o_r │ │ │ │ +Iterator iterator │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:152 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +typename Container::ReferenceElement ReferenceElement │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:146 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_c_u_b_e │ │ │ │ +static const ReferenceElement & cube() │ │ │ │ +get hypercube reference elements │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:168 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_e_n_d │ │ │ │ +static Iterator end() │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:178 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _>_:_:_c_t_y_p_e │ │ │ │ +ctype ctype │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:131 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_g_e_n_e_r_a_l │ │ │ │ +static const ReferenceElement & general(const GeometryType &type) │ │ │ │ +get general reference elements │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:156 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_s_i_m_p_l_e_x │ │ │ │ +static const ReferenceElement & simplex() │ │ │ │ +get simplex reference elements │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:162 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ +typename Container::const_iterator Iterator │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:149 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ +static constexpr int dimension │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:137 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _>_:_:_C_o_o_r_d_i_n_a_t_e_F_i_e_l_d │ │ │ │ +ctype CoordinateField │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:134 │ │ │ │ +_D_u_n_e_:_:_D_i_m │ │ │ │ +Static tag representing a dimension. │ │ │ │ +DDeeffiinniittiioonn dimension.hh:16 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ +DDeeffiinniittiioonn type.hh:114 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_d │ │ │ │ +constexpr unsigned int id() const │ │ │ │ +Return the topology id of the type. │ │ │ │ +DDeeffiinniittiioonn type.hh:365 │ │ │ │ +_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_g_e_n_e_r_a_l │ │ │ │ +static const ReferenceElement & general(const GeometryType &type) │ │ │ │ +get general reference elements │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:156 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00188.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: typeindex.hh File Reference │ │ │ +dune-geometry: generalvertexorder.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -73,42 +73,48 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
typeindex.hh File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
generalvertexorder.hh File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

Helper classes to provide indices for geometrytypes for use in a vector. │ │ │ -More...

│ │ │ -
#include <cstddef>
│ │ │ -#include <dune/common/indices.hh>
│ │ │ -#include <dune/common/hybridutilities.hh>
│ │ │ -#include "type.hh"
│ │ │ +
#include <algorithm>
│ │ │ +#include <cassert>
│ │ │ +#include <cstddef>
│ │ │ +#include <iterator>
│ │ │ +#include <vector>
│ │ │ +#include <dune/common/iteratorfacades.hh>
│ │ │ +#include "type.hh"
│ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::LocalGeometryTypeIndex
 Compute per-dimension indices for geometry types. More...
class  Dune::GlobalGeometryTypeIndex
 Compute indices for geometry types, taking the dimension into account. More...
class  Dune::GeneralVertexOrder< dim, Index_ >
 Class providing information on the ordering of vertices. More...
class  Dune::GeneralVertexOrder< dim, Index_ >::iterator
 Iterate over the vertex indices of some sub-entity. More...
│ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Functions

template<class InIterator, class OutIterator>
void Dune::reduceOrder (const InIterator &inBegin, const InIterator &inEnd, OutIterator outIt)
 Algorithm to reduce vertex order information.
│ │ │ -

Detailed Description

│ │ │ -

Helper classes to provide indices for geometrytypes for use in a vector.

│ │ │ -
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,27 +1,31 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -typeindex.hh File Reference │ │ │ │ -Helper classes to provide indices for geometrytypes for use in a vector. │ │ │ │ -_M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +generalvertexorder.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include "_t_y_p_e_._h_h" │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x │ │ │ │ -  Compute per-dimension indices for geometry types. _M_o_r_e_._._. │ │ │ │ -class   _D_u_n_e_:_:_G_l_o_b_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x │ │ │ │ -  Compute indices for geometry types, taking the dimension into account. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ +class   _D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_<_ _d_i_m_,_ _I_n_d_e_x___ _> │ │ │ │ +  Class providing information on the ordering of vertices. _M_o_r_e_._._. │ │ │ │ +class   _D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_<_ _d_i_m_,_ _I_n_d_e_x___ _>_:_:_i_t_e_r_a_t_o_r │ │ │ │ +  Iterate over the vertex indices of some sub-entity. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Helper classes to provide indices for geometrytypes for use in a vector. │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +void  _D_u_n_e_:_:_r_e_d_u_c_e_O_r_d_e_r (const InIterator &inBegin, const InIterator &inEnd, │ │ │ │ + OutIterator outIt) │ │ │ │ +  Algorithm to reduce vertex order information. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00188_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: typeindex.hh Source File │ │ │ +dune-geometry: generalvertexorder.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,163 +71,187 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
typeindex.hh
│ │ │ +
generalvertexorder.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_TYPEINDEX_HH
│ │ │ -
6#define DUNE_GEOMETRY_TYPEINDEX_HH
│ │ │ -
7
│ │ │ -
13
│ │ │ -
14#include <cstddef>
│ │ │ -
15
│ │ │ -
16#include <dune/common/indices.hh>
│ │ │ -
17#include <dune/common/hybridutilities.hh>
│ │ │ -
18
│ │ │ -
19#include "type.hh"
│ │ │ -
20
│ │ │ -
21namespace Dune
│ │ │ -
22{
│ │ │ -
│ │ │ - │ │ │ -
25 {
│ │ │ -
32 inline static constexpr std::size_t regular_size(std::size_t dim)
│ │ │ -
33 {
│ │ │ -
34 // The following expression is derived from the expression for
│ │ │ -
35 // GlobalGeometryTypeIndex::regular_offset(). Subtracting
│ │ │ -
36 // regular_offset(dim+1)-regular_offset(dim) we get:
│ │ │ -
37 //
│ │ │ -
38 // ((1 << dim+1) >> 1) - ((1 << dim) >> 1)
│ │ │ -
39 //
│ │ │ -
40 // We always have
│ │ │ -
41 //
│ │ │ -
42 // dim >= 0,
│ │ │ -
43 //
│ │ │ -
44 // so
│ │ │ -
45 //
│ │ │ -
46 // (1 << dim+1) >= 2 and (1 << dim+2) % 2 == 0.
│ │ │ -
47 //
│ │ │ -
48 // So if we apply a single right-shift to that, we will never lose any
│ │ │ -
49 // set bits, thus
│ │ │ -
50 //
│ │ │ -
51 // ((1 << dim+1) >> 1) == (1 << dim)
│ │ │ -
52 return (1 << dim) - ((1 << dim) >> 1);
│ │ │ -
53 }
│ │ │ -
54
│ │ │ -
55 public:
│ │ │ -
│ │ │ -
61 inline static constexpr std::size_t size(std::size_t dim)
│ │ │ -
62 {
│ │ │ -
63 // one for "none"
│ │ │ -
64 return regular_size(dim) + 1;
│ │ │ -
65 }
│ │ │ -
│ │ │ -
66
│ │ │ -
│ │ │ -
73 inline static constexpr std::size_t index(const GeometryType &gt)
│ │ │ -
74 {
│ │ │ -
75 return gt.isNone() ? regular_size(gt.dim()) : (gt.id() >> 1);
│ │ │ -
76 }
│ │ │ -
│ │ │ -
77
│ │ │ -
│ │ │ -
79 inline static constexpr GeometryType type(std::size_t dim, std::size_t index) {
│ │ │ -
80 return (index == regular_size(dim)) ?
│ │ │ - │ │ │ -
82 // the cast to unsigned makes sure this is interpreted as the topology
│ │ │ -
83 // ID constructor
│ │ │ -
84 GeometryType(static_cast< unsigned int >(index << 1), dim);
│ │ │ -
85 }
│ │ │ -
│ │ │ -
86 };
│ │ │ -
│ │ │ -
87
│ │ │ -
│ │ │ - │ │ │ -
90 {
│ │ │ -
98 inline static constexpr std::size_t regular_offset(std::size_t dim)
│ │ │ -
99 {
│ │ │ -
100 // The number of regular geometry types in a given dimension is
│ │ │ -
101 // 2^(dim-1). For dim==0 this would yield 1/2 geometry types (which is
│ │ │ -
102 // obviously bogus, dim==0 has one regular geometry type, the point).
│ │ │ -
103 // The following expression relies on 1 >> 1 == 0 to treat dim==0
│ │ │ -
104 // specially.
│ │ │ -
105 return (1 << dim) >> 1;
│ │ │ -
106 }
│ │ │ -
107
│ │ │ -
108 public:
│ │ │ -
│ │ │ -
113 inline static constexpr std::size_t offset(std::size_t dim)
│ │ │ -
114 {
│ │ │ -
115 // dim times "none"
│ │ │ -
116 return regular_offset(dim) + dim;
│ │ │ -
117 }
│ │ │ -
│ │ │ -
118
│ │ │ -
│ │ │ -
125 inline static constexpr std::size_t size(std::size_t maxdim)
│ │ │ -
126 {
│ │ │ -
127 return offset(maxdim+1);
│ │ │ -
128 }
│ │ │ -
│ │ │ -
129
│ │ │ -
│ │ │ -
138 inline static constexpr std::size_t index(const GeometryType &gt)
│ │ │ -
139 {
│ │ │ -
140 return offset(gt.dim()) + LocalGeometryTypeIndex::index(gt);
│ │ │ -
141 }
│ │ │ -
│ │ │ -
142 };
│ │ │ -
│ │ │ -
143
│ │ │ -
144 namespace Impl {
│ │ │ -
145
│ │ │ -
146 // Map a dynamic GeometryType to a static integral_constant<GeometryType::Id, ...>
│ │ │ -
147 template<int dim, class F>
│ │ │ -
148 static auto toGeometryTypeIdConstant(const GeometryType& gt, F&& f) {
│ │ │ -
149 // Transform LocalGeometryTypeIndex to GeometryType::Id
│ │ │ -
150 auto callWithId = [&](auto index) {
│ │ │ -
151 static constexpr auto id = LocalGeometryTypeIndex::type(dim, decltype(index)::value).toId();
│ │ │ -
152 return f(std::integral_constant<GeometryType::Id, id>{});
│ │ │ -
153 };
│ │ │ -
154 // switchCases needs a fallback to determine the return type.
│ │ │ -
155 auto fallBack = [&]() { return callWithId(Dune::Indices::_0); };
│ │ │ -
156 // Iterate over all _regular_ GeometryType indices for given dimension
│ │ │ -
157 auto allIndices = std::make_index_sequence<LocalGeometryTypeIndex::size(dim)-1>{};
│ │ │ -
158 return Dune::Hybrid::switchCases(allIndices, LocalGeometryTypeIndex::index(gt), callWithId, fallBack);
│ │ │ +
5
│ │ │ +
6#ifndef DUNE_GEOMETRY_GENERALVERTEXORDER_HH
│ │ │ +
7#define DUNE_GEOMETRY_GENERALVERTEXORDER_HH
│ │ │ +
8
│ │ │ +
9#include <algorithm>
│ │ │ +
10#include <cassert>
│ │ │ +
11#include <cstddef>
│ │ │ +
12#include <iterator>
│ │ │ +
13#include <vector>
│ │ │ +
14
│ │ │ +
15#include <dune/common/iteratorfacades.hh>
│ │ │ +
16
│ │ │ +
17#include "type.hh"
│ │ │ + │ │ │ +
19
│ │ │ +
20namespace Dune {
│ │ │ +
21
│ │ │ +
39 template<class InIterator, class OutIterator>
│ │ │ +
│ │ │ +
40 void reduceOrder(const InIterator& inBegin, const InIterator& inEnd,
│ │ │ +
41 OutIterator outIt)
│ │ │ +
42 {
│ │ │ +
43 for(InIterator inIt = inBegin; inIt != inEnd; ++inIt, ++outIt)
│ │ │ +
44 *outIt = std::count_if(inBegin, inEnd, [&](const auto& v)
│ │ │ +
45 {
│ │ │ +
46 return v < *inIt;
│ │ │ +
47 });
│ │ │ +
48 }
│ │ │ +
│ │ │ +
49
│ │ │ +
51
│ │ │ +
66 template<std::size_t dim, class Index_ = std::size_t>
│ │ │ +
│ │ │ + │ │ │ +
68 typedef ReferenceElements<double, dim> RefElems;
│ │ │ +
69 typedef typename RefElems::ReferenceElement RefElem;
│ │ │ +
70
│ │ │ +
71 RefElem refelem;
│ │ │ +
72 GeometryType gt;
│ │ │ +
73 std::vector<Index_> vertexOrder;
│ │ │ +
74
│ │ │ +
75 public:
│ │ │ +
77 typedef Index_ Index;
│ │ │ +
78
│ │ │ +
80 class iterator;
│ │ │ +
81
│ │ │ +
83 static const std::size_t dimension = dim;
│ │ │ +
85 const GeometryType &type() const { return gt; }
│ │ │ +
86
│ │ │ +
88
│ │ │ +
96 template<class InIterator>
│ │ │ +
│ │ │ +
97 GeneralVertexOrder(const GeometryType& gt_, const InIterator &inBegin,
│ │ │ +
98 const InIterator &inEnd) :
│ │ │ +
99 refelem(RefElems::general(gt_)), gt(gt_),
│ │ │ +
100 vertexOrder(refelem.size(dim))
│ │ │ +
101 { reduceOrder(inBegin, inEnd, vertexOrder.begin()); }
│ │ │ +
│ │ │ +
102
│ │ │ +
104
│ │ │ +
│ │ │ +
108 iterator begin(std::size_t codim, std::size_t subEntity) const
│ │ │ +
109 { return iterator(*this, codim, subEntity); }
│ │ │ +
│ │ │ +
110
│ │ │ +
111
│ │ │ +
│ │ │ +
115 iterator end(std::size_t codim, std::size_t subEntity) const {
│ │ │ +
116 return iterator(*this, codim, subEntity,
│ │ │ +
117 refelem.size(subEntity, codim, dim));
│ │ │ +
118 }
│ │ │ +
│ │ │ +
119
│ │ │ +
121
│ │ │ +
│ │ │ +
128 void getReduced(std::size_t codim, std::size_t subEntity,
│ │ │ +
129 std::vector<Index>& order) const
│ │ │ +
130 {
│ │ │ +
131 order.resize(refelem.size(subEntity, codim, dim));
│ │ │ +
132 reduceOrder(begin(codim, subEntity), end(codim, subEntity),
│ │ │ +
133 order.begin());
│ │ │ +
134 }
│ │ │ +
│ │ │ +
135 };
│ │ │ +
│ │ │ +
136
│ │ │ +
138
│ │ │ +
141 template<std::size_t dim, class Index_>
│ │ │ +
│ │ │ +
142 class GeneralVertexOrder<dim, Index_>::iterator :
│ │ │ +
143 public Dune::RandomAccessIteratorFacade<iterator, const Index_>
│ │ │ +
144 {
│ │ │ +
145 const GeneralVertexOrder *order;
│ │ │ +
146 std::size_t codim;
│ │ │ +
147 std::size_t subEntity;
│ │ │ +
148 std::size_t vertex;
│ │ │ +
149
│ │ │ +
150 iterator(const GeneralVertexOrder &order_, std::size_t codim_,
│ │ │ +
151 std::size_t subEntity_, std::size_t vertex_ = 0) :
│ │ │ +
152 order(&order_), codim(codim_), subEntity(subEntity_), vertex(vertex_)
│ │ │ +
153 { }
│ │ │ +
154
│ │ │ +
155 public:
│ │ │ +
│ │ │ +
156 const Index &dereference() const {
│ │ │ +
157 return order->vertexOrder[order->refelem.subEntity(subEntity, codim,
│ │ │ +
158 vertex, dim)];
│ │ │
159 }
│ │ │ -
160
│ │ │ -
161 } // namespace Impl
│ │ │ -
162} // namespace Dune
│ │ │ -
163
│ │ │ -
164#endif // DUNE_GEOMETRY_TYPEINDEX_HH
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ -
constexpr GeometryType none(unsigned int dim)
Returns a GeometryType representing a singular of dimension dim.
Definition type.hh:471
│ │ │ +
│ │ │ +
│ │ │ +
160 const Index &elementAt(std::ptrdiff_t n) const {
│ │ │ +
161 return order->vertexOrder[order->refelem.subEntity(subEntity, codim,
│ │ │ +
162 vertex+n, dim)];
│ │ │ +
163 }
│ │ │ +
│ │ │ +
│ │ │ +
164 bool equals(const iterator &other) const {
│ │ │ +
165 return order == other.order && codim == other.codim &&
│ │ │ +
166 subEntity == other.subEntity && vertex == other.vertex;
│ │ │ +
167 }
│ │ │ +
│ │ │ +
168 void increment() { ++vertex; }
│ │ │ +
169 void decrement() { --vertex; }
│ │ │ +
170 void advance(std::ptrdiff_t n) { vertex += n; }
│ │ │ +
│ │ │ +
171 std::ptrdiff_t distanceTo(const iterator &other) const {
│ │ │ +
172 // make sure we reference the same container
│ │ │ +
173 assert(order == other.order && codim == other.codim &&
│ │ │ +
174 subEntity == other.subEntity);
│ │ │ +
175 if(vertex < other.vertex) return other.vertex - vertex;
│ │ │ +
176 else return -static_cast<std::ptrdiff_t>(vertex - other.vertex);
│ │ │ +
177 }
│ │ │ +
│ │ │ +
178
│ │ │ +
179 friend class GeneralVertexOrder<dim, Index>;
│ │ │ +
180
│ │ │ +
182
│ │ │ + │ │ │ +
188 };
│ │ │ +
│ │ │ +
189} // namespace Dune
│ │ │ +
190
│ │ │ +
191#endif // DUNE_GEOMETRY_GENERALVERTEXORDER_HH
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ + │ │ │
Definition affinegeometry.hh:22
│ │ │ +
void reduceOrder(const InIterator &inBegin, const InIterator &inEnd, OutIterator outIt)
Algorithm to reduce vertex order information.
Definition generalvertexorder.hh:40
│ │ │ +
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │ +
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:146
│ │ │ +
Index_ Index
Type of indices.
Definition generalvertexorder.hh:77
│ │ │ +
const GeometryType & type() const
get type of the entity's geometry
Definition generalvertexorder.hh:85
│ │ │ +
static const std::size_t dimension
export the dimension of the entity we provide information for
Definition generalvertexorder.hh:83
│ │ │ +
void getReduced(std::size_t codim, std::size_t subEntity, std::vector< Index > &order) const
get a vector of reduced indices for some sub-entity
Definition generalvertexorder.hh:128
│ │ │ +
iterator end(std::size_t codim, std::size_t subEntity) const
get end iterator for the vertex indices of some sub-entity
Definition generalvertexorder.hh:115
│ │ │ +
GeneralVertexOrder(const GeometryType &gt_, const InIterator &inBegin, const InIterator &inEnd)
construct a GeneralVertexOrder
Definition generalvertexorder.hh:97
│ │ │ +
iterator begin(std::size_t codim, std::size_t subEntity) const
get begin iterator for the vertex indices of some sub-entity
Definition generalvertexorder.hh:108
│ │ │ +
Iterate over the vertex indices of some sub-entity.
Definition generalvertexorder.hh:144
│ │ │ +
iterator()
public default constructor
Definition generalvertexorder.hh:187
│ │ │ +
void decrement()
Definition generalvertexorder.hh:169
│ │ │ +
void advance(std::ptrdiff_t n)
Definition generalvertexorder.hh:170
│ │ │ +
const Index & dereference() const
Definition generalvertexorder.hh:156
│ │ │ +
void increment()
Definition generalvertexorder.hh:168
│ │ │ +
bool equals(const iterator &other) const
Definition generalvertexorder.hh:164
│ │ │ +
std::ptrdiff_t distanceTo(const iterator &other) const
Definition generalvertexorder.hh:171
│ │ │ +
const Index & elementAt(std::ptrdiff_t n) const
Definition generalvertexorder.hh:160
│ │ │
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ -
constexpr Id toId() const
Create an Id representation of this GeometryType.
Definition type.hh:210
│ │ │ -
constexpr unsigned int dim() const
Return dimension of the type.
Definition type.hh:360
│ │ │ -
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:365
│ │ │ -
constexpr bool isNone() const
Return true if entity is a singular of any dimension.
Definition type.hh:355
│ │ │ -
Compute per-dimension indices for geometry types.
Definition typeindex.hh:25
│ │ │ -
static constexpr std::size_t size(std::size_t dim)
Compute total number of geometry types for the given dimension.
Definition typeindex.hh:61
│ │ │ -
static constexpr GeometryType type(std::size_t dim, std::size_t index)
compute the geometry type for the given local index and dimension
Definition typeindex.hh:79
│ │ │ -
static constexpr std::size_t index(const GeometryType &gt)
Compute the index for the given geometry type within its dimension.
Definition typeindex.hh:73
│ │ │ -
Compute indices for geometry types, taking the dimension into account.
Definition typeindex.hh:90
│ │ │ -
static constexpr std::size_t index(const GeometryType &gt)
Compute the index for the given geometry type over all dimensions.
Definition typeindex.hh:138
│ │ │ -
static constexpr std::size_t offset(std::size_t dim)
Compute the starting index for a given dimension including irregular geometry types.
Definition typeindex.hh:113
│ │ │ -
static constexpr std::size_t size(std::size_t maxdim)
Compute total number of geometry types up to and including the given dimension.
Definition typeindex.hh:125
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,188 +1,214 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -typeindex.hh │ │ │ │ +generalvertexorder.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_TYPEINDEX_HH │ │ │ │ -6#define DUNE_GEOMETRY_TYPEINDEX_HH │ │ │ │ -7 │ │ │ │ -13 │ │ │ │ -14#include │ │ │ │ -15 │ │ │ │ -16#include │ │ │ │ -17#include │ │ │ │ -18 │ │ │ │ -19#include "_t_y_p_e_._h_h" │ │ │ │ -20 │ │ │ │ -21namespace _D_u_n_e │ │ │ │ -22{ │ │ │ │ -_2_4 class _L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x │ │ │ │ -25 { │ │ │ │ -32 inline static constexpr std::size_t regular_size(std::size_t dim) │ │ │ │ -33 { │ │ │ │ -34 // The following expression is derived from the expression for │ │ │ │ -35 // GlobalGeometryTypeIndex::regular_offset(). Subtracting │ │ │ │ -36 // regular_offset(dim+1)-regular_offset(dim) we get: │ │ │ │ -37 // │ │ │ │ -38 // ((1 << dim+1) >> 1) - ((1 << dim) >> 1) │ │ │ │ -39 // │ │ │ │ -40 // We always have │ │ │ │ -41 // │ │ │ │ -42 // dim >= 0, │ │ │ │ -43 // │ │ │ │ -44 // so │ │ │ │ -45 // │ │ │ │ -46 // (1 << dim+1) >= 2 and (1 << dim+2) % 2 == 0. │ │ │ │ -47 // │ │ │ │ -48 // So if we apply a single right-shift to that, we will never lose any │ │ │ │ -49 // set bits, thus │ │ │ │ -50 // │ │ │ │ -51 // ((1 << dim+1) >> 1) == (1 << dim) │ │ │ │ -52 return (1 << dim) - ((1 << dim) >> 1); │ │ │ │ -53 } │ │ │ │ -54 │ │ │ │ -55 public: │ │ │ │ -_6_1 inline static constexpr std::size_t _s_i_z_e(std::size_t dim) │ │ │ │ -62 { │ │ │ │ -63 // one for "none" │ │ │ │ -64 return regular_size(dim) + 1; │ │ │ │ -65 } │ │ │ │ -66 │ │ │ │ -_7_3 inline static constexpr std::size_t _i_n_d_e_x(const _G_e_o_m_e_t_r_y_T_y_p_e >) │ │ │ │ -74 { │ │ │ │ -75 return gt._i_s_N_o_n_e() ? regular_size(gt._d_i_m()) : (gt._i_d() >> 1); │ │ │ │ -76 } │ │ │ │ -77 │ │ │ │ -_7_9 inline static constexpr _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e(std::size_t dim, std::size_t │ │ │ │ -_i_n_d_e_x) { │ │ │ │ -80 return (_i_n_d_e_x == regular_size(dim)) ? │ │ │ │ -81 _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_n_o_n_e(dim) : │ │ │ │ -82 // the cast to unsigned makes sure this is interpreted as the topology │ │ │ │ -83 // ID constructor │ │ │ │ -84 _G_e_o_m_e_t_r_y_T_y_p_e(static_cast< unsigned int >(_i_n_d_e_x << 1), dim); │ │ │ │ -85 } │ │ │ │ -86 }; │ │ │ │ -87 │ │ │ │ -_8_9 class _G_l_o_b_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x │ │ │ │ -90 { │ │ │ │ -98 inline static constexpr std::size_t regular_offset(std::size_t dim) │ │ │ │ -99 { │ │ │ │ -100 // The number of regular geometry types in a given dimension is │ │ │ │ -101 // 2^(dim-1). For dim==0 this would yield 1/2 geometry types (which is │ │ │ │ -102 // obviously bogus, dim==0 has one regular geometry type, the point). │ │ │ │ -103 // The following expression relies on 1 >> 1 == 0 to treat dim==0 │ │ │ │ -104 // specially. │ │ │ │ -105 return (1 << dim) >> 1; │ │ │ │ -106 } │ │ │ │ -107 │ │ │ │ -108 public: │ │ │ │ -_1_1_3 inline static constexpr std::size_t _o_f_f_s_e_t(std::size_t dim) │ │ │ │ -114 { │ │ │ │ -115 // dim times "none" │ │ │ │ -116 return regular_offset(dim) + dim; │ │ │ │ -117 } │ │ │ │ -118 │ │ │ │ -_1_2_5 inline static constexpr std::size_t _s_i_z_e(std::size_t maxdim) │ │ │ │ -126 { │ │ │ │ -127 return _o_f_f_s_e_t(maxdim+1); │ │ │ │ -128 } │ │ │ │ -129 │ │ │ │ -_1_3_8 inline static constexpr std::size_t _i_n_d_e_x(const _G_e_o_m_e_t_r_y_T_y_p_e >) │ │ │ │ -139 { │ │ │ │ -140 return _o_f_f_s_e_t(gt._d_i_m()) + _L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_i_n_d_e_x(gt); │ │ │ │ -141 } │ │ │ │ -142 }; │ │ │ │ -143 │ │ │ │ -144 namespace Impl { │ │ │ │ -145 │ │ │ │ -146 // Map a dynamic GeometryType to a static integral_constant │ │ │ │ -147 template │ │ │ │ -148 static auto toGeometryTypeIdConstant(const GeometryType& gt, F&& f) { │ │ │ │ -149 // Transform LocalGeometryTypeIndex to GeometryType::Id │ │ │ │ -150 auto callWithId = [&](auto index) { │ │ │ │ -151 static constexpr auto id = _L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_t_y_p_e(dim, decltype │ │ │ │ -(index)::value)._t_o_I_d(); │ │ │ │ -152 return f(std::integral_constant{}); │ │ │ │ -153 }; │ │ │ │ -154 // switchCases needs a fallback to determine the return type. │ │ │ │ -155 auto fallBack = [&]() { return callWithId(Dune::Indices::_0); }; │ │ │ │ -156 // Iterate over all _regular_ GeometryType indices for given dimension │ │ │ │ -157 auto allIndices = std::make_index_sequence<_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_s_i_z_e │ │ │ │ -(dim)-1>{}; │ │ │ │ -158 return Dune::Hybrid::switchCases(allIndices, _L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_i_n_d_e_x │ │ │ │ -(gt), callWithId, fallBack); │ │ │ │ +5 │ │ │ │ +6#ifndef DUNE_GEOMETRY_GENERALVERTEXORDER_HH │ │ │ │ +7#define DUNE_GEOMETRY_GENERALVERTEXORDER_HH │ │ │ │ +8 │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13#include │ │ │ │ +14 │ │ │ │ +15#include │ │ │ │ +16 │ │ │ │ +17#include "_t_y_p_e_._h_h" │ │ │ │ +18#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +19 │ │ │ │ +20namespace _D_u_n_e { │ │ │ │ +21 │ │ │ │ +39 template │ │ │ │ +_4_0 void _r_e_d_u_c_e_O_r_d_e_r(const InIterator& inBegin, const InIterator& inEnd, │ │ │ │ +41 OutIterator outIt) │ │ │ │ +42 { │ │ │ │ +43 for(InIterator inIt = inBegin; inIt != inEnd; ++inIt, ++outIt) │ │ │ │ +44 *outIt = std::count_if(inBegin, inEnd, [&](const auto& v) │ │ │ │ +45 { │ │ │ │ +46 return v < *inIt; │ │ │ │ +47 }); │ │ │ │ +48 } │ │ │ │ +49 │ │ │ │ +51 │ │ │ │ +66 template │ │ │ │ +_6_7 class _G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r { │ │ │ │ +68 typedef _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_d_o_u_b_l_e_,_ _d_i_m_> RefElems; │ │ │ │ +69 typedef typename _R_e_f_E_l_e_m_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t RefElem; │ │ │ │ +70 │ │ │ │ +71 RefElem refelem; │ │ │ │ +72 _G_e_o_m_e_t_r_y_T_y_p_e gt; │ │ │ │ +73 std::vector vertexOrder; │ │ │ │ +74 │ │ │ │ +75 public: │ │ │ │ +_7_7 typedef Index_ _I_n_d_e_x; │ │ │ │ +78 │ │ │ │ +80 class _i_t_e_r_a_t_o_r; │ │ │ │ +81 │ │ │ │ +_8_3 static const std::size_t _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ +_8_5 const _G_e_o_m_e_t_r_y_T_y_p_e &_t_y_p_e() const { return gt; } │ │ │ │ +86 │ │ │ │ +88 │ │ │ │ +96 template │ │ │ │ +_9_7 _G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r(const _G_e_o_m_e_t_r_y_T_y_p_e& gt_, const InIterator &inBegin, │ │ │ │ +98 const InIterator &inEnd) : │ │ │ │ +99 refelem(RefElems::general(gt_)), gt(gt_), │ │ │ │ +100 vertexOrder(refelem.size(dim)) │ │ │ │ +101 { _r_e_d_u_c_e_O_r_d_e_r(inBegin, inEnd, vertexOrder.begin()); } │ │ │ │ +102 │ │ │ │ +104 │ │ │ │ +_1_0_8 _i_t_e_r_a_t_o_r _b_e_g_i_n(std::size_t codim, std::size_t subEntity) const │ │ │ │ +109 { return _i_t_e_r_a_t_o_r(*this, codim, subEntity); } │ │ │ │ +110 │ │ │ │ +111 │ │ │ │ +_1_1_5 _i_t_e_r_a_t_o_r _e_n_d(std::size_t codim, std::size_t subEntity) const { │ │ │ │ +116 return _i_t_e_r_a_t_o_r(*this, codim, subEntity, │ │ │ │ +117 refelem.size(subEntity, codim, dim)); │ │ │ │ +118 } │ │ │ │ +119 │ │ │ │ +121 │ │ │ │ +_1_2_8 void _g_e_t_R_e_d_u_c_e_d(std::size_t codim, std::size_t subEntity, │ │ │ │ +129 std::vector& order) const │ │ │ │ +130 { │ │ │ │ +131 order.resize(refelem.size(subEntity, codim, dim)); │ │ │ │ +132 _r_e_d_u_c_e_O_r_d_e_r(_b_e_g_i_n(codim, subEntity), _e_n_d(codim, subEntity), │ │ │ │ +133 order.begin()); │ │ │ │ +134 } │ │ │ │ +135 }; │ │ │ │ +136 │ │ │ │ +138 │ │ │ │ +141 template │ │ │ │ +_1_4_2 class _G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r::iterator : │ │ │ │ +143 public Dune::RandomAccessIteratorFacade │ │ │ │ +144 { │ │ │ │ +145 const _G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r *order; │ │ │ │ +146 std::size_t codim; │ │ │ │ +147 std::size_t subEntity; │ │ │ │ +148 std::size_t vertex; │ │ │ │ +149 │ │ │ │ +150 iterator(const _G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r &order_, std::size_t codim_, │ │ │ │ +151 std::size_t subEntity_, std::size_t vertex_ = 0) : │ │ │ │ +152 order(&order_), codim(codim_), subEntity(subEntity_), vertex(vertex_) │ │ │ │ +153 { } │ │ │ │ +154 │ │ │ │ +155 public: │ │ │ │ +_1_5_6 const _I_n_d_e_x &_d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ +157 return order->vertexOrder[order->refelem.subEntity(subEntity, codim, │ │ │ │ +158 vertex, dim)]; │ │ │ │ 159 } │ │ │ │ -160 │ │ │ │ -161 } // namespace Impl │ │ │ │ -162} // namespace Dune │ │ │ │ -163 │ │ │ │ -164#endif // DUNE_GEOMETRY_TYPEINDEX_HH │ │ │ │ +_1_6_0 const _I_n_d_e_x &_e_l_e_m_e_n_t_A_t(std::ptrdiff_t n) const { │ │ │ │ +161 return order->vertexOrder[order->refelem.subEntity(subEntity, codim, │ │ │ │ +162 vertex+n, dim)]; │ │ │ │ +163 } │ │ │ │ +_1_6_4 bool _e_q_u_a_l_s(const iterator &other) const { │ │ │ │ +165 return order == other.order && codim == other.codim && │ │ │ │ +166 subEntity == other.subEntity && vertex == other.vertex; │ │ │ │ +167 } │ │ │ │ +_1_6_8 void _i_n_c_r_e_m_e_n_t() { ++vertex; } │ │ │ │ +_1_6_9 void _d_e_c_r_e_m_e_n_t() { --vertex; } │ │ │ │ +_1_7_0 void _a_d_v_a_n_c_e(std::ptrdiff_t n) { vertex += n; } │ │ │ │ +_1_7_1 std::ptrdiff_t _d_i_s_t_a_n_c_e_T_o(const iterator &other) const { │ │ │ │ +172 // make sure we reference the same container │ │ │ │ +173 assert(order == other.order && codim == other.codim && │ │ │ │ +174 subEntity == other.subEntity); │ │ │ │ +175 if(vertex < other.vertex) return other.vertex - vertex; │ │ │ │ +176 else return -static_cast(vertex - other.vertex); │ │ │ │ +177 } │ │ │ │ +178 │ │ │ │ +179 friend class _G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r; │ │ │ │ +180 │ │ │ │ +182 │ │ │ │ +_1_8_7 _i_t_e_r_a_t_o_r() { } │ │ │ │ +188 }; │ │ │ │ +189} // namespace Dune │ │ │ │ +190 │ │ │ │ +191#endif // DUNE_GEOMETRY_GENERALVERTEXORDER_HH │ │ │ │ _t_y_p_e_._h_h │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_n_o_n_e │ │ │ │ -constexpr GeometryType none(unsigned int dim) │ │ │ │ -Returns a GeometryType representing a singular of dimension dim. │ │ │ │ -DDeeffiinniittiioonn type.hh:471 │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ +_D_u_n_e_:_:_r_e_d_u_c_e_O_r_d_e_r │ │ │ │ +void reduceOrder(const InIterator &inBegin, const InIterator &inEnd, │ │ │ │ +OutIterator outIt) │ │ │ │ +Algorithm to reduce vertex order information. │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:40 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ +Class providing access to the singletons of the reference elements. │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +typename Container::ReferenceElement ReferenceElement │ │ │ │ +The reference element type. │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:146 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_I_n_d_e_x │ │ │ │ +Index_ Index │ │ │ │ +Type of indices. │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:77 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_t_y_p_e │ │ │ │ +const GeometryType & type() const │ │ │ │ +get type of the entity's geometry │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:85 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ +static const std::size_t dimension │ │ │ │ +export the dimension of the entity we provide information for │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:83 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_g_e_t_R_e_d_u_c_e_d │ │ │ │ +void getReduced(std::size_t codim, std::size_t subEntity, std::vector< Index > │ │ │ │ +&order) const │ │ │ │ +get a vector of reduced indices for some sub-entity │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:128 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_e_n_d │ │ │ │ +iterator end(std::size_t codim, std::size_t subEntity) const │ │ │ │ +get end iterator for the vertex indices of some sub-entity │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:115 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r │ │ │ │ +GeneralVertexOrder(const GeometryType >_, const InIterator &inBegin, const │ │ │ │ +InIterator &inEnd) │ │ │ │ +construct a GeneralVertexOrder │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:97 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_b_e_g_i_n │ │ │ │ +iterator begin(std::size_t codim, std::size_t subEntity) const │ │ │ │ +get begin iterator for the vertex indices of some sub-entity │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:108 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r │ │ │ │ +Iterate over the vertex indices of some sub-entity. │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:144 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_i_t_e_r_a_t_o_r │ │ │ │ +iterator() │ │ │ │ +public default constructor │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:187 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_d_e_c_r_e_m_e_n_t │ │ │ │ +void decrement() │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:169 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_a_d_v_a_n_c_e │ │ │ │ +void advance(std::ptrdiff_t n) │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:170 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ +const Index & dereference() const │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:156 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ +void increment() │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:168 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const iterator &other) const │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:164 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_d_i_s_t_a_n_c_e_T_o │ │ │ │ +std::ptrdiff_t distanceTo(const iterator &other) const │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:171 │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_e_l_e_m_e_n_t_A_t │ │ │ │ +const Index & elementAt(std::ptrdiff_t n) const │ │ │ │ +DDeeffiinniittiioonn generalvertexorder.hh:160 │ │ │ │ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ DDeeffiinniittiioonn type.hh:114 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_t_o_I_d │ │ │ │ -constexpr Id toId() const │ │ │ │ -Create an Id representation of this GeometryType. │ │ │ │ -DDeeffiinniittiioonn type.hh:210 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_d_i_m │ │ │ │ -constexpr unsigned int dim() const │ │ │ │ -Return dimension of the type. │ │ │ │ -DDeeffiinniittiioonn type.hh:360 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_d │ │ │ │ -constexpr unsigned int id() const │ │ │ │ -Return the topology id of the type. │ │ │ │ -DDeeffiinniittiioonn type.hh:365 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_N_o_n_e │ │ │ │ -constexpr bool isNone() const │ │ │ │ -Return true if entity is a singular of any dimension. │ │ │ │ -DDeeffiinniittiioonn type.hh:355 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x │ │ │ │ -Compute per-dimension indices for geometry types. │ │ │ │ -DDeeffiinniittiioonn typeindex.hh:25 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_s_i_z_e │ │ │ │ -static constexpr std::size_t size(std::size_t dim) │ │ │ │ -Compute total number of geometry types for the given dimension. │ │ │ │ -DDeeffiinniittiioonn typeindex.hh:61 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_t_y_p_e │ │ │ │ -static constexpr GeometryType type(std::size_t dim, std::size_t index) │ │ │ │ -compute the geometry type for the given local index and dimension │ │ │ │ -DDeeffiinniittiioonn typeindex.hh:79 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_i_n_d_e_x │ │ │ │ -static constexpr std::size_t index(const GeometryType >) │ │ │ │ -Compute the index for the given geometry type within its dimension. │ │ │ │ -DDeeffiinniittiioonn typeindex.hh:73 │ │ │ │ -_D_u_n_e_:_:_G_l_o_b_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x │ │ │ │ -Compute indices for geometry types, taking the dimension into account. │ │ │ │ -DDeeffiinniittiioonn typeindex.hh:90 │ │ │ │ -_D_u_n_e_:_:_G_l_o_b_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_i_n_d_e_x │ │ │ │ -static constexpr std::size_t index(const GeometryType >) │ │ │ │ -Compute the index for the given geometry type over all dimensions. │ │ │ │ -DDeeffiinniittiioonn typeindex.hh:138 │ │ │ │ -_D_u_n_e_:_:_G_l_o_b_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_o_f_f_s_e_t │ │ │ │ -static constexpr std::size_t offset(std::size_t dim) │ │ │ │ -Compute the starting index for a given dimension including irregular geometry │ │ │ │ -types. │ │ │ │ -DDeeffiinniittiioonn typeindex.hh:113 │ │ │ │ -_D_u_n_e_:_:_G_l_o_b_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_s_i_z_e │ │ │ │ -static constexpr std::size_t size(std::size_t maxdim) │ │ │ │ -Compute total number of geometry types up to and including the given dimension. │ │ │ │ -DDeeffiinniittiioonn typeindex.hh:125 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00191.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: type.hh File Reference │ │ │ +dune-geometry: referenceelementimplementation.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,82 +72,26 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Functions | │ │ │ -Variables
│ │ │ -
type.hh File Reference
│ │ │ +Namespaces
│ │ │ +
referenceelementimplementation.cc File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

A unique label for each type of element that can occur in a grid. │ │ │ -More...

│ │ │ -
#include <cassert>
│ │ │ -#include <cstdint>
│ │ │ -#include <string>
│ │ │ -#include <type_traits>
│ │ │ -#include <dune/common/exceptions.hh>
│ │ │ -#include <dune/common/typetraits.hh>
│ │ │ -#include <dune/common/unused.hh>
│ │ │ -
│ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

class  Dune::GeometryType
 Unique label for each type of entities that can occur in DUNE grids. More...
│ │ │ +
│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ -

│ │ │ Namespaces

namespace  Dune
namespace  Dune::GeometryTypes
 Predefined GeometryTypes for common geometries.
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Functions

std::ostream & Dune::operator<< (std::ostream &s, const GeometryType &a)
 Prints the type to an output stream.
constexpr GeometryType Dune::GeometryTypes::simplex (unsigned int dim)
 Returns a GeometryType representing a simplex of dimension dim.
constexpr GeometryType Dune::GeometryTypes::cube (unsigned int dim)
 Returns a GeometryType representing a hypercube of dimension dim.
constexpr GeometryType Dune::GeometryTypes::none (unsigned int dim)
 Returns a GeometryType representing a singular of dimension dim.
constexpr GeometryType Dune::GeometryTypes::conicalExtension (const GeometryType &gt)
 Return GeometryType of a conical construction with gt as base.
constexpr GeometryType Dune::GeometryTypes::prismaticExtension (const GeometryType &gt)
 Return GeometryType of a prismatic construction with gt as base.
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │

│ │ │ -Variables

constexpr GeometryType Dune::GeometryTypes::vertex = GeometryType(0,0,false)
 GeometryType representing a vertex.
constexpr GeometryType Dune::GeometryTypes::line = GeometryType(0,1,false)
 GeometryType representing a line.
constexpr GeometryType Dune::GeometryTypes::triangle = simplex(2)
 GeometryType representing a triangle.
constexpr GeometryType Dune::GeometryTypes::quadrilateral = cube(2)
 GeometryType representing a quadrilateral (a square).
constexpr GeometryType Dune::GeometryTypes::tetrahedron = simplex(3)
 GeometryType representing a tetrahedron.
constexpr GeometryType Dune::GeometryTypes::pyramid = GeometryType(0b0011,3,false)
 GeometryType representing a 3D pyramid.
constexpr GeometryType Dune::GeometryTypes::prism = GeometryType(0b0101,3,false)
 GeometryType representing a 3D prism.
constexpr GeometryType Dune::GeometryTypes::hexahedron = cube(3)
 GeometryType representing a hexahedron.
namespace  Dune::Geo
│ │ │ -

Detailed Description

│ │ │ -

A unique label for each type of element that can occur in a grid.

│ │ │ -
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,69 +1,14 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ -type.hh File Reference │ │ │ │ -A unique label for each type of element that can occur in a grid. _M_o_r_e_._._. │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ -  Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +referenceelementimplementation.cc File Reference │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_i_m_p_l_e_m_e_n_t_a_t_i_o_n_._h_h> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ -namespace   _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s │ │ │ │ -  Predefined _G_e_o_m_e_t_r_y_T_y_p_e_s for common geometries. │ │ │ │ -FFuunnccttiioonnss │ │ │ │ - std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &s, const _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ - &a) │ │ │ │ -  Prints the type to an output stream. │ │ │ │ -constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_s_i_m_p_l_e_x (unsigned int dim) │ │ │ │ -  Returns a _G_e_o_m_e_t_r_y_T_y_p_e representing a simplex of │ │ │ │ - dimension dim. │ │ │ │ -constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_u_b_e (unsigned int dim) │ │ │ │ -  Returns a _G_e_o_m_e_t_r_y_T_y_p_e representing a hypercube of │ │ │ │ - dimension dim. │ │ │ │ -constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_n_o_n_e (unsigned int dim) │ │ │ │ -  Returns a _G_e_o_m_e_t_r_y_T_y_p_e representing a singular of │ │ │ │ - dimension dim. │ │ │ │ -constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_o_n_i_c_a_l_E_x_t_e_n_s_i_o_n (const │ │ │ │ - _G_e_o_m_e_t_r_y_T_y_p_e >) │ │ │ │ -  Return _G_e_o_m_e_t_r_y_T_y_p_e of a conical construction with gt │ │ │ │ - as base. │ │ │ │ -constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m_a_t_i_c_E_x_t_e_n_s_i_o_n (const │ │ │ │ - _G_e_o_m_e_t_r_y_T_y_p_e >) │ │ │ │ -  Return _G_e_o_m_e_t_r_y_T_y_p_e of a prismatic construction with gt │ │ │ │ - as base. │ │ │ │ -VVaarriiaabblleess │ │ │ │ -constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x = _G_e_o_m_e_t_r_y_T_y_p_e(0,0,false) │ │ │ │ -  _G_e_o_m_e_t_r_y_T_y_p_e representing a vertex. │ │ │ │ -constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_l_i_n_e = _G_e_o_m_e_t_r_y_T_y_p_e(0,1,false) │ │ │ │ -  _G_e_o_m_e_t_r_y_T_y_p_e representing a line. │ │ │ │ -constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_r_i_a_n_g_l_e = _s_i_m_p_l_e_x(2) │ │ │ │ -  _G_e_o_m_e_t_r_y_T_y_p_e representing a triangle. │ │ │ │ -constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_q_u_a_d_r_i_l_a_t_e_r_a_l = _c_u_b_e(2) │ │ │ │ -  _G_e_o_m_e_t_r_y_T_y_p_e representing a quadrilateral (a square). │ │ │ │ -constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_e_t_r_a_h_e_d_r_o_n = _s_i_m_p_l_e_x(3) │ │ │ │ -  _G_e_o_m_e_t_r_y_T_y_p_e representing a tetrahedron. │ │ │ │ -constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_y_r_a_m_i_d = _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ - (0b0011,3,false) │ │ │ │ -  _G_e_o_m_e_t_r_y_T_y_p_e representing a 3D pyramid. │ │ │ │ -constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m = _G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ - (0b0101,3,false) │ │ │ │ -  _G_e_o_m_e_t_r_y_T_y_p_e representing a 3D prism. │ │ │ │ -constexpr _G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_h_e_x_a_h_e_d_r_o_n = _c_u_b_e(3) │ │ │ │ -  _G_e_o_m_e_t_r_y_T_y_p_e representing a hexahedron. │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A unique label for each type of element that can occur in a grid. │ │ │ │ +namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00194.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: topologyfactory.hh File Reference │ │ │ +dune-geometry: prismtriangulation.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,47 +66,83 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
topologyfactory.hh File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Functions
│ │ │ +
prismtriangulation.cc File Reference
│ │ │
│ │ │
│ │ │ -
#include <cassert>
│ │ │ -#include <array>
│ │ │ -#include <map>
│ │ │ -#include <memory>
│ │ │ -#include <type_traits>
│ │ │ -#include <vector>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ -#include <dune/geometry/typeindex.hh>
│ │ │ +
#include <dune/common/fvector.hh>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ +#include <dune/geometry/type.hh>
│ │ │ +#include "base.cc"
│ │ │ +#include "simplex.cc"
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

struct  Dune::TopologyFactory< Traits >
 Provide a factory over the generic topologies. More...
struct  Dune::TopologySingletonFactory< Factory >
 A wrapper for a TopologyFactory providing singleton storage. Same usage as TopologyFactory but with empty release method an internal storage. More...
class  Dune::RefinementImp::PrismTriangulation::RefinementImp< dimension_, CoordType >
 Implementation of the refinement of a prism into simplices. More...
struct  Dune::RefinementImp::PrismTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
class  Dune::RefinementImp::PrismTriangulation::RefinementIteratorSpecial< dimension, CoordType, dimension >
class  Dune::RefinementImp::PrismTriangulation::RefinementIteratorSpecial< dimension, CoordType, 0 >
class  Dune::RefinementImp::PrismTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
│ │ │ │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ Namespaces

namespace  Dune
namespace  Dune::RefinementImp
 This namespace contains the implementation of Refinement.
namespace  Dune::RefinementImp::PrismTriangulation
 This namespace contains the Refinement implementation for triangulating prisms (GeometryType::prism -> GeometryType::simplex).
│ │ │ + │ │ │ + │ │ │ +

│ │ │ +Macros

#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

template<int dimension, class CoordType>
FieldVector< CoordType, dimension > Dune::RefinementImp::PrismTriangulation::transformCoordinate (FieldVector< CoordType, dimension > point)
template<int n>
FieldVector< int, n > Dune::RefinementImp::PrismTriangulation::getPermutation (int m)
 Calculate permutation from it's index.
template<int dimension, class CoordType>
FieldVector< CoordType, dimension > Dune::RefinementImp::PrismTriangulation::referenceToKuhn (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
 Map from the reference simplex to some Kuhn simplex.
│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC
│ │ │ +
│ │ │ + │ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,59 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -topologyfactory.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ + * _r_e_f_i_n_e_m_e_n_t │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +prismtriangulation.cc File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_i_n_d_e_x_._h_h> │ │ │ │ +#include "_b_a_s_e_._c_c" │ │ │ │ +#include "_s_i_m_p_l_e_x_._c_c" │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_<_ _T_r_a_i_t_s_ _> │ │ │ │ -  Provide a factory over the generic topologies. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_<_ _F_a_c_t_o_r_y_ _> │ │ │ │ - A wrapper for a _T_o_p_o_l_o_g_y_F_a_c_t_o_r_y providing singleton storage. Same │ │ │ │ -  usage as _T_o_p_o_l_o_g_y_F_a_c_t_o_r_y but with empty release method an internal │ │ │ │ - storage. _M_o_r_e_._._. │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ + _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ +  Implementation of the refinement of a prism into simplices. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ + _C_o_o_r_d_T_y_p_e_ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ + _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ + _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _> │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ + _C_o_o_r_d_T_y_p_e_ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ +namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ +  This namespace contains the implementation of _R_e_f_i_n_e_m_e_n_t. │ │ │ │ +namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ + This namespace contains the _R_e_f_i_n_e_m_e_n_t implementation for │ │ │ │ +  triangulating prisms (_G_e_o_m_e_t_r_y_T_y_p_e_:_:_p_r_i_s_m -> _G_e_o_m_e_t_r_y_T_y_p_e_:_: │ │ │ │ + _s_i_m_p_l_e_x). │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _D_U_N_E___G_E_O_M_E_T_R_Y___R_E_F_I_N_E_M_E_N_T___P_R_I_S_M_T_R_I_A_N_G_U_L_A_T_I_O_N___C_C │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_: │ │ │ │ + _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e (FieldVector< │ │ │ │ + CoordType, dimension > point) │ │ │ │ +template │ │ │ │ + FieldVector< int, n >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_: │ │ │ │ + _g_e_t_P_e_r_m_u_t_a_t_i_o_n (int m) │ │ │ │ +  Calculate permutation from it's index. │ │ │ │ +template │ │ │ │ +FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_: │ │ │ │ + _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n (FieldVector< CoordType, │ │ │ │ + dimension > point, const FieldVector< int, │ │ │ │ + dimension > &kuhn) │ │ │ │ +  Map from the reference simplex to some │ │ │ │ + Kuhn simplex. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__PPRRIISSMMTTRRIIAANNGGUULLAATTIIOONN__CCCC ********** │ │ │ │ +#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00194_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: topologyfactory.hh Source File │ │ │ +dune-geometry: prismtriangulation.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,200 +66,543 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
topologyfactory.hh
│ │ │ +
prismtriangulation.cc
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_TOPOLOGYFACTORY_HH
│ │ │ -
6#define DUNE_GEOMETRY_TOPOLOGYFACTORY_HH
│ │ │ +
5#ifndef DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC
│ │ │ +
6#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC
│ │ │
7
│ │ │ -
8#include <cassert>
│ │ │ -
9
│ │ │ -
10#include <array>
│ │ │ -
11#include <map>
│ │ │ -
12#include <memory>
│ │ │ -
13#include <type_traits>
│ │ │ -
14#include <vector>
│ │ │ -
15
│ │ │ -
16#include <dune/geometry/type.hh>
│ │ │ - │ │ │ -
18
│ │ │ -
19namespace Dune
│ │ │ -
20{
│ │ │ -
21
│ │ │ -
40 template <class Traits>
│ │ │ -
│ │ │ - │ │ │ -
42 {
│ │ │ -
43 // extract types from Traits class
│ │ │ -
44 static const unsigned int dimension = Traits::dimension;
│ │ │ -
45 typedef typename Traits::Key Key;
│ │ │ -
46 typedef typename Traits::Object Object;
│ │ │ -
47 typedef typename Traits::Factory Factory;
│ │ │ -
48
│ │ │ +
8#include <dune/common/fvector.hh>
│ │ │ +
9#include <dune/common/typetraits.hh>
│ │ │ +
10
│ │ │ + │ │ │ +
12#include <dune/geometry/type.hh>
│ │ │ +
13
│ │ │ +
14#include "base.cc"
│ │ │ +
15#include "simplex.cc"
│ │ │ +
16
│ │ │ +
17namespace Dune
│ │ │ +
18{
│ │ │ +
19 namespace RefinementImp
│ │ │ +
20 {
│ │ │ +
│ │ │ + │ │ │ +
27 {
│ │ │ +
28 // ////////////
│ │ │ +
29 //
│ │ │ +
30 // Utilities
│ │ │ +
31 //
│ │ │ +
32
│ │ │ + │ │ │ + │ │ │ +
35
│ │ │ +
36 // ////////////////////////////////////
│ │ │ +
37 //
│ │ │ +
38 // Refine a prism with simplices
│ │ │ +
39 //
│ │ │ +
40
│ │ │ +
41 // forward declaration of the iterator base
│ │ │ +
42 template<int dimension, class CoordType, int codimension>
│ │ │ + │ │ │ +
44 /*
│ │ │ +
45 * The permutations 0,2 and 3 of the Kuhn-decomposition of a cube into simplices form a prism.
│ │ │ +
46 * The resulting prism is not oriented the same as the reference prism and so the Kuhn-coordinates
│ │ │ +
47 * have to be transformed using the method below.
│ │ │ +
48 */
│ │ │ +
49 template<int dimension, class CoordType> FieldVector<CoordType, dimension>
│ │ │
│ │ │ -
50 static Object *create ( const Dune::GeometryType &gt, const Key &key )
│ │ │ -
51 {
│ │ │ -
52 return Impl::toGeometryTypeIdConstant<dimension>(gt, [&](auto id) {
│ │ │ - │ │ │ -
54 });
│ │ │ -
55 }
│ │ │ -
│ │ │ -
56
│ │ │ -
57 template< GeometryType::Id geometryId >
│ │ │ -
│ │ │ -
58 static Object *create ( const Key &key )
│ │ │ -
59 {
│ │ │ -
60 return Factory::template createObject< geometryId >( key );
│ │ │ -
61 }
│ │ │ -
│ │ │ -
62
│ │ │ -
64 template< class Topology >
│ │ │ -
│ │ │ -
65 static Object *create ( const Key &key )
│ │ │ -
66 {
│ │ │ -
67 return Factory::template createObject< Topology >( key );
│ │ │ -
68 }
│ │ │ -
│ │ │ -
69
│ │ │ -
71 static void release( Object *object ) { delete object; }
│ │ │ -
72 };
│ │ │ -
│ │ │ -
73
│ │ │ -
74
│ │ │ -
75
│ │ │ -
80 template <class Factory>
│ │ │ -
│ │ │ -
81 struct TopologySingletonFactory
│ │ │ -
82 {
│ │ │ -
83 static const unsigned int dimension = Factory::dimension;
│ │ │ -
84 typedef typename Factory::Key Key;
│ │ │ -
85 typedef const typename Factory::Object Object;
│ │ │ -
86
│ │ │ -
│ │ │ -
88 static Object *create ( const Dune::GeometryType &gt, const Key &key )
│ │ │ -
89 {
│ │ │ -
90 assert( gt.id() < numTopologies );
│ │ │ -
91 return instance().getObject( gt, key );
│ │ │ -
92 }
│ │ │ -
│ │ │ -
93
│ │ │ -
94 template< GeometryType::Id geometryId >
│ │ │ -
│ │ │ -
95 static auto create ( const Key &key )
│ │ │ -
96 -> std::enable_if_t< static_cast<GeometryType>(geometryId).dim() == dimension, Object * >
│ │ │ -
97 {
│ │ │ -
98 return instance().template getObject< geometryId >( key );
│ │ │ -
99 }
│ │ │ -
│ │ │ -
100
│ │ │ -
102 template< class Topology >
│ │ │ -
│ │ │ -
103 static auto create ( const Key &key )
│ │ │ -
104 -> std::enable_if_t< Topology::dimension == dimension, Object * >
│ │ │ -
105 {
│ │ │ -
106 return instance().template getObject< Topology >( key );
│ │ │ -
107 }
│ │ │ -
│ │ │ -
108
│ │ │ -
│ │ │ -
110 static void release ( Object *object )
│ │ │ -
111 {}
│ │ │ -
│ │ │ -
112
│ │ │ -
113 private:
│ │ │ -
114 struct ObjectDeleter
│ │ │ -
115 {
│ │ │ -
116 void operator() ( Object *ptr ) const { Factory::release( ptr ); }
│ │ │ -
117 };
│ │ │ +
50 transformCoordinate(FieldVector<CoordType, dimension> point)
│ │ │ +
51 {
│ │ │ +
52 FieldVector<CoordType, dimension> transform;
│ │ │ +
53 transform[0] = point[1];
│ │ │ +
54 transform[1] = 1 - point[0];
│ │ │ +
55 transform[2] = point[2];
│ │ │ +
56 return transform;
│ │ │ +
57 }
│ │ │ +
│ │ │ +
58
│ │ │ +
65 template<int dimension_, class CoordType>
│ │ │ +
│ │ │ + │ │ │ +
67 {
│ │ │ +
68 public:
│ │ │ +
69 constexpr static int dimension = dimension_;
│ │ │ +
70
│ │ │ +
71 typedef CoordType ctype;
│ │ │ +
72
│ │ │ +
73 template<int codimension>
│ │ │ +
74 struct Codim;
│ │ │ + │ │ │ +
76 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ + │ │ │ +
78 typedef FieldVector<int, dimension+1> IndexVector;
│ │ │ +
79
│ │ │ +
80 static int nVertices(int nIntervals);
│ │ │ +
81 static VertexIterator vBegin(int nIntervals);
│ │ │ +
82 static VertexIterator vEnd(int nIntervals);
│ │ │ +
83
│ │ │ +
84 static int nElements(int nIntervals);
│ │ │ +
85 static ElementIterator eBegin(int nIntervals);
│ │ │ +
86 static ElementIterator eEnd(int nIntervals);
│ │ │ +
87
│ │ │ +
88 private:
│ │ │ +
89 friend class RefinementIteratorSpecial<dimension, CoordType, 0>;
│ │ │ +
90 friend class RefinementIteratorSpecial<dimension, CoordType, dimension>;
│ │ │ +
91
│ │ │ +
92 typedef Simplex::RefinementImp<dimension, CoordType> BackendRefinement;
│ │ │ +
93 };
│ │ │ +
│ │ │ +
94
│ │ │ +
95 template<int dimension, class CoordType>
│ │ │ +
96 template<int codimension>
│ │ │ +
│ │ │ +
97 struct RefinementImp<dimension, CoordType>::Codim
│ │ │ +
98 {
│ │ │ + │ │ │ + │ │ │ +
101 };
│ │ │ +
│ │ │ +
102
│ │ │ +
103 template<int dimension, class CoordType>
│ │ │ +
104 int
│ │ │ +
│ │ │ + │ │ │ +
106 nVertices(int nIntervals)
│ │ │ +
107 {
│ │ │ +
108 return BackendRefinement::nVertices(nIntervals) * 3;
│ │ │ +
109 }
│ │ │ +
│ │ │ +
110
│ │ │ +
111 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
114 vBegin(int nIntervals)
│ │ │ +
115 {
│ │ │ +
116 return VertexIterator(nIntervals);
│ │ │ +
117 }
│ │ │ +
│ │ │
118
│ │ │ -
119 static TopologySingletonFactory &instance ()
│ │ │ -
120 {
│ │ │ -
121 static TopologySingletonFactory instance;
│ │ │ -
122 return instance;
│ │ │ -
123 }
│ │ │ -
124
│ │ │ -
125 static const unsigned int numTopologies = (1 << dimension);
│ │ │ -
126 typedef std::array< std::unique_ptr< Object, ObjectDeleter >, numTopologies > Array;
│ │ │ -
127 typedef std::map< Key, Array > Storage;
│ │ │ -
128
│ │ │ -
129 TopologySingletonFactory () = default;
│ │ │ -
130
│ │ │ -
131 std::unique_ptr< Object, ObjectDeleter > &find ( const unsigned int topologyId, const Key &key )
│ │ │ -
132 {
│ │ │ -
133 return storage_[ key ][ topologyId ];
│ │ │ -
134 }
│ │ │ -
135
│ │ │ -
136 Object *getObject ( const Dune::GeometryType &gt, const Key &key )
│ │ │ -
137 {
│ │ │ -
138 auto &object = find( gt.id(), key );
│ │ │ -
139 if( !object )
│ │ │ -
140 object.reset( Factory::create( gt, key ) );
│ │ │ -
141 return object.get();
│ │ │ -
142 }
│ │ │ -
143
│ │ │ -
144 template< GeometryType::Id geometryId >
│ │ │ -
145 Object *getObject ( const Key &key )
│ │ │ -
146 {
│ │ │ -
147 static constexpr GeometryType geometry = geometryId;
│ │ │ -
148 auto &object = find( geometry.id(), key );
│ │ │ -
149 if( !object )
│ │ │ -
150 object.reset( Factory::template create< geometry >( key ) );
│ │ │ -
151 return object.get();
│ │ │ -
152 }
│ │ │ -
153
│ │ │ -
154 template< class Topology >
│ │ │ -
155 Object *getObject ( const Key &key )
│ │ │ -
156 {
│ │ │ -
157 auto &object = find( Topology::id, key );
│ │ │ -
158 if( !object )
│ │ │ -
159 object.reset( Factory::template create< Topology >( key ) );
│ │ │ -
160 return object.get();
│ │ │ -
161 }
│ │ │ -
162
│ │ │ -
163 Storage storage_;
│ │ │ -
164 };
│ │ │ -
│ │ │ -
165
│ │ │ -
166}
│ │ │ -
167
│ │ │ -
168#endif // #ifndef DUNE_GEOMETRY_TOPOLOGYFACTORY_HH
│ │ │ -
Helper classes to provide indices for geometrytypes for use in a vector.
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ +
119 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
122 vEnd(int nIntervals)
│ │ │ +
123 {
│ │ │ +
124 return VertexIterator(nIntervals, true);
│ │ │ +
125 }
│ │ │ +
│ │ │ +
126
│ │ │ +
127 template<int dimension, class CoordType>
│ │ │ +
128 int
│ │ │ +
│ │ │ + │ │ │ +
130 nElements(int nIntervals)
│ │ │ +
131 {
│ │ │ +
132 return BackendRefinement::nElements(nIntervals) * 3;
│ │ │ +
133 }
│ │ │ +
│ │ │ +
134
│ │ │ +
135 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
138 eBegin(int nIntervals)
│ │ │ +
139 {
│ │ │ +
140 return ElementIterator(nIntervals);
│ │ │ +
141 }
│ │ │ +
│ │ │ +
142
│ │ │ +
143 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
146 eEnd(int nIntervals)
│ │ │ +
147 {
│ │ │ +
148 return ElementIterator(nIntervals, true);
│ │ │ +
149 }
│ │ │ +
│ │ │ +
150
│ │ │ +
151 // //////////////
│ │ │ +
152 //
│ │ │ +
153 // The iterator
│ │ │ +
154 //
│ │ │ +
155
│ │ │ +
156 // vertices
│ │ │ +
157 template<int dimension, class CoordType>
│ │ │ +
│ │ │ +
158 class RefinementIteratorSpecial<dimension, CoordType, dimension>
│ │ │ +
159 {
│ │ │ +
160 public:
│ │ │ + │ │ │ + │ │ │ +
163 typedef typename Refinement::template Codim<dimension>::Geometry Geometry;
│ │ │ +
164
│ │ │ +
165 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ +
166
│ │ │ +
167 void increment();
│ │ │ +
168
│ │ │ +
169 CoordVector coords() const;
│ │ │ +
170 Geometry geometry () const;
│ │ │ +
171
│ │ │ +
172 int index() const;
│ │ │ +
173 protected:
│ │ │ +
174 typedef typename Refinement::BackendRefinement BackendRefinement;
│ │ │ +
175 typedef typename BackendRefinement::template Codim<dimension>::SubEntityIterator BackendIterator;
│ │ │ +
176 constexpr static int nKuhnSimplices = 3;
│ │ │ +
177
│ │ │ + │ │ │ +
179
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
183 };
│ │ │ +
│ │ │ +
184
│ │ │ +
185 template<int dimension, class CoordType>
│ │ │ +
│ │ │ + │ │ │ +
187 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ +
188 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ + │ │ │ + │ │ │ +
191 {
│ │ │ +
192 if (end)
│ │ │ + │ │ │ +
194 }
│ │ │ +
│ │ │ +
195
│ │ │ +
196 template<int dimension, class CoordType>
│ │ │ +
197 void
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
200 {
│ │ │ +
201 ++backend;
│ │ │ +
202 if (backend == backendEnd)
│ │ │ +
203 {
│ │ │ + │ │ │ +
205 ++kuhnIndex;
│ │ │ +
206 }
│ │ │ +
207 }
│ │ │ +
│ │ │ +
208
│ │ │ +
209 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
212 coords() const
│ │ │ +
213 {
│ │ │ +
214 // while the kuhnIndex runs from 0,1,2 the actual permutations we need are 0,2,3
│ │ │ + │ │ │ + │ │ │ +
217 }
│ │ │ +
│ │ │ +
218
│ │ │ +
219 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
222 {
│ │ │ +
223 std::vector<CoordVector> corners(1);
│ │ │ +
224 corners[0] = transformCoordinate(referenceToKuhn(backend.coords(),
│ │ │ + │ │ │ +
226 return Geometry(GeometryTypes::vertex, corners);
│ │ │ +
227 }
│ │ │ +
│ │ │ +
228
│ │ │ +
229 template<int dimension, class CoordType>
│ │ │ +
230 int
│ │ │ +
│ │ │ + │ │ │ +
232 index() const
│ │ │ +
233 {
│ │ │ + │ │ │ +
235 }
│ │ │ +
│ │ │ +
236
│ │ │ +
237 // elements
│ │ │ +
238 template<int dimension, class CoordType>
│ │ │ +
│ │ │ +
239 class RefinementIteratorSpecial<dimension, CoordType, 0>
│ │ │ +
240 {
│ │ │ +
241 public:
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
245 typedef typename Refinement::template Codim<0>::Geometry Geometry;
│ │ │ +
246
│ │ │ +
247 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ +
248
│ │ │ +
249 void increment();
│ │ │ +
250
│ │ │ + │ │ │ +
252 int index() const;
│ │ │ +
253 CoordVector coords() const;
│ │ │ +
254
│ │ │ +
255 Geometry geometry () const;
│ │ │ +
256
│ │ │ +
257 private:
│ │ │ +
258 CoordVector global(const CoordVector &local) const;
│ │ │ +
259
│ │ │ +
260 protected:
│ │ │ +
261 typedef typename Refinement::BackendRefinement BackendRefinement;
│ │ │ +
262 typedef typename BackendRefinement::template Codim<0>::SubEntityIterator BackendIterator;
│ │ │ +
263 constexpr static int nKuhnSimplices = 3;
│ │ │ +
264
│ │ │ + │ │ │ +
266
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
270 };
│ │ │ +
│ │ │ +
271
│ │ │ +
272 template<int dimension, class CoordType>
│ │ │ +
│ │ │ + │ │ │ +
274 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ +
275 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ + │ │ │ + │ │ │ +
278 {
│ │ │ +
279 if (end)
│ │ │ + │ │ │ +
281 }
│ │ │ +
│ │ │ +
282
│ │ │ +
283 template<int dimension, class CoordType>
│ │ │ +
284 void
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
287 {
│ │ │ +
288 ++backend;
│ │ │ +
289 if (backend == backendEnd)
│ │ │ +
290 {
│ │ │ + │ │ │ +
292 ++kuhnIndex;
│ │ │ +
293 }
│ │ │ +
294 }
│ │ │ +
│ │ │ +
295
│ │ │ +
296 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
299 vertexIndices() const
│ │ │ +
300 {
│ │ │ +
301 IndexVector indices = backend.vertexIndices();
│ │ │ +
302
│ │ │ + │ │ │ +
304 indices += base;
│ │ │ +
305
│ │ │ +
306 return indices;
│ │ │ +
307 }
│ │ │ +
│ │ │ +
308
│ │ │ +
309 template<int dimension, class CoordType>
│ │ │ +
310 int
│ │ │ +
│ │ │ + │ │ │ +
312 index() const
│ │ │ +
313 {
│ │ │ + │ │ │ +
315 }
│ │ │ +
│ │ │ +
316
│ │ │ +
317 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
320 coords() const
│ │ │ +
321 {
│ │ │ +
322 return global(backend.coords());
│ │ │ +
323 }
│ │ │ +
│ │ │ +
324
│ │ │ +
325 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
328 {
│ │ │ +
329 const typename BackendIterator::Geometry &bgeo =
│ │ │ +
330 backend.geometry();
│ │ │ +
331 std::vector<CoordVector> corners(dimension+1);
│ │ │ +
332 for(int i = 0; i <= dimension; ++i)
│ │ │ +
333 corners[i] = global(bgeo.corner(i));
│ │ │ +
334
│ │ │ +
335 return Geometry(bgeo.type(), corners);
│ │ │ +
336 }
│ │ │ +
│ │ │ +
337
│ │ │ +
338 template<int dimension, class CoordType>
│ │ │ + │ │ │ + │ │ │ +
341 global(const CoordVector &local) const
│ │ │ +
342 {
│ │ │ +
343 // while the kuhnIndex runs from 0,1,2 the actual permutations we need are 0,2,3
│ │ │ +
344 return transformCoordinate(referenceToKuhn(local, getPermutation<dimension>((kuhnIndex+2)%4)));
│ │ │ +
345 }
│ │ │ +
346
│ │ │ +
347 // common
│ │ │ +
348 template<int dimension, class CoordType>
│ │ │ +
349 template<int codimension>
│ │ │ +
│ │ │ +
350 class RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │ +
351 : public ForwardIteratorFacade<typename RefinementImp<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ +
352 public RefinementIteratorSpecial<dimension, CoordType, codimension>
│ │ │ +
353 {
│ │ │ +
354 public:
│ │ │ + │ │ │ + │ │ │ +
357
│ │ │ +
358 SubEntityIterator(int nIntervals, bool end = false);
│ │ │ +
359
│ │ │ +
360 bool equals(const This &other) const;
│ │ │ +
361 protected:
│ │ │ +
362 using RefinementIteratorSpecial<dimension, CoordType, codimension>::kuhnIndex;
│ │ │ +
363 using RefinementIteratorSpecial<dimension, CoordType, codimension>::backend;
│ │ │ +
364 };
│ │ │ +
│ │ │ +
365
│ │ │ +
366#ifndef DOXYGEN
│ │ │ +
367 template<int dimension, class CoordType>
│ │ │ +
368 template<int codimension>
│ │ │ + │ │ │ +
370 SubEntityIterator(int nIntervals, bool end)
│ │ │ +
371 : RefinementIteratorSpecial<dimension, CoordType, codimension>(nIntervals, end)
│ │ │ +
372 {}
│ │ │ +
373
│ │ │ +
374 template<int dimension, class CoordType>
│ │ │ +
375 template<int codimension>
│ │ │ +
376 bool
│ │ │ + │ │ │ +
378 equals(const This &other) const
│ │ │ +
379 {
│ │ │ +
380 return ((kuhnIndex == other.kuhnIndex) && (backend == other.backend));
│ │ │ +
381 }
│ │ │ +
382#endif
│ │ │ +
383
│ │ │ +
384 } // namespace PrismTriangulation
│ │ │ +
│ │ │ +
385 } // namespace RefinementImp
│ │ │ +
386
│ │ │ +
387 namespace RefinementImp
│ │ │ +
388 {
│ │ │ +
389 // ///////////////////////
│ │ │ +
390 //
│ │ │ +
391 // The refinement traits
│ │ │ +
392 //
│ │ │ +
393
│ │ │ +
394#ifndef DOXYGEN
│ │ │ +
395 template<unsigned topologyId, class CoordType, unsigned coerceToId>
│ │ │ +
396 struct Traits<
│ │ │ +
397 topologyId, CoordType, coerceToId, 3,
│ │ │ +
398 typename std::enable_if<
│ │ │ +
399 (GeometryTypes::prism.id() >> 1) ==
│ │ │ +
400 (topologyId >> 1) &&
│ │ │ +
401 (GeometryTypes::simplex(3).id() >> 1) ==
│ │ │ +
402 (coerceToId >> 1)
│ │ │ +
403 >::type>
│ │ │ +
404 {
│ │ │ +
405 typedef PrismTriangulation::RefinementImp<3, CoordType> Imp;
│ │ │ +
406 };
│ │ │ +
407#endif
│ │ │ +
408
│ │ │ +
409 } // namespace RefinementImp
│ │ │ +
410} // namespace Dune
│ │ │ +
411
│ │ │ +
412#endif // DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ + │ │ │ +
This file contains the parts independent of a particular Refinement implementation.
│ │ │ +
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │ +
constexpr GeometryType vertex
GeometryType representing a vertex.
Definition type.hh:492
│ │ │ +
STL namespace.
│ │ │
Definition affinegeometry.hh:22
│ │ │ -
Provide a factory over the generic topologies.
Definition topologyfactory.hh:42
│ │ │ -
Traits::Factory Factory
Definition topologyfactory.hh:47
│ │ │ -
static Object * create(const Dune::GeometryType &gt, const Key &key)
dynamically create objects
Definition topologyfactory.hh:50
│ │ │ -
static const unsigned int dimension
Definition topologyfactory.hh:44
│ │ │ -
static Object * create(const Key &key)
statically create objects
Definition topologyfactory.hh:58
│ │ │ -
static void release(Object *object)
release the object returned by the create methods
Definition topologyfactory.hh:71
│ │ │ -
Traits::Key Key
Definition topologyfactory.hh:45
│ │ │ -
Traits::Object Object
Definition topologyfactory.hh:46
│ │ │ -
static auto create(const Key &key) -> std::enable_if_t< Topology::dimension==dimension, Object * >
Definition topologyfactory.hh:103
│ │ │ -
static Object * create(const Dune::GeometryType &gt, const Key &key)
Definition topologyfactory.hh:88
│ │ │ -
static void release(Object *object)
release the object returned by the create methods
Definition topologyfactory.hh:110
│ │ │ -
const Factory::Object Object
Definition topologyfactory.hh:85
│ │ │ -
Factory::Key Key
Definition topologyfactory.hh:84
│ │ │ -
static auto create(const Key &key) -> std::enable_if_t< static_cast< GeometryType >(geometryId).dim()==dimension, Object * >
Definition topologyfactory.hh:95
│ │ │ -
static const unsigned int dimension
Definition topologyfactory.hh:83
│ │ │ -
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ -
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:365
│ │ │ +
This namespace contains the Refinement implementation for triangulating prisms (GeometryType::prism -...
Definition prismtriangulation.cc:27
│ │ │ +
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:293
│ │ │ +
FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from the reference simplex to some Kuhn simplex.
Definition simplex.cc:322
│ │ │ +
FieldVector< CoordType, dimension > transformCoordinate(FieldVector< CoordType, dimension > point)
Definition prismtriangulation.cc:50
│ │ │ +
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:293
│ │ │ +
FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from the reference simplex to some Kuhn simplex.
Definition simplex.cc:322
│ │ │ +
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │ +
generic geometry implementation based on corner coordinates
Definition multilineargeometry.hh:181
│ │ │ + │ │ │ +
Implementation of the refinement of a prism into simplices.
Definition prismtriangulation.cc:67
│ │ │ + │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition prismtriangulation.cc:355
│ │ │ +
static constexpr int dimension
Definition prismtriangulation.cc:69
│ │ │ +
CoordType ctype
Definition prismtriangulation.cc:71
│ │ │ +
static VertexIterator vEnd(int nIntervals)
Definition prismtriangulation.cc:122
│ │ │ +
FieldVector< int, dimension+1 > IndexVector
Definition prismtriangulation.cc:78
│ │ │ +
static ElementIterator eEnd(int nIntervals)
Definition prismtriangulation.cc:146
│ │ │ +
static int nVertices(int nIntervals)
Definition prismtriangulation.cc:106
│ │ │ +
FieldVector< CoordType, dimension > CoordVector
Definition prismtriangulation.cc:76
│ │ │ +
static int nElements(int nIntervals)
Definition prismtriangulation.cc:130
│ │ │ + │ │ │ +
Codim< 0 >::SubEntityIterator ElementIterator
Definition prismtriangulation.cc:77
│ │ │ +
Codim< dimension >::SubEntityIterator VertexIterator
Definition prismtriangulation.cc:75
│ │ │ +
static ElementIterator eBegin(int nIntervals)
Definition prismtriangulation.cc:138
│ │ │ +
static VertexIterator vBegin(int nIntervals)
Definition prismtriangulation.cc:114
│ │ │ + │ │ │ + │ │ │ +
Dune::MultiLinearGeometry< CoordType, dimension-codimension, dimension > Geometry
Definition prismtriangulation.cc:100
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
Refinement::template Codim< dimension >::Geometry Geometry
Definition prismtriangulation.cc:163
│ │ │ +
Refinement::BackendRefinement BackendRefinement
Definition prismtriangulation.cc:174
│ │ │ +
BackendRefinement::template Codim< dimension >::SubEntityIterator BackendIterator
Definition prismtriangulation.cc:175
│ │ │ + │ │ │ + │ │ │ +
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition prismtriangulation.cc:187
│ │ │ + │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition prismtriangulation.cc:161
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
Refinement::template Codim< 0 >::Geometry Geometry
Definition prismtriangulation.cc:245
│ │ │ + │ │ │ + │ │ │ +
Refinement::IndexVector IndexVector
Definition prismtriangulation.cc:243
│ │ │ +
BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator
Definition prismtriangulation.cc:262
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
Refinement::CoordVector CoordVector
Definition prismtriangulation.cc:244
│ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition prismtriangulation.cc:242
│ │ │ + │ │ │ +
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition prismtriangulation.cc:274
│ │ │ + │ │ │ + │ │ │ +
Refinement::BackendRefinement BackendRefinement
Definition prismtriangulation.cc:261
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,218 +1,684 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -topologyfactory.hh │ │ │ │ + * _r_e_f_i_n_e_m_e_n_t │ │ │ │ +prismtriangulation.cc │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_TOPOLOGYFACTORY_HH │ │ │ │ -6#define DUNE_GEOMETRY_TOPOLOGYFACTORY_HH │ │ │ │ +5#ifndef DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC │ │ │ │ +_6#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ -9 │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ -13#include │ │ │ │ -14#include │ │ │ │ -15 │ │ │ │ -16#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -17#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_i_n_d_e_x_._h_h> │ │ │ │ -18 │ │ │ │ -19namespace _D_u_n_e │ │ │ │ -20{ │ │ │ │ -21 │ │ │ │ -40 template │ │ │ │ -_4_1 struct _T_o_p_o_l_o_g_y_F_a_c_t_o_r_y │ │ │ │ -42 { │ │ │ │ -43 // extract types from Traits class │ │ │ │ -_4_4 static const unsigned int _d_i_m_e_n_s_i_o_n = Traits::dimension; │ │ │ │ -_4_5 typedef typename Traits::Key _K_e_y; │ │ │ │ -_4_6 typedef typename Traits::Object _O_b_j_e_c_t; │ │ │ │ -_4_7 typedef typename Traits::Factory _F_a_c_t_o_r_y; │ │ │ │ -48 │ │ │ │ -_5_0 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e >, const _K_e_y &key ) │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10 │ │ │ │ +11#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +12#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +13 │ │ │ │ +14#include "_b_a_s_e_._c_c" │ │ │ │ +15#include "_s_i_m_p_l_e_x_._c_c" │ │ │ │ +16 │ │ │ │ +17namespace _D_u_n_e │ │ │ │ +18{ │ │ │ │ +19 namespace RefinementImp │ │ │ │ +20 { │ │ │ │ +_2_6 namespace _P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ +27 { │ │ │ │ +28 // //////////// │ │ │ │ +29 // │ │ │ │ +30 // Utilities │ │ │ │ +31 // │ │ │ │ +32 │ │ │ │ +33 using _S_i_m_p_l_e_x_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n; │ │ │ │ +34 using _S_i_m_p_l_e_x_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n; │ │ │ │ +35 │ │ │ │ +36 // //////////////////////////////////// │ │ │ │ +37 // │ │ │ │ +38 // Refine a prism with simplices │ │ │ │ +39 // │ │ │ │ +40 │ │ │ │ +41 // forward declaration of the iterator base │ │ │ │ +42 template │ │ │ │ +_4_3 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l; │ │ │ │ +44 /* │ │ │ │ +45 * The permutations 0,2 and 3 of the Kuhn-decomposition of a cube into │ │ │ │ +simplices form a prism. │ │ │ │ +46 * The resulting prism is not oriented the same as the reference prism and so │ │ │ │ +the Kuhn-coordinates │ │ │ │ +47 * have to be transformed using the method below. │ │ │ │ +48 */ │ │ │ │ +49 template FieldVector │ │ │ │ +_5_0 _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e(FieldVector point) │ │ │ │ 51 { │ │ │ │ -52 return Impl::toGeometryTypeIdConstant(gt, [&](auto id) { │ │ │ │ -53 return _c_r_e_a_t_e_<_d_e_c_l_t_y_p_e_(_i_d_)_:_:_v_a_l_u_e_>(key); │ │ │ │ -54 }); │ │ │ │ -55 } │ │ │ │ -56 │ │ │ │ -57 template< GeometryType::Id geometryId > │ │ │ │ -_5_8 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ -59 { │ │ │ │ -60 return Factory::template createObject< geometryId >( key ); │ │ │ │ -61 } │ │ │ │ -62 │ │ │ │ -64 template< class Topology > │ │ │ │ -_6_5 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ -66 { │ │ │ │ -67 return Factory::template createObject< Topology >( key ); │ │ │ │ -68 } │ │ │ │ -69 │ │ │ │ -_7_1 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ -72 }; │ │ │ │ -73 │ │ │ │ -74 │ │ │ │ -75 │ │ │ │ -80 template │ │ │ │ -_8_1 struct TopologySingletonFactory │ │ │ │ -82 { │ │ │ │ -_8_3 static const unsigned int _d_i_m_e_n_s_i_o_n = Factory::dimension; │ │ │ │ -_8_4 typedef typename Factory::Key _K_e_y; │ │ │ │ -_8_5 typedef const typename Factory::Object _O_b_j_e_c_t; │ │ │ │ -86 │ │ │ │ -_8_8 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e >, const _K_e_y &key ) │ │ │ │ -89 { │ │ │ │ -90 assert( gt._i_d() < numTopologies ); │ │ │ │ -91 return instance().getObject( gt, key ); │ │ │ │ -92 } │ │ │ │ -93 │ │ │ │ -94 template< GeometryType::Id geometryId > │ │ │ │ -_9_5 static auto _c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ -96 -> std::enable_if_t< static_cast(geometryId).dim() == │ │ │ │ -_d_i_m_e_n_s_i_o_n, _O_b_j_e_c_t * > │ │ │ │ -97 { │ │ │ │ -98 return instance().template getObject< geometryId >( key ); │ │ │ │ -99 } │ │ │ │ -100 │ │ │ │ -102 template< class Topology > │ │ │ │ -_1_0_3 static auto _c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ -104 -> std::enable_if_t< Topology::dimension == dimension, Object * > │ │ │ │ -105 { │ │ │ │ -106 return instance().template getObject< Topology >( key ); │ │ │ │ -107 } │ │ │ │ -108 │ │ │ │ -_1_1_0 static void _r_e_l_e_a_s_e ( _O_b_j_e_c_t *object ) │ │ │ │ -111 {} │ │ │ │ -112 │ │ │ │ -113 private: │ │ │ │ -114 struct ObjectDeleter │ │ │ │ +52 FieldVector transform; │ │ │ │ +53 transform[0] = point[1]; │ │ │ │ +54 transform[1] = 1 - point[0]; │ │ │ │ +55 transform[2] = point[2]; │ │ │ │ +56 return transform; │ │ │ │ +57 } │ │ │ │ +58 │ │ │ │ +65 template │ │ │ │ +_6_6 class _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ +67 { │ │ │ │ +68 public: │ │ │ │ +_6_9 constexpr static int _d_i_m_e_n_s_i_o_n = dimension_; │ │ │ │ +70 │ │ │ │ +_7_1 typedef CoordType _c_t_y_p_e; │ │ │ │ +72 │ │ │ │ +73 template │ │ │ │ +74 struct _C_o_d_i_m; │ │ │ │ +_7_5 typedef typename _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _V_e_r_t_e_x_I_t_e_r_a_t_o_r; │ │ │ │ +_7_6 typedef FieldVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ +_7_7 typedef typename _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r; │ │ │ │ +_7_8 typedef FieldVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ +79 │ │ │ │ +_8_0 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ +_8_1 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ +_8_2 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ +83 │ │ │ │ +_8_4 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ +_8_5 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_B_e_g_i_n(int nIntervals); │ │ │ │ +_8_6 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_E_n_d(int nIntervals); │ │ │ │ +87 │ │ │ │ +88 private: │ │ │ │ +89 friend class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, 0>; │ │ │ │ +90 friend class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, _d_i_m_e_n_s_i_o_n>; │ │ │ │ +91 │ │ │ │ +92 typedef _S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> BackendRefinement; │ │ │ │ +93 }; │ │ │ │ +94 │ │ │ │ +95 template │ │ │ │ +96 template │ │ │ │ +_9_7 struct _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m │ │ │ │ +98 { │ │ │ │ +99 class _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r; │ │ │ │ +_1_0_0 typedef _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ +101 }; │ │ │ │ +102 │ │ │ │ +103 template │ │ │ │ +104 int │ │ │ │ +_1_0_5 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +106_ _n_V_e_r_t_i_c_e_s(int nIntervals) │ │ │ │ +107 { │ │ │ │ +108 return _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(nIntervals) * 3; │ │ │ │ +109 } │ │ │ │ +110 │ │ │ │ +111 template │ │ │ │ +112 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ +_1_1_3 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +114_ _v_B_e_g_i_n(int nIntervals) │ │ │ │ 115 { │ │ │ │ -116 void operator() ( _O_b_j_e_c_t *ptr ) const { Factory::release( ptr ); } │ │ │ │ -117 }; │ │ │ │ +116 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ +117 } │ │ │ │ 118 │ │ │ │ -119 static TopologySingletonFactory &instance () │ │ │ │ -120 { │ │ │ │ -121 static TopologySingletonFactory instance; │ │ │ │ -122 return instance; │ │ │ │ -123 } │ │ │ │ -124 │ │ │ │ -125 static const unsigned int numTopologies = (1 << _d_i_m_e_n_s_i_o_n); │ │ │ │ -126 typedef std::array< std::unique_ptr< Object, ObjectDeleter >, numTopologies │ │ │ │ -> Array; │ │ │ │ -127 typedef std::map< Key, Array > Storage; │ │ │ │ -128 │ │ │ │ -129 TopologySingletonFactory () = default; │ │ │ │ -130 │ │ │ │ -131 std::unique_ptr< Object, ObjectDeleter > &find ( const unsigned int │ │ │ │ -topologyId, const _K_e_y &key ) │ │ │ │ -132 { │ │ │ │ -133 return storage_[ key ][ topologyId ]; │ │ │ │ -134 } │ │ │ │ -135 │ │ │ │ -136 _O_b_j_e_c_t *getObject ( const Dune::GeometryType >, const _K_e_y &key ) │ │ │ │ -137 { │ │ │ │ -138 auto &object = find( gt._i_d(), key ); │ │ │ │ -139 if( !object ) │ │ │ │ -140 object.reset( Factory::create( gt, key ) ); │ │ │ │ -141 return object.get(); │ │ │ │ -142 } │ │ │ │ -143 │ │ │ │ -144 template< GeometryType::Id geometryId > │ │ │ │ -145 _O_b_j_e_c_t *getObject ( const _K_e_y &key ) │ │ │ │ -146 { │ │ │ │ -147 static constexpr GeometryType geometry = geometryId; │ │ │ │ -148 auto &object = find( geometry.id(), key ); │ │ │ │ -149 if( !object ) │ │ │ │ -150 object.reset( Factory::template _c_r_e_a_t_e_<_ _g_e_o_m_e_t_r_y_ _>( key ) ); │ │ │ │ -151 return object.get(); │ │ │ │ -152 } │ │ │ │ -153 │ │ │ │ -154 template< class Topology > │ │ │ │ -155 _O_b_j_e_c_t *getObject ( const _K_e_y &key ) │ │ │ │ -156 { │ │ │ │ -157 auto &object = find( Topology::id, key ); │ │ │ │ -158 if( !object ) │ │ │ │ -159 object.reset( Factory::template _c_r_e_a_t_e_<_ _T_o_p_o_l_o_g_y_ _>( key ) ); │ │ │ │ -160 return object.get(); │ │ │ │ -161 } │ │ │ │ -162 │ │ │ │ -163 Storage storage_; │ │ │ │ -164 }; │ │ │ │ -165 │ │ │ │ -166} │ │ │ │ -167 │ │ │ │ -168#endif // #ifndef DUNE_GEOMETRY_TOPOLOGYFACTORY_HH │ │ │ │ -_t_y_p_e_i_n_d_e_x_._h_h │ │ │ │ -Helper classes to provide indices for geometrytypes for use in a vector. │ │ │ │ +119 template │ │ │ │ +120 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ +_1_2_1 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +122_ _v_E_n_d(int nIntervals) │ │ │ │ +123 { │ │ │ │ +124 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ +125 } │ │ │ │ +126 │ │ │ │ +127 template │ │ │ │ +128 int │ │ │ │ +_1_2_9 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +130_ _n_E_l_e_m_e_n_t_s(int nIntervals) │ │ │ │ +131 { │ │ │ │ +132 return _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(nIntervals) * 3; │ │ │ │ +133 } │ │ │ │ +134 │ │ │ │ +135 template │ │ │ │ +136 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ +_1_3_7 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +138_ _e_B_e_g_i_n(int nIntervals) │ │ │ │ +139 { │ │ │ │ +140 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ +141 } │ │ │ │ +142 │ │ │ │ +143 template │ │ │ │ +144 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ +_1_4_5 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +146_ _e_E_n_d(int nIntervals) │ │ │ │ +147 { │ │ │ │ +148 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ +149 } │ │ │ │ +150 │ │ │ │ +151 // ////////////// │ │ │ │ +152 // │ │ │ │ +153 // The iterator │ │ │ │ +154 // │ │ │ │ +155 │ │ │ │ +156 // vertices │ │ │ │ +157 template │ │ │ │ +_1_5_8 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +159 { │ │ │ │ +160 public: │ │ │ │ +_1_6_1 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_1_6_2 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ +_1_6_3 typedef typename Refinement::template _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ +164 │ │ │ │ +165 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ +166 │ │ │ │ +167 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ +168 │ │ │ │ +169 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ +170 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const; │ │ │ │ +171 │ │ │ │ +172 int _i_n_d_e_x() const; │ │ │ │ +173 protected: │ │ │ │ +_1_7_4 typedef typename Refinement::BackendRefinement _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_1_7_5 typedef typename BackendRefinement::template _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r; │ │ │ │ +_1_7_6 constexpr static int _n_K_u_h_n_S_i_m_p_l_i_c_e_s = 3; │ │ │ │ +177 │ │ │ │ +_1_7_8 int _n_I_n_t_e_r_v_a_l_s__; │ │ │ │ +179 │ │ │ │ +_1_8_0 int _k_u_h_n_I_n_d_e_x; │ │ │ │ +_1_8_1 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d; │ │ │ │ +_1_8_2 const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d_E_n_d; │ │ │ │ +183 }; │ │ │ │ +184 │ │ │ │ +185 template │ │ │ │ +_1_8_6 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +187_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ +188 : _n_I_n_t_e_r_v_a_l_s__(nIntervals), _k_u_h_n_I_n_d_e_x(0), │ │ │ │ +189 _b_a_c_k_e_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vBegin(_n_I_n_t_e_r_v_a_l_s__)), │ │ │ │ +190 _b_a_c_k_e_n_d_E_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vEnd(_n_I_n_t_e_r_v_a_l_s__)) │ │ │ │ +191 { │ │ │ │ +192 if (end) │ │ │ │ +193 _k_u_h_n_I_n_d_e_x = _n_K_u_h_n_S_i_m_p_l_i_c_e_s; │ │ │ │ +194 } │ │ │ │ +195 │ │ │ │ +196 template │ │ │ │ +197 void │ │ │ │ +_1_9_8 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +199_ _i_n_c_r_e_m_e_n_t() │ │ │ │ +200 { │ │ │ │ +201 ++_b_a_c_k_e_n_d; │ │ │ │ +202 if (_b_a_c_k_e_n_d == _b_a_c_k_e_n_d_E_n_d) │ │ │ │ +203 { │ │ │ │ +204 _b_a_c_k_e_n_d = _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ +205 ++_k_u_h_n_I_n_d_e_x; │ │ │ │ +206 } │ │ │ │ +207 } │ │ │ │ +208 │ │ │ │ +209 template │ │ │ │ +210 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +_2_1_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +212_ _c_o_o_r_d_s() const │ │ │ │ +213 { │ │ │ │ +214 // while the kuhnIndex runs from 0,1,2 the actual permutations we need are │ │ │ │ +0,2,3 │ │ │ │ +215 return _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e(_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(_b_a_c_k_e_n_d.coords(), │ │ │ │ +216 _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>((_k_u_h_n_I_n_d_e_x + 2) % 4))); │ │ │ │ +217 } │ │ │ │ +218 │ │ │ │ +219 template │ │ │ │ +220 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +_G_e_o_m_e_t_r_y │ │ │ │ +_2_2_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_:_g_e_o_m_e_t_r_y () │ │ │ │ +const │ │ │ │ +222 { │ │ │ │ +223 std::vector corners(1); │ │ │ │ +224 corners[0] = _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e(_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(_b_a_c_k_e_n_d.coords(), │ │ │ │ +225 _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>((_k_u_h_n_I_n_d_e_x + 2) % 4))); │ │ │ │ +226 return _G_e_o_m_e_t_r_y(_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x, corners); │ │ │ │ +227 } │ │ │ │ +228 │ │ │ │ +229 template │ │ │ │ +230 int │ │ │ │ +_2_3_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +232_ _i_n_d_e_x() const │ │ │ │ +233 { │ │ │ │ +234 return _k_u_h_n_I_n_d_e_x*_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(_n_I_n_t_e_r_v_a_l_s__) + _b_a_c_k_e_n_d.index │ │ │ │ +(); │ │ │ │ +235 } │ │ │ │ +236 │ │ │ │ +237 // elements │ │ │ │ +238 template │ │ │ │ +_2_3_9 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +240 { │ │ │ │ +241 public: │ │ │ │ +_2_4_2 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_2_4_3 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_I_n_d_e_x_V_e_c_t_o_r _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ +_2_4_4 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ +_2_4_5 typedef typename Refinement::template _C_o_d_i_m_<_0_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ +246 │ │ │ │ +247 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ +248 │ │ │ │ +249 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ +250 │ │ │ │ +251 _I_n_d_e_x_V_e_c_t_o_r _v_e_r_t_e_x_I_n_d_i_c_e_s() const; │ │ │ │ +252 int _i_n_d_e_x() const; │ │ │ │ +253 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ +254 │ │ │ │ +255 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const; │ │ │ │ +256 │ │ │ │ +257 private: │ │ │ │ +258 _C_o_o_r_d_V_e_c_t_o_r global(const _C_o_o_r_d_V_e_c_t_o_r &local) const; │ │ │ │ +259 │ │ │ │ +260 protected: │ │ │ │ +_2_6_1 typedef typename Refinement::BackendRefinement _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_2_6_2 typedef typename BackendRefinement::template _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ +_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r; │ │ │ │ +_2_6_3 constexpr static int _n_K_u_h_n_S_i_m_p_l_i_c_e_s = 3; │ │ │ │ +264 │ │ │ │ +_2_6_5 int _n_I_n_t_e_r_v_a_l_s__; │ │ │ │ +266 │ │ │ │ +_2_6_7 int _k_u_h_n_I_n_d_e_x; │ │ │ │ +_2_6_8 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d; │ │ │ │ +_2_6_9 const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d_E_n_d; │ │ │ │ +270 }; │ │ │ │ +271 │ │ │ │ +272 template │ │ │ │ +_2_7_3 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +274_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ +275 : _n_I_n_t_e_r_v_a_l_s__(nIntervals), _k_u_h_n_I_n_d_e_x(0), │ │ │ │ +276 _b_a_c_k_e_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eBegin(_n_I_n_t_e_r_v_a_l_s__)), │ │ │ │ +277 _b_a_c_k_e_n_d_E_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eEnd(_n_I_n_t_e_r_v_a_l_s__)) │ │ │ │ +278 { │ │ │ │ +279 if (end) │ │ │ │ +280 _k_u_h_n_I_n_d_e_x = _n_K_u_h_n_S_i_m_p_l_i_c_e_s; │ │ │ │ +281 } │ │ │ │ +282 │ │ │ │ +283 template │ │ │ │ +284 void │ │ │ │ +_2_8_5 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +286_ _i_n_c_r_e_m_e_n_t() │ │ │ │ +287 { │ │ │ │ +288 ++_b_a_c_k_e_n_d; │ │ │ │ +289 if (_b_a_c_k_e_n_d == _b_a_c_k_e_n_d_E_n_d) │ │ │ │ +290 { │ │ │ │ +291 _b_a_c_k_e_n_d = _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ +292 ++_k_u_h_n_I_n_d_e_x; │ │ │ │ +293 } │ │ │ │ +294 } │ │ │ │ +295 │ │ │ │ +296 template │ │ │ │ +297 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ +_2_9_8 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +299_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ +300 { │ │ │ │ +301 _I_n_d_e_x_V_e_c_t_o_r indices = _b_a_c_k_e_n_d.vertexIndices(); │ │ │ │ +302 │ │ │ │ +303 int base = _k_u_h_n_I_n_d_e_x * _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ +304 indices += base; │ │ │ │ +305 │ │ │ │ +306 return indices; │ │ │ │ +307 } │ │ │ │ +308 │ │ │ │ +309 template │ │ │ │ +310 int │ │ │ │ +_3_1_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +312_ _i_n_d_e_x() const │ │ │ │ +313 { │ │ │ │ +314 return _k_u_h_n_I_n_d_e_x*_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(_n_I_n_t_e_r_v_a_l_s__) + _b_a_c_k_e_n_d.index │ │ │ │ +(); │ │ │ │ +315 } │ │ │ │ +316 │ │ │ │ +317 template │ │ │ │ +318 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +_3_1_9 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +320_ _c_o_o_r_d_s() const │ │ │ │ +321 { │ │ │ │ +322 return global(_b_a_c_k_e_n_d.coords()); │ │ │ │ +323 } │ │ │ │ +324 │ │ │ │ +325 template │ │ │ │ +326 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_G_e_o_m_e_t_r_y │ │ │ │ +_3_2_7 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ +328 { │ │ │ │ +329 const typename BackendIterator::Geometry &bgeo = │ │ │ │ +330 _b_a_c_k_e_n_d.geometry(); │ │ │ │ +331 std::vector corners(dimension+1); │ │ │ │ +332 for(int i = 0; i <= dimension; ++i) │ │ │ │ +333 corners[i] = global(bgeo.corner(i)); │ │ │ │ +334 │ │ │ │ +335 return _G_e_o_m_e_t_r_y(bgeo.type(), corners); │ │ │ │ +336 } │ │ │ │ +337 │ │ │ │ +338 template │ │ │ │ +339 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +340 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +341_ _g_l_o_b_a_l(const CoordVector &local) const │ │ │ │ +342 { │ │ │ │ +343 // while the kuhnIndex runs from 0,1,2 the actual permutations we need are │ │ │ │ +0,2,3 │ │ │ │ +344 return _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e(_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(local, _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_> │ │ │ │ +((kuhnIndex+2)%4))); │ │ │ │ +345 } │ │ │ │ +346 │ │ │ │ +347 // common │ │ │ │ +348 template │ │ │ │ +349 template │ │ │ │ +_3_5_0 class _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m_:_: │ │ │ │ +_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ +351 : public ForwardIteratorFacade::template Codim::SubEntityIterator, int>, │ │ │ │ +352 public _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +353 { │ │ │ │ +354 public: │ │ │ │ +_3_5_5 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_3_5_6 typedef _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _T_h_i_s; │ │ │ │ +357 │ │ │ │ +_3_5_8 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end = false); │ │ │ │ +359 │ │ │ │ +_3_6_0 bool _e_q_u_a_l_s(const _T_h_i_s &other) const; │ │ │ │ +361 protected: │ │ │ │ +362 using _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>:: │ │ │ │ +kuhnIndex; │ │ │ │ +363 using _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>:: │ │ │ │ +backend; │ │ │ │ +364 }; │ │ │ │ +365 │ │ │ │ +366#ifndef DOXYGEN │ │ │ │ +367 template │ │ │ │ +368 template │ │ │ │ +369 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ +370_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end) │ │ │ │ +371 : _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>(nIntervals, │ │ │ │ +end) │ │ │ │ +372 {} │ │ │ │ +373 │ │ │ │ +374 template │ │ │ │ +375 template │ │ │ │ +376 bool │ │ │ │ +377 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ +378_ _e_q_u_a_l_s(const This &other) const │ │ │ │ +379 { │ │ │ │ +380 return ((kuhnIndex == other.kuhnIndex) && (backend == other.backend)); │ │ │ │ +381 } │ │ │ │ +382#endif │ │ │ │ +383 │ │ │ │ +384 } // namespace PrismTriangulation │ │ │ │ +385 } // namespace RefinementImp │ │ │ │ +386 │ │ │ │ +387 namespace RefinementImp │ │ │ │ +388 { │ │ │ │ +389 // /////////////////////// │ │ │ │ +390 // │ │ │ │ +391 // The refinement traits │ │ │ │ +392 // │ │ │ │ +393 │ │ │ │ +394#ifndef DOXYGEN │ │ │ │ +395 template │ │ │ │ +396 struct Traits< │ │ │ │ +397 topologyId, CoordType, coerceToId, 3, │ │ │ │ +398 typename _s_t_d::enable_if< │ │ │ │ +399 (GeometryTypes::prism.id() >> 1) == │ │ │ │ +400 (topologyId >> 1) && │ │ │ │ +401 (GeometryTypes::simplex(3).id() >> 1) == │ │ │ │ +402 (coerceToId >> 1) │ │ │ │ +403 >::type> │ │ │ │ +404 { │ │ │ │ +405 typedef PrismTriangulation::RefinementImp<3, CoordType> Imp; │ │ │ │ +406 }; │ │ │ │ +407#endif │ │ │ │ +408 │ │ │ │ +409 } // namespace RefinementImp │ │ │ │ +410} // namespace Dune │ │ │ │ +411 │ │ │ │ +412#endif // DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC │ │ │ │ _t_y_p_e_._h_h │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ +_b_a_s_e_._c_c │ │ │ │ +This file contains the parts independent of a particular Refinement │ │ │ │ +implementation. │ │ │ │ +_s_i_m_p_l_e_x_._c_c │ │ │ │ +This file contains the Refinement implementation for simplices (triangles, │ │ │ │ +tetrahedrons.... │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x │ │ │ │ +constexpr GeometryType vertex │ │ │ │ +GeometryType representing a vertex. │ │ │ │ +DDeeffiinniittiioonn type.hh:492 │ │ │ │ +_s_t_d │ │ │ │ +STL namespace. │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y │ │ │ │ -Provide a factory over the generic topologies. │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:42 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_F_a_c_t_o_r_y │ │ │ │ -Traits::Factory Factory │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:47 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ -static Object * create(const Dune::GeometryType >, const Key &key) │ │ │ │ -dynamically create objects │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:50 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static const unsigned int dimension │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:44 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ -static Object * create(const Key &key) │ │ │ │ -statically create objects │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:58 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ -static void release(Object *object) │ │ │ │ -release the object returned by the create methods │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:71 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ -Traits::Key Key │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:45 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ -Traits::Object Object │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:46 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ -static auto create(const Key &key) -> std::enable_if_t< Topology:: │ │ │ │ -dimension==dimension, Object * > │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:103 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ -static Object * create(const Dune::GeometryType >, const Key &key) │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:88 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ -static void release(Object *object) │ │ │ │ -release the object returned by the create methods │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:110 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ -const Factory::Object Object │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:85 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ -Factory::Key Key │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:84 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ -static auto create(const Key &key) -> std::enable_if_t< static_cast< │ │ │ │ -GeometryType >(geometryId).dim()==dimension, Object * > │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:95 │ │ │ │ -_D_u_n_e_:_:_T_o_p_o_l_o_g_y_S_i_n_g_l_e_t_o_n_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static const unsigned int dimension │ │ │ │ -DDeeffiinniittiioonn topologyfactory.hh:83 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ -Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ -DDeeffiinniittiioonn type.hh:114 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_d │ │ │ │ -constexpr unsigned int id() const │ │ │ │ -Return the topology id of the type. │ │ │ │ -DDeeffiinniittiioonn type.hh:365 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ +This namespace contains the Refinement implementation for triangulating prisms │ │ │ │ +(GeometryType::prism -... │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:27 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n │ │ │ │ +FieldVector< int, n > getPermutation(int m) │ │ │ │ +Calculate permutation from it's index. │ │ │ │ +DDeeffiinniittiioonn simplex.cc:293 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n │ │ │ │ +FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, │ │ │ │ +dimension > point, const FieldVector< int, dimension > &kuhn) │ │ │ │ +Map from the reference simplex to some Kuhn simplex. │ │ │ │ +DDeeffiinniittiioonn simplex.cc:322 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e │ │ │ │ +FieldVector< CoordType, dimension > transformCoordinate(FieldVector< CoordType, │ │ │ │ +dimension > point) │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:50 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n │ │ │ │ +FieldVector< int, n > getPermutation(int m) │ │ │ │ +Calculate permutation from it's index. │ │ │ │ +DDeeffiinniittiioonn simplex.cc:293 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n │ │ │ │ +FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, │ │ │ │ +dimension > point, const FieldVector< int, dimension > &kuhn) │ │ │ │ +Map from the reference simplex to some Kuhn simplex. │ │ │ │ +DDeeffiinniittiioonn simplex.cc:322 │ │ │ │ +_D_u_n_e_:_:_C_o_d_i_m │ │ │ │ +Static tag representing a codimension. │ │ │ │ +DDeeffiinniittiioonn dimension.hh:24 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ +generic geometry implementation based on corner coordinates │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:181 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:43 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ +Implementation of the refinement of a prism into simplices. │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:67 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ +SubEntityIterator(int nIntervals, bool end=false) │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ +RefinementImp< dimension, CoordType > Refinement │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:355 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +_>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ +static constexpr int dimension │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:69 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_c_t_y_p_e │ │ │ │ +CoordType ctype │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:71 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_E_n_d │ │ │ │ +static VertexIterator vEnd(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:122 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ +FieldVector< int, dimension+1 > IndexVector │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:78 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_E_n_d │ │ │ │ +static ElementIterator eEnd(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:146 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ +static int nVertices(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:106 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +FieldVector< CoordType, dimension > CoordVector │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:76 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ +static int nElements(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:130 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_T_h_i_s │ │ │ │ +SubEntityIterator This │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:356 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ +Codim< 0 >::SubEntityIterator ElementIterator │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:77 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ +Codim< dimension >::SubEntityIterator VertexIterator │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:75 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_B_e_g_i_n │ │ │ │ +static ElementIterator eBegin(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:138 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_B_e_g_i_n │ │ │ │ +static VertexIterator vBegin(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:114 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const This &other) const │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:98 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ +_G_e_o_m_e_t_r_y │ │ │ │ +Dune::MultiLinearGeometry< CoordType, dimension-codimension, dimension > │ │ │ │ +Geometry │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:100 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_n_K_u_h_n_S_i_m_p_l_i_c_e_s │ │ │ │ +static constexpr int nKuhnSimplices │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:176 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_n_I_n_t_e_r_v_a_l_s__ │ │ │ │ +int nIntervals_ │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:178 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ +Geometry geometry() const │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:221 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ +Refinement::template Codim< dimension >::Geometry Geometry │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:163 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ +Refinement::BackendRefinement BackendRefinement │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:174 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r │ │ │ │ +BackendRefinement::template Codim< dimension >::SubEntityIterator │ │ │ │ +BackendIterator │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:175 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +Refinement::CoordVector CoordVector │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:162 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ +void increment() │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:199 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +RefinementIteratorSpecial(int nIntervals, bool end=false) │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:187 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_b_a_c_k_e_n_d_E_n_d │ │ │ │ +const BackendIterator backendEnd │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:182 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ +RefinementImp< dimension, CoordType > Refinement │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:161 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_b_a_c_k_e_n_d │ │ │ │ +BackendIterator backend │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:181 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_d_e_x │ │ │ │ +int index() const │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:232 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_c_o_o_r_d_s │ │ │ │ +CoordVector coords() const │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:212 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ +int kuhnIndex │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:180 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_n_I_n_t_e_r_v_a_l_s__ │ │ │ │ +int nIntervals_ │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:265 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ +Refinement::template Codim< 0 >::Geometry Geometry │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:245 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_b_a_c_k_e_n_d │ │ │ │ +BackendIterator backend │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:268 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_n_K_u_h_n_S_i_m_p_l_i_c_e_s │ │ │ │ +static constexpr int nKuhnSimplices │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:263 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ +Refinement::IndexVector IndexVector │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:243 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r │ │ │ │ +BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:262 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ +void increment() │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:286 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ +int kuhnIndex │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:267 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_v_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ +IndexVector vertexIndices() const │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:299 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ +Geometry geometry() const │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:327 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +Refinement::CoordVector CoordVector │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:244 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ +RefinementImp< dimension, CoordType > Refinement │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:242 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_b_a_c_k_e_n_d_E_n_d │ │ │ │ +const BackendIterator backendEnd │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:269 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +RefinementIteratorSpecial(int nIntervals, bool end=false) │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:274 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_i_n_d_e_x │ │ │ │ +int index() const │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:312 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_c_o_o_r_d_s │ │ │ │ +CoordVector coords() const │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:320 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ +Refinement::BackendRefinement BackendRefinement │ │ │ │ +DDeeffiinniittiioonn prismtriangulation.cc:261 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ +DDeeffiinniittiioonn simplex.cc:361 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ +static int nVertices(int nIntervals) │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ +static int nElements(int nIntervals) │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_v_B_e_g_i_n │ │ │ │ +static VertexIterator vBegin(int nIntervals) │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_e_B_e_g_i_n │ │ │ │ +static ElementIterator eBegin(int nIntervals) │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00197.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: simplex.cc File Reference │ │ │ +dune-geometry: base.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,79 +74,65 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ -Macros
│ │ │ -
simplex.cc File Reference
│ │ │ +Macros | │ │ │ +Functions
│ │ │ +
base.cc File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

This file contains the Refinement implementation for simplices (triangles, tetrahedrons...). │ │ │ +

This file contains the parts independent of a particular Refinement implementation. │ │ │ More...

│ │ │ -
#include <algorithm>
│ │ │ -#include <dune/common/fvector.hh>
│ │ │ -#include <dune/common/math.hh>
│ │ │ -#include <dune/geometry/multilineargeometry.hh>
│ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ -#include "base.cc"
│ │ │ +
#include <dune/geometry/type.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::RefinementImp::Simplex::RefinementImp< dimension_, CoordType >
struct  Dune::RefinementImp::Simplex::RefinementImp< dimension_, CoordType >::Codim< codimension >
class  Dune::RefinementImp::Simplex::RefinementIteratorSpecial< dimension, CoordType, dimension >
class  Dune::RefinementImp::Simplex::RefinementIteratorSpecial< dimension, CoordType, 0 >
class  Dune::RefinementImp::Simplex::RefinementImp< dimension_, CoordType >::Codim< codimension >
struct  Dune::RefinementImp::Traits< topologyId, CoordType, coerceToId, dimension, Dummy >
 Mapping from geometryType, CoordType and coerceTo to a particular Refinement implementation. More...
class  Dune::RefinementIntervals
 Holds the number of refined intervals per axis needed for virtual and static refinement. More...
class  Dune::StaticRefinement< topologyId, CoordType, coerceToId, dimension_ >
 Wrap each Refinement implementation to get a consistent interface. More...
struct  Dune::StaticRefinement< topologyId, CoordType, coerceToId, dimension_ >::Codim< codimension >
 The Codim struct inherited from the Refinement implementation. More...
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::RefinementImp
 This namespace contains the implementation of Refinement.
namespace  Dune::RefinementImp::Simplex
 This namespace contains the Refinement implementation for simplices (triangles, tetrahedrons...).
│ │ │ │ │ │ - │ │ │ + │ │ │

│ │ │ Macros

#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
#define DUNE_GEOMETRY_REFINEMENT_BASE_CC
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

Utilities
template<int dimension>
int Dune::RefinementImp::Simplex::pointIndex (const FieldVector< int, dimension > &point)
 calculate the index of a given gridpoint within a Kuhn0 simplex
template<int n>
FieldVector< int, n > Dune::RefinementImp::Simplex::getPermutation (int m)
 Calculate permutation from it's index.
template<int dimension, class CoordType>
FieldVector< CoordType, dimension > Dune::RefinementImp::Simplex::referenceToKuhn (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
 Map from the reference simplex to some Kuhn simplex.
template<int dimension, class CoordType>
FieldVector< CoordType, dimension > Dune::RefinementImp::Simplex::kuhnToReference (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
 Map from some Kuhn simplex to the reference simplex.
RefinementIntervals Dune::refinementIntervals (int intervals)
 Creates a RefinementIntervals object.
RefinementIntervals Dune::refinementLevels (int levels)
 Creates a RefinementIntervals object.
│ │ │

Detailed Description

│ │ │ -

This file contains the Refinement implementation for simplices (triangles, tetrahedrons...).

│ │ │ -

See Refinement implementation for simplices.

│ │ │ +

This file contains the parts independent of a particular Refinement implementation.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC

│ │ │ + │ │ │ +

◆ DUNE_GEOMETRY_REFINEMENT_BASE_CC

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │
#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC#define DUNE_GEOMETRY_REFINEMENT_BASE_CC
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,73 +1,47 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ * _r_e_f_i_n_e_m_e_n_t │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ -simplex.cc File Reference │ │ │ │ -This file contains the _R_e_f_i_n_e_m_e_n_t implementation for simplices (triangles, │ │ │ │ -tetrahedrons...). _M_o_r_e_._._. │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_m_u_l_t_i_l_i_n_e_a_r_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +base.cc File Reference │ │ │ │ +This file contains the parts independent of a particular _R_e_f_i_n_e_m_e_n_t │ │ │ │ +implementation. _M_o_r_e_._._. │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -#include "_b_a_s_e_._c_c" │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___,_ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___,_ _C_o_o_r_d_T_y_p_e_ _>_:_: │ │ │ │ - _C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ - _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ - _C_o_o_r_d_T_y_p_e_,_ _0_ _> │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___,_ _C_o_o_r_d_T_y_p_e_ _>_:_: │ │ │ │ - _C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ +struct   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_T_r_a_i_t_s_<_ _t_o_p_o_l_o_g_y_I_d_,_ _C_o_o_r_d_T_y_p_e_,_ _c_o_e_r_c_e_T_o_I_d_, │ │ │ │ + _d_i_m_e_n_s_i_o_n_,_ _D_u_m_m_y_ _> │ │ │ │ +  Mapping from ggeeoommeettrryyTTyyppee, CCoooorrddTTyyppee and ccooeerrcceeTToo to a particular │ │ │ │ + _R_e_f_i_n_e_m_e_n_t implementation. _M_o_r_e_._._. │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s │ │ │ │ +  Holds the number of refined intervals per axis needed for virtual and │ │ │ │ + static refinement. _M_o_r_e_._._. │ │ │ │ + class   _D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_<_ _t_o_p_o_l_o_g_y_I_d_,_ _C_o_o_r_d_T_y_p_e_,_ _c_o_e_r_c_e_T_o_I_d_,_ _d_i_m_e_n_s_i_o_n__ │ │ │ │ + _> │ │ │ │ +  Wrap each _R_e_f_i_n_e_m_e_n_t implementation to get a consistent interface. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_<_ _t_o_p_o_l_o_g_y_I_d_,_ _C_o_o_r_d_T_y_p_e_,_ _c_o_e_r_c_e_T_o_I_d_,_ _d_i_m_e_n_s_i_o_n__ │ │ │ │ + _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ +  The _C_o_d_i_m struct inherited from the _R_e_f_i_n_e_m_e_n_t implementation. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │   This namespace contains the implementation of _R_e_f_i_n_e_m_e_n_t. │ │ │ │ -namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x │ │ │ │ -  This namespace contains the _R_e_f_i_n_e_m_e_n_t implementation for simplices │ │ │ │ - (triangles, tetrahedrons...). │ │ │ │ MMaaccrrooss │ │ │ │ -#define  _D_U_N_E___G_R_I_D___C_O_M_M_O_N___R_E_F_I_N_E_M_E_N_T___S_I_M_P_L_E_X___C_C │ │ │ │ +#define  _D_U_N_E___G_E_O_M_E_T_R_Y___R_E_F_I_N_E_M_E_N_T___B_A_S_E___C_C │ │ │ │ FFuunnccttiioonnss │ │ │ │ -Utilities │ │ │ │ -template │ │ │ │ - int  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_p_o_i_n_t_I_n_d_e_x │ │ │ │ - (const FieldVector< int, dimension > │ │ │ │ - &point) │ │ │ │ -  calculate the index of a given gridpoint │ │ │ │ - within a Kuhn0 simplex │ │ │ │ -template │ │ │ │ - FieldVector< int, n >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_: │ │ │ │ - _g_e_t_P_e_r_m_u_t_a_t_i_o_n (int m) │ │ │ │ -  Calculate permutation from it's index. │ │ │ │ -template │ │ │ │ -FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_: │ │ │ │ - _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n (FieldVector< CoordType, │ │ │ │ - dimension > point, const FieldVector< int, │ │ │ │ - dimension > &kuhn) │ │ │ │ -  Map from the reference simplex to some │ │ │ │ - Kuhn simplex. │ │ │ │ -template │ │ │ │ -FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_: │ │ │ │ - _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e (FieldVector< CoordType, │ │ │ │ - dimension > point, const FieldVector< int, │ │ │ │ - dimension > &kuhn) │ │ │ │ -  Map from some Kuhn simplex to the │ │ │ │ - reference simplex. │ │ │ │ +_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s  _D_u_n_e_:_:_r_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s (int intervals) │ │ │ │ +  Creates a _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s object. │ │ │ │ +_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s  _D_u_n_e_:_:_r_e_f_i_n_e_m_e_n_t_L_e_v_e_l_s (int levels) │ │ │ │ +  Creates a _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s object. │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -This file contains the _R_e_f_i_n_e_m_e_n_t implementation for simplices (triangles, │ │ │ │ -tetrahedrons...). │ │ │ │ -See _R_e_f_i_n_e_m_e_n_t_ _i_m_p_l_e_m_e_n_t_a_t_i_o_n_ _f_o_r_ _s_i_m_p_l_i_c_e_s. │ │ │ │ +This file contains the parts independent of a particular _R_e_f_i_n_e_m_e_n_t │ │ │ │ +implementation. │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? DDUUNNEE__GGRRIIDD__CCOOMMMMOONN__RREEFFIINNEEMMEENNTT__SSIIMMPPLLEEXX__CCCC ********** │ │ │ │ -#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ +********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__BBAASSEE__CCCC ********** │ │ │ │ +#define DUNE_GEOMETRY_REFINEMENT_BASE_CC │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00197_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: simplex.cc Source File │ │ │ +dune-geometry: base.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,633 +71,199 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
simplex.cc
│ │ │ +
base.cc
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ -
6#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ -
7
│ │ │ -
8// This file is part of DUNE, a Distributed and Unified Numerics Environment
│ │ │ -
9// This file is copyright (C) 2005 Jorrit Fahlke <jorrit@jorrit.de>
│ │ │ -
10// This file is licensed under version 2 of the GNU General Public License,
│ │ │ -
11// with a special "runtime exception." See COPYING at the top of the source
│ │ │ -
12// tree for the full licence.
│ │ │ -
13
│ │ │ -
21
│ │ │ -
242
│ │ │ -
243#include <algorithm>
│ │ │ -
244
│ │ │ -
245#include <dune/common/fvector.hh>
│ │ │ -
246#include <dune/common/math.hh>
│ │ │ -
247
│ │ │ - │ │ │ - │ │ │ -
250#include <dune/geometry/type.hh>
│ │ │ -
251
│ │ │ -
252#include "base.cc"
│ │ │ -
253
│ │ │ -
254namespace Dune {
│ │ │ +
5#ifndef DUNE_GEOMETRY_REFINEMENT_BASE_CC
│ │ │ +
6#define DUNE_GEOMETRY_REFINEMENT_BASE_CC
│ │ │ +
7
│ │ │ +
14
│ │ │ +
15#include <dune/geometry/type.hh>
│ │ │ +
16
│ │ │ +
17namespace Dune
│ │ │ +
18{
│ │ │ +
23
│ │ │ +
│ │ │ +
28 namespace RefinementImp
│ │ │ +
29 {
│ │ │ +
30 // /////////////////////////////////
│ │ │ +
31 //
│ │ │ +
32 // Declaration of RefinementImp::Traits
│ │ │ +
33 //
│ │ │ +
34
│ │ │ +
35#ifdef DOXYGEN
│ │ │ +
36 // This is just for Doxygen
│ │ │ +
67 template<unsigned topologyId, class CoordType,
│ │ │ +
68 unsigned coerceToId, int dimension, class Dummy = void>
│ │ │ +
│ │ │ +
69 struct Traits
│ │ │ +
70 {
│ │ │ +
72 typedef SquaringTheCircle::Refinement Imp;
│ │ │ +
73 };
│ │ │ +
│ │ │ +
74
│ │ │ +
75#else // !DOXYGEN
│ │ │ +
76
│ │ │ +
77 // Doxygen won't see this
│ │ │ +
78
│ │ │ +
79 template<unsigned topologyId, class CoordType,
│ │ │ +
80 unsigned coerceToId, int dimension, class = void>
│ │ │ +
81 struct Traits;
│ │ │ +
82
│ │ │ +
83#endif // !DOXYGEN
│ │ │ +
84 } // namespace RefinementImp
│ │ │ +
│ │ │ +
85
│ │ │ +
86
│ │ │ +
│ │ │ + │ │ │ +
95 int intervals_=1;
│ │ │ +
96
│ │ │ +
97 public:
│ │ │ +
98 explicit RefinementIntervals(int i) : intervals_(i) {}
│ │ │ +
99
│ │ │ +
100 int intervals() const { return intervals_; }
│ │ │ +
101 };
│ │ │ +
│ │ │ +
102
│ │ │ +
│ │ │ + │ │ │ +
109 {
│ │ │ +
110 return RefinementIntervals{intervals};
│ │ │ +
111 }
│ │ │ +
│ │ │ +
112
│ │ │ +
│ │ │ + │ │ │ +
118 {
│ │ │ +
119 return RefinementIntervals{1<<levels};
│ │ │ +
120 }
│ │ │ +
│ │ │ +
121
│ │ │ +
122 // ///////////////
│ │ │ +
123 //
│ │ │ +
124 // Static Refinement
│ │ │ +
125 //
│ │ │ +
126
│ │ │ +
136 template<unsigned topologyId, class CoordType,
│ │ │ +
137 unsigned coerceToId, int dimension_>
│ │ │ +
│ │ │ + │ │ │ +
139 : public RefinementImp::Traits<topologyId, CoordType,
│ │ │ +
140 coerceToId, dimension_ >::Imp
│ │ │ +
141 {
│ │ │ +
142 public:
│ │ │ +
143#ifdef DOXYGEN
│ │ │ +
149 template<int codimension>
│ │ │ +
│ │ │ +
150 struct Codim
│ │ │ +
151 {
│ │ │ + │ │ │ +
158 };
│ │ │ +
│ │ │ +
159
│ │ │ + │ │ │ + │ │ │ +
164
│ │ │ +
170 typedef CoordVector;
│ │ │ +
171
│ │ │ +
177 typedef IndexVector;
│ │ │ +
178#endif
│ │ │ +
179
│ │ │ +
180 typedef typename RefinementImp::Traits< topologyId, CoordType, coerceToId, dimension_>::Imp RefinementImp;
│ │ │ +
181
│ │ │ +
182 using RefinementImp::dimension;
│ │ │ +
183
│ │ │ +
184 using RefinementImp::Codim;
│ │ │ +
185
│ │ │ +
186 using typename RefinementImp::VertexIterator;
│ │ │ +
187 using typename RefinementImp::CoordVector;
│ │ │ +
188
│ │ │ +
189 using typename RefinementImp::ElementIterator;
│ │ │ +
190 using typename RefinementImp::IndexVector;
│ │ │ +
191
│ │ │ +
│ │ │ + │ │ │ +
198 {
│ │ │ +
199 return RefinementImp::nVertices(tag.intervals());
│ │ │ +
200 }
│ │ │ +
│ │ │ +
201
│ │ │ +
│ │ │ + │ │ │ +
208 {
│ │ │ +
209 return RefinementImp::vBegin(tag.intervals());
│ │ │ +
210 }
│ │ │ +
│ │ │ +
211
│ │ │ +
│ │ │ + │ │ │ +
218 {
│ │ │ +
219 return RefinementImp::vEnd(tag.intervals());
│ │ │ +
220 }
│ │ │ +
│ │ │ +
221
│ │ │ +
│ │ │ + │ │ │ +
228 {
│ │ │ +
229 return RefinementImp::nElements(tag.intervals());
│ │ │ +
230 }
│ │ │ +
│ │ │ +
231
│ │ │ +
│ │ │ + │ │ │ +
238 {
│ │ │ +
239 return RefinementImp::eBegin(tag.intervals());
│ │ │ +
240 }
│ │ │ +
│ │ │ +
241
│ │ │ +
│ │ │ + │ │ │ +
248 {
│ │ │ +
249 return RefinementImp::eEnd(tag.intervals());
│ │ │ +
250 }
│ │ │ +
│ │ │ +
251 };
│ │ │ +
│ │ │ +
252
│ │ │ +
254} // namespace Dune
│ │ │
255
│ │ │ -
256 namespace RefinementImp {
│ │ │ -
257
│ │ │ -
│ │ │ -
264 namespace Simplex {
│ │ │ -
265
│ │ │ -
266 // //////////////////
│ │ │ -
267 //
│ │ │ -
269 //
│ │ │ -
270
│ │ │ -
272
│ │ │ -
279 template<int dimension>
│ │ │ -
│ │ │ -
280 int pointIndex(const FieldVector<int, dimension> &point)
│ │ │ -
281 {
│ │ │ -
282 int index = 0;
│ │ │ -
283 for(int i = 0; i < dimension; ++i)
│ │ │ -
284 index += Dune::binomial(dimension-i + point[i]-1, dimension-i);
│ │ │ -
285 return index;
│ │ │ -
286 }
│ │ │ -
│ │ │ -
287
│ │ │ -
292 template<int n>
│ │ │ -
│ │ │ -
293 FieldVector<int, n> getPermutation(int m)
│ │ │ -
294 {
│ │ │ -
295 FieldVector<int, n> perm;
│ │ │ -
296 for(int i = 0; i < n; ++i)
│ │ │ -
297 perm[i] = i;
│ │ │ -
298
│ │ │ -
299 int base = 1;
│ │ │ -
300 for(int i = 1; i <= n; ++i)
│ │ │ -
301 base *= i;
│ │ │ -
302
│ │ │ -
303 for(int i = n; i > 0; --i) {
│ │ │ -
304 base /= i;
│ │ │ -
305 int d = m / base;
│ │ │ -
306 m %= base;
│ │ │ -
307 int t = perm[i-1]; perm[i-1] = perm[i-1-d]; perm[i-1-d] = t;
│ │ │ -
308 }
│ │ │ -
309 return perm;
│ │ │ -
310 }
│ │ │ -
│ │ │ -
311
│ │ │ -
312 // map between the reference simplex and some arbitrary kuhn simplex (denoted by it's permutation)
│ │ │ -
320 template<int dimension, class CoordType>
│ │ │ -
321 FieldVector<CoordType, dimension>
│ │ │ -
│ │ │ - │ │ │ -
323 FieldVector<CoordType, dimension> point,
│ │ │ -
325 const FieldVector<int, dimension> &kuhn)
│ │ │ -
326 {
│ │ │ -
327 for(int i = dimension - 1; i > 0; --i)
│ │ │ -
328 point[kuhn[i-1]] += point[kuhn[i]];
│ │ │ -
329 return point;
│ │ │ -
330 }
│ │ │ -
│ │ │ -
331
│ │ │ -
339 template<int dimension, class CoordType>
│ │ │ -
340 FieldVector<CoordType, dimension>
│ │ │ -
│ │ │ - │ │ │ -
342 FieldVector<CoordType, dimension> point,
│ │ │ -
344 const FieldVector<int, dimension> &kuhn)
│ │ │ -
345 {
│ │ │ -
346 for(int i = 0; i < dimension - 1; ++i)
│ │ │ -
347 point[kuhn[i]] -= point[kuhn[i+1]];
│ │ │ -
348 return point;
│ │ │ -
349 }
│ │ │ -
│ │ │ -
350
│ │ │ -
351
│ │ │ -
353
│ │ │ -
354 // /////////////////////////////////////////
│ │ │ -
355 //
│ │ │ -
356 // refinement implementation for simplices
│ │ │ -
357 //
│ │ │ -
358
│ │ │ -
359 template<int dimension_, class CoordType>
│ │ │ -
│ │ │ - │ │ │ -
361 {
│ │ │ -
362 public:
│ │ │ -
363 constexpr static int dimension = dimension_;
│ │ │ -
364 typedef CoordType ctype;
│ │ │ -
365
│ │ │ -
366 template<int codimension>
│ │ │ -
367 struct Codim;
│ │ │ -
368 typedef typename Codim<dimension>::SubEntityIterator VertexIterator;
│ │ │ -
369 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ -
370 typedef typename Codim<0>::SubEntityIterator ElementIterator;
│ │ │ -
371 typedef FieldVector<int, dimension+1> IndexVector;
│ │ │ -
372
│ │ │ -
373 static int nVertices(int nIntervals);
│ │ │ -
374 static VertexIterator vBegin(int nIntervals);
│ │ │ -
375 static VertexIterator vEnd(int nIntervals);
│ │ │ -
376
│ │ │ -
377 static int nElements(int nIntervals);
│ │ │ -
378 static ElementIterator eBegin(int nIntervals);
│ │ │ -
379 static ElementIterator eEnd(int nIntervals);
│ │ │ -
380 };
│ │ │ -
│ │ │ -
381
│ │ │ -
382 template<int dimension, class CoordType>
│ │ │ -
383 template<int codimension>
│ │ │ -
│ │ │ -
384 struct RefinementImp<dimension, CoordType>::Codim
│ │ │ -
385 {
│ │ │ -
386 class SubEntityIterator;
│ │ │ -
387 // We don't need the caching, but the uncached MultiLinearGeometry has bug FS#1209
│ │ │ -
388 typedef Dune::CachedMultiLinearGeometry<CoordType,dimension-codimension,dimension> Geometry;
│ │ │ -
389 };
│ │ │ -
│ │ │ -
390
│ │ │ -
391 template<int dimension, class CoordType>
│ │ │ -
392 int
│ │ │ -
│ │ │ - │ │ │ -
394 nVertices(int nIntervals)
│ │ │ -
395 {
│ │ │ -
396 return Dune::binomial(dimension + nIntervals, (int)dimension);
│ │ │ -
397 }
│ │ │ -
│ │ │ -
398
│ │ │ -
399 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
402 vBegin(int nIntervals)
│ │ │ -
403 {
│ │ │ -
404 return VertexIterator(nIntervals);
│ │ │ -
405 }
│ │ │ -
│ │ │ -
406
│ │ │ -
407 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
410 vEnd(int nIntervals)
│ │ │ -
411 {
│ │ │ -
412 return VertexIterator(nIntervals, true);
│ │ │ -
413 }
│ │ │ -
│ │ │ -
414
│ │ │ -
415 template<int dimension, class CoordType>
│ │ │ -
416 int
│ │ │ -
│ │ │ - │ │ │ -
418 nElements(int nIntervals)
│ │ │ -
419 {
│ │ │ -
420 return Dune::power(nIntervals, int(dimension));
│ │ │ -
421 }
│ │ │ -
│ │ │ -
422
│ │ │ -
423 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
426 eBegin(int nIntervals)
│ │ │ -
427 {
│ │ │ -
428 return ElementIterator(nIntervals);
│ │ │ -
429 }
│ │ │ -
│ │ │ -
430
│ │ │ -
431 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
434 eEnd(int nIntervals)
│ │ │ -
435 {
│ │ │ -
436 return ElementIterator(nIntervals, true);
│ │ │ -
437 }
│ │ │ -
│ │ │ -
438
│ │ │ -
439 // //////////////
│ │ │ -
440 //
│ │ │ -
441 // The iterator
│ │ │ -
442 //
│ │ │ -
443
│ │ │ -
444 template<int dimension, class CoordType, int codimension>
│ │ │ - │ │ │ -
446
│ │ │ -
447 // vertices
│ │ │ -
448
│ │ │ -
449 template<int dimension, class CoordType>
│ │ │ -
│ │ │ -
450 class RefinementIteratorSpecial<dimension, CoordType, dimension>
│ │ │ -
451 {
│ │ │ -
452 public:
│ │ │ - │ │ │ - │ │ │ -
455 typedef typename Refinement::template Codim<dimension>::Geometry Geometry;
│ │ │ - │ │ │ -
457
│ │ │ -
458 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ -
459
│ │ │ -
460 void increment();
│ │ │ -
461 bool equals(const This &other) const;
│ │ │ -
462
│ │ │ -
463 CoordVector coords() const;
│ │ │ -
464 Geometry geometry () const;
│ │ │ -
465
│ │ │ -
466 int index() const;
│ │ │ -
467 protected:
│ │ │ -
468 typedef FieldVector<int, dimension> Vertex;
│ │ │ -
469
│ │ │ -
470 int size;
│ │ │ - │ │ │ -
472 };
│ │ │ -
│ │ │ -
473
│ │ │ -
474 template<int dimension, class CoordType>
│ │ │ -
│ │ │ - │ │ │ -
476 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ -
477 : size(nIntervals)
│ │ │ -
478 {
│ │ │ -
479 vertex[0] = (end) ? size + 1 : 0;
│ │ │ -
480 for(int i = 1; i < dimension; ++ i)
│ │ │ -
481 vertex[i] = 0;
│ │ │ -
482 }
│ │ │ -
│ │ │ -
483
│ │ │ -
484 template<int dimension, class CoordType>
│ │ │ -
485 void
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
488 {
│ │ │ -
489 assert(vertex[0] <= size);
│ │ │ -
490 for(int i = dimension - 1; i >= 0; --i) {
│ │ │ -
491 ++vertex[i];
│ │ │ -
492 if(i == 0 || vertex[i] <= vertex[i-1])
│ │ │ -
493 break;
│ │ │ -
494 else
│ │ │ -
495 vertex[i] = 0;
│ │ │ -
496 }
│ │ │ -
497 }
│ │ │ -
│ │ │ -
498
│ │ │ -
499 template<int dimension, class CoordType>
│ │ │ -
500 bool
│ │ │ -
│ │ │ - │ │ │ -
502 equals(const This &other) const
│ │ │ -
503 {
│ │ │ -
504 return size == other.size && vertex == other.vertex;
│ │ │ -
505 }
│ │ │ -
│ │ │ -
506
│ │ │ -
507 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
510 coords() const
│ │ │ -
511 {
│ │ │ - │ │ │ -
513
│ │ │ - │ │ │ -
515 for(int i = 0; i < dimension; ++i)
│ │ │ -
516 coords[i] = CoordType(ref[i]) / size;
│ │ │ -
517 return coords;
│ │ │ -
518 }
│ │ │ -
│ │ │ -
519
│ │ │ -
520 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
523 {
│ │ │ -
524 std::vector<CoordVector> corners(1);
│ │ │ -
525 corners[0] = (CoordVector)vertex;
│ │ │ -
526 return Geometry(GeometryTypes::vertex, corners);
│ │ │ -
527 }
│ │ │ -
│ │ │ -
528
│ │ │ -
529 template<int dimension, class CoordType>
│ │ │ -
530 int
│ │ │ -
│ │ │ - │ │ │ -
532 index() const
│ │ │ -
533 {
│ │ │ -
534 return pointIndex(vertex);
│ │ │ -
535 }
│ │ │ -
│ │ │ -
536
│ │ │ -
537 // elements
│ │ │ -
538
│ │ │ -
539 template<int dimension, class CoordType>
│ │ │ -
│ │ │ -
540 class RefinementIteratorSpecial<dimension, CoordType, 0>
│ │ │ -
541 {
│ │ │ -
542 public:
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
546 typedef typename Refinement::template Codim<0>::Geometry Geometry;
│ │ │ - │ │ │ -
548
│ │ │ -
549 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ -
550
│ │ │ -
551 void increment();
│ │ │ -
552 bool equals(const This &other) const;
│ │ │ -
553
│ │ │ - │ │ │ -
555 int index() const;
│ │ │ -
556 CoordVector coords() const;
│ │ │ -
557
│ │ │ -
558 Geometry geometry () const;
│ │ │ -
559
│ │ │ -
560 private:
│ │ │ -
561 CoordVector global(const CoordVector &local) const;
│ │ │ -
562
│ │ │ -
563 protected:
│ │ │ -
564 typedef FieldVector<int, dimension> Vertex;
│ │ │ -
565 constexpr static int nKuhnIntervals = Dune::factorial(dimension);
│ │ │ -
566
│ │ │ - │ │ │ - │ │ │ -
569 int size;
│ │ │ - │ │ │ -
571 };
│ │ │ -
│ │ │ -
572
│ │ │ -
573 template<int dimension, class CoordType>
│ │ │ -
│ │ │ - │ │ │ -
575 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ -
576 : kuhnIndex(0), size(nIntervals), index_(0)
│ │ │ -
577 {
│ │ │ -
578 for(int i = 0; i < dimension; ++i)
│ │ │ -
579 origin[i] = 0;
│ │ │ -
580 if(end) {
│ │ │ -
581 index_ = Refinement::nElements(nIntervals);
│ │ │ -
582 origin[0] = size;
│ │ │ -
583 }
│ │ │ -
584 }
│ │ │ -
│ │ │ -
585
│ │ │ -
586 template<int dimension, class CoordType>
│ │ │ -
587 void
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
590 {
│ │ │ -
591 assert(origin[0] < size);
│ │ │ -
592
│ │ │ -
593 ++index_;
│ │ │ -
594
│ │ │ -
595 while(1) {
│ │ │ -
596 ++kuhnIndex;
│ │ │ - │ │ │ -
598 kuhnIndex = 0;
│ │ │ -
599 // increment origin
│ │ │ -
600 for(int i = dimension - 1; i >= 0; --i) {
│ │ │ -
601 ++origin[i];
│ │ │ -
602 if(i == 0 || origin[i] <= origin[i-1])
│ │ │ -
603 break;
│ │ │ -
604 else
│ │ │ -
605 origin[i] = 0;
│ │ │ -
606 }
│ │ │ -
607 }
│ │ │ -
608
│ │ │ -
609 // test whether the current simplex has any corner outside the kuhn0 simplex
│ │ │ -
610 FieldVector<int, dimension> perm = getPermutation<dimension>(kuhnIndex);
│ │ │ -
611 Vertex corner = origin;
│ │ │ -
612 bool outside = false;
│ │ │ -
613 for(int i = 0; i < dimension; ++i) {
│ │ │ -
614 // next corner
│ │ │ -
615 ++corner[perm[i]];
│ │ │ -
616 if(perm[i] > 0)
│ │ │ -
617 if(corner[perm[i]] > corner[perm[i]-1]) {
│ │ │ -
618 outside = true;
│ │ │ -
619 break;
│ │ │ -
620 }
│ │ │ -
621 }
│ │ │ -
622 if(!outside)
│ │ │ -
623 return;
│ │ │ -
624 }
│ │ │ -
625 }
│ │ │ -
│ │ │ -
626
│ │ │ -
627 template<int dimension, class CoordType>
│ │ │ -
628 bool
│ │ │ -
│ │ │ - │ │ │ -
630 equals(const This &other) const
│ │ │ -
631 {
│ │ │ -
632 return size == other.size && index_ == other.index_;
│ │ │ -
633 }
│ │ │ -
│ │ │ -
634
│ │ │ -
635 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
638 vertexIndices() const
│ │ │ -
639 {
│ │ │ -
640 IndexVector indices;
│ │ │ -
641 FieldVector<int, dimension> perm = getPermutation<dimension>(kuhnIndex);
│ │ │ -
642 Vertex vertex = origin;
│ │ │ -
643 indices[0] = pointIndex(vertex);
│ │ │ -
644 for(int i = 0; i < dimension; ++i) {
│ │ │ -
645 ++vertex[perm[i]];
│ │ │ -
646 indices[i+1] = pointIndex(vertex);
│ │ │ -
647 }
│ │ │ -
648 if (kuhnIndex%2 == 1)
│ │ │ -
649 for(int i = 0; i < (dimension+1)/2; ++i) {
│ │ │ -
650 int t = indices[i];
│ │ │ -
651 indices[i] = indices[dimension-i];
│ │ │ -
652 indices[dimension-i] = t;
│ │ │ -
653 }
│ │ │ -
654 return indices;
│ │ │ -
655 }
│ │ │ -
│ │ │ -
656
│ │ │ -
657 template<int dimension, class CoordType>
│ │ │ -
658 int
│ │ │ -
│ │ │ - │ │ │ -
660 index() const
│ │ │ -
661 {
│ │ │ -
662 return index_;
│ │ │ -
663 }
│ │ │ -
│ │ │ -
664
│ │ │ -
665 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
668 coords() const
│ │ │ -
669 {
│ │ │ - │ │ │ -
671 ::simplex().position(0,0));
│ │ │ -
672 }
│ │ │ -
│ │ │ -
673
│ │ │ -
674 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
677 {
│ │ │ -
678 std::vector<CoordVector> corners(dimension+1);
│ │ │ - │ │ │ -
680 for(int i = 0; i <= dimension; ++i)
│ │ │ -
681 corners[i] = global(refelem.position(i, dimension));
│ │ │ -
682 return Geometry(refelem.type(), corners);
│ │ │ -
683 }
│ │ │ -
│ │ │ -
684
│ │ │ -
685 template<int dimension, class CoordType>
│ │ │ - │ │ │ - │ │ │ -
688 global(const CoordVector &local) const {
│ │ │ -
689 CoordVector v =
│ │ │ - │ │ │ -
691 v += origin;
│ │ │ -
692 v /= (typename CoordVector::value_type)size;
│ │ │ - │ │ │ -
694 }
│ │ │ -
695
│ │ │ -
696 // common
│ │ │ -
697
│ │ │ -
698 template<int dimension, class CoordType>
│ │ │ -
699 template<int codimension>
│ │ │ -
│ │ │ -
700 class RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │ -
701 : public ForwardIteratorFacade<typename RefinementImp<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ -
702 public RefinementIteratorSpecial<dimension, CoordType, codimension>
│ │ │ -
703 {
│ │ │ -
704 public:
│ │ │ - │ │ │ -
706
│ │ │ -
707 SubEntityIterator(int nIntervals, bool end = false);
│ │ │ -
708 };
│ │ │ -
│ │ │ -
709
│ │ │ -
710#ifndef DOXYGEN
│ │ │ -
711
│ │ │ -
712 template<int dimension, class CoordType>
│ │ │ -
713 template<int codimension>
│ │ │ - │ │ │ -
715 SubEntityIterator(int nIntervals, bool end)
│ │ │ -
716 : RefinementIteratorSpecial<dimension, CoordType, codimension>(nIntervals, end)
│ │ │ -
717 {}
│ │ │ -
718
│ │ │ -
719#endif
│ │ │ -
720
│ │ │ -
721 } // namespace Simplex
│ │ │ -
│ │ │ -
722
│ │ │ -
723 } // namespace RefinementImp
│ │ │ -
724
│ │ │ -
725
│ │ │ -
726 namespace RefinementImp {
│ │ │ -
727
│ │ │ -
728 // ///////////////////////
│ │ │ -
729 //
│ │ │ -
730 // The refinement traits
│ │ │ -
731 //
│ │ │ -
732
│ │ │ -
733#ifndef DOXYGEN
│ │ │ -
734 template<unsigned topologyId, class CoordType, unsigned coerceToId,
│ │ │ -
735 int dim>
│ │ │ -
736 struct Traits<
│ │ │ -
737 topologyId, CoordType, coerceToId, dim,
│ │ │ -
738 typename std::enable_if<
│ │ │ -
739 ((GeometryTypes::simplex(dim).id() >> 1) ==
│ │ │ -
740 (topologyId >> 1) &&
│ │ │ -
741 (GeometryTypes::simplex(dim).id() >> 1) ==
│ │ │ -
742 (coerceToId >> 1)
│ │ │ -
743 )>::type
│ │ │ -
744 >
│ │ │ -
745 {
│ │ │ -
746 typedef Simplex::RefinementImp<dim, CoordType> Imp;
│ │ │ -
747 };
│ │ │ -
748#endif
│ │ │ -
749
│ │ │ -
750
│ │ │ -
751 } // namespace RefinementImp
│ │ │ -
752
│ │ │ -
753} // namespace Dune
│ │ │ -
754
│ │ │ -
755#endif //DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ -
This file contains the parts independent of a particular Refinement implementation.
│ │ │ - │ │ │ - │ │ │ -
constexpr GeometryType vertex
GeometryType representing a vertex.
Definition type.hh:492
│ │ │ -
STL namespace.
│ │ │ +
256#endif // DUNE_GEOMETRY_REFINEMENT_BASE_CC
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ +
RefinementIntervals refinementIntervals(int intervals)
Creates a RefinementIntervals object.
Definition base.cc:108
│ │ │ +
RefinementIntervals refinementLevels(int levels)
Creates a RefinementIntervals object.
Definition base.cc:117
│ │ │
Definition affinegeometry.hh:22
│ │ │
This namespace contains the implementation of Refinement.
Definition base.cc:29
│ │ │ -
This namespace contains the Refinement implementation for simplices (triangles, tetrahedrons....
Definition simplex.cc:264
│ │ │ -
int pointIndex(const FieldVector< int, dimension > &point)
calculate the index of a given gridpoint within a Kuhn0 simplex
Definition simplex.cc:280
│ │ │ -
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:293
│ │ │ -
FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from the reference simplex to some Kuhn simplex.
Definition simplex.cc:322
│ │ │ -
FieldVector< CoordType, dimension > kuhnToReference(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from some Kuhn simplex to the reference simplex.
Definition simplex.cc:341
│ │ │ -
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │ -
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │ -
Implement a MultiLinearGeometry with additional caching.
Definition multilineargeometry.hh:526
│ │ │ - │ │ │ -
Codim< dimension >::SubEntityIterator VertexIterator
Definition simplex.cc:368
│ │ │ -
FieldVector< int, dimension+1 > IndexVector
Definition simplex.cc:371
│ │ │ - │ │ │ -
static int nVertices(int nIntervals)
Definition simplex.cc:394
│ │ │ -
static int nElements(int nIntervals)
Definition simplex.cc:418
│ │ │ - │ │ │ -
static ElementIterator eEnd(int nIntervals)
Definition simplex.cc:434
│ │ │ -
static VertexIterator vEnd(int nIntervals)
Definition simplex.cc:410
│ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:705
│ │ │ -
Codim< 0 >::SubEntityIterator ElementIterator
Definition simplex.cc:370
│ │ │ -
static VertexIterator vBegin(int nIntervals)
Definition simplex.cc:402
│ │ │ -
static ElementIterator eBegin(int nIntervals)
Definition simplex.cc:426
│ │ │ -
FieldVector< CoordType, dimension > CoordVector
Definition simplex.cc:369
│ │ │ -
static constexpr int dimension
Definition simplex.cc:363
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:453
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition simplex.cc:476
│ │ │ - │ │ │ - │ │ │ -
Refinement::template Codim< dimension >::Geometry Geometry
Definition simplex.cc:455
│ │ │ - │ │ │ -
RefinementIteratorSpecial< dimension, CoordType, dimension > This
Definition simplex.cc:456
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
FieldVector< int, dimension > Vertex
Definition simplex.cc:564
│ │ │ -
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition simplex.cc:575
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
Refinement::template Codim< 0 >::Geometry Geometry
Definition simplex.cc:546
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
RefinementIteratorSpecial< dimension, CoordType, 0 > This
Definition simplex.cc:547
│ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:543
│ │ │ - │ │ │ -
bool equals(const This &other) const
Definition simplex.cc:630
│ │ │ -
static const ReferenceElement & simplex()
get simplex reference elements
Definition referenceelements.hh:162
│ │ │ +
Mapping from geometryType, CoordType and coerceTo to a particular Refinement implementation.
Definition base.cc:70
│ │ │ +
Holds the number of refined intervals per axis needed for virtual and static refinement.
Definition base.cc:94
│ │ │ +
RefinementIntervals(int i)
Definition base.cc:98
│ │ │ +
int intervals() const
Definition base.cc:100
│ │ │ +
Wrap each Refinement implementation to get a consistent interface.
Definition base.cc:141
│ │ │ +
static ElementIterator eEnd(Dune::RefinementIntervals tag)
Get an ElementIterator.
Definition base.cc:247
│ │ │ +
static ElementIterator eBegin(Dune::RefinementIntervals tag)
Get an ElementIterator.
Definition base.cc:237
│ │ │ +
static int nElements(Dune::RefinementIntervals tag)
Get the number of Elements.
Definition base.cc:227
│ │ │ +
Codim< 0 >::SubEntityIterator ElementIterator
The ElementIterator of the Refinement.
Definition base.cc:163
│ │ │ +
static int nVertices(Dune::RefinementIntervals tag)
Get the number of Vertices.
Definition base.cc:197
│ │ │ +
static VertexIterator vBegin(Dune::RefinementIntervals tag)
Get a VertexIterator.
Definition base.cc:207
│ │ │ +
Codim< dimension >::SubEntityIterator VertexIterator
The VertexIterator of the Refinement.
Definition base.cc:161
│ │ │ + │ │ │ + │ │ │ +
RefinementImp::Traits< topologyId, CoordType, coerceToId, dimension_ >::Imp RefinementImp
Definition base.cc:180
│ │ │ +
static VertexIterator vEnd(Dune::RefinementIntervals tag)
Get a VertexIterator.
Definition base.cc:217
│ │ │ +
The Codim struct inherited from the Refinement implementation.
Definition base.cc:151
│ │ │ +
typedef SubEntityIterator
Definition base.cc:157
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,746 +1,228 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ * _r_e_f_i_n_e_m_e_n_t │ │ │ │ -simplex.cc │ │ │ │ +base.cc │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ -_6#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ +5#ifndef DUNE_GEOMETRY_REFINEMENT_BASE_CC │ │ │ │ +_6#define DUNE_GEOMETRY_REFINEMENT_BASE_CC │ │ │ │ 7 │ │ │ │ -8// This file is part of DUNE, a Distributed and Unified Numerics Environment │ │ │ │ -9// This file is copyright (C) 2005 Jorrit Fahlke │ │ │ │ -10// This file is licensed under version 2 of the GNU General Public License, │ │ │ │ -11// with a special "runtime exception." See COPYING at the top of the source │ │ │ │ -12// tree for the full licence. │ │ │ │ -13 │ │ │ │ -21 │ │ │ │ -242 │ │ │ │ -243#include │ │ │ │ -244 │ │ │ │ -245#include │ │ │ │ -246#include │ │ │ │ -247 │ │ │ │ -248#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_m_u_l_t_i_l_i_n_e_a_r_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ -249#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ -250#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -251 │ │ │ │ -252#include "_b_a_s_e_._c_c" │ │ │ │ -253 │ │ │ │ -254namespace _D_u_n_e { │ │ │ │ +14 │ │ │ │ +15#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +16 │ │ │ │ +17namespace _D_u_n_e │ │ │ │ +18{ │ │ │ │ +23 │ │ │ │ +_2_8 namespace _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ +29 { │ │ │ │ +30 // ///////////////////////////////// │ │ │ │ +31 // │ │ │ │ +32 // Declaration of RefinementImp::Traits │ │ │ │ +33 // │ │ │ │ +34 │ │ │ │ +35#ifdef DOXYGEN │ │ │ │ +36 // This is just for Doxygen │ │ │ │ +67 template │ │ │ │ +_6_9 struct _T_r_a_i_t_s │ │ │ │ +70 { │ │ │ │ +72 typedef SquaringTheCircle::Refinement Imp; │ │ │ │ +73 }; │ │ │ │ +74 │ │ │ │ +75#else // !DOXYGEN │ │ │ │ +76 │ │ │ │ +77 // Doxygen won't see this │ │ │ │ +78 │ │ │ │ +79 template │ │ │ │ +81 struct _T_r_a_i_t_s; │ │ │ │ +82 │ │ │ │ +83#endif // !DOXYGEN │ │ │ │ +84 } // namespace RefinementImp │ │ │ │ +85 │ │ │ │ +86 │ │ │ │ +_9_4 class _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s{ │ │ │ │ +95 int intervals_=1; │ │ │ │ +96 │ │ │ │ +97 public: │ │ │ │ +_9_8 explicit _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s(int i) : intervals_(i) {} │ │ │ │ +99 │ │ │ │ +_1_0_0 int _i_n_t_e_r_v_a_l_s() const { return intervals_; } │ │ │ │ +101 }; │ │ │ │ +102 │ │ │ │ +_1_0_8 inline _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s _r_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s(int intervals) │ │ │ │ +109 { │ │ │ │ +110 return _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s{intervals}; │ │ │ │ +111 } │ │ │ │ +112 │ │ │ │ +_1_1_7 inline _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s _r_e_f_i_n_e_m_e_n_t_L_e_v_e_l_s(int levels) │ │ │ │ +118 { │ │ │ │ +119 return _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s{1< │ │ │ │ +_1_3_8 class _S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t │ │ │ │ +139 : public _R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_T_r_a_i_t_s::Imp │ │ │ │ +141 { │ │ │ │ +142 public: │ │ │ │ +143#ifdef DOXYGEN │ │ │ │ +149 template │ │ │ │ +_1_5_0 struct _C_o_d_i_m │ │ │ │ +151 { │ │ │ │ +_1_5_7 typedef _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r; │ │ │ │ +158 }; │ │ │ │ +159 │ │ │ │ +_1_6_1 typedef _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _V_e_r_t_e_x_I_t_e_r_a_t_o_r; │ │ │ │ +_1_6_3 typedef _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r; │ │ │ │ +164 │ │ │ │ +_1_7_0 typedef _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ +171 │ │ │ │ +_1_7_7 typedef _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ +178#endif │ │ │ │ +179 │ │ │ │ +_1_8_0 typedef typename RefinementImp::Traits< topologyId, CoordType, coerceToId, │ │ │ │ +dimension_>::Imp _R_e_f_i_n_e_m_e_n_t_I_m_p; │ │ │ │ +181 │ │ │ │ +182 using RefinementImp::dimension; │ │ │ │ +183 │ │ │ │ +184 using RefinementImp::Codim; │ │ │ │ +185 │ │ │ │ +186 using typename RefinementImp::VertexIterator; │ │ │ │ +187 using typename RefinementImp::CoordVector; │ │ │ │ +188 │ │ │ │ +189 using typename RefinementImp::ElementIterator; │ │ │ │ +190 using typename RefinementImp::IndexVector; │ │ │ │ +191 │ │ │ │ +_1_9_7 static int _n_V_e_r_t_i_c_e_s(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ +198 { │ │ │ │ +199 return RefinementImp::nVertices(tag._i_n_t_e_r_v_a_l_s()); │ │ │ │ +200 } │ │ │ │ +201 │ │ │ │ +_2_0_7 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ +208 { │ │ │ │ +209 return RefinementImp::vBegin(tag._i_n_t_e_r_v_a_l_s()); │ │ │ │ +210 } │ │ │ │ +211 │ │ │ │ +_2_1_7 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ +218 { │ │ │ │ +219 return RefinementImp::vEnd(tag._i_n_t_e_r_v_a_l_s()); │ │ │ │ +220 } │ │ │ │ +221 │ │ │ │ +_2_2_7 static int _n_E_l_e_m_e_n_t_s(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ +228 { │ │ │ │ +229 return RefinementImp::nElements(tag._i_n_t_e_r_v_a_l_s()); │ │ │ │ +230 } │ │ │ │ +231 │ │ │ │ +_2_3_7 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_B_e_g_i_n(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ +238 { │ │ │ │ +239 return RefinementImp::eBegin(tag._i_n_t_e_r_v_a_l_s()); │ │ │ │ +240 } │ │ │ │ +241 │ │ │ │ +_2_4_7 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_E_n_d(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ +248 { │ │ │ │ +249 return RefinementImp::eEnd(tag._i_n_t_e_r_v_a_l_s()); │ │ │ │ +250 } │ │ │ │ +251 }; │ │ │ │ +252 │ │ │ │ +254} // namespace Dune │ │ │ │ 255 │ │ │ │ -256 namespace RefinementImp { │ │ │ │ -257 │ │ │ │ -_2_6_4 namespace _S_i_m_p_l_e_x { │ │ │ │ -265 │ │ │ │ -266 // ////////////////// │ │ │ │ -267 // │ │ │ │ -269 // │ │ │ │ -270 │ │ │ │ -272 │ │ │ │ -279 template │ │ │ │ -_2_8_0 int _p_o_i_n_t_I_n_d_e_x(const FieldVector &point) │ │ │ │ -281 { │ │ │ │ -282 int index = 0; │ │ │ │ -283 for(int i = 0; i < dimension; ++i) │ │ │ │ -284 index += Dune::binomial(dimension-i + point[i]-1, dimension-i); │ │ │ │ -285 return index; │ │ │ │ -286 } │ │ │ │ -287 │ │ │ │ -292 template │ │ │ │ -_2_9_3 FieldVector _g_e_t_P_e_r_m_u_t_a_t_i_o_n(int m) │ │ │ │ -294 { │ │ │ │ -295 FieldVector perm; │ │ │ │ -296 for(int i = 0; i < n; ++i) │ │ │ │ -297 perm[i] = i; │ │ │ │ -298 │ │ │ │ -299 int base = 1; │ │ │ │ -300 for(int i = 1; i <= n; ++i) │ │ │ │ -301 base *= i; │ │ │ │ -302 │ │ │ │ -303 for(int i = n; i > 0; --i) { │ │ │ │ -304 base /= i; │ │ │ │ -305 int d = m / base; │ │ │ │ -306 m %= base; │ │ │ │ -307 int t = perm[i-1]; perm[i-1] = perm[i-1-d]; perm[i-1-d] = t; │ │ │ │ -308 } │ │ │ │ -309 return perm; │ │ │ │ -310 } │ │ │ │ -311 │ │ │ │ -312 // map between the reference simplex and some arbitrary kuhn simplex │ │ │ │ -(denoted by it's permutation) │ │ │ │ -320 template │ │ │ │ -321 FieldVector │ │ │ │ -_3_2_2 _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n( │ │ │ │ -323 FieldVector point, │ │ │ │ -325 const FieldVector &kuhn) │ │ │ │ -326 { │ │ │ │ -327 for(int i = dimension - 1; i > 0; --i) │ │ │ │ -328 point[kuhn[i-1]] += point[kuhn[i]]; │ │ │ │ -329 return point; │ │ │ │ -330 } │ │ │ │ -331 │ │ │ │ -339 template │ │ │ │ -340 FieldVector │ │ │ │ -_3_4_1 _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e( │ │ │ │ -342 FieldVector point, │ │ │ │ -344 const FieldVector &kuhn) │ │ │ │ -345 { │ │ │ │ -346 for(int i = 0; i < dimension - 1; ++i) │ │ │ │ -347 point[kuhn[i]] -= point[kuhn[i+1]]; │ │ │ │ -348 return point; │ │ │ │ -349 } │ │ │ │ -350 │ │ │ │ -351 │ │ │ │ -353 │ │ │ │ -354 // ///////////////////////////////////////// │ │ │ │ -355 // │ │ │ │ -356 // refinement implementation for simplices │ │ │ │ -357 // │ │ │ │ -358 │ │ │ │ -359 template │ │ │ │ -_3_6_0 class _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ -361 { │ │ │ │ -362 public: │ │ │ │ -_3_6_3 constexpr static int _d_i_m_e_n_s_i_o_n = dimension_; │ │ │ │ -_3_6_4 typedef CoordType _c_t_y_p_e; │ │ │ │ -365 │ │ │ │ -366 template │ │ │ │ -367 struct Codim; │ │ │ │ -_3_6_8 typedef typename Codim::SubEntityIterator _V_e_r_t_e_x_I_t_e_r_a_t_o_r; │ │ │ │ -_3_6_9 typedef FieldVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ -_3_7_0 typedef typename Codim<0>::SubEntityIterator _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r; │ │ │ │ -_3_7_1 typedef FieldVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ -372 │ │ │ │ -_3_7_3 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ -_3_7_4 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ -_3_7_5 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ -376 │ │ │ │ -_3_7_7 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ -_3_7_8 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_B_e_g_i_n(int nIntervals); │ │ │ │ -_3_7_9 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_E_n_d(int nIntervals); │ │ │ │ -380 }; │ │ │ │ -381 │ │ │ │ -382 template │ │ │ │ -383 template │ │ │ │ -_3_8_4 struct _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m │ │ │ │ -385 { │ │ │ │ -386 class _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r; │ │ │ │ -387 // We don't need the caching, but the uncached MultiLinearGeometry has bug │ │ │ │ -FS#1209 │ │ │ │ -388 typedef _D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y Geometry; │ │ │ │ -389 }; │ │ │ │ -390 │ │ │ │ -391 template │ │ │ │ -392 int │ │ │ │ -_3_9_3 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -394_ _n_V_e_r_t_i_c_e_s(int nIntervals) │ │ │ │ -395 { │ │ │ │ -396 return Dune::binomial(_d_i_m_e_n_s_i_o_n + nIntervals, (int)_d_i_m_e_n_s_i_o_n); │ │ │ │ -397 } │ │ │ │ -398 │ │ │ │ -399 template │ │ │ │ -400 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ -_4_0_1 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -402_ _v_B_e_g_i_n(int nIntervals) │ │ │ │ -403 { │ │ │ │ -404 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ -405 } │ │ │ │ -406 │ │ │ │ -407 template │ │ │ │ -408 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ -_4_0_9 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -410_ _v_E_n_d(int nIntervals) │ │ │ │ -411 { │ │ │ │ -412 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ -413 } │ │ │ │ -414 │ │ │ │ -415 template │ │ │ │ -416 int │ │ │ │ -_4_1_7 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -418_ _n_E_l_e_m_e_n_t_s(int nIntervals) │ │ │ │ -419 { │ │ │ │ -420 return Dune::power(nIntervals, int(_d_i_m_e_n_s_i_o_n)); │ │ │ │ -421 } │ │ │ │ -422 │ │ │ │ -423 template │ │ │ │ -424 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ -_4_2_5 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -426_ _e_B_e_g_i_n(int nIntervals) │ │ │ │ -427 { │ │ │ │ -428 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ -429 } │ │ │ │ -430 │ │ │ │ -431 template │ │ │ │ -432 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ -_4_3_3 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -434_ _e_E_n_d(int nIntervals) │ │ │ │ -435 { │ │ │ │ -436 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ -437 } │ │ │ │ -438 │ │ │ │ -439 // ////////////// │ │ │ │ -440 // │ │ │ │ -441 // The iterator │ │ │ │ -442 // │ │ │ │ -443 │ │ │ │ -444 template │ │ │ │ -_4_4_5 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l; │ │ │ │ -446 │ │ │ │ -447 // vertices │ │ │ │ -448 │ │ │ │ -449 template │ │ │ │ -_4_5_0 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -451 { │ │ │ │ -452 public: │ │ │ │ -_4_5_3 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_4_5_4 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ -_4_5_5 typedef typename Refinement::template _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ -_4_5_6 typedef _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_> _T_h_i_s; │ │ │ │ -457 │ │ │ │ -458 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ -459 │ │ │ │ -460 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ -461 bool _e_q_u_a_l_s(const _T_h_i_s &other) const; │ │ │ │ -462 │ │ │ │ -463 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ -464 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const; │ │ │ │ -465 │ │ │ │ -466 int _i_n_d_e_x() const; │ │ │ │ -467 protected: │ │ │ │ -_4_6_8 typedef FieldVector _V_e_r_t_e_x; │ │ │ │ -469 │ │ │ │ -_4_7_0 int _s_i_z_e; │ │ │ │ -_4_7_1 _V_e_r_t_e_x _v_e_r_t_e_x; │ │ │ │ -472 }; │ │ │ │ -473 │ │ │ │ -474 template │ │ │ │ -_4_7_5 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -476_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ -477 : _s_i_z_e(nIntervals) │ │ │ │ -478 { │ │ │ │ -479 _v_e_r_t_e_x[0] = (end) ? _s_i_z_e + 1 : 0; │ │ │ │ -480 for(int i = 1; i < dimension; ++ i) │ │ │ │ -481 _v_e_r_t_e_x[i] = 0; │ │ │ │ -482 } │ │ │ │ -483 │ │ │ │ -484 template │ │ │ │ -485 void │ │ │ │ -_4_8_6 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -487_ _i_n_c_r_e_m_e_n_t() │ │ │ │ -488 { │ │ │ │ -489 assert(_v_e_r_t_e_x[0] <= _s_i_z_e); │ │ │ │ -490 for(int i = dimension - 1; i >= 0; --i) { │ │ │ │ -491 ++_v_e_r_t_e_x[i]; │ │ │ │ -492 if(i == 0 || _v_e_r_t_e_x[i] <= _v_e_r_t_e_x[i-1]) │ │ │ │ -493 break; │ │ │ │ -494 else │ │ │ │ -495 _v_e_r_t_e_x[i] = 0; │ │ │ │ -496 } │ │ │ │ -497 } │ │ │ │ -498 │ │ │ │ -499 template │ │ │ │ -500 bool │ │ │ │ -_5_0_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -502_ _e_q_u_a_l_s(const _T_h_i_s &other) const │ │ │ │ -503 { │ │ │ │ -504 return _s_i_z_e == other._s_i_z_e && _v_e_r_t_e_x == other._v_e_r_t_e_x; │ │ │ │ -505 } │ │ │ │ -506 │ │ │ │ -507 template │ │ │ │ -508 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -_5_0_9 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -510_ _c_o_o_r_d_s() const │ │ │ │ -511 { │ │ │ │ -512 _V_e_r_t_e_x ref = _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e(_v_e_r_t_e_x, _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(0)); │ │ │ │ -513 │ │ │ │ -514 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s; │ │ │ │ -515 for(int i = 0; i < dimension; ++i) │ │ │ │ -516 _c_o_o_r_d_s[i] = CoordType(ref[i]) / _s_i_z_e; │ │ │ │ -517 return _c_o_o_r_d_s; │ │ │ │ -518 } │ │ │ │ -519 │ │ │ │ -520 template │ │ │ │ -521 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -_G_e_o_m_e_t_r_y │ │ │ │ -_5_2_2 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_:_g_e_o_m_e_t_r_y () │ │ │ │ -const │ │ │ │ -523 { │ │ │ │ -524 std::vector corners(1); │ │ │ │ -525 corners[0] = (_C_o_o_r_d_V_e_c_t_o_r)_v_e_r_t_e_x; │ │ │ │ -526 return _G_e_o_m_e_t_r_y(_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x, corners); │ │ │ │ -527 } │ │ │ │ -528 │ │ │ │ -529 template │ │ │ │ -530 int │ │ │ │ -_5_3_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -532_ _i_n_d_e_x() const │ │ │ │ -533 { │ │ │ │ -534 return _p_o_i_n_t_I_n_d_e_x(_v_e_r_t_e_x); │ │ │ │ -535 } │ │ │ │ -536 │ │ │ │ -537 // elements │ │ │ │ -538 │ │ │ │ -539 template │ │ │ │ -_5_4_0 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -541 { │ │ │ │ -542 public: │ │ │ │ -_5_4_3 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_5_4_4 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_I_n_d_e_x_V_e_c_t_o_r _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ -_5_4_5 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ -_5_4_6 typedef typename Refinement::template _C_o_d_i_m_<_0_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ -_5_4_7 typedef _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_> _T_h_i_s; │ │ │ │ -548 │ │ │ │ -549 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ -550 │ │ │ │ -551 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ -552 bool _e_q_u_a_l_s(const _T_h_i_s &other) const; │ │ │ │ -553 │ │ │ │ -554 _I_n_d_e_x_V_e_c_t_o_r _v_e_r_t_e_x_I_n_d_i_c_e_s() const; │ │ │ │ -555 int _i_n_d_e_x() const; │ │ │ │ -556 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ -557 │ │ │ │ -558 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const; │ │ │ │ -559 │ │ │ │ -560 private: │ │ │ │ -561 _C_o_o_r_d_V_e_c_t_o_r global(const _C_o_o_r_d_V_e_c_t_o_r &local) const; │ │ │ │ -562 │ │ │ │ -563 protected: │ │ │ │ -_5_6_4 typedef FieldVector _V_e_r_t_e_x; │ │ │ │ -_5_6_5 constexpr static int _n_K_u_h_n_I_n_t_e_r_v_a_l_s = Dune::factorial(dimension); │ │ │ │ -566 │ │ │ │ -_5_6_7 _V_e_r_t_e_x _o_r_i_g_i_n; │ │ │ │ -_5_6_8 int _k_u_h_n_I_n_d_e_x; │ │ │ │ -_5_6_9 int _s_i_z_e; │ │ │ │ -_5_7_0 int _i_n_d_e_x__; │ │ │ │ -571 }; │ │ │ │ -572 │ │ │ │ -573 template │ │ │ │ -_5_7_4 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -575_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ -576 : _k_u_h_n_I_n_d_e_x(0), _s_i_z_e(nIntervals), _i_n_d_e_x__(0) │ │ │ │ -577 { │ │ │ │ -578 for(int i = 0; i < dimension; ++i) │ │ │ │ -579 _o_r_i_g_i_n[i] = 0; │ │ │ │ -580 if(end) { │ │ │ │ -581 _i_n_d_e_x__ = _R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(nIntervals); │ │ │ │ -582 _o_r_i_g_i_n[0] = _s_i_z_e; │ │ │ │ -583 } │ │ │ │ -584 } │ │ │ │ -585 │ │ │ │ -586 template │ │ │ │ -587 void │ │ │ │ -_5_8_8 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -589_ _i_n_c_r_e_m_e_n_t() │ │ │ │ -590 { │ │ │ │ -591 assert(_o_r_i_g_i_n[0] < _s_i_z_e); │ │ │ │ -592 │ │ │ │ -593 ++_i_n_d_e_x__; │ │ │ │ -594 │ │ │ │ -595 while(1) { │ │ │ │ -596 ++_k_u_h_n_I_n_d_e_x; │ │ │ │ -597 if(_k_u_h_n_I_n_d_e_x == _n_K_u_h_n_I_n_t_e_r_v_a_l_s) { │ │ │ │ -598 _k_u_h_n_I_n_d_e_x = 0; │ │ │ │ -599 // increment origin │ │ │ │ -600 for(int i = dimension - 1; i >= 0; --i) { │ │ │ │ -601 ++_o_r_i_g_i_n[i]; │ │ │ │ -602 if(i == 0 || _o_r_i_g_i_n[i] <= _o_r_i_g_i_n[i-1]) │ │ │ │ -603 break; │ │ │ │ -604 else │ │ │ │ -605 _o_r_i_g_i_n[i] = 0; │ │ │ │ -606 } │ │ │ │ -607 } │ │ │ │ -608 │ │ │ │ -609 // test whether the current simplex has any corner outside the kuhn0 │ │ │ │ -simplex │ │ │ │ -610 FieldVector perm = _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(_k_u_h_n_I_n_d_e_x); │ │ │ │ -611 _V_e_r_t_e_x corner = _o_r_i_g_i_n; │ │ │ │ -612 bool outside = false; │ │ │ │ -613 for(int i = 0; i < dimension; ++i) { │ │ │ │ -614 // next corner │ │ │ │ -615 ++corner[perm[i]]; │ │ │ │ -616 if(perm[i] > 0) │ │ │ │ -617 if(corner[perm[i]] > corner[perm[i]-1]) { │ │ │ │ -618 outside = true; │ │ │ │ -619 break; │ │ │ │ -620 } │ │ │ │ -621 } │ │ │ │ -622 if(!outside) │ │ │ │ -623 return; │ │ │ │ -624 } │ │ │ │ -625 } │ │ │ │ -626 │ │ │ │ -627 template │ │ │ │ -628 bool │ │ │ │ -_6_2_9 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -630_ _e_q_u_a_l_s(const _T_h_i_s &other) const │ │ │ │ -631 { │ │ │ │ -632 return _s_i_z_e == other._s_i_z_e && _i_n_d_e_x__ == other._i_n_d_e_x__; │ │ │ │ -633 } │ │ │ │ -634 │ │ │ │ -635 template │ │ │ │ -636 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ -_6_3_7 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -638_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ -639 { │ │ │ │ -640 _I_n_d_e_x_V_e_c_t_o_r indices; │ │ │ │ -641 FieldVector perm = _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(_k_u_h_n_I_n_d_e_x); │ │ │ │ -642 _V_e_r_t_e_x vertex = _o_r_i_g_i_n; │ │ │ │ -643 indices[0] = _p_o_i_n_t_I_n_d_e_x(vertex); │ │ │ │ -644 for(int i = 0; i < dimension; ++i) { │ │ │ │ -645 ++vertex[perm[i]]; │ │ │ │ -646 indices[i+1] = _p_o_i_n_t_I_n_d_e_x(vertex); │ │ │ │ -647 } │ │ │ │ -648 if (_k_u_h_n_I_n_d_e_x%2 == 1) │ │ │ │ -649 for(int i = 0; i < (dimension+1)/2; ++i) { │ │ │ │ -650 int t = indices[i]; │ │ │ │ -651 indices[i] = indices[dimension-i]; │ │ │ │ -652 indices[dimension-i] = t; │ │ │ │ -653 } │ │ │ │ -654 return indices; │ │ │ │ -655 } │ │ │ │ -656 │ │ │ │ -657 template │ │ │ │ -658 int │ │ │ │ -_6_5_9 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -660_ _i_n_d_e_x() const │ │ │ │ -661 { │ │ │ │ -662 return _i_n_d_e_x__; │ │ │ │ -663 } │ │ │ │ -664 │ │ │ │ -665 template │ │ │ │ -666 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -_6_6_7 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -668_ _c_o_o_r_d_s() const │ │ │ │ -669 { │ │ │ │ -670 return global(_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_> │ │ │ │ -671 ::simplex().position(0,0)); │ │ │ │ -672 } │ │ │ │ -673 │ │ │ │ -674 template │ │ │ │ -675 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_G_e_o_m_e_t_r_y │ │ │ │ -_6_7_6 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ -677 { │ │ │ │ -678 std::vector corners(dimension+1); │ │ │ │ -679 auto refelem = _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_:_s_i_m_p_l_e_x(); │ │ │ │ -680 for(int i = 0; i <= dimension; ++i) │ │ │ │ -681 corners[i] = global(refelem.position(i, dimension)); │ │ │ │ -682 return _G_e_o_m_e_t_r_y(refelem.type(), corners); │ │ │ │ -683 } │ │ │ │ -684 │ │ │ │ -685 template │ │ │ │ -686 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -687 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -688_ _g_l_o_b_a_l(const CoordVector &local) const { │ │ │ │ -689 CoordVector v = │ │ │ │ -690 _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(local, _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(kuhnIndex)); │ │ │ │ -691 v += origin; │ │ │ │ -692 v /= (typename CoordVector::value_type)size; │ │ │ │ -693 return _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e(v, _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(0)); │ │ │ │ -694 } │ │ │ │ -695 │ │ │ │ -696 // common │ │ │ │ -697 │ │ │ │ -698 template │ │ │ │ -699 template │ │ │ │ -_7_0_0 class _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m_:_: │ │ │ │ -_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ -701 : public ForwardIteratorFacade::template Codim::SubEntityIterator, int>, │ │ │ │ -702 public _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -703 { │ │ │ │ -704 public: │ │ │ │ -_7_0_5 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ -706 │ │ │ │ -_7_0_7 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end = false); │ │ │ │ -708 }; │ │ │ │ -709 │ │ │ │ -710#ifndef DOXYGEN │ │ │ │ -711 │ │ │ │ -712 template │ │ │ │ -713 template │ │ │ │ -714 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ -715_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end) │ │ │ │ -716 : _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>(nIntervals, │ │ │ │ -end) │ │ │ │ -717 {} │ │ │ │ -718 │ │ │ │ -719#endif │ │ │ │ -720 │ │ │ │ -721 } // namespace Simplex │ │ │ │ -722 │ │ │ │ -723 } // namespace RefinementImp │ │ │ │ -724 │ │ │ │ -725 │ │ │ │ -726 namespace _R_e_f_i_n_e_m_e_n_t_I_m_p { │ │ │ │ -727 │ │ │ │ -728 // /////////////////////// │ │ │ │ -729 // │ │ │ │ -730 // The refinement traits │ │ │ │ -731 // │ │ │ │ -732 │ │ │ │ -733#ifndef DOXYGEN │ │ │ │ -734 template │ │ │ │ -736 struct Traits< │ │ │ │ -737 topologyId, CoordType, coerceToId, dim, │ │ │ │ -738 typename _s_t_d::enable_if< │ │ │ │ -739 ((GeometryTypes::simplex(dim).id() >> 1) == │ │ │ │ -740 (topologyId >> 1) && │ │ │ │ -741 (GeometryTypes::simplex(dim).id() >> 1) == │ │ │ │ -742 (coerceToId >> 1) │ │ │ │ -743 )>::type │ │ │ │ -744 > │ │ │ │ -745 { │ │ │ │ -746 typedef Simplex::RefinementImp Imp; │ │ │ │ -747 }; │ │ │ │ -748#endif │ │ │ │ -749 │ │ │ │ -750 │ │ │ │ -751 } // namespace RefinementImp │ │ │ │ -752 │ │ │ │ -753} // namespace Dune │ │ │ │ -754 │ │ │ │ -755#endif //DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ +256#endif // DUNE_GEOMETRY_REFINEMENT_BASE_CC │ │ │ │ _t_y_p_e_._h_h │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ -_b_a_s_e_._c_c │ │ │ │ -This file contains the parts independent of a particular Refinement │ │ │ │ -implementation. │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ -_m_u_l_t_i_l_i_n_e_a_r_g_e_o_m_e_t_r_y_._h_h │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x │ │ │ │ -constexpr GeometryType vertex │ │ │ │ -GeometryType representing a vertex. │ │ │ │ -DDeeffiinniittiioonn type.hh:492 │ │ │ │ -_s_t_d │ │ │ │ -STL namespace. │ │ │ │ +_D_u_n_e_:_:_r_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s │ │ │ │ +RefinementIntervals refinementIntervals(int intervals) │ │ │ │ +Creates a RefinementIntervals object. │ │ │ │ +DDeeffiinniittiioonn base.cc:108 │ │ │ │ +_D_u_n_e_:_:_r_e_f_i_n_e_m_e_n_t_L_e_v_e_l_s │ │ │ │ +RefinementIntervals refinementLevels(int levels) │ │ │ │ +Creates a RefinementIntervals object. │ │ │ │ +DDeeffiinniittiioonn base.cc:117 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ This namespace contains the implementation of Refinement. │ │ │ │ DDeeffiinniittiioonn base.cc:29 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x │ │ │ │ -This namespace contains the Refinement implementation for simplices (triangles, │ │ │ │ -tetrahedrons.... │ │ │ │ -DDeeffiinniittiioonn simplex.cc:264 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_p_o_i_n_t_I_n_d_e_x │ │ │ │ -int pointIndex(const FieldVector< int, dimension > &point) │ │ │ │ -calculate the index of a given gridpoint within a Kuhn0 simplex │ │ │ │ -DDeeffiinniittiioonn simplex.cc:280 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n │ │ │ │ -FieldVector< int, n > getPermutation(int m) │ │ │ │ -Calculate permutation from it's index. │ │ │ │ -DDeeffiinniittiioonn simplex.cc:293 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n │ │ │ │ -FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, │ │ │ │ -dimension > point, const FieldVector< int, dimension > &kuhn) │ │ │ │ -Map from the reference simplex to some Kuhn simplex. │ │ │ │ -DDeeffiinniittiioonn simplex.cc:322 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_k_u_h_n_T_o_R_e_f_e_r_e_n_c_e │ │ │ │ -FieldVector< CoordType, dimension > kuhnToReference(FieldVector< CoordType, │ │ │ │ -dimension > point, const FieldVector< int, dimension > &kuhn) │ │ │ │ -Map from some Kuhn simplex to the reference simplex. │ │ │ │ -DDeeffiinniittiioonn simplex.cc:341 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ -Class providing access to the singletons of the reference elements. │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ -_D_u_n_e_:_:_C_o_d_i_m │ │ │ │ -Static tag representing a codimension. │ │ │ │ -DDeeffiinniittiioonn dimension.hh:24 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ -Implement a MultiLinearGeometry with additional caching. │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:526 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ -DDeeffiinniittiioonn simplex.cc:361 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_: │ │ │ │ -_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ -Codim< dimension >::SubEntityIterator VertexIterator │ │ │ │ -DDeeffiinniittiioonn simplex.cc:368 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_: │ │ │ │ -_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ -FieldVector< int, dimension+1 > IndexVector │ │ │ │ -DDeeffiinniittiioonn simplex.cc:371 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_c_t_y_p_e │ │ │ │ -CoordType ctype │ │ │ │ -DDeeffiinniittiioonn simplex.cc:364 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ -static int nVertices(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn simplex.cc:394 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ -static int nElements(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn simplex.cc:418 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_C_o_d_i_m_< │ │ │ │ -_c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ -SubEntityIterator(int nIntervals, bool end=false) │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_E_n_d │ │ │ │ -static ElementIterator eEnd(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn simplex.cc:434 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_E_n_d │ │ │ │ -static VertexIterator vEnd(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn simplex.cc:410 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_C_o_d_i_m_< │ │ │ │ -_c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ -RefinementImp< dimension, CoordType > Refinement │ │ │ │ -DDeeffiinniittiioonn simplex.cc:705 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_: │ │ │ │ -_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_T_r_a_i_t_s │ │ │ │ +Mapping from geometryType, CoordType and coerceTo to a particular Refinement │ │ │ │ +implementation. │ │ │ │ +DDeeffiinniittiioonn base.cc:70 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s │ │ │ │ +Holds the number of refined intervals per axis needed for virtual and static │ │ │ │ +refinement. │ │ │ │ +DDeeffiinniittiioonn base.cc:94 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s │ │ │ │ +RefinementIntervals(int i) │ │ │ │ +DDeeffiinniittiioonn base.cc:98 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s_:_:_i_n_t_e_r_v_a_l_s │ │ │ │ +int intervals() const │ │ │ │ +DDeeffiinniittiioonn base.cc:100 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t │ │ │ │ +Wrap each Refinement implementation to get a consistent interface. │ │ │ │ +DDeeffiinniittiioonn base.cc:141 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_e_E_n_d │ │ │ │ +static ElementIterator eEnd(Dune::RefinementIntervals tag) │ │ │ │ +Get an ElementIterator. │ │ │ │ +DDeeffiinniittiioonn base.cc:247 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n │ │ │ │ +static ElementIterator eBegin(Dune::RefinementIntervals tag) │ │ │ │ +Get an ElementIterator. │ │ │ │ +DDeeffiinniittiioonn base.cc:237 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ +static int nElements(Dune::RefinementIntervals tag) │ │ │ │ +Get the number of Elements. │ │ │ │ +DDeeffiinniittiioonn base.cc:227 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ Codim< 0 >::SubEntityIterator ElementIterator │ │ │ │ -DDeeffiinniittiioonn simplex.cc:370 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_B_e_g_i_n │ │ │ │ -static VertexIterator vBegin(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn simplex.cc:402 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_B_e_g_i_n │ │ │ │ -static ElementIterator eBegin(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn simplex.cc:426 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_: │ │ │ │ +The ElementIterator of the Refinement. │ │ │ │ +DDeeffiinniittiioonn base.cc:163 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ +static int nVertices(Dune::RefinementIntervals tag) │ │ │ │ +Get the number of Vertices. │ │ │ │ +DDeeffiinniittiioonn base.cc:197 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n │ │ │ │ +static VertexIterator vBegin(Dune::RefinementIntervals tag) │ │ │ │ +Get a VertexIterator. │ │ │ │ +DDeeffiinniittiioonn base.cc:207 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ +Codim< dimension >::SubEntityIterator VertexIterator │ │ │ │ +The VertexIterator of the Refinement. │ │ │ │ +DDeeffiinniittiioonn base.cc:161 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_<_ _t_o_p_o_l_o_g_y_I_d_,_ _C_o_o_r_d_T_y_p_e_,_ _c_o_e_r_c_e_T_o_I_d_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ _C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -FieldVector< CoordType, dimension > CoordVector │ │ │ │ -DDeeffiinniittiioonn simplex.cc:369 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int dimension │ │ │ │ -DDeeffiinniittiioonn simplex.cc:363 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m │ │ │ │ -DDeeffiinniittiioonn simplex.cc:385 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -DDeeffiinniittiioonn simplex.cc:445 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_d_i_m_e_n_s_i_o_n_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -Refinement::CoordVector CoordVector │ │ │ │ -DDeeffiinniittiioonn simplex.cc:454 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ -RefinementImp< dimension, CoordType > Refinement │ │ │ │ -DDeeffiinniittiioonn simplex.cc:453 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_d_i_m_e_n_s_i_o_n_ _>_:_:_v_e_r_t_e_x │ │ │ │ -Vertex vertex │ │ │ │ -DDeeffiinniittiioonn simplex.cc:471 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_d_e_x │ │ │ │ -int index() const │ │ │ │ -DDeeffiinniittiioonn simplex.cc:532 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ -void increment() │ │ │ │ -DDeeffiinniittiioonn simplex.cc:487 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -RefinementIteratorSpecial(int nIntervals, bool end=false) │ │ │ │ -DDeeffiinniittiioonn simplex.cc:476 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_d_i_m_e_n_s_i_o_n_ _>_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const This &other) const │ │ │ │ -DDeeffiinniittiioonn simplex.cc:502 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_d_i_m_e_n_s_i_o_n_ _>_:_:_c_o_o_r_d_s │ │ │ │ -CoordVector coords() const │ │ │ │ -DDeeffiinniittiioonn simplex.cc:510 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_d_i_m_e_n_s_i_o_n_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ -Refinement::template Codim< dimension >::Geometry Geometry │ │ │ │ -DDeeffiinniittiioonn simplex.cc:455 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_d_i_m_e_n_s_i_o_n_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ -Geometry geometry() const │ │ │ │ -DDeeffiinniittiioonn simplex.cc:522 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_d_i_m_e_n_s_i_o_n_ _>_:_:_T_h_i_s │ │ │ │ -RefinementIteratorSpecial< dimension, CoordType, dimension > This │ │ │ │ -DDeeffiinniittiioonn simplex.cc:456 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_d_i_m_e_n_s_i_o_n_ _>_:_:_V_e_r_t_e_x │ │ │ │ -FieldVector< int, dimension > Vertex │ │ │ │ -DDeeffiinniittiioonn simplex.cc:468 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_d_i_m_e_n_s_i_o_n_ _>_:_:_s_i_z_e │ │ │ │ -int size │ │ │ │ -DDeeffiinniittiioonn simplex.cc:470 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_v_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ -IndexVector vertexIndices() const │ │ │ │ -DDeeffiinniittiioonn simplex.cc:638 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ -int kuhnIndex │ │ │ │ -DDeeffiinniittiioonn simplex.cc:568 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ -void increment() │ │ │ │ -DDeeffiinniittiioonn simplex.cc:589 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_V_e_r_t_e_x │ │ │ │ -FieldVector< int, dimension > Vertex │ │ │ │ -DDeeffiinniittiioonn simplex.cc:564 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -RefinementIteratorSpecial(int nIntervals, bool end=false) │ │ │ │ -DDeeffiinniittiioonn simplex.cc:575 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_o_r_i_g_i_n │ │ │ │ -Vertex origin │ │ │ │ -DDeeffiinniittiioonn simplex.cc:567 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ -Geometry geometry() const │ │ │ │ -DDeeffiinniittiioonn simplex.cc:676 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_i_n_d_e_x__ │ │ │ │ -int index_ │ │ │ │ -DDeeffiinniittiioonn simplex.cc:570 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_i_n_d_e_x │ │ │ │ -int index() const │ │ │ │ -DDeeffiinniittiioonn simplex.cc:660 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_n_K_u_h_n_I_n_t_e_r_v_a_l_s │ │ │ │ -static constexpr int nKuhnIntervals │ │ │ │ -DDeeffiinniittiioonn simplex.cc:565 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ -Refinement::template Codim< 0 >::Geometry Geometry │ │ │ │ -DDeeffiinniittiioonn simplex.cc:546 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_c_o_o_r_d_s │ │ │ │ -CoordVector coords() const │ │ │ │ -DDeeffiinniittiioonn simplex.cc:668 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ -Refinement::IndexVector IndexVector │ │ │ │ -DDeeffiinniittiioonn simplex.cc:544 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -Refinement::CoordVector CoordVector │ │ │ │ -DDeeffiinniittiioonn simplex.cc:545 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_T_h_i_s │ │ │ │ -RefinementIteratorSpecial< dimension, CoordType, 0 > This │ │ │ │ -DDeeffiinniittiioonn simplex.cc:547 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ -RefinementImp< dimension, CoordType > Refinement │ │ │ │ -DDeeffiinniittiioonn simplex.cc:543 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_s_i_z_e │ │ │ │ -int size │ │ │ │ -DDeeffiinniittiioonn simplex.cc:569 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ -_0_ _>_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const This &other) const │ │ │ │ -DDeeffiinniittiioonn simplex.cc:630 │ │ │ │ -_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_s_i_m_p_l_e_x │ │ │ │ -static const ReferenceElement & simplex() │ │ │ │ -get simplex reference elements │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:162 │ │ │ │ +typedef CoordVector │ │ │ │ +DDeeffiinniittiioonn base.cc:170 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_<_ _t_o_p_o_l_o_g_y_I_d_,_ _C_o_o_r_d_T_y_p_e_,_ _c_o_e_r_c_e_T_o_I_d_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ +_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ +typedef IndexVector │ │ │ │ +DDeeffiinniittiioonn base.cc:177 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ +RefinementImp::Traits< topologyId, CoordType, coerceToId, dimension_ >::Imp │ │ │ │ +RefinementImp │ │ │ │ +DDeeffiinniittiioonn base.cc:180 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_v_E_n_d │ │ │ │ +static VertexIterator vEnd(Dune::RefinementIntervals tag) │ │ │ │ +Get a VertexIterator. │ │ │ │ +DDeeffiinniittiioonn base.cc:217 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m │ │ │ │ +The Codim struct inherited from the Refinement implementation. │ │ │ │ +DDeeffiinniittiioonn base.cc:151 │ │ │ │ +_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ +typedef SubEntityIterator │ │ │ │ +DDeeffiinniittiioonn base.cc:157 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00200.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: pyramidtriangulation.cc File Reference │ │ │ +dune-geometry: simplex.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,69 +74,79 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ -Macros | │ │ │ -Functions
│ │ │ -
pyramidtriangulation.cc File Reference
│ │ │ +Macros
│ │ │ +
simplex.cc File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/common/fvector.hh>
│ │ │ -#include <dune/common/typetraits.hh>
│ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ -#include "base.cc"
│ │ │ -#include "simplex.cc"
│ │ │ + │ │ │ +

This file contains the Refinement implementation for simplices (triangles, tetrahedrons...). │ │ │ +More...

│ │ │ +
#include <algorithm>
│ │ │ +#include <dune/common/fvector.hh>
│ │ │ +#include <dune/common/math.hh>
│ │ │ +#include <dune/geometry/multilineargeometry.hh>
│ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ +#include <dune/geometry/type.hh>
│ │ │ +#include "base.cc"
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::RefinementImp::PyramidTriangulation::RefinementImp< dimension_, CoordType >
 Implementation of the refinement of a pyramid into simplices. More...
struct  Dune::RefinementImp::PyramidTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
class  Dune::RefinementImp::PyramidTriangulation::RefinementIteratorSpecial< dimension, CoordType, dimension >
class  Dune::RefinementImp::PyramidTriangulation::RefinementIteratorSpecial< dimension, CoordType, 0 >
class  Dune::RefinementImp::PyramidTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
class  Dune::RefinementImp::Simplex::RefinementImp< dimension_, CoordType >
struct  Dune::RefinementImp::Simplex::RefinementImp< dimension_, CoordType >::Codim< codimension >
class  Dune::RefinementImp::Simplex::RefinementIteratorSpecial< dimension, CoordType, dimension >
class  Dune::RefinementImp::Simplex::RefinementIteratorSpecial< dimension, CoordType, 0 >
class  Dune::RefinementImp::Simplex::RefinementImp< dimension_, CoordType >::Codim< codimension >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::RefinementImp
 This namespace contains the implementation of Refinement.
namespace  Dune::RefinementImp::PyramidTriangulation
 This namespace contains the Refinement implementation for triangulating pyramids (GeometryType::pyramid -> GeometryType::simplex).
namespace  Dune::RefinementImp::Simplex
 This namespace contains the Refinement implementation for simplices (triangles, tetrahedrons...).
│ │ │ │ │ │ - │ │ │ + │ │ │

│ │ │ Macros

#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC
#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

template<int dimension, class CoordType>
FieldVector< CoordType, dimension > Dune::RefinementImp::PyramidTriangulation::transformCoordinate (FieldVector< CoordType, dimension > point)
Utilities
template<int dimension>
int Dune::RefinementImp::Simplex::pointIndex (const FieldVector< int, dimension > &point)
 calculate the index of a given gridpoint within a Kuhn0 simplex
template<int n>
FieldVector< int, n > Dune::RefinementImp::PyramidTriangulation::getPermutation (int m)
FieldVector< int, n > Dune::RefinementImp::Simplex::getPermutation (int m)
 Calculate permutation from it's index.
template<int dimension, class CoordType>
FieldVector< CoordType, dimension > Dune::RefinementImp::PyramidTriangulation::referenceToKuhn (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
FieldVector< CoordType, dimension > Dune::RefinementImp::Simplex::referenceToKuhn (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
 Map from the reference simplex to some Kuhn simplex.
template<int dimension, class CoordType>
FieldVector< CoordType, dimension > Dune::RefinementImp::Simplex::kuhnToReference (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
 Map from some Kuhn simplex to the reference simplex.
│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC

│ │ │ +

Detailed Description

│ │ │ +

This file contains the Refinement implementation for simplices (triangles, tetrahedrons...).

│ │ │ +

See Refinement implementation for simplices.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │
#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,62 +1,73 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ * _r_e_f_i_n_e_m_e_n_t │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -pyramidtriangulation.cc File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ +simplex.cc File Reference │ │ │ │ +This file contains the _R_e_f_i_n_e_m_e_n_t implementation for simplices (triangles, │ │ │ │ +tetrahedrons...). _M_o_r_e_._._. │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_m_u_l_t_i_l_i_n_e_a_r_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ #include "_b_a_s_e_._c_c" │ │ │ │ -#include "_s_i_m_p_l_e_x_._c_c" │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ - _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ -  Implementation of the refinement of a pyramid into simplices. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ - _C_o_o_r_d_T_y_p_e_ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ - _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ - _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _> │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ - _C_o_o_r_d_T_y_p_e_ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___,_ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___,_ _C_o_o_r_d_T_y_p_e_ _>_:_: │ │ │ │ + _C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ + _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ + _C_o_o_r_d_T_y_p_e_,_ _0_ _> │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___,_ _C_o_o_r_d_T_y_p_e_ _>_:_: │ │ │ │ + _C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │   This namespace contains the implementation of _R_e_f_i_n_e_m_e_n_t. │ │ │ │ -namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ - This namespace contains the _R_e_f_i_n_e_m_e_n_t implementation for │ │ │ │ -  triangulating pyramids (_G_e_o_m_e_t_r_y_T_y_p_e_:_:_p_y_r_a_m_i_d -> _G_e_o_m_e_t_r_y_T_y_p_e_:_: │ │ │ │ - _s_i_m_p_l_e_x). │ │ │ │ +namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x │ │ │ │ +  This namespace contains the _R_e_f_i_n_e_m_e_n_t implementation for simplices │ │ │ │ + (triangles, tetrahedrons...). │ │ │ │ MMaaccrrooss │ │ │ │ -#define  _D_U_N_E___G_E_O_M_E_T_R_Y___R_E_F_I_N_E_M_E_N_T___P_Y_R_A_M_I_D_T_R_I_A_N_G_U_L_A_T_I_O_N___C_C │ │ │ │ +#define  _D_U_N_E___G_R_I_D___C_O_M_M_O_N___R_E_F_I_N_E_M_E_N_T___S_I_M_P_L_E_X___C_C │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_: │ │ │ │ - _P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e │ │ │ │ - (FieldVector< CoordType, dimension > │ │ │ │ - point) │ │ │ │ +Utilities │ │ │ │ +template │ │ │ │ + int  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_p_o_i_n_t_I_n_d_e_x │ │ │ │ + (const FieldVector< int, dimension > │ │ │ │ + &point) │ │ │ │ +  calculate the index of a given gridpoint │ │ │ │ + within a Kuhn0 simplex │ │ │ │ template │ │ │ │ - FieldVector< int, n >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_: │ │ │ │ - _P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n (int │ │ │ │ - m) │ │ │ │ + FieldVector< int, n >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_: │ │ │ │ + _g_e_t_P_e_r_m_u_t_a_t_i_o_n (int m) │ │ │ │   Calculate permutation from it's index. │ │ │ │ template │ │ │ │ -FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_: │ │ │ │ - _P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n │ │ │ │ - (FieldVector< CoordType, dimension > │ │ │ │ - point, const FieldVector< int, dimension > │ │ │ │ - &kuhn) │ │ │ │ +FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_: │ │ │ │ + _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n (FieldVector< CoordType, │ │ │ │ + dimension > point, const FieldVector< int, │ │ │ │ + dimension > &kuhn) │ │ │ │   Map from the reference simplex to some │ │ │ │ Kuhn simplex. │ │ │ │ +template │ │ │ │ +FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_: │ │ │ │ + _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e (FieldVector< CoordType, │ │ │ │ + dimension > point, const FieldVector< int, │ │ │ │ + dimension > &kuhn) │ │ │ │ +  Map from some Kuhn simplex to the │ │ │ │ + reference simplex. │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +This file contains the _R_e_f_i_n_e_m_e_n_t implementation for simplices (triangles, │ │ │ │ +tetrahedrons...). │ │ │ │ +See _R_e_f_i_n_e_m_e_n_t_ _i_m_p_l_e_m_e_n_t_a_t_i_o_n_ _f_o_r_ _s_i_m_p_l_i_c_e_s. │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__PPYYRRAAMMIIDDTTRRIIAANNGGUULLAATTIIOONN__CCCC ********** │ │ │ │ -#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC │ │ │ │ +********** _?◆_? DDUUNNEE__GGRRIIDD__CCOOMMMMOONN__RREEFFIINNEEMMEENNTT__SSIIMMPPLLEEXX__CCCC ********** │ │ │ │ +#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00200_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: pyramidtriangulation.cc Source File │ │ │ +dune-geometry: simplex.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,541 +71,633 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
pyramidtriangulation.cc
│ │ │ +
simplex.cc
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC
│ │ │ -
6#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC
│ │ │ +
5#ifndef DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ +
6#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │
7
│ │ │ -
8#include <dune/common/fvector.hh>
│ │ │ -
9#include <dune/common/typetraits.hh>
│ │ │ -
10
│ │ │ - │ │ │ -
12#include <dune/geometry/type.hh>
│ │ │ -
13
│ │ │ -
14#include "base.cc"
│ │ │ -
15#include "simplex.cc"
│ │ │ -
16
│ │ │ -
17namespace Dune
│ │ │ -
18{
│ │ │ -
19 namespace RefinementImp
│ │ │ -
20 {
│ │ │ -
│ │ │ - │ │ │ -
27 {
│ │ │ -
28 // ////////////
│ │ │ -
29 //
│ │ │ -
30 // Utilities
│ │ │ -
31 //
│ │ │ -
32
│ │ │ - │ │ │ - │ │ │ -
35
│ │ │ -
36 // ////////////////////////////////////
│ │ │ -
37 //
│ │ │ -
38 // Refine a pyramid with simplices
│ │ │ -
39 //
│ │ │ -
40
│ │ │ -
41 // forward declaration of the iterator base
│ │ │ -
42 template<int dimension, class CoordType, int codimension>
│ │ │ - │ │ │ -
44
│ │ │ -
45 /*
│ │ │ -
46 * The permutations 0 and 1 of the Kuhn-decomposition of a cube into simplices form a pyramid.
│ │ │ -
47 * The resulting pyramid is not oriented the same as the reference pyramid and so the Kuhn-coordinates
│ │ │ -
48 * have to be transformed using the method below.
│ │ │ -
49 */
│ │ │ -
50 template<int dimension, class CoordType> FieldVector<CoordType, dimension>
│ │ │ -
│ │ │ -
51 transformCoordinate( FieldVector<CoordType, dimension> point)
│ │ │ -
52 {
│ │ │ -
53 FieldVector<CoordType, dimension> transform;
│ │ │ -
54 transform[0]=1-point[0];
│ │ │ -
55 transform[1]=1-point[1];
│ │ │ -
56 transform[2]=point[2];
│ │ │ -
57 return transform;
│ │ │ -
58 }
│ │ │ -
│ │ │ -
59
│ │ │ -
66 template<int dimension_, class CoordType>
│ │ │ -
│ │ │ - │ │ │ -
68 {
│ │ │ -
69 public:
│ │ │ -
70 constexpr static int dimension = dimension_;
│ │ │ -
71
│ │ │ -
72 typedef CoordType ctype;
│ │ │ -
73
│ │ │ -
74 template<int codimension>
│ │ │ -
75 struct Codim;
│ │ │ - │ │ │ -
77 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ - │ │ │ -
79 typedef FieldVector<int, dimension+1> IndexVector;
│ │ │ -
80
│ │ │ -
81 static int nVertices(int nIntervals);
│ │ │ -
82 static VertexIterator vBegin(int nIntervals);
│ │ │ -
83 static VertexIterator vEnd(int nIntervals);
│ │ │ -
84
│ │ │ -
85 static int nElements(int nIntervals);
│ │ │ -
86 static ElementIterator eBegin(int nIntervals);
│ │ │ -
87 static ElementIterator eEnd(int nIntervals);
│ │ │ -
88
│ │ │ -
89 private:
│ │ │ -
90 friend class RefinementIteratorSpecial<dimension, CoordType, 0>;
│ │ │ -
91 friend class RefinementIteratorSpecial<dimension, CoordType, dimension>;
│ │ │ -
92
│ │ │ -
93 typedef Simplex::RefinementImp<dimension, CoordType> BackendRefinement;
│ │ │ -
94
│ │ │ -
95 constexpr static int nKuhnSimplices = 2;
│ │ │ -
96 };
│ │ │ -
│ │ │ -
97
│ │ │ -
98 template<int dimension, class CoordType>
│ │ │ -
99 template<int codimension>
│ │ │ -
│ │ │ -
100 struct RefinementImp<dimension, CoordType>::Codim
│ │ │ -
101 {
│ │ │ -
102 class SubEntityIterator;
│ │ │ - │ │ │ -
104 };
│ │ │ -
│ │ │ -
105
│ │ │ -
106 template<int dimension, class CoordType>
│ │ │ -
107 int
│ │ │ -
│ │ │ - │ │ │ -
109 nVertices(int nIntervals)
│ │ │ -
110 {
│ │ │ -
111 return BackendRefinement::nVertices(nIntervals) * nKuhnSimplices;
│ │ │ -
112 }
│ │ │ -
│ │ │ -
113
│ │ │ -
114 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
117 vBegin(int nIntervals)
│ │ │ -
118 {
│ │ │ -
119 return VertexIterator(nIntervals);
│ │ │ -
120 }
│ │ │ -
│ │ │ -
121
│ │ │ -
122 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
125 vEnd(int nIntervals)
│ │ │ -
126 {
│ │ │ -
127 return VertexIterator(nIntervals, true);
│ │ │ -
128 }
│ │ │ -
│ │ │ -
129
│ │ │ -
130 template<int dimension, class CoordType>
│ │ │ -
131 int
│ │ │ -
│ │ │ - │ │ │ -
133 nElements(int nIntervals)
│ │ │ -
134 {
│ │ │ -
135 return BackendRefinement::nElements(nIntervals) * nKuhnSimplices;
│ │ │ -
136 }
│ │ │ -
│ │ │ -
137
│ │ │ -
138 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
141 eBegin(int nIntervals)
│ │ │ -
142 {
│ │ │ -
143 return ElementIterator(nIntervals);
│ │ │ -
144 }
│ │ │ -
│ │ │ -
145
│ │ │ -
146 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
149 eEnd(int nIntervals)
│ │ │ -
150 {
│ │ │ -
151 return ElementIterator(nIntervals, true);
│ │ │ -
152 }
│ │ │ -
│ │ │ -
153
│ │ │ -
154 // //////////////
│ │ │ -
155 //
│ │ │ -
156 // The iterator
│ │ │ -
157 //
│ │ │ -
158
│ │ │ -
159 // vertices
│ │ │ -
160 template<int dimension, class CoordType>
│ │ │ -
│ │ │ -
161 class RefinementIteratorSpecial<dimension, CoordType, dimension>
│ │ │ -
162 {
│ │ │ -
163 public:
│ │ │ - │ │ │ - │ │ │ -
166 typedef typename Refinement::template Codim<dimension>::Geometry Geometry;
│ │ │ -
167
│ │ │ -
168 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ -
169
│ │ │ -
170 void increment();
│ │ │ -
171
│ │ │ -
172 CoordVector coords() const;
│ │ │ -
173
│ │ │ -
174 Geometry geometry() const;
│ │ │ -
175
│ │ │ -
176 int index() const;
│ │ │ -
177 protected:
│ │ │ -
178 typedef typename Refinement::BackendRefinement BackendRefinement;
│ │ │ -
179 typedef typename BackendRefinement::template Codim<dimension>::SubEntityIterator BackendIterator;
│ │ │ -
180 constexpr static int nKuhnSimplices = 2;
│ │ │ -
181
│ │ │ - │ │ │ -
183
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
187 };
│ │ │ -
│ │ │ -
188
│ │ │ -
189 template<int dimension, class CoordType>
│ │ │ -
│ │ │ - │ │ │ -
191 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ -
192 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ - │ │ │ - │ │ │ -
195 {
│ │ │ -
196 if (end)
│ │ │ - │ │ │ -
198 }
│ │ │ -
│ │ │ -
199
│ │ │ -
200 template<int dimension, class CoordType>
│ │ │ -
201 void
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
204 {
│ │ │ -
205 ++backend;
│ │ │ -
206 if(backend == backendEnd)
│ │ │ -
207 {
│ │ │ - │ │ │ -
209 ++kuhnIndex;
│ │ │ -
210 }
│ │ │ -
211 }
│ │ │ -
│ │ │ -
212
│ │ │ -
213 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
216 coords() const
│ │ │ -
217 {
│ │ │ - │ │ │ - │ │ │ -
220 }
│ │ │ -
│ │ │ -
221
│ │ │ -
222 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
225 {
│ │ │ -
226 std::vector<CoordVector> corners(1);
│ │ │ - │ │ │ -
228 return Geometry(GeometryTypes::vertex, corners);
│ │ │ -
229 }
│ │ │ -
│ │ │ -
230
│ │ │ -
231 template<int dimension, class CoordType>
│ │ │ -
232 int
│ │ │ -
│ │ │ - │ │ │ -
234 index() const
│ │ │ -
235 {
│ │ │ - │ │ │ -
237 }
│ │ │ -
│ │ │ -
238
│ │ │ -
239 // elements
│ │ │ -
240 template<int dimension, class CoordType>
│ │ │ -
│ │ │ -
241 class RefinementIteratorSpecial<dimension, CoordType, 0>
│ │ │ -
242 {
│ │ │ -
243 public:
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
247 typedef typename Refinement::template Codim<0>::Geometry Geometry;
│ │ │ -
248
│ │ │ -
249 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ -
250
│ │ │ -
251 void increment();
│ │ │ -
252
│ │ │ - │ │ │ -
254 int index() const;
│ │ │ -
255 CoordVector coords() const;
│ │ │ -
256
│ │ │ -
257 Geometry geometry() const;
│ │ │ -
258
│ │ │ -
259 private:
│ │ │ -
260 CoordVector global(const CoordVector &local) const;
│ │ │ -
261
│ │ │ -
262 protected:
│ │ │ -
263 typedef typename Refinement::BackendRefinement BackendRefinement;
│ │ │ -
264 typedef typename BackendRefinement::template Codim<0>::SubEntityIterator BackendIterator;
│ │ │ -
265 constexpr static int nKuhnSimplices = 2;
│ │ │ -
266
│ │ │ - │ │ │ -
268
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
272 };
│ │ │ -
│ │ │ -
273
│ │ │ -
274 template<int dimension, class CoordType>
│ │ │ -
│ │ │ - │ │ │ -
276 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ -
277 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ - │ │ │ - │ │ │ -
280 {
│ │ │ -
281 if (end)
│ │ │ - │ │ │ -
283 }
│ │ │ -
│ │ │ -
284
│ │ │ -
285 template<int dimension, class CoordType>
│ │ │ -
286 void
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
289 {
│ │ │ -
290 ++backend;
│ │ │ -
291 if (backend == backendEnd)
│ │ │ -
292 {
│ │ │ - │ │ │ -
294 ++kuhnIndex;
│ │ │ -
295 }
│ │ │ -
296 }
│ │ │ -
│ │ │ -
297
│ │ │ -
298 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
301 vertexIndices() const
│ │ │ -
302 {
│ │ │ -
303 IndexVector indices = backend.vertexIndices();
│ │ │ -
304
│ │ │ - │ │ │ -
306 indices += base;
│ │ │ -
307
│ │ │ -
308 return indices;
│ │ │ -
309 }
│ │ │ -
│ │ │ -
310
│ │ │ -
311 template<int dimension, class CoordType>
│ │ │ -
312 int
│ │ │ -
│ │ │ - │ │ │ -
314 index() const
│ │ │ -
315 {
│ │ │ - │ │ │ -
317 }
│ │ │ -
│ │ │ -
318
│ │ │ -
319 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
322 coords() const
│ │ │ -
323 {
│ │ │ -
324 return global(backend.coords());
│ │ │ -
325 }
│ │ │ -
│ │ │ -
326
│ │ │ -
327 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
330 geometry() const
│ │ │ -
331 {
│ │ │ -
332 const typename BackendIterator::Geometry &
│ │ │ -
333 bgeo = backend.geometry();
│ │ │ -
334 std::vector<CoordVector> corners(dimension+1);
│ │ │ -
335 for(int i = 0; i <= dimension; ++i)
│ │ │ -
336 corners[i] = global(bgeo.corner(i));
│ │ │ -
337
│ │ │ -
338 return Geometry(bgeo.type(), corners);
│ │ │ -
339 }
│ │ │ -
│ │ │ -
340
│ │ │ -
341 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
343 CoordVector
│ │ │ - │ │ │ -
345 global(const CoordVector &local) const
│ │ │ -
346 {
│ │ │ - │ │ │ -
348 getPermutation<dimension>(kuhnIndex)));
│ │ │ +
8// This file is part of DUNE, a Distributed and Unified Numerics Environment
│ │ │ +
9// This file is copyright (C) 2005 Jorrit Fahlke <jorrit@jorrit.de>
│ │ │ +
10// This file is licensed under version 2 of the GNU General Public License,
│ │ │ +
11// with a special "runtime exception." See COPYING at the top of the source
│ │ │ +
12// tree for the full licence.
│ │ │ +
13
│ │ │ +
21
│ │ │ +
242
│ │ │ +
243#include <algorithm>
│ │ │ +
244
│ │ │ +
245#include <dune/common/fvector.hh>
│ │ │ +
246#include <dune/common/math.hh>
│ │ │ +
247
│ │ │ + │ │ │ + │ │ │ +
250#include <dune/geometry/type.hh>
│ │ │ +
251
│ │ │ +
252#include "base.cc"
│ │ │ +
253
│ │ │ +
254namespace Dune {
│ │ │ +
255
│ │ │ +
256 namespace RefinementImp {
│ │ │ +
257
│ │ │ +
│ │ │ +
264 namespace Simplex {
│ │ │ +
265
│ │ │ +
266 // //////////////////
│ │ │ +
267 //
│ │ │ +
269 //
│ │ │ +
270
│ │ │ +
272
│ │ │ +
279 template<int dimension>
│ │ │ +
│ │ │ +
280 int pointIndex(const FieldVector<int, dimension> &point)
│ │ │ +
281 {
│ │ │ +
282 int index = 0;
│ │ │ +
283 for(int i = 0; i < dimension; ++i)
│ │ │ +
284 index += Dune::binomial(dimension-i + point[i]-1, dimension-i);
│ │ │ +
285 return index;
│ │ │ +
286 }
│ │ │ +
│ │ │ +
287
│ │ │ +
292 template<int n>
│ │ │ +
│ │ │ +
293 FieldVector<int, n> getPermutation(int m)
│ │ │ +
294 {
│ │ │ +
295 FieldVector<int, n> perm;
│ │ │ +
296 for(int i = 0; i < n; ++i)
│ │ │ +
297 perm[i] = i;
│ │ │ +
298
│ │ │ +
299 int base = 1;
│ │ │ +
300 for(int i = 1; i <= n; ++i)
│ │ │ +
301 base *= i;
│ │ │ +
302
│ │ │ +
303 for(int i = n; i > 0; --i) {
│ │ │ +
304 base /= i;
│ │ │ +
305 int d = m / base;
│ │ │ +
306 m %= base;
│ │ │ +
307 int t = perm[i-1]; perm[i-1] = perm[i-1-d]; perm[i-1-d] = t;
│ │ │ +
308 }
│ │ │ +
309 return perm;
│ │ │ +
310 }
│ │ │ +
│ │ │ +
311
│ │ │ +
312 // map between the reference simplex and some arbitrary kuhn simplex (denoted by it's permutation)
│ │ │ +
320 template<int dimension, class CoordType>
│ │ │ +
321 FieldVector<CoordType, dimension>
│ │ │ +
│ │ │ + │ │ │ +
323 FieldVector<CoordType, dimension> point,
│ │ │ +
325 const FieldVector<int, dimension> &kuhn)
│ │ │ +
326 {
│ │ │ +
327 for(int i = dimension - 1; i > 0; --i)
│ │ │ +
328 point[kuhn[i-1]] += point[kuhn[i]];
│ │ │ +
329 return point;
│ │ │ +
330 }
│ │ │ +
│ │ │ +
331
│ │ │ +
339 template<int dimension, class CoordType>
│ │ │ +
340 FieldVector<CoordType, dimension>
│ │ │ +
│ │ │ + │ │ │ +
342 FieldVector<CoordType, dimension> point,
│ │ │ +
344 const FieldVector<int, dimension> &kuhn)
│ │ │ +
345 {
│ │ │ +
346 for(int i = 0; i < dimension - 1; ++i)
│ │ │ +
347 point[kuhn[i]] -= point[kuhn[i+1]];
│ │ │ +
348 return point;
│ │ │
349 }
│ │ │ +
│ │ │
350
│ │ │ -
351 // common
│ │ │ -
352 template<int dimension, class CoordType>
│ │ │ -
353 template<int codimension>
│ │ │ -
│ │ │ -
354 class RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │ -
355 : public ForwardIteratorFacade<typename RefinementImp<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ -
356 public RefinementIteratorSpecial<dimension, CoordType, codimension>
│ │ │ -
357 {
│ │ │ -
358 public:
│ │ │ - │ │ │ - │ │ │ -
361
│ │ │ -
362 SubEntityIterator(int nIntervals, bool end = false);
│ │ │ -
363
│ │ │ -
364 bool equals(const This &other) const;
│ │ │ -
365 protected:
│ │ │ -
366 using RefinementIteratorSpecial<dimension, CoordType, codimension>::kuhnIndex;
│ │ │ -
367 using RefinementIteratorSpecial<dimension, CoordType, codimension>::backend;
│ │ │ -
368 };
│ │ │ -
│ │ │ -
369
│ │ │ -
370#ifndef DOXYGEN
│ │ │ -
371 template<int dimension, class CoordType>
│ │ │ -
372 template<int codimension>
│ │ │ - │ │ │ -
374 SubEntityIterator(int nIntervals, bool end)
│ │ │ -
375 : RefinementIteratorSpecial<dimension, CoordType, codimension>(nIntervals, end)
│ │ │ -
376 {}
│ │ │ -
377
│ │ │ -
378 template<int dimension, class CoordType>
│ │ │ -
379 template<int codimension>
│ │ │ -
380 bool
│ │ │ - │ │ │ -
382 equals(const This &other) const
│ │ │ -
383 {
│ │ │ -
384 return kuhnIndex == other.kuhnIndex && backend == other.backend;
│ │ │ -
385 }
│ │ │ -
386#endif
│ │ │ -
387
│ │ │ -
388 } // namespace PyramidTriangulation
│ │ │ +
351
│ │ │ +
353
│ │ │ +
354 // /////////////////////////////////////////
│ │ │ +
355 //
│ │ │ +
356 // refinement implementation for simplices
│ │ │ +
357 //
│ │ │ +
358
│ │ │ +
359 template<int dimension_, class CoordType>
│ │ │ +
│ │ │ + │ │ │ +
361 {
│ │ │ +
362 public:
│ │ │ +
363 constexpr static int dimension = dimension_;
│ │ │ +
364 typedef CoordType ctype;
│ │ │ +
365
│ │ │ +
366 template<int codimension>
│ │ │ +
367 struct Codim;
│ │ │ +
368 typedef typename Codim<dimension>::SubEntityIterator VertexIterator;
│ │ │ +
369 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ +
370 typedef typename Codim<0>::SubEntityIterator ElementIterator;
│ │ │ +
371 typedef FieldVector<int, dimension+1> IndexVector;
│ │ │ +
372
│ │ │ +
373 static int nVertices(int nIntervals);
│ │ │ +
374 static VertexIterator vBegin(int nIntervals);
│ │ │ +
375 static VertexIterator vEnd(int nIntervals);
│ │ │ +
376
│ │ │ +
377 static int nElements(int nIntervals);
│ │ │ +
378 static ElementIterator eBegin(int nIntervals);
│ │ │ +
379 static ElementIterator eEnd(int nIntervals);
│ │ │ +
380 };
│ │ │ +
│ │ │ +
381
│ │ │ +
382 template<int dimension, class CoordType>
│ │ │ +
383 template<int codimension>
│ │ │ +
│ │ │ +
384 struct RefinementImp<dimension, CoordType>::Codim
│ │ │ +
385 {
│ │ │ +
386 class SubEntityIterator;
│ │ │ +
387 // We don't need the caching, but the uncached MultiLinearGeometry has bug FS#1209
│ │ │ +
388 typedef Dune::CachedMultiLinearGeometry<CoordType,dimension-codimension,dimension> Geometry;
│ │ │ +
389 };
│ │ │
│ │ │ -
389 } // namespace RefinementImp
│ │ │
390
│ │ │ -
391 namespace RefinementImp
│ │ │ -
392 {
│ │ │ -
393 // ///////////////////////
│ │ │ -
394 //
│ │ │ -
395 // The refinement traits
│ │ │ -
396 //
│ │ │ -
397#ifndef DOXYGEN
│ │ │ -
398 template<unsigned topologyId, class CoordType, unsigned coerceToId>
│ │ │ -
399 struct Traits<
│ │ │ -
400 topologyId, CoordType, coerceToId, 3,
│ │ │ -
401 typename std::enable_if<
│ │ │ -
402 (GeometryTypes::pyramid.id() >> 1) ==
│ │ │ -
403 (topologyId >> 1) &&
│ │ │ -
404 (GeometryTypes::simplex(3).id() >> 1) ==
│ │ │ -
405 (coerceToId >> 1)
│ │ │ -
406 >::type>
│ │ │ -
407 {
│ │ │ -
408 typedef PyramidTriangulation::RefinementImp<3, CoordType> Imp;
│ │ │ -
409 };
│ │ │ -
410#endif
│ │ │ -
411
│ │ │ -
412 } // namespace RefinementImp
│ │ │ -
413} // namespace Dune
│ │ │ +
391 template<int dimension, class CoordType>
│ │ │ +
392 int
│ │ │ +
│ │ │ + │ │ │ +
394 nVertices(int nIntervals)
│ │ │ +
395 {
│ │ │ +
396 return Dune::binomial(dimension + nIntervals, (int)dimension);
│ │ │ +
397 }
│ │ │ +
│ │ │ +
398
│ │ │ +
399 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
402 vBegin(int nIntervals)
│ │ │ +
403 {
│ │ │ +
404 return VertexIterator(nIntervals);
│ │ │ +
405 }
│ │ │ +
│ │ │ +
406
│ │ │ +
407 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
410 vEnd(int nIntervals)
│ │ │ +
411 {
│ │ │ +
412 return VertexIterator(nIntervals, true);
│ │ │ +
413 }
│ │ │ +
│ │ │
414
│ │ │ -
415#endif // DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ -
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │ -
This file contains the parts independent of a particular Refinement implementation.
│ │ │ - │ │ │ +
415 template<int dimension, class CoordType>
│ │ │ +
416 int
│ │ │ +
│ │ │ + │ │ │ +
418 nElements(int nIntervals)
│ │ │ +
419 {
│ │ │ +
420 return Dune::power(nIntervals, int(dimension));
│ │ │ +
421 }
│ │ │ +
│ │ │ +
422
│ │ │ +
423 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
426 eBegin(int nIntervals)
│ │ │ +
427 {
│ │ │ +
428 return ElementIterator(nIntervals);
│ │ │ +
429 }
│ │ │ +
│ │ │ +
430
│ │ │ +
431 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
434 eEnd(int nIntervals)
│ │ │ +
435 {
│ │ │ +
436 return ElementIterator(nIntervals, true);
│ │ │ +
437 }
│ │ │ +
│ │ │ +
438
│ │ │ +
439 // //////////////
│ │ │ +
440 //
│ │ │ +
441 // The iterator
│ │ │ +
442 //
│ │ │ +
443
│ │ │ +
444 template<int dimension, class CoordType, int codimension>
│ │ │ + │ │ │ +
446
│ │ │ +
447 // vertices
│ │ │ +
448
│ │ │ +
449 template<int dimension, class CoordType>
│ │ │ +
│ │ │ +
450 class RefinementIteratorSpecial<dimension, CoordType, dimension>
│ │ │ +
451 {
│ │ │ +
452 public:
│ │ │ + │ │ │ + │ │ │ +
455 typedef typename Refinement::template Codim<dimension>::Geometry Geometry;
│ │ │ + │ │ │ +
457
│ │ │ +
458 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ +
459
│ │ │ +
460 void increment();
│ │ │ +
461 bool equals(const This &other) const;
│ │ │ +
462
│ │ │ +
463 CoordVector coords() const;
│ │ │ +
464 Geometry geometry () const;
│ │ │ +
465
│ │ │ +
466 int index() const;
│ │ │ +
467 protected:
│ │ │ +
468 typedef FieldVector<int, dimension> Vertex;
│ │ │ +
469
│ │ │ +
470 int size;
│ │ │ + │ │ │ +
472 };
│ │ │ +
│ │ │ +
473
│ │ │ +
474 template<int dimension, class CoordType>
│ │ │ +
│ │ │ + │ │ │ +
476 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ +
477 : size(nIntervals)
│ │ │ +
478 {
│ │ │ +
479 vertex[0] = (end) ? size + 1 : 0;
│ │ │ +
480 for(int i = 1; i < dimension; ++ i)
│ │ │ +
481 vertex[i] = 0;
│ │ │ +
482 }
│ │ │ +
│ │ │ +
483
│ │ │ +
484 template<int dimension, class CoordType>
│ │ │ +
485 void
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
488 {
│ │ │ +
489 assert(vertex[0] <= size);
│ │ │ +
490 for(int i = dimension - 1; i >= 0; --i) {
│ │ │ +
491 ++vertex[i];
│ │ │ +
492 if(i == 0 || vertex[i] <= vertex[i-1])
│ │ │ +
493 break;
│ │ │ +
494 else
│ │ │ +
495 vertex[i] = 0;
│ │ │ +
496 }
│ │ │ +
497 }
│ │ │ +
│ │ │ +
498
│ │ │ +
499 template<int dimension, class CoordType>
│ │ │ +
500 bool
│ │ │ +
│ │ │ + │ │ │ +
502 equals(const This &other) const
│ │ │ +
503 {
│ │ │ +
504 return size == other.size && vertex == other.vertex;
│ │ │ +
505 }
│ │ │ +
│ │ │ +
506
│ │ │ +
507 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
510 coords() const
│ │ │ +
511 {
│ │ │ + │ │ │ +
513
│ │ │ + │ │ │ +
515 for(int i = 0; i < dimension; ++i)
│ │ │ +
516 coords[i] = CoordType(ref[i]) / size;
│ │ │ +
517 return coords;
│ │ │ +
518 }
│ │ │ +
│ │ │ +
519
│ │ │ +
520 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
523 {
│ │ │ +
524 std::vector<CoordVector> corners(1);
│ │ │ +
525 corners[0] = (CoordVector)vertex;
│ │ │ +
526 return Geometry(GeometryTypes::vertex, corners);
│ │ │ +
527 }
│ │ │ +
│ │ │ +
528
│ │ │ +
529 template<int dimension, class CoordType>
│ │ │ +
530 int
│ │ │ +
│ │ │ + │ │ │ +
532 index() const
│ │ │ +
533 {
│ │ │ +
534 return pointIndex(vertex);
│ │ │ +
535 }
│ │ │ +
│ │ │ +
536
│ │ │ +
537 // elements
│ │ │ +
538
│ │ │ +
539 template<int dimension, class CoordType>
│ │ │ +
│ │ │ +
540 class RefinementIteratorSpecial<dimension, CoordType, 0>
│ │ │ +
541 {
│ │ │ +
542 public:
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
546 typedef typename Refinement::template Codim<0>::Geometry Geometry;
│ │ │ + │ │ │ +
548
│ │ │ +
549 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ +
550
│ │ │ +
551 void increment();
│ │ │ +
552 bool equals(const This &other) const;
│ │ │ +
553
│ │ │ + │ │ │ +
555 int index() const;
│ │ │ +
556 CoordVector coords() const;
│ │ │ +
557
│ │ │ +
558 Geometry geometry () const;
│ │ │ +
559
│ │ │ +
560 private:
│ │ │ +
561 CoordVector global(const CoordVector &local) const;
│ │ │ +
562
│ │ │ +
563 protected:
│ │ │ +
564 typedef FieldVector<int, dimension> Vertex;
│ │ │ +
565 constexpr static int nKuhnIntervals = Dune::factorial(dimension);
│ │ │ +
566
│ │ │ + │ │ │ + │ │ │ +
569 int size;
│ │ │ + │ │ │ +
571 };
│ │ │ +
│ │ │ +
572
│ │ │ +
573 template<int dimension, class CoordType>
│ │ │ +
│ │ │ + │ │ │ +
575 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ +
576 : kuhnIndex(0), size(nIntervals), index_(0)
│ │ │ +
577 {
│ │ │ +
578 for(int i = 0; i < dimension; ++i)
│ │ │ +
579 origin[i] = 0;
│ │ │ +
580 if(end) {
│ │ │ +
581 index_ = Refinement::nElements(nIntervals);
│ │ │ +
582 origin[0] = size;
│ │ │ +
583 }
│ │ │ +
584 }
│ │ │ +
│ │ │ +
585
│ │ │ +
586 template<int dimension, class CoordType>
│ │ │ +
587 void
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
590 {
│ │ │ +
591 assert(origin[0] < size);
│ │ │ +
592
│ │ │ +
593 ++index_;
│ │ │ +
594
│ │ │ +
595 while(1) {
│ │ │ +
596 ++kuhnIndex;
│ │ │ + │ │ │ +
598 kuhnIndex = 0;
│ │ │ +
599 // increment origin
│ │ │ +
600 for(int i = dimension - 1; i >= 0; --i) {
│ │ │ +
601 ++origin[i];
│ │ │ +
602 if(i == 0 || origin[i] <= origin[i-1])
│ │ │ +
603 break;
│ │ │ +
604 else
│ │ │ +
605 origin[i] = 0;
│ │ │ +
606 }
│ │ │ +
607 }
│ │ │ +
608
│ │ │ +
609 // test whether the current simplex has any corner outside the kuhn0 simplex
│ │ │ +
610 FieldVector<int, dimension> perm = getPermutation<dimension>(kuhnIndex);
│ │ │ +
611 Vertex corner = origin;
│ │ │ +
612 bool outside = false;
│ │ │ +
613 for(int i = 0; i < dimension; ++i) {
│ │ │ +
614 // next corner
│ │ │ +
615 ++corner[perm[i]];
│ │ │ +
616 if(perm[i] > 0)
│ │ │ +
617 if(corner[perm[i]] > corner[perm[i]-1]) {
│ │ │ +
618 outside = true;
│ │ │ +
619 break;
│ │ │ +
620 }
│ │ │ +
621 }
│ │ │ +
622 if(!outside)
│ │ │ +
623 return;
│ │ │ +
624 }
│ │ │ +
625 }
│ │ │ +
│ │ │ +
626
│ │ │ +
627 template<int dimension, class CoordType>
│ │ │ +
628 bool
│ │ │ +
│ │ │ + │ │ │ +
630 equals(const This &other) const
│ │ │ +
631 {
│ │ │ +
632 return size == other.size && index_ == other.index_;
│ │ │ +
633 }
│ │ │ +
│ │ │ +
634
│ │ │ +
635 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
638 vertexIndices() const
│ │ │ +
639 {
│ │ │ +
640 IndexVector indices;
│ │ │ +
641 FieldVector<int, dimension> perm = getPermutation<dimension>(kuhnIndex);
│ │ │ +
642 Vertex vertex = origin;
│ │ │ +
643 indices[0] = pointIndex(vertex);
│ │ │ +
644 for(int i = 0; i < dimension; ++i) {
│ │ │ +
645 ++vertex[perm[i]];
│ │ │ +
646 indices[i+1] = pointIndex(vertex);
│ │ │ +
647 }
│ │ │ +
648 if (kuhnIndex%2 == 1)
│ │ │ +
649 for(int i = 0; i < (dimension+1)/2; ++i) {
│ │ │ +
650 int t = indices[i];
│ │ │ +
651 indices[i] = indices[dimension-i];
│ │ │ +
652 indices[dimension-i] = t;
│ │ │ +
653 }
│ │ │ +
654 return indices;
│ │ │ +
655 }
│ │ │ +
│ │ │ +
656
│ │ │ +
657 template<int dimension, class CoordType>
│ │ │ +
658 int
│ │ │ +
│ │ │ + │ │ │ +
660 index() const
│ │ │ +
661 {
│ │ │ +
662 return index_;
│ │ │ +
663 }
│ │ │ +
│ │ │ +
664
│ │ │ +
665 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
668 coords() const
│ │ │ +
669 {
│ │ │ + │ │ │ +
671 ::simplex().position(0,0));
│ │ │ +
672 }
│ │ │ +
│ │ │ +
673
│ │ │ +
674 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
677 {
│ │ │ +
678 std::vector<CoordVector> corners(dimension+1);
│ │ │ + │ │ │ +
680 for(int i = 0; i <= dimension; ++i)
│ │ │ +
681 corners[i] = global(refelem.position(i, dimension));
│ │ │ +
682 return Geometry(refelem.type(), corners);
│ │ │ +
683 }
│ │ │ +
│ │ │ +
684
│ │ │ +
685 template<int dimension, class CoordType>
│ │ │ + │ │ │ + │ │ │ +
688 global(const CoordVector &local) const {
│ │ │ +
689 CoordVector v =
│ │ │ + │ │ │ +
691 v += origin;
│ │ │ +
692 v /= (typename CoordVector::value_type)size;
│ │ │ + │ │ │ +
694 }
│ │ │ +
695
│ │ │ +
696 // common
│ │ │ +
697
│ │ │ +
698 template<int dimension, class CoordType>
│ │ │ +
699 template<int codimension>
│ │ │ +
│ │ │ +
700 class RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │ +
701 : public ForwardIteratorFacade<typename RefinementImp<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ +
702 public RefinementIteratorSpecial<dimension, CoordType, codimension>
│ │ │ +
703 {
│ │ │ +
704 public:
│ │ │ + │ │ │ +
706
│ │ │ +
707 SubEntityIterator(int nIntervals, bool end = false);
│ │ │ +
708 };
│ │ │ +
│ │ │ +
709
│ │ │ +
710#ifndef DOXYGEN
│ │ │ +
711
│ │ │ +
712 template<int dimension, class CoordType>
│ │ │ +
713 template<int codimension>
│ │ │ + │ │ │ +
715 SubEntityIterator(int nIntervals, bool end)
│ │ │ +
716 : RefinementIteratorSpecial<dimension, CoordType, codimension>(nIntervals, end)
│ │ │ +
717 {}
│ │ │ +
718
│ │ │ +
719#endif
│ │ │ +
720
│ │ │ +
721 } // namespace Simplex
│ │ │ +
│ │ │ +
722
│ │ │ +
723 } // namespace RefinementImp
│ │ │ +
724
│ │ │ +
725
│ │ │ +
726 namespace RefinementImp {
│ │ │ +
727
│ │ │ +
728 // ///////////////////////
│ │ │ +
729 //
│ │ │ +
730 // The refinement traits
│ │ │ +
731 //
│ │ │ +
732
│ │ │ +
733#ifndef DOXYGEN
│ │ │ +
734 template<unsigned topologyId, class CoordType, unsigned coerceToId,
│ │ │ +
735 int dim>
│ │ │ +
736 struct Traits<
│ │ │ +
737 topologyId, CoordType, coerceToId, dim,
│ │ │ +
738 typename std::enable_if<
│ │ │ +
739 ((GeometryTypes::simplex(dim).id() >> 1) ==
│ │ │ +
740 (topologyId >> 1) &&
│ │ │ +
741 (GeometryTypes::simplex(dim).id() >> 1) ==
│ │ │ +
742 (coerceToId >> 1)
│ │ │ +
743 )>::type
│ │ │ +
744 >
│ │ │ +
745 {
│ │ │ +
746 typedef Simplex::RefinementImp<dim, CoordType> Imp;
│ │ │ +
747 };
│ │ │ +
748#endif
│ │ │ +
749
│ │ │ +
750
│ │ │ +
751 } // namespace RefinementImp
│ │ │ +
752
│ │ │ +
753} // namespace Dune
│ │ │ +
754
│ │ │ +
755#endif //DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ + │ │ │ +
This file contains the parts independent of a particular Refinement implementation.
│ │ │ + │ │ │
constexpr GeometryType vertex
GeometryType representing a vertex.
Definition type.hh:492
│ │ │
STL namespace.
│ │ │
Definition affinegeometry.hh:22
│ │ │ -
This namespace contains the Refinement implementation for triangulating pyramids (GeometryType::pyram...
Definition pyramidtriangulation.cc:27
│ │ │ -
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:293
│ │ │ -
FieldVector< CoordType, dimension > transformCoordinate(FieldVector< CoordType, dimension > point)
Definition pyramidtriangulation.cc:51
│ │ │ -
FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from the reference simplex to some Kuhn simplex.
Definition simplex.cc:322
│ │ │ +
This namespace contains the implementation of Refinement.
Definition base.cc:29
│ │ │ +
This namespace contains the Refinement implementation for simplices (triangles, tetrahedrons....
Definition simplex.cc:264
│ │ │ +
int pointIndex(const FieldVector< int, dimension > &point)
calculate the index of a given gridpoint within a Kuhn0 simplex
Definition simplex.cc:280
│ │ │
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:293
│ │ │
FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from the reference simplex to some Kuhn simplex.
Definition simplex.cc:322
│ │ │ +
FieldVector< CoordType, dimension > kuhnToReference(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from some Kuhn simplex to the reference simplex.
Definition simplex.cc:341
│ │ │ +
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │ -
generic geometry implementation based on corner coordinates
Definition multilineargeometry.hh:181
│ │ │ - │ │ │ -
Implementation of the refinement of a pyramid into simplices.
Definition pyramidtriangulation.cc:68
│ │ │ -
FieldVector< CoordType, dimension > CoordVector
Definition pyramidtriangulation.cc:77
│ │ │ -
static int nVertices(int nIntervals)
Definition pyramidtriangulation.cc:109
│ │ │ -
static int nElements(int nIntervals)
Definition pyramidtriangulation.cc:133
│ │ │ -
CoordType ctype
Definition pyramidtriangulation.cc:72
│ │ │ -
Codim< dimension >::SubEntityIterator VertexIterator
Definition pyramidtriangulation.cc:76
│ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition pyramidtriangulation.cc:359
│ │ │ -
Codim< 0 >::SubEntityIterator ElementIterator
Definition pyramidtriangulation.cc:78
│ │ │ -
static constexpr int dimension
Definition pyramidtriangulation.cc:70
│ │ │ -
static ElementIterator eBegin(int nIntervals)
Definition pyramidtriangulation.cc:141
│ │ │ - │ │ │ -
static ElementIterator eEnd(int nIntervals)
Definition pyramidtriangulation.cc:149
│ │ │ - │ │ │ -
FieldVector< int, dimension+1 > IndexVector
Definition pyramidtriangulation.cc:79
│ │ │ -
static VertexIterator vBegin(int nIntervals)
Definition pyramidtriangulation.cc:117
│ │ │ - │ │ │ -
static VertexIterator vEnd(int nIntervals)
Definition pyramidtriangulation.cc:125
│ │ │ - │ │ │ -
Dune::MultiLinearGeometry< CoordType, dimension-codimension, dimension > Geometry
Definition pyramidtriangulation.cc:103
│ │ │ - │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition pyramidtriangulation.cc:164
│ │ │ - │ │ │ -
Refinement::template Codim< dimension >::Geometry Geometry
Definition pyramidtriangulation.cc:166
│ │ │ - │ │ │ -
Refinement::BackendRefinement BackendRefinement
Definition pyramidtriangulation.cc:178
│ │ │ - │ │ │ -
BackendRefinement::template Codim< dimension >::SubEntityIterator BackendIterator
Definition pyramidtriangulation.cc:179
│ │ │ - │ │ │ - │ │ │ -
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition pyramidtriangulation.cc:191
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
Refinement::CoordVector CoordVector
Definition pyramidtriangulation.cc:246
│ │ │ - │ │ │ -
Refinement::template Codim< 0 >::Geometry Geometry
Definition pyramidtriangulation.cc:247
│ │ │ -
Refinement::IndexVector IndexVector
Definition pyramidtriangulation.cc:245
│ │ │ - │ │ │ -
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition pyramidtriangulation.cc:276
│ │ │ -
BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator
Definition pyramidtriangulation.cc:264
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition pyramidtriangulation.cc:244
│ │ │ -
Refinement::BackendRefinement BackendRefinement
Definition pyramidtriangulation.cc:263
│ │ │ +
Implement a MultiLinearGeometry with additional caching.
Definition multilineargeometry.hh:526
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ +
Codim< dimension >::SubEntityIterator VertexIterator
Definition simplex.cc:368
│ │ │ +
FieldVector< int, dimension+1 > IndexVector
Definition simplex.cc:371
│ │ │ + │ │ │ +
static int nVertices(int nIntervals)
Definition simplex.cc:394
│ │ │ +
static int nElements(int nIntervals)
Definition simplex.cc:418
│ │ │ + │ │ │ +
static ElementIterator eEnd(int nIntervals)
Definition simplex.cc:434
│ │ │ +
static VertexIterator vEnd(int nIntervals)
Definition simplex.cc:410
│ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:705
│ │ │ +
Codim< 0 >::SubEntityIterator ElementIterator
Definition simplex.cc:370
│ │ │ +
static VertexIterator vBegin(int nIntervals)
Definition simplex.cc:402
│ │ │ +
static ElementIterator eBegin(int nIntervals)
Definition simplex.cc:426
│ │ │ +
FieldVector< CoordType, dimension > CoordVector
Definition simplex.cc:369
│ │ │ +
static constexpr int dimension
Definition simplex.cc:363
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:453
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition simplex.cc:476
│ │ │ + │ │ │ + │ │ │ +
Refinement::template Codim< dimension >::Geometry Geometry
Definition simplex.cc:455
│ │ │ + │ │ │ +
RefinementIteratorSpecial< dimension, CoordType, dimension > This
Definition simplex.cc:456
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
FieldVector< int, dimension > Vertex
Definition simplex.cc:564
│ │ │ +
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition simplex.cc:575
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
Refinement::template Codim< 0 >::Geometry Geometry
Definition simplex.cc:546
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
RefinementIteratorSpecial< dimension, CoordType, 0 > This
Definition simplex.cc:547
│ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:543
│ │ │ + │ │ │ +
bool equals(const This &other) const
Definition simplex.cc:630
│ │ │ +
static const ReferenceElement & simplex()
get simplex reference elements
Definition referenceelements.hh:162
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,685 +1,746 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ * _r_e_f_i_n_e_m_e_n_t │ │ │ │ -pyramidtriangulation.cc │ │ │ │ +simplex.cc │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC │ │ │ │ -_6#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC │ │ │ │ +5#ifndef DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ +_6#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ -9#include │ │ │ │ -10 │ │ │ │ -11#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ -12#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +8// This file is part of DUNE, a Distributed and Unified Numerics Environment │ │ │ │ +9// This file is copyright (C) 2005 Jorrit Fahlke │ │ │ │ +10// This file is licensed under version 2 of the GNU General Public License, │ │ │ │ +11// with a special "runtime exception." See COPYING at the top of the source │ │ │ │ +12// tree for the full licence. │ │ │ │ 13 │ │ │ │ -14#include "_b_a_s_e_._c_c" │ │ │ │ -15#include "_s_i_m_p_l_e_x_._c_c" │ │ │ │ -16 │ │ │ │ -17namespace _D_u_n_e │ │ │ │ -18{ │ │ │ │ -19 namespace RefinementImp │ │ │ │ -20 { │ │ │ │ -_2_6 namespace _P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ -27 { │ │ │ │ -28 // //////////// │ │ │ │ -29 // │ │ │ │ -30 // Utilities │ │ │ │ -31 // │ │ │ │ -32 │ │ │ │ -33 using _S_i_m_p_l_e_x_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n; │ │ │ │ -34 using _S_i_m_p_l_e_x_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n; │ │ │ │ -35 │ │ │ │ -36 // //////////////////////////////////// │ │ │ │ -37 // │ │ │ │ -38 // Refine a pyramid with simplices │ │ │ │ -39 // │ │ │ │ -40 │ │ │ │ -41 // forward declaration of the iterator base │ │ │ │ -42 template │ │ │ │ -_4_3 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l; │ │ │ │ -44 │ │ │ │ -45 /* │ │ │ │ -46 * The permutations 0 and 1 of the Kuhn-decomposition of a cube into │ │ │ │ -simplices form a pyramid. │ │ │ │ -47 * The resulting pyramid is not oriented the same as the reference pyramid │ │ │ │ -and so the Kuhn-coordinates │ │ │ │ -48 * have to be transformed using the method below. │ │ │ │ -49 */ │ │ │ │ -50 template FieldVector │ │ │ │ -_5_1 _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e( FieldVector point) │ │ │ │ -52 { │ │ │ │ -53 FieldVector transform; │ │ │ │ -54 transform[0]=1-point[0]; │ │ │ │ -55 transform[1]=1-point[1]; │ │ │ │ -56 transform[2]=point[2]; │ │ │ │ -57 return transform; │ │ │ │ -58 } │ │ │ │ -59 │ │ │ │ -66 template │ │ │ │ -_6_7 class _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ -68 { │ │ │ │ -69 public: │ │ │ │ -_7_0 constexpr static int _d_i_m_e_n_s_i_o_n = dimension_; │ │ │ │ -71 │ │ │ │ -_7_2 typedef CoordType _c_t_y_p_e; │ │ │ │ -73 │ │ │ │ -74 template │ │ │ │ -75 struct _C_o_d_i_m; │ │ │ │ -_7_6 typedef typename _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _V_e_r_t_e_x_I_t_e_r_a_t_o_r; │ │ │ │ -_7_7 typedef FieldVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ -_7_8 typedef typename _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r; │ │ │ │ -_7_9 typedef FieldVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ -80 │ │ │ │ -_8_1 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ -_8_2 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ -_8_3 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ -84 │ │ │ │ -_8_5 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ -_8_6 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_B_e_g_i_n(int nIntervals); │ │ │ │ -_8_7 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_E_n_d(int nIntervals); │ │ │ │ -88 │ │ │ │ -89 private: │ │ │ │ -90 friend class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, 0>; │ │ │ │ -91 friend class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, _d_i_m_e_n_s_i_o_n>; │ │ │ │ -92 │ │ │ │ -93 typedef _S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> BackendRefinement; │ │ │ │ -94 │ │ │ │ -95 constexpr static int nKuhnSimplices = 2; │ │ │ │ -96 }; │ │ │ │ -97 │ │ │ │ -98 template │ │ │ │ -99 template │ │ │ │ -_1_0_0 struct _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m │ │ │ │ -101 { │ │ │ │ -102 class _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r; │ │ │ │ -_1_0_3 typedef _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ -104 }; │ │ │ │ -105 │ │ │ │ -106 template │ │ │ │ -107 int │ │ │ │ -_1_0_8 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -109_ _n_V_e_r_t_i_c_e_s(int nIntervals) │ │ │ │ -110 { │ │ │ │ -111 return _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(nIntervals) * nKuhnSimplices; │ │ │ │ -112 } │ │ │ │ -113 │ │ │ │ -114 template │ │ │ │ -115 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ -_1_1_6 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -117_ _v_B_e_g_i_n(int nIntervals) │ │ │ │ -118 { │ │ │ │ -119 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ -120 } │ │ │ │ -121 │ │ │ │ -122 template │ │ │ │ -123 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ -_1_2_4 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -125_ _v_E_n_d(int nIntervals) │ │ │ │ -126 { │ │ │ │ -127 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ -128 } │ │ │ │ -129 │ │ │ │ -130 template │ │ │ │ -131 int │ │ │ │ -_1_3_2 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -133_ _n_E_l_e_m_e_n_t_s(int nIntervals) │ │ │ │ -134 { │ │ │ │ -135 return _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(nIntervals) * nKuhnSimplices; │ │ │ │ -136 } │ │ │ │ -137 │ │ │ │ -138 template │ │ │ │ -139 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ -_1_4_0 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -141_ _e_B_e_g_i_n(int nIntervals) │ │ │ │ -142 { │ │ │ │ -143 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ -144 } │ │ │ │ -145 │ │ │ │ -146 template │ │ │ │ -147 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ -_1_4_8 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -149_ _e_E_n_d(int nIntervals) │ │ │ │ -150 { │ │ │ │ -151 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ -152 } │ │ │ │ -153 │ │ │ │ -154 // ////////////// │ │ │ │ -155 // │ │ │ │ -156 // The iterator │ │ │ │ -157 // │ │ │ │ -158 │ │ │ │ -159 // vertices │ │ │ │ -160 template │ │ │ │ -_1_6_1 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -162 { │ │ │ │ -163 public: │ │ │ │ -_1_6_4 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_1_6_5 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ -_1_6_6 typedef typename Refinement::template _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ -167 │ │ │ │ -168 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ -169 │ │ │ │ -170 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ -171 │ │ │ │ -172 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ -173 │ │ │ │ -174 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y() const; │ │ │ │ -175 │ │ │ │ -176 int _i_n_d_e_x() const; │ │ │ │ -177 protected: │ │ │ │ -_1_7_8 typedef typename Refinement::BackendRefinement _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_1_7_9 typedef typename BackendRefinement::template _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r; │ │ │ │ -_1_8_0 constexpr static int _n_K_u_h_n_S_i_m_p_l_i_c_e_s = 2; │ │ │ │ -181 │ │ │ │ -_1_8_2 int _n_I_n_t_e_r_v_a_l_s__; │ │ │ │ -183 │ │ │ │ -_1_8_4 int _k_u_h_n_I_n_d_e_x; │ │ │ │ -_1_8_5 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d; │ │ │ │ -_1_8_6 const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d_E_n_d; │ │ │ │ -187 }; │ │ │ │ -188 │ │ │ │ -189 template │ │ │ │ -_1_9_0 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -191_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ -192 : _n_I_n_t_e_r_v_a_l_s__(nIntervals), _k_u_h_n_I_n_d_e_x(0), │ │ │ │ -193 _b_a_c_k_e_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vBegin(_n_I_n_t_e_r_v_a_l_s__)), │ │ │ │ -194 _b_a_c_k_e_n_d_E_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vEnd(_n_I_n_t_e_r_v_a_l_s__)) │ │ │ │ -195 { │ │ │ │ -196 if (end) │ │ │ │ -197 _k_u_h_n_I_n_d_e_x = _n_K_u_h_n_S_i_m_p_l_i_c_e_s; │ │ │ │ -198 } │ │ │ │ -199 │ │ │ │ -200 template │ │ │ │ -201 void │ │ │ │ -_2_0_2 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -203_ _i_n_c_r_e_m_e_n_t() │ │ │ │ -204 { │ │ │ │ -205 ++_b_a_c_k_e_n_d; │ │ │ │ -206 if(_b_a_c_k_e_n_d == _b_a_c_k_e_n_d_E_n_d) │ │ │ │ -207 { │ │ │ │ -208 _b_a_c_k_e_n_d = _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ -209 ++_k_u_h_n_I_n_d_e_x; │ │ │ │ -210 } │ │ │ │ -211 } │ │ │ │ -212 │ │ │ │ -213 template │ │ │ │ -214 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +21 │ │ │ │ +242 │ │ │ │ +243#include │ │ │ │ +244 │ │ │ │ +245#include │ │ │ │ +246#include │ │ │ │ +247 │ │ │ │ +248#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_m_u_l_t_i_l_i_n_e_a_r_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ +249#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +250#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +251 │ │ │ │ +252#include "_b_a_s_e_._c_c" │ │ │ │ +253 │ │ │ │ +254namespace _D_u_n_e { │ │ │ │ +255 │ │ │ │ +256 namespace RefinementImp { │ │ │ │ +257 │ │ │ │ +_2_6_4 namespace _S_i_m_p_l_e_x { │ │ │ │ +265 │ │ │ │ +266 // ////////////////// │ │ │ │ +267 // │ │ │ │ +269 // │ │ │ │ +270 │ │ │ │ +272 │ │ │ │ +279 template │ │ │ │ +_2_8_0 int _p_o_i_n_t_I_n_d_e_x(const FieldVector &point) │ │ │ │ +281 { │ │ │ │ +282 int index = 0; │ │ │ │ +283 for(int i = 0; i < dimension; ++i) │ │ │ │ +284 index += Dune::binomial(dimension-i + point[i]-1, dimension-i); │ │ │ │ +285 return index; │ │ │ │ +286 } │ │ │ │ +287 │ │ │ │ +292 template │ │ │ │ +_2_9_3 FieldVector _g_e_t_P_e_r_m_u_t_a_t_i_o_n(int m) │ │ │ │ +294 { │ │ │ │ +295 FieldVector perm; │ │ │ │ +296 for(int i = 0; i < n; ++i) │ │ │ │ +297 perm[i] = i; │ │ │ │ +298 │ │ │ │ +299 int base = 1; │ │ │ │ +300 for(int i = 1; i <= n; ++i) │ │ │ │ +301 base *= i; │ │ │ │ +302 │ │ │ │ +303 for(int i = n; i > 0; --i) { │ │ │ │ +304 base /= i; │ │ │ │ +305 int d = m / base; │ │ │ │ +306 m %= base; │ │ │ │ +307 int t = perm[i-1]; perm[i-1] = perm[i-1-d]; perm[i-1-d] = t; │ │ │ │ +308 } │ │ │ │ +309 return perm; │ │ │ │ +310 } │ │ │ │ +311 │ │ │ │ +312 // map between the reference simplex and some arbitrary kuhn simplex │ │ │ │ +(denoted by it's permutation) │ │ │ │ +320 template │ │ │ │ +321 FieldVector │ │ │ │ +_3_2_2 _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n( │ │ │ │ +323 FieldVector point, │ │ │ │ +325 const FieldVector &kuhn) │ │ │ │ +326 { │ │ │ │ +327 for(int i = dimension - 1; i > 0; --i) │ │ │ │ +328 point[kuhn[i-1]] += point[kuhn[i]]; │ │ │ │ +329 return point; │ │ │ │ +330 } │ │ │ │ +331 │ │ │ │ +339 template │ │ │ │ +340 FieldVector │ │ │ │ +_3_4_1 _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e( │ │ │ │ +342 FieldVector point, │ │ │ │ +344 const FieldVector &kuhn) │ │ │ │ +345 { │ │ │ │ +346 for(int i = 0; i < dimension - 1; ++i) │ │ │ │ +347 point[kuhn[i]] -= point[kuhn[i+1]]; │ │ │ │ +348 return point; │ │ │ │ +349 } │ │ │ │ +350 │ │ │ │ +351 │ │ │ │ +353 │ │ │ │ +354 // ///////////////////////////////////////// │ │ │ │ +355 // │ │ │ │ +356 // refinement implementation for simplices │ │ │ │ +357 // │ │ │ │ +358 │ │ │ │ +359 template │ │ │ │ +_3_6_0 class _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ +361 { │ │ │ │ +362 public: │ │ │ │ +_3_6_3 constexpr static int _d_i_m_e_n_s_i_o_n = dimension_; │ │ │ │ +_3_6_4 typedef CoordType _c_t_y_p_e; │ │ │ │ +365 │ │ │ │ +366 template │ │ │ │ +367 struct Codim; │ │ │ │ +_3_6_8 typedef typename Codim::SubEntityIterator _V_e_r_t_e_x_I_t_e_r_a_t_o_r; │ │ │ │ +_3_6_9 typedef FieldVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ +_3_7_0 typedef typename Codim<0>::SubEntityIterator _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r; │ │ │ │ +_3_7_1 typedef FieldVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ +372 │ │ │ │ +_3_7_3 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ +_3_7_4 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ +_3_7_5 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ +376 │ │ │ │ +_3_7_7 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ +_3_7_8 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_B_e_g_i_n(int nIntervals); │ │ │ │ +_3_7_9 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_E_n_d(int nIntervals); │ │ │ │ +380 }; │ │ │ │ +381 │ │ │ │ +382 template │ │ │ │ +383 template │ │ │ │ +_3_8_4 struct _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m │ │ │ │ +385 { │ │ │ │ +386 class _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r; │ │ │ │ +387 // We don't need the caching, but the uncached MultiLinearGeometry has bug │ │ │ │ +FS#1209 │ │ │ │ +388 typedef _D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y Geometry; │ │ │ │ +389 }; │ │ │ │ +390 │ │ │ │ +391 template │ │ │ │ +392 int │ │ │ │ +_3_9_3 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +394_ _n_V_e_r_t_i_c_e_s(int nIntervals) │ │ │ │ +395 { │ │ │ │ +396 return Dune::binomial(_d_i_m_e_n_s_i_o_n + nIntervals, (int)_d_i_m_e_n_s_i_o_n); │ │ │ │ +397 } │ │ │ │ +398 │ │ │ │ +399 template │ │ │ │ +400 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ +_4_0_1 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +402_ _v_B_e_g_i_n(int nIntervals) │ │ │ │ +403 { │ │ │ │ +404 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ +405 } │ │ │ │ +406 │ │ │ │ +407 template │ │ │ │ +408 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ +_4_0_9 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +410_ _v_E_n_d(int nIntervals) │ │ │ │ +411 { │ │ │ │ +412 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ +413 } │ │ │ │ +414 │ │ │ │ +415 template │ │ │ │ +416 int │ │ │ │ +_4_1_7 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +418_ _n_E_l_e_m_e_n_t_s(int nIntervals) │ │ │ │ +419 { │ │ │ │ +420 return Dune::power(nIntervals, int(_d_i_m_e_n_s_i_o_n)); │ │ │ │ +421 } │ │ │ │ +422 │ │ │ │ +423 template │ │ │ │ +424 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ +_4_2_5 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +426_ _e_B_e_g_i_n(int nIntervals) │ │ │ │ +427 { │ │ │ │ +428 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ +429 } │ │ │ │ +430 │ │ │ │ +431 template │ │ │ │ +432 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ +_4_3_3 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +434_ _e_E_n_d(int nIntervals) │ │ │ │ +435 { │ │ │ │ +436 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ +437 } │ │ │ │ +438 │ │ │ │ +439 // ////////////// │ │ │ │ +440 // │ │ │ │ +441 // The iterator │ │ │ │ +442 // │ │ │ │ +443 │ │ │ │ +444 template │ │ │ │ +_4_4_5 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l; │ │ │ │ +446 │ │ │ │ +447 // vertices │ │ │ │ +448 │ │ │ │ +449 template │ │ │ │ +_4_5_0 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +451 { │ │ │ │ +452 public: │ │ │ │ +_4_5_3 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_4_5_4 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ +_4_5_5 typedef typename Refinement::template _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ +_4_5_6 typedef _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_> _T_h_i_s; │ │ │ │ +457 │ │ │ │ +458 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ +459 │ │ │ │ +460 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ +461 bool _e_q_u_a_l_s(const _T_h_i_s &other) const; │ │ │ │ +462 │ │ │ │ +463 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ +464 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const; │ │ │ │ +465 │ │ │ │ +466 int _i_n_d_e_x() const; │ │ │ │ +467 protected: │ │ │ │ +_4_6_8 typedef FieldVector _V_e_r_t_e_x; │ │ │ │ +469 │ │ │ │ +_4_7_0 int _s_i_z_e; │ │ │ │ +_4_7_1 _V_e_r_t_e_x _v_e_r_t_e_x; │ │ │ │ +472 }; │ │ │ │ +473 │ │ │ │ +474 template │ │ │ │ +_4_7_5 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +476_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ +477 : _s_i_z_e(nIntervals) │ │ │ │ +478 { │ │ │ │ +479 _v_e_r_t_e_x[0] = (end) ? _s_i_z_e + 1 : 0; │ │ │ │ +480 for(int i = 1; i < dimension; ++ i) │ │ │ │ +481 _v_e_r_t_e_x[i] = 0; │ │ │ │ +482 } │ │ │ │ +483 │ │ │ │ +484 template │ │ │ │ +485 void │ │ │ │ +_4_8_6 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +487_ _i_n_c_r_e_m_e_n_t() │ │ │ │ +488 { │ │ │ │ +489 assert(_v_e_r_t_e_x[0] <= _s_i_z_e); │ │ │ │ +490 for(int i = dimension - 1; i >= 0; --i) { │ │ │ │ +491 ++_v_e_r_t_e_x[i]; │ │ │ │ +492 if(i == 0 || _v_e_r_t_e_x[i] <= _v_e_r_t_e_x[i-1]) │ │ │ │ +493 break; │ │ │ │ +494 else │ │ │ │ +495 _v_e_r_t_e_x[i] = 0; │ │ │ │ +496 } │ │ │ │ +497 } │ │ │ │ +498 │ │ │ │ +499 template │ │ │ │ +500 bool │ │ │ │ +_5_0_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +502_ _e_q_u_a_l_s(const _T_h_i_s &other) const │ │ │ │ +503 { │ │ │ │ +504 return _s_i_z_e == other._s_i_z_e && _v_e_r_t_e_x == other._v_e_r_t_e_x; │ │ │ │ +505 } │ │ │ │ +506 │ │ │ │ +507 template │ │ │ │ +508 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ _C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -_2_1_5 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -216_ _c_o_o_r_d_s() const │ │ │ │ -217 { │ │ │ │ -218 return _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e(_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(_b_a_c_k_e_n_d.coords(), │ │ │ │ -219 _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(_k_u_h_n_I_n_d_e_x))); │ │ │ │ -220 } │ │ │ │ -221 │ │ │ │ -222 template │ │ │ │ -223 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +_5_0_9 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +510_ _c_o_o_r_d_s() const │ │ │ │ +511 { │ │ │ │ +512 _V_e_r_t_e_x ref = _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e(_v_e_r_t_e_x, _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(0)); │ │ │ │ +513 │ │ │ │ +514 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s; │ │ │ │ +515 for(int i = 0; i < dimension; ++i) │ │ │ │ +516 _c_o_o_r_d_s[i] = CoordType(ref[i]) / _s_i_z_e; │ │ │ │ +517 return _c_o_o_r_d_s; │ │ │ │ +518 } │ │ │ │ +519 │ │ │ │ +520 template │ │ │ │ +521 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ _G_e_o_m_e_t_r_y │ │ │ │ -_2_2_4 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_:_g_e_o_m_e_t_r_y () │ │ │ │ +_5_2_2 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_:_g_e_o_m_e_t_r_y () │ │ │ │ const │ │ │ │ -225 { │ │ │ │ -226 std::vector corners(1); │ │ │ │ -227 corners[0] = _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(_b_a_c_k_e_n_d.coords(), _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_> │ │ │ │ -(_k_u_h_n_I_n_d_e_x)); │ │ │ │ -228 return _G_e_o_m_e_t_r_y(_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x, corners); │ │ │ │ -229 } │ │ │ │ -230 │ │ │ │ -231 template │ │ │ │ -232 int │ │ │ │ -_2_3_3 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -234_ _i_n_d_e_x() const │ │ │ │ -235 { │ │ │ │ -236 return _k_u_h_n_I_n_d_e_x*_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(_n_I_n_t_e_r_v_a_l_s__) + _b_a_c_k_e_n_d.index │ │ │ │ -(); │ │ │ │ -237 } │ │ │ │ -238 │ │ │ │ -239 // elements │ │ │ │ -240 template │ │ │ │ -_2_4_1 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -242 { │ │ │ │ -243 public: │ │ │ │ -_2_4_4 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_2_4_5 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_I_n_d_e_x_V_e_c_t_o_r _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ -_2_4_6 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ -_2_4_7 typedef typename Refinement::template _C_o_d_i_m_<_0_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ -248 │ │ │ │ -249 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ -250 │ │ │ │ -251 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ -252 │ │ │ │ -253 _I_n_d_e_x_V_e_c_t_o_r _v_e_r_t_e_x_I_n_d_i_c_e_s() const; │ │ │ │ -254 int _i_n_d_e_x() const; │ │ │ │ -255 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ -256 │ │ │ │ -257 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y() const; │ │ │ │ -258 │ │ │ │ -259 private: │ │ │ │ -260 _C_o_o_r_d_V_e_c_t_o_r global(const _C_o_o_r_d_V_e_c_t_o_r &local) const; │ │ │ │ -261 │ │ │ │ -262 protected: │ │ │ │ -_2_6_3 typedef typename Refinement::BackendRefinement _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_2_6_4 typedef typename BackendRefinement::template _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ -_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r; │ │ │ │ -_2_6_5 constexpr static int _n_K_u_h_n_S_i_m_p_l_i_c_e_s = 2; │ │ │ │ -266 │ │ │ │ -_2_6_7 int _n_I_n_t_e_r_v_a_l_s__; │ │ │ │ -268 │ │ │ │ -_2_6_9 int _k_u_h_n_I_n_d_e_x; │ │ │ │ -_2_7_0 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d; │ │ │ │ -_2_7_1 const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d_E_n_d; │ │ │ │ -272 }; │ │ │ │ -273 │ │ │ │ -274 template │ │ │ │ -_2_7_5 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -276_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ -277 : _n_I_n_t_e_r_v_a_l_s__(nIntervals), _k_u_h_n_I_n_d_e_x(0), │ │ │ │ -278 _b_a_c_k_e_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eBegin(_n_I_n_t_e_r_v_a_l_s__)), │ │ │ │ -279 _b_a_c_k_e_n_d_E_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eEnd(_n_I_n_t_e_r_v_a_l_s__)) │ │ │ │ -280 { │ │ │ │ -281 if (end) │ │ │ │ -282 _k_u_h_n_I_n_d_e_x = _n_K_u_h_n_S_i_m_p_l_i_c_e_s; │ │ │ │ -283 } │ │ │ │ -284 │ │ │ │ -285 template │ │ │ │ -286 void │ │ │ │ -_2_8_7 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -288_ _i_n_c_r_e_m_e_n_t() │ │ │ │ -289 { │ │ │ │ -290 ++_b_a_c_k_e_n_d; │ │ │ │ -291 if (_b_a_c_k_e_n_d == _b_a_c_k_e_n_d_E_n_d) │ │ │ │ -292 { │ │ │ │ -293 _b_a_c_k_e_n_d = _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ -294 ++_k_u_h_n_I_n_d_e_x; │ │ │ │ -295 } │ │ │ │ -296 } │ │ │ │ -297 │ │ │ │ -298 template │ │ │ │ -299 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ -_3_0_0 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -301_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ -302 { │ │ │ │ -303 _I_n_d_e_x_V_e_c_t_o_r indices = _b_a_c_k_e_n_d.vertexIndices(); │ │ │ │ -304 │ │ │ │ -305 int base = _k_u_h_n_I_n_d_e_x * _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ -306 indices += base; │ │ │ │ -307 │ │ │ │ -308 return indices; │ │ │ │ -309 } │ │ │ │ -310 │ │ │ │ -311 template │ │ │ │ -312 int │ │ │ │ -_3_1_3 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -314_ _i_n_d_e_x() const │ │ │ │ -315 { │ │ │ │ -316 return _k_u_h_n_I_n_d_e_x*_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(_n_I_n_t_e_r_v_a_l_s__) + _b_a_c_k_e_n_d.index │ │ │ │ -(); │ │ │ │ -317 } │ │ │ │ -318 │ │ │ │ -319 template │ │ │ │ -320 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -_3_2_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -322_ _c_o_o_r_d_s() const │ │ │ │ -323 { │ │ │ │ -324 return global(_b_a_c_k_e_n_d.coords()); │ │ │ │ -325 } │ │ │ │ -326 │ │ │ │ -327 template │ │ │ │ -328 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_G_e_o_m_e_t_r_y │ │ │ │ -_3_2_9 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -330_ _g_e_o_m_e_t_r_y() const │ │ │ │ -331 { │ │ │ │ -332 const typename BackendIterator::Geometry & │ │ │ │ -333 bgeo = _b_a_c_k_e_n_d.geometry(); │ │ │ │ -334 std::vector corners(dimension+1); │ │ │ │ -335 for(int i = 0; i <= dimension; ++i) │ │ │ │ -336 corners[i] = global(bgeo.corner(i)); │ │ │ │ -337 │ │ │ │ -338 return _G_e_o_m_e_t_r_y(bgeo.type(), corners); │ │ │ │ -339 } │ │ │ │ -340 │ │ │ │ -341 template │ │ │ │ -342 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>:: │ │ │ │ -343 CoordVector │ │ │ │ -344 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -345_ _g_l_o_b_a_l(const CoordVector &local) const │ │ │ │ -346 { │ │ │ │ -347 return _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e(_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(local, │ │ │ │ -348 _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(kuhnIndex))); │ │ │ │ -349 } │ │ │ │ -350 │ │ │ │ -351 // common │ │ │ │ -352 template │ │ │ │ -353 template │ │ │ │ -_3_5_4 class _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m_:_: │ │ │ │ +523 { │ │ │ │ +524 std::vector corners(1); │ │ │ │ +525 corners[0] = (_C_o_o_r_d_V_e_c_t_o_r)_v_e_r_t_e_x; │ │ │ │ +526 return _G_e_o_m_e_t_r_y(_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x, corners); │ │ │ │ +527 } │ │ │ │ +528 │ │ │ │ +529 template │ │ │ │ +530 int │ │ │ │ +_5_3_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +532_ _i_n_d_e_x() const │ │ │ │ +533 { │ │ │ │ +534 return _p_o_i_n_t_I_n_d_e_x(_v_e_r_t_e_x); │ │ │ │ +535 } │ │ │ │ +536 │ │ │ │ +537 // elements │ │ │ │ +538 │ │ │ │ +539 template │ │ │ │ +_5_4_0 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +541 { │ │ │ │ +542 public: │ │ │ │ +_5_4_3 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_5_4_4 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_I_n_d_e_x_V_e_c_t_o_r _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ +_5_4_5 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ +_5_4_6 typedef typename Refinement::template _C_o_d_i_m_<_0_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ +_5_4_7 typedef _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_> _T_h_i_s; │ │ │ │ +548 │ │ │ │ +549 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ +550 │ │ │ │ +551 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ +552 bool _e_q_u_a_l_s(const _T_h_i_s &other) const; │ │ │ │ +553 │ │ │ │ +554 _I_n_d_e_x_V_e_c_t_o_r _v_e_r_t_e_x_I_n_d_i_c_e_s() const; │ │ │ │ +555 int _i_n_d_e_x() const; │ │ │ │ +556 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ +557 │ │ │ │ +558 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const; │ │ │ │ +559 │ │ │ │ +560 private: │ │ │ │ +561 _C_o_o_r_d_V_e_c_t_o_r global(const _C_o_o_r_d_V_e_c_t_o_r &local) const; │ │ │ │ +562 │ │ │ │ +563 protected: │ │ │ │ +_5_6_4 typedef FieldVector _V_e_r_t_e_x; │ │ │ │ +_5_6_5 constexpr static int _n_K_u_h_n_I_n_t_e_r_v_a_l_s = Dune::factorial(dimension); │ │ │ │ +566 │ │ │ │ +_5_6_7 _V_e_r_t_e_x _o_r_i_g_i_n; │ │ │ │ +_5_6_8 int _k_u_h_n_I_n_d_e_x; │ │ │ │ +_5_6_9 int _s_i_z_e; │ │ │ │ +_5_7_0 int _i_n_d_e_x__; │ │ │ │ +571 }; │ │ │ │ +572 │ │ │ │ +573 template │ │ │ │ +_5_7_4 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +575_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ +576 : _k_u_h_n_I_n_d_e_x(0), _s_i_z_e(nIntervals), _i_n_d_e_x__(0) │ │ │ │ +577 { │ │ │ │ +578 for(int i = 0; i < dimension; ++i) │ │ │ │ +579 _o_r_i_g_i_n[i] = 0; │ │ │ │ +580 if(end) { │ │ │ │ +581 _i_n_d_e_x__ = _R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(nIntervals); │ │ │ │ +582 _o_r_i_g_i_n[0] = _s_i_z_e; │ │ │ │ +583 } │ │ │ │ +584 } │ │ │ │ +585 │ │ │ │ +586 template │ │ │ │ +587 void │ │ │ │ +_5_8_8 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +589_ _i_n_c_r_e_m_e_n_t() │ │ │ │ +590 { │ │ │ │ +591 assert(_o_r_i_g_i_n[0] < _s_i_z_e); │ │ │ │ +592 │ │ │ │ +593 ++_i_n_d_e_x__; │ │ │ │ +594 │ │ │ │ +595 while(1) { │ │ │ │ +596 ++_k_u_h_n_I_n_d_e_x; │ │ │ │ +597 if(_k_u_h_n_I_n_d_e_x == _n_K_u_h_n_I_n_t_e_r_v_a_l_s) { │ │ │ │ +598 _k_u_h_n_I_n_d_e_x = 0; │ │ │ │ +599 // increment origin │ │ │ │ +600 for(int i = dimension - 1; i >= 0; --i) { │ │ │ │ +601 ++_o_r_i_g_i_n[i]; │ │ │ │ +602 if(i == 0 || _o_r_i_g_i_n[i] <= _o_r_i_g_i_n[i-1]) │ │ │ │ +603 break; │ │ │ │ +604 else │ │ │ │ +605 _o_r_i_g_i_n[i] = 0; │ │ │ │ +606 } │ │ │ │ +607 } │ │ │ │ +608 │ │ │ │ +609 // test whether the current simplex has any corner outside the kuhn0 │ │ │ │ +simplex │ │ │ │ +610 FieldVector perm = _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(_k_u_h_n_I_n_d_e_x); │ │ │ │ +611 _V_e_r_t_e_x corner = _o_r_i_g_i_n; │ │ │ │ +612 bool outside = false; │ │ │ │ +613 for(int i = 0; i < dimension; ++i) { │ │ │ │ +614 // next corner │ │ │ │ +615 ++corner[perm[i]]; │ │ │ │ +616 if(perm[i] > 0) │ │ │ │ +617 if(corner[perm[i]] > corner[perm[i]-1]) { │ │ │ │ +618 outside = true; │ │ │ │ +619 break; │ │ │ │ +620 } │ │ │ │ +621 } │ │ │ │ +622 if(!outside) │ │ │ │ +623 return; │ │ │ │ +624 } │ │ │ │ +625 } │ │ │ │ +626 │ │ │ │ +627 template │ │ │ │ +628 bool │ │ │ │ +_6_2_9 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +630_ _e_q_u_a_l_s(const _T_h_i_s &other) const │ │ │ │ +631 { │ │ │ │ +632 return _s_i_z_e == other._s_i_z_e && _i_n_d_e_x__ == other._i_n_d_e_x__; │ │ │ │ +633 } │ │ │ │ +634 │ │ │ │ +635 template │ │ │ │ +636 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ +_6_3_7 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +638_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ +639 { │ │ │ │ +640 _I_n_d_e_x_V_e_c_t_o_r indices; │ │ │ │ +641 FieldVector perm = _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(_k_u_h_n_I_n_d_e_x); │ │ │ │ +642 _V_e_r_t_e_x vertex = _o_r_i_g_i_n; │ │ │ │ +643 indices[0] = _p_o_i_n_t_I_n_d_e_x(vertex); │ │ │ │ +644 for(int i = 0; i < dimension; ++i) { │ │ │ │ +645 ++vertex[perm[i]]; │ │ │ │ +646 indices[i+1] = _p_o_i_n_t_I_n_d_e_x(vertex); │ │ │ │ +647 } │ │ │ │ +648 if (_k_u_h_n_I_n_d_e_x%2 == 1) │ │ │ │ +649 for(int i = 0; i < (dimension+1)/2; ++i) { │ │ │ │ +650 int t = indices[i]; │ │ │ │ +651 indices[i] = indices[dimension-i]; │ │ │ │ +652 indices[dimension-i] = t; │ │ │ │ +653 } │ │ │ │ +654 return indices; │ │ │ │ +655 } │ │ │ │ +656 │ │ │ │ +657 template │ │ │ │ +658 int │ │ │ │ +_6_5_9 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +660_ _i_n_d_e_x() const │ │ │ │ +661 { │ │ │ │ +662 return _i_n_d_e_x__; │ │ │ │ +663 } │ │ │ │ +664 │ │ │ │ +665 template │ │ │ │ +666 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +_6_6_7 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +668_ _c_o_o_r_d_s() const │ │ │ │ +669 { │ │ │ │ +670 return global(_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_> │ │ │ │ +671 ::simplex().position(0,0)); │ │ │ │ +672 } │ │ │ │ +673 │ │ │ │ +674 template │ │ │ │ +675 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_G_e_o_m_e_t_r_y │ │ │ │ +_6_7_6 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ +677 { │ │ │ │ +678 std::vector corners(dimension+1); │ │ │ │ +679 auto refelem = _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_:_s_i_m_p_l_e_x(); │ │ │ │ +680 for(int i = 0; i <= dimension; ++i) │ │ │ │ +681 corners[i] = global(refelem.position(i, dimension)); │ │ │ │ +682 return _G_e_o_m_e_t_r_y(refelem.type(), corners); │ │ │ │ +683 } │ │ │ │ +684 │ │ │ │ +685 template │ │ │ │ +686 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +687 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +688_ _g_l_o_b_a_l(const CoordVector &local) const { │ │ │ │ +689 CoordVector v = │ │ │ │ +690 _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(local, _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(kuhnIndex)); │ │ │ │ +691 v += origin; │ │ │ │ +692 v /= (typename CoordVector::value_type)size; │ │ │ │ +693 return _k_u_h_n_T_o_R_e_f_e_r_e_n_c_e(v, _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(0)); │ │ │ │ +694 } │ │ │ │ +695 │ │ │ │ +696 // common │ │ │ │ +697 │ │ │ │ +698 template │ │ │ │ +699 template │ │ │ │ +_7_0_0 class _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m_:_: │ │ │ │ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ -355 : public ForwardIteratorFacade::template Codim::SubEntityIterator, int>, │ │ │ │ -356 public _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -357 { │ │ │ │ -358 public: │ │ │ │ -_3_5_9 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_3_6_0 typedef _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _T_h_i_s; │ │ │ │ -361 │ │ │ │ -_3_6_2 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end = false); │ │ │ │ -363 │ │ │ │ -_3_6_4 bool _e_q_u_a_l_s(const _T_h_i_s &other) const; │ │ │ │ -365 protected: │ │ │ │ -366 using _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>:: │ │ │ │ -kuhnIndex; │ │ │ │ -367 using _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>:: │ │ │ │ -backend; │ │ │ │ -368 }; │ │ │ │ -369 │ │ │ │ -370#ifndef DOXYGEN │ │ │ │ -371 template │ │ │ │ -372 template │ │ │ │ -373 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +702 public _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +703 { │ │ │ │ +704 public: │ │ │ │ +_7_0_5 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ +706 │ │ │ │ +_7_0_7 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end = false); │ │ │ │ +708 }; │ │ │ │ +709 │ │ │ │ +710#ifndef DOXYGEN │ │ │ │ +711 │ │ │ │ +712 template │ │ │ │ +713 template │ │ │ │ +714 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ -374_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end) │ │ │ │ -375 : _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>(nIntervals, │ │ │ │ +715_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end) │ │ │ │ +716 : _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>(nIntervals, │ │ │ │ end) │ │ │ │ -376 {} │ │ │ │ -377 │ │ │ │ -378 template │ │ │ │ -379 template │ │ │ │ -380 bool │ │ │ │ -381 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ -382_ _e_q_u_a_l_s(const This &other) const │ │ │ │ -383 { │ │ │ │ -384 return kuhnIndex == other.kuhnIndex && backend == other.backend; │ │ │ │ -385 } │ │ │ │ -386#endif │ │ │ │ -387 │ │ │ │ -388 } // namespace PyramidTriangulation │ │ │ │ -389 } // namespace RefinementImp │ │ │ │ -390 │ │ │ │ -391 namespace RefinementImp │ │ │ │ -392 { │ │ │ │ -393 // /////////////////////// │ │ │ │ -394 // │ │ │ │ -395 // The refinement traits │ │ │ │ -396 // │ │ │ │ -397#ifndef DOXYGEN │ │ │ │ -398 template │ │ │ │ -399 struct Traits< │ │ │ │ -400 topologyId, CoordType, coerceToId, 3, │ │ │ │ -401 typename _s_t_d::enable_if< │ │ │ │ -402 (GeometryTypes::pyramid.id() >> 1) == │ │ │ │ -403 (topologyId >> 1) && │ │ │ │ -404 (GeometryTypes::simplex(3).id() >> 1) == │ │ │ │ -405 (coerceToId >> 1) │ │ │ │ -406 >::type> │ │ │ │ -407 { │ │ │ │ -408 typedef PyramidTriangulation::RefinementImp<3, CoordType> Imp; │ │ │ │ -409 }; │ │ │ │ -410#endif │ │ │ │ -411 │ │ │ │ -412 } // namespace RefinementImp │ │ │ │ -413} // namespace Dune │ │ │ │ -414 │ │ │ │ -415#endif // DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC │ │ │ │ +717 {} │ │ │ │ +718 │ │ │ │ +719#endif │ │ │ │ +720 │ │ │ │ +721 } // namespace Simplex │ │ │ │ +722 │ │ │ │ +723 } // namespace RefinementImp │ │ │ │ +724 │ │ │ │ +725 │ │ │ │ +726 namespace _R_e_f_i_n_e_m_e_n_t_I_m_p { │ │ │ │ +727 │ │ │ │ +728 // /////////////////////// │ │ │ │ +729 // │ │ │ │ +730 // The refinement traits │ │ │ │ +731 // │ │ │ │ +732 │ │ │ │ +733#ifndef DOXYGEN │ │ │ │ +734 template │ │ │ │ +736 struct Traits< │ │ │ │ +737 topologyId, CoordType, coerceToId, dim, │ │ │ │ +738 typename _s_t_d::enable_if< │ │ │ │ +739 ((GeometryTypes::simplex(dim).id() >> 1) == │ │ │ │ +740 (topologyId >> 1) && │ │ │ │ +741 (GeometryTypes::simplex(dim).id() >> 1) == │ │ │ │ +742 (coerceToId >> 1) │ │ │ │ +743 )>::type │ │ │ │ +744 > │ │ │ │ +745 { │ │ │ │ +746 typedef Simplex::RefinementImp Imp; │ │ │ │ +747 }; │ │ │ │ +748#endif │ │ │ │ +749 │ │ │ │ +750 │ │ │ │ +751 } // namespace RefinementImp │ │ │ │ +752 │ │ │ │ +753} // namespace Dune │ │ │ │ +754 │ │ │ │ +755#endif //DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ _t_y_p_e_._h_h │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ -_s_i_m_p_l_e_x_._c_c │ │ │ │ -This file contains the Refinement implementation for simplices (triangles, │ │ │ │ -tetrahedrons.... │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ _b_a_s_e_._c_c │ │ │ │ This file contains the parts independent of a particular Refinement │ │ │ │ implementation. │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ +_m_u_l_t_i_l_i_n_e_a_r_g_e_o_m_e_t_r_y_._h_h │ │ │ │ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x │ │ │ │ constexpr GeometryType vertex │ │ │ │ GeometryType representing a vertex. │ │ │ │ DDeeffiinniittiioonn type.hh:492 │ │ │ │ _s_t_d │ │ │ │ STL namespace. │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ -This namespace contains the Refinement implementation for triangulating │ │ │ │ -pyramids (GeometryType::pyram... │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:27 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n │ │ │ │ -FieldVector< int, n > getPermutation(int m) │ │ │ │ -Calculate permutation from it's index. │ │ │ │ -DDeeffiinniittiioonn simplex.cc:293 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< CoordType, dimension > transformCoordinate(FieldVector< CoordType, │ │ │ │ -dimension > point) │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:51 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n │ │ │ │ -FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, │ │ │ │ -dimension > point, const FieldVector< int, dimension > &kuhn) │ │ │ │ -Map from the reference simplex to some Kuhn simplex. │ │ │ │ -DDeeffiinniittiioonn simplex.cc:322 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ +This namespace contains the implementation of Refinement. │ │ │ │ +DDeeffiinniittiioonn base.cc:29 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x │ │ │ │ +This namespace contains the Refinement implementation for simplices (triangles, │ │ │ │ +tetrahedrons.... │ │ │ │ +DDeeffiinniittiioonn simplex.cc:264 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_p_o_i_n_t_I_n_d_e_x │ │ │ │ +int pointIndex(const FieldVector< int, dimension > &point) │ │ │ │ +calculate the index of a given gridpoint within a Kuhn0 simplex │ │ │ │ +DDeeffiinniittiioonn simplex.cc:280 │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n │ │ │ │ FieldVector< int, n > getPermutation(int m) │ │ │ │ Calculate permutation from it's index. │ │ │ │ DDeeffiinniittiioonn simplex.cc:293 │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n │ │ │ │ FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, │ │ │ │ dimension > point, const FieldVector< int, dimension > &kuhn) │ │ │ │ Map from the reference simplex to some Kuhn simplex. │ │ │ │ DDeeffiinniittiioonn simplex.cc:322 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_k_u_h_n_T_o_R_e_f_e_r_e_n_c_e │ │ │ │ +FieldVector< CoordType, dimension > kuhnToReference(FieldVector< CoordType, │ │ │ │ +dimension > point, const FieldVector< int, dimension > &kuhn) │ │ │ │ +Map from some Kuhn simplex to the reference simplex. │ │ │ │ +DDeeffiinniittiioonn simplex.cc:341 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ +Class providing access to the singletons of the reference elements. │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ _D_u_n_e_:_:_C_o_d_i_m │ │ │ │ Static tag representing a codimension. │ │ │ │ DDeeffiinniittiioonn dimension.hh:24 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ -generic geometry implementation based on corner coordinates │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:181 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:43 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ -Implementation of the refinement of a pyramid into simplices. │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:68 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -FieldVector< CoordType, dimension > CoordVector │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:77 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ +Implement a MultiLinearGeometry with additional caching. │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:526 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ +DDeeffiinniittiioonn simplex.cc:361 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_: │ │ │ │ +_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ +Codim< dimension >::SubEntityIterator VertexIterator │ │ │ │ +DDeeffiinniittiioonn simplex.cc:368 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_: │ │ │ │ +_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ +FieldVector< int, dimension+1 > IndexVector │ │ │ │ +DDeeffiinniittiioonn simplex.cc:371 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_c_t_y_p_e │ │ │ │ +CoordType ctype │ │ │ │ +DDeeffiinniittiioonn simplex.cc:364 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ static int nVertices(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:109 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ +DDeeffiinniittiioonn simplex.cc:394 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ static int nElements(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:133 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_c_t_y_p_e │ │ │ │ -CoordType ctype │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:72 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ -Codim< dimension >::SubEntityIterator VertexIterator │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:76 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ -_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ -RefinementImp< dimension, CoordType > Refinement │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:359 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ -Codim< 0 >::SubEntityIterator ElementIterator │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:78 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ -_>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int dimension │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:70 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_B_e_g_i_n │ │ │ │ -static ElementIterator eBegin(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:141 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ -_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ +DDeeffiinniittiioonn simplex.cc:418 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_C_o_d_i_m_< │ │ │ │ +_c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ SubEntityIterator(int nIntervals, bool end=false) │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_E_n_d │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_E_n_d │ │ │ │ static ElementIterator eEnd(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:149 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ -_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const This &other) const │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ -FieldVector< int, dimension+1 > IndexVector │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:79 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_B_e_g_i_n │ │ │ │ -static VertexIterator vBegin(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:117 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ -_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_T_h_i_s │ │ │ │ -SubEntityIterator This │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:360 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_E_n_d │ │ │ │ +DDeeffiinniittiioonn simplex.cc:434 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_E_n_d │ │ │ │ static VertexIterator vEnd(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:125 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:101 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ -_G_e_o_m_e_t_r_y │ │ │ │ -Dune::MultiLinearGeometry< CoordType, dimension-codimension, dimension > │ │ │ │ -Geometry │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:103 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_d_e_x │ │ │ │ -int index() const │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:234 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ +DDeeffiinniittiioonn simplex.cc:410 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_C_o_d_i_m_< │ │ │ │ +_c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ RefinementImp< dimension, CoordType > Refinement │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:164 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ -Geometry geometry() const │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:224 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ -Refinement::template Codim< dimension >::Geometry Geometry │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:166 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_n_K_u_h_n_S_i_m_p_l_i_c_e_s │ │ │ │ -static constexpr int nKuhnSimplices │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:180 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ -Refinement::BackendRefinement BackendRefinement │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:178 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_b_a_c_k_e_n_d │ │ │ │ -BackendIterator backend │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:185 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r │ │ │ │ -BackendRefinement::template Codim< dimension >::SubEntityIterator │ │ │ │ -BackendIterator │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:179 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ +DDeeffiinniittiioonn simplex.cc:705 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_: │ │ │ │ +_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ +Codim< 0 >::SubEntityIterator ElementIterator │ │ │ │ +DDeeffiinniittiioonn simplex.cc:370 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_B_e_g_i_n │ │ │ │ +static VertexIterator vBegin(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn simplex.cc:402 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_B_e_g_i_n │ │ │ │ +static ElementIterator eBegin(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn simplex.cc:426 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_: │ │ │ │ +_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +FieldVector< CoordType, dimension > CoordVector │ │ │ │ +DDeeffiinniittiioonn simplex.cc:369 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ +static constexpr int dimension │ │ │ │ +DDeeffiinniittiioonn simplex.cc:363 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m │ │ │ │ +DDeeffiinniittiioonn simplex.cc:385 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +DDeeffiinniittiioonn simplex.cc:445 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_d_i_m_e_n_s_i_o_n_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +Refinement::CoordVector CoordVector │ │ │ │ +DDeeffiinniittiioonn simplex.cc:454 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ +RefinementImp< dimension, CoordType > Refinement │ │ │ │ +DDeeffiinniittiioonn simplex.cc:453 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_d_i_m_e_n_s_i_o_n_ _>_:_:_v_e_r_t_e_x │ │ │ │ +Vertex vertex │ │ │ │ +DDeeffiinniittiioonn simplex.cc:471 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_d_e_x │ │ │ │ +int index() const │ │ │ │ +DDeeffiinniittiioonn simplex.cc:532 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ void increment() │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:203 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_c_o_o_r_d_s │ │ │ │ -CoordVector coords() const │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:216 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +DDeeffiinniittiioonn simplex.cc:487 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ RefinementIteratorSpecial(int nIntervals, bool end=false) │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:191 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ +DDeeffiinniittiioonn simplex.cc:476 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_d_i_m_e_n_s_i_o_n_ _>_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const This &other) const │ │ │ │ +DDeeffiinniittiioonn simplex.cc:502 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_d_i_m_e_n_s_i_o_n_ _>_:_:_c_o_o_r_d_s │ │ │ │ +CoordVector coords() const │ │ │ │ +DDeeffiinniittiioonn simplex.cc:510 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_d_i_m_e_n_s_i_o_n_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ +Refinement::template Codim< dimension >::Geometry Geometry │ │ │ │ +DDeeffiinniittiioonn simplex.cc:455 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_d_i_m_e_n_s_i_o_n_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ +Geometry geometry() const │ │ │ │ +DDeeffiinniittiioonn simplex.cc:522 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_d_i_m_e_n_s_i_o_n_ _>_:_:_T_h_i_s │ │ │ │ +RefinementIteratorSpecial< dimension, CoordType, dimension > This │ │ │ │ +DDeeffiinniittiioonn simplex.cc:456 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_d_i_m_e_n_s_i_o_n_ _>_:_:_V_e_r_t_e_x │ │ │ │ +FieldVector< int, dimension > Vertex │ │ │ │ +DDeeffiinniittiioonn simplex.cc:468 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_d_i_m_e_n_s_i_o_n_ _>_:_:_s_i_z_e │ │ │ │ +int size │ │ │ │ +DDeeffiinniittiioonn simplex.cc:470 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_v_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ +IndexVector vertexIndices() const │ │ │ │ +DDeeffiinniittiioonn simplex.cc:638 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ int kuhnIndex │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:184 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -Refinement::CoordVector CoordVector │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:165 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_b_a_c_k_e_n_d_E_n_d │ │ │ │ -const BackendIterator backendEnd │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:186 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_n_I_n_t_e_r_v_a_l_s__ │ │ │ │ -int nIntervals_ │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:182 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ +DDeeffiinniittiioonn simplex.cc:568 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ void increment() │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:288 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_b_a_c_k_e_n_d_E_n_d │ │ │ │ -const BackendIterator backendEnd │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:271 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_i_n_d_e_x │ │ │ │ +DDeeffiinniittiioonn simplex.cc:589 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_V_e_r_t_e_x │ │ │ │ +FieldVector< int, dimension > Vertex │ │ │ │ +DDeeffiinniittiioonn simplex.cc:564 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +RefinementIteratorSpecial(int nIntervals, bool end=false) │ │ │ │ +DDeeffiinniittiioonn simplex.cc:575 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_o_r_i_g_i_n │ │ │ │ +Vertex origin │ │ │ │ +DDeeffiinniittiioonn simplex.cc:567 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ +Geometry geometry() const │ │ │ │ +DDeeffiinniittiioonn simplex.cc:676 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_i_n_d_e_x__ │ │ │ │ +int index_ │ │ │ │ +DDeeffiinniittiioonn simplex.cc:570 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_i_n_d_e_x │ │ │ │ int index() const │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:314 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -Refinement::CoordVector CoordVector │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:246 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_n_I_n_t_e_r_v_a_l_s__ │ │ │ │ -int nIntervals_ │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:267 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ +DDeeffiinniittiioonn simplex.cc:660 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_n_K_u_h_n_I_n_t_e_r_v_a_l_s │ │ │ │ +static constexpr int nKuhnIntervals │ │ │ │ +DDeeffiinniittiioonn simplex.cc:565 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ Refinement::template Codim< 0 >::Geometry Geometry │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:247 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ -Refinement::IndexVector IndexVector │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:245 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ -Geometry geometry() const │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:330 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -RefinementIteratorSpecial(int nIntervals, bool end=false) │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:276 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r │ │ │ │ -BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:264 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_v_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ -IndexVector vertexIndices() const │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:301 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_n_K_u_h_n_S_i_m_p_l_i_c_e_s │ │ │ │ -static constexpr int nKuhnSimplices │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:265 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ -int kuhnIndex │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:269 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_c_o_o_r_d_s │ │ │ │ +DDeeffiinniittiioonn simplex.cc:546 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_c_o_o_r_d_s │ │ │ │ CoordVector coords() const │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:322 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_b_a_c_k_e_n_d │ │ │ │ -BackendIterator backend │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:270 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ +DDeeffiinniittiioonn simplex.cc:668 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ +Refinement::IndexVector IndexVector │ │ │ │ +DDeeffiinniittiioonn simplex.cc:544 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +Refinement::CoordVector CoordVector │ │ │ │ +DDeeffiinniittiioonn simplex.cc:545 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_T_h_i_s │ │ │ │ +RefinementIteratorSpecial< dimension, CoordType, 0 > This │ │ │ │ +DDeeffiinniittiioonn simplex.cc:547 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ RefinementImp< dimension, CoordType > Refinement │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:244 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ -_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ -Refinement::BackendRefinement BackendRefinement │ │ │ │ -DDeeffiinniittiioonn pyramidtriangulation.cc:263 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ -DDeeffiinniittiioonn simplex.cc:361 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ -static int nVertices(int nIntervals) │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ -static int nElements(int nIntervals) │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_v_B_e_g_i_n │ │ │ │ -static VertexIterator vBegin(int nIntervals) │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_e_B_e_g_i_n │ │ │ │ -static ElementIterator eBegin(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn simplex.cc:543 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_s_i_z_e │ │ │ │ +int size │ │ │ │ +DDeeffiinniittiioonn simplex.cc:569 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_, │ │ │ │ +_0_ _>_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const This &other) const │ │ │ │ +DDeeffiinniittiioonn simplex.cc:630 │ │ │ │ +_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_s_i_m_p_l_e_x │ │ │ │ +static const ReferenceElement & simplex() │ │ │ │ +get simplex reference elements │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:162 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00203.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: prismtriangulation.cc File Reference │ │ │ +dune-geometry: hcubetriangulation.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -76,67 +76,68 @@ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ Macros | │ │ │ Functions
│ │ │ -
prismtriangulation.cc File Reference
│ │ │ +
hcubetriangulation.cc File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/common/fvector.hh>
│ │ │ -#include <dune/common/typetraits.hh>
│ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ -#include "base.cc"
│ │ │ -#include "simplex.cc"
│ │ │ + │ │ │ +

This file contains the Refinement implementation for triangulating hypercubes (quadrilateral -> triangle, hexahedron -> tetrahedron). │ │ │ +More...

│ │ │ +
#include <dune/geometry/referenceelements.hh>
│ │ │ +#include <dune/geometry/type.hh>
│ │ │ +#include "base.cc"
│ │ │ +#include "simplex.cc"
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::RefinementImp::PrismTriangulation::RefinementImp< dimension_, CoordType >
 Implementation of the refinement of a prism into simplices. More...
struct  Dune::RefinementImp::PrismTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
class  Dune::RefinementImp::PrismTriangulation::RefinementIteratorSpecial< dimension, CoordType, dimension >
class  Dune::RefinementImp::PrismTriangulation::RefinementIteratorSpecial< dimension, CoordType, 0 >
class  Dune::RefinementImp::PrismTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
class  Dune::RefinementImp::HCubeTriangulation::RefinementImp< dimension_, CoordType >
struct  Dune::RefinementImp::HCubeTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
class  Dune::RefinementImp::HCubeTriangulation::RefinementIteratorSpecial< dimension, CoordType, dimension >
class  Dune::RefinementImp::HCubeTriangulation::RefinementIteratorSpecial< dimension, CoordType, 0 >
class  Dune::RefinementImp::HCubeTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::RefinementImp
 This namespace contains the implementation of Refinement.
namespace  Dune::RefinementImp::PrismTriangulation
 This namespace contains the Refinement implementation for triangulating prisms (GeometryType::prism -> GeometryType::simplex).
namespace  Dune::RefinementImp::HCubeTriangulation
 This namespace contains the Refinement implementation for triangulating hypercubes (GeometryType::cube -> GeometryType::simplex).
│ │ │ │ │ │ - │ │ │ + │ │ │

│ │ │ Macros

#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC
#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC
│ │ │ │ │ │ - │ │ │ - │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │

│ │ │ Functions

template<int dimension, class CoordType>
FieldVector< CoordType, dimension > Dune::RefinementImp::PrismTriangulation::transformCoordinate (FieldVector< CoordType, dimension > point)
template<int n>
FieldVector< int, n > Dune::RefinementImp::PrismTriangulation::getPermutation (int m)
FieldVector< int, n > Dune::RefinementImp::HCubeTriangulation::getPermutation (int m)
 Calculate permutation from it's index.
template<int dimension, class CoordType>
FieldVector< CoordType, dimension > Dune::RefinementImp::PrismTriangulation::referenceToKuhn (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
FieldVector< CoordType, dimension > Dune::RefinementImp::HCubeTriangulation::referenceToKuhn (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
 Map from the reference simplex to some Kuhn simplex.
│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC

│ │ │ +

Detailed Description

│ │ │ +

This file contains the Refinement implementation for triangulating hypercubes (quadrilateral -> triangle, hexahedron -> tetrahedron).

│ │ │ +

See Refinement implementation for triangulating hypercubes.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │
#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -2,58 +2,57 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ * _r_e_f_i_n_e_m_e_n_t │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -prismtriangulation.cc File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +hcubetriangulation.cc File Reference │ │ │ │ +This file contains the _R_e_f_i_n_e_m_e_n_t implementation for triangulating hypercubes │ │ │ │ +(quadrilateral -> triangle, hexahedron -> tetrahedron). _M_o_r_e_._._. │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ #include "_b_a_s_e_._c_c" │ │ │ │ #include "_s_i_m_p_l_e_x_._c_c" │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ -  Implementation of the refinement of a prism into simplices. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ +struct   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ _C_o_o_r_d_T_y_p_e_ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _> │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ _C_o_o_r_d_T_y_p_e_ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │   This namespace contains the implementation of _R_e_f_i_n_e_m_e_n_t. │ │ │ │ -namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ +namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ This namespace contains the _R_e_f_i_n_e_m_e_n_t implementation for │ │ │ │ -  triangulating prisms (_G_e_o_m_e_t_r_y_T_y_p_e_:_:_p_r_i_s_m -> _G_e_o_m_e_t_r_y_T_y_p_e_:_: │ │ │ │ +  triangulating hypercubes (_G_e_o_m_e_t_r_y_T_y_p_e_:_:_c_u_b_e -> _G_e_o_m_e_t_r_y_T_y_p_e_:_: │ │ │ │ _s_i_m_p_l_e_x). │ │ │ │ MMaaccrrooss │ │ │ │ -#define  _D_U_N_E___G_E_O_M_E_T_R_Y___R_E_F_I_N_E_M_E_N_T___P_R_I_S_M_T_R_I_A_N_G_U_L_A_T_I_O_N___C_C │ │ │ │ +#define  _D_U_N_E___G_E_O_M_E_T_R_Y___R_E_F_I_N_E_M_E_N_T___H_C_U_B_E_T_R_I_A_N_G_U_L_A_T_I_O_N___C_C │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_: │ │ │ │ - _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e (FieldVector< │ │ │ │ - CoordType, dimension > point) │ │ │ │ template │ │ │ │ - FieldVector< int, n >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_: │ │ │ │ + FieldVector< int, n >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_: │ │ │ │ _g_e_t_P_e_r_m_u_t_a_t_i_o_n (int m) │ │ │ │   Calculate permutation from it's index. │ │ │ │ template │ │ │ │ -FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_: │ │ │ │ +FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_: │ │ │ │ _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n (FieldVector< CoordType, │ │ │ │ dimension > point, const FieldVector< int, │ │ │ │ dimension > &kuhn) │ │ │ │   Map from the reference simplex to some │ │ │ │ Kuhn simplex. │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +This file contains the _R_e_f_i_n_e_m_e_n_t implementation for triangulating hypercubes │ │ │ │ +(quadrilateral -> triangle, hexahedron -> tetrahedron). │ │ │ │ +See _R_e_f_i_n_e_m_e_n_t_ _i_m_p_l_e_m_e_n_t_a_t_i_o_n_ _f_o_r_ _t_r_i_a_n_g_u_l_a_t_i_n_g_ _h_y_p_e_r_c_u_b_e_s. │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__PPRRIISSMMTTRRIIAANNGGUULLAATTIIOONN__CCCC ********** │ │ │ │ -#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC │ │ │ │ +********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__HHCCUUBBEETTRRIIAANNGGUULLAATTIIOONN__CCCC ********** │ │ │ │ +#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00203_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: prismtriangulation.cc Source File │ │ │ +dune-geometry: hcubetriangulation.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,533 +71,523 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
prismtriangulation.cc
│ │ │ +
hcubetriangulation.cc
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC
│ │ │ -
6#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC
│ │ │ -
7
│ │ │ -
8#include <dune/common/fvector.hh>
│ │ │ -
9#include <dune/common/typetraits.hh>
│ │ │ -
10
│ │ │ - │ │ │ -
12#include <dune/geometry/type.hh>
│ │ │ -
13
│ │ │ -
14#include "base.cc"
│ │ │ -
15#include "simplex.cc"
│ │ │ -
16
│ │ │ -
17namespace Dune
│ │ │ -
18{
│ │ │ -
19 namespace RefinementImp
│ │ │ -
20 {
│ │ │ -
│ │ │ - │ │ │ -
27 {
│ │ │ -
28 // ////////////
│ │ │ -
29 //
│ │ │ -
30 // Utilities
│ │ │ -
31 //
│ │ │ -
32
│ │ │ - │ │ │ - │ │ │ -
35
│ │ │ -
36 // ////////////////////////////////////
│ │ │ -
37 //
│ │ │ -
38 // Refine a prism with simplices
│ │ │ -
39 //
│ │ │ -
40
│ │ │ -
41 // forward declaration of the iterator base
│ │ │ -
42 template<int dimension, class CoordType, int codimension>
│ │ │ - │ │ │ -
44 /*
│ │ │ -
45 * The permutations 0,2 and 3 of the Kuhn-decomposition of a cube into simplices form a prism.
│ │ │ -
46 * The resulting prism is not oriented the same as the reference prism and so the Kuhn-coordinates
│ │ │ -
47 * have to be transformed using the method below.
│ │ │ -
48 */
│ │ │ -
49 template<int dimension, class CoordType> FieldVector<CoordType, dimension>
│ │ │ -
│ │ │ -
50 transformCoordinate(FieldVector<CoordType, dimension> point)
│ │ │ -
51 {
│ │ │ -
52 FieldVector<CoordType, dimension> transform;
│ │ │ -
53 transform[0] = point[1];
│ │ │ -
54 transform[1] = 1 - point[0];
│ │ │ -
55 transform[2] = point[2];
│ │ │ -
56 return transform;
│ │ │ -
57 }
│ │ │ -
│ │ │ -
58
│ │ │ +
5#ifndef DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC
│ │ │ +
6#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC
│ │ │ +
7
│ │ │ +
16
│ │ │ +
28
│ │ │ + │ │ │ +
30#include <dune/geometry/type.hh>
│ │ │ +
31
│ │ │ +
32#include "base.cc"
│ │ │ +
33#include "simplex.cc"
│ │ │ +
34
│ │ │ +
35namespace Dune
│ │ │ +
36{
│ │ │ +
37 namespace RefinementImp
│ │ │ +
38 {
│ │ │ +
│ │ │ + │ │ │ +
47
│ │ │ +
48 // ////////////
│ │ │ +
49 //
│ │ │ +
50 // Utilities
│ │ │ +
51 //
│ │ │ +
52
│ │ │ + │ │ │ + │ │ │ +
55
│ │ │ +
56 // ////////////////////////////////////
│ │ │ +
57 //
│ │ │ +
58 // Refine a hypercube with simplices
│ │ │ +
59 //
│ │ │ +
60
│ │ │ +
61 // forward declaration of the iterator base
│ │ │ +
62 template<int dimension, class CoordType, int codimension>
│ │ │ + │ │ │ +
64
│ │ │
65 template<int dimension_, class CoordType>
│ │ │
│ │ │ - │ │ │ + │ │ │
67 {
│ │ │
68 public:
│ │ │ -
69 constexpr static int dimension = dimension_;
│ │ │ +
69 constexpr static int dimension = dimension_;
│ │ │
70
│ │ │ -
71 typedef CoordType ctype;
│ │ │ +
71 typedef CoordType ctype;
│ │ │
72
│ │ │
73 template<int codimension>
│ │ │ -
74 struct Codim;
│ │ │ - │ │ │ -
76 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ - │ │ │ -
78 typedef FieldVector<int, dimension+1> IndexVector;
│ │ │ +
74 struct Codim;
│ │ │ + │ │ │ +
76 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ + │ │ │ +
78 typedef FieldVector<int, dimension+1> IndexVector;
│ │ │
79
│ │ │ -
80 static int nVertices(int nIntervals);
│ │ │ -
81 static VertexIterator vBegin(int nIntervals);
│ │ │ -
82 static VertexIterator vEnd(int nIntervals);
│ │ │ +
80 static int nVertices(int nIntervals);
│ │ │ +
81 static VertexIterator vBegin(int nIntervals);
│ │ │ +
82 static VertexIterator vEnd(int nIntervals);
│ │ │
83
│ │ │ -
84 static int nElements(int nIntervals);
│ │ │ -
85 static ElementIterator eBegin(int nIntervals);
│ │ │ -
86 static ElementIterator eEnd(int nIntervals);
│ │ │ -
87
│ │ │ -
88 private:
│ │ │ -
89 friend class RefinementIteratorSpecial<dimension, CoordType, 0>;
│ │ │ -
90 friend class RefinementIteratorSpecial<dimension, CoordType, dimension>;
│ │ │ -
91
│ │ │ -
92 typedef Simplex::RefinementImp<dimension, CoordType> BackendRefinement;
│ │ │ -
93 };
│ │ │ -
│ │ │ -
94
│ │ │ -
95 template<int dimension, class CoordType>
│ │ │ -
96 template<int codimension>
│ │ │ -
│ │ │ -
97 struct RefinementImp<dimension, CoordType>::Codim
│ │ │ -
98 {
│ │ │ - │ │ │ - │ │ │ -
101 };
│ │ │ -
│ │ │ -
102
│ │ │ -
103 template<int dimension, class CoordType>
│ │ │ -
104 int
│ │ │ -
│ │ │ - │ │ │ -
106 nVertices(int nIntervals)
│ │ │ -
107 {
│ │ │ -
108 return BackendRefinement::nVertices(nIntervals) * 3;
│ │ │ -
109 }
│ │ │ -
│ │ │ -
110
│ │ │ -
111 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
114 vBegin(int nIntervals)
│ │ │ -
115 {
│ │ │ -
116 return VertexIterator(nIntervals);
│ │ │ -
117 }
│ │ │ -
│ │ │ -
118
│ │ │ -
119 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
122 vEnd(int nIntervals)
│ │ │ -
123 {
│ │ │ -
124 return VertexIterator(nIntervals, true);
│ │ │ -
125 }
│ │ │ -
│ │ │ -
126
│ │ │ -
127 template<int dimension, class CoordType>
│ │ │ -
128 int
│ │ │ -
│ │ │ - │ │ │ -
130 nElements(int nIntervals)
│ │ │ -
131 {
│ │ │ -
132 return BackendRefinement::nElements(nIntervals) * 3;
│ │ │ -
133 }
│ │ │ -
│ │ │ -
134
│ │ │ -
135 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
138 eBegin(int nIntervals)
│ │ │ -
139 {
│ │ │ -
140 return ElementIterator(nIntervals);
│ │ │ -
141 }
│ │ │ -
│ │ │ -
142
│ │ │ -
143 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
146 eEnd(int nIntervals)
│ │ │ -
147 {
│ │ │ -
148 return ElementIterator(nIntervals, true);
│ │ │ -
149 }
│ │ │ -
│ │ │ -
150
│ │ │ -
151 // //////////////
│ │ │ -
152 //
│ │ │ -
153 // The iterator
│ │ │ -
154 //
│ │ │ -
155
│ │ │ -
156 // vertices
│ │ │ -
157 template<int dimension, class CoordType>
│ │ │ -
│ │ │ -
158 class RefinementIteratorSpecial<dimension, CoordType, dimension>
│ │ │ -
159 {
│ │ │ -
160 public:
│ │ │ - │ │ │ - │ │ │ -
163 typedef typename Refinement::template Codim<dimension>::Geometry Geometry;
│ │ │ -
164
│ │ │ -
165 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ -
166
│ │ │ -
167 void increment();
│ │ │ -
168
│ │ │ -
169 CoordVector coords() const;
│ │ │ -
170 Geometry geometry () const;
│ │ │ +
84 static int nElements(int nIntervals);
│ │ │ +
85 static ElementIterator eBegin(int nIntervals);
│ │ │ +
86 static ElementIterator eEnd(int nIntervals);
│ │ │ +
87 private:
│ │ │ +
88 friend class RefinementIteratorSpecial<dimension, CoordType, 0>;
│ │ │ +
89 friend class RefinementIteratorSpecial<dimension, CoordType, dimension>;
│ │ │ +
90
│ │ │ +
91 typedef Simplex::RefinementImp<dimension, CoordType> BackendRefinement;
│ │ │ +
92 };
│ │ │ +
│ │ │ +
93
│ │ │ +
94 template<int dimension, class CoordType>
│ │ │ +
95 template<int codimension>
│ │ │ +
│ │ │ +
96 struct RefinementImp<dimension, CoordType>::Codim
│ │ │ +
97 {
│ │ │ + │ │ │ +
99 typedef Dune::MultiLinearGeometry<CoordType,dimension-codimension,dimension> Geometry;
│ │ │ +
100 };
│ │ │ +
│ │ │ +
101
│ │ │ +
102 template<int dimension, class CoordType>
│ │ │ +
103 int
│ │ │ +
│ │ │ + │ │ │ +
105 nVertices(int nIntervals)
│ │ │ +
106 {
│ │ │ +
107 return BackendRefinement::nVertices(nIntervals) * factorial(int(dimension));
│ │ │ +
108 }
│ │ │ +
│ │ │ +
109
│ │ │ +
110 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
113 vBegin(int nIntervals)
│ │ │ +
114 {
│ │ │ +
115 return VertexIterator(nIntervals);
│ │ │ +
116 }
│ │ │ +
│ │ │ +
117
│ │ │ +
118 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
121 vEnd(int nIntervals)
│ │ │ +
122 {
│ │ │ +
123 return VertexIterator(nIntervals, true);
│ │ │ +
124 }
│ │ │ +
│ │ │ +
125
│ │ │ +
126 template<int dimension, class CoordType>
│ │ │ +
127 int
│ │ │ +
│ │ │ + │ │ │ +
129 nElements(int nIntervals)
│ │ │ +
130 {
│ │ │ +
131 return BackendRefinement::nElements(nIntervals) * factorial(int(dimension));
│ │ │ +
132 }
│ │ │ +
│ │ │ +
133
│ │ │ +
134 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
137 eBegin(int nIntervals)
│ │ │ +
138 {
│ │ │ +
139 return ElementIterator(nIntervals);
│ │ │ +
140 }
│ │ │ +
│ │ │ +
141
│ │ │ +
142 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
145 eEnd(int nIntervals)
│ │ │ +
146 {
│ │ │ +
147 return ElementIterator(nIntervals, true);
│ │ │ +
148 }
│ │ │ +
│ │ │ +
149
│ │ │ +
150 // //////////////
│ │ │ +
151 //
│ │ │ +
152 // The iterator
│ │ │ +
153 //
│ │ │ +
154
│ │ │ +
155 // vertices
│ │ │ +
156 template<int dimension, class CoordType>
│ │ │ +
│ │ │ +
157 class RefinementIteratorSpecial<dimension, CoordType, dimension>
│ │ │ +
158 {
│ │ │ +
159 public:
│ │ │ + │ │ │ + │ │ │ +
162 typedef typename Refinement::template Codim<dimension>::Geometry Geometry;
│ │ │ +
163
│ │ │ +
164 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ +
165
│ │ │ +
166 void increment();
│ │ │ +
167
│ │ │ +
168 CoordVector coords() const;
│ │ │ +
169
│ │ │ +
170 Geometry geometry() const;
│ │ │
171
│ │ │ -
172 int index() const;
│ │ │ +
172 int index() const;
│ │ │
173 protected:
│ │ │ -
174 typedef typename Refinement::BackendRefinement BackendRefinement;
│ │ │ -
175 typedef typename BackendRefinement::template Codim<dimension>::SubEntityIterator BackendIterator;
│ │ │ -
176 constexpr static int nKuhnSimplices = 3;
│ │ │ +
174 typedef typename Refinement::BackendRefinement BackendRefinement;
│ │ │ +
175 typedef typename BackendRefinement::template Codim<dimension>::SubEntityIterator BackendIterator;
│ │ │ +
176 constexpr static int nKuhnSimplices = factorial(int(dimension));
│ │ │
177
│ │ │ - │ │ │ + │ │ │
179
│ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │
183 };
│ │ │
│ │ │
184
│ │ │
185 template<int dimension, class CoordType>
│ │ │
│ │ │ - │ │ │ -
187 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ -
188 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ - │ │ │ - │ │ │ + │ │ │ +
187 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ +
188 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ + │ │ │ + │ │ │
191 {
│ │ │
192 if (end)
│ │ │ - │ │ │ + │ │ │
194 }
│ │ │
│ │ │
195
│ │ │
196 template<int dimension, class CoordType>
│ │ │
197 void
│ │ │
│ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │
200 {
│ │ │ -
201 ++backend;
│ │ │ -
202 if (backend == backendEnd)
│ │ │ +
201 ++backend;
│ │ │ +
202 if (backend == backendEnd)
│ │ │
203 {
│ │ │ - │ │ │ -
205 ++kuhnIndex;
│ │ │ + │ │ │ +
205 ++kuhnIndex;
│ │ │
206 }
│ │ │
207 }
│ │ │
│ │ │
208
│ │ │
209 template<int dimension, class CoordType>
│ │ │ - │ │ │ + │ │ │
│ │ │ - │ │ │ -
212 coords() const
│ │ │ + │ │ │ +
212 coords() const
│ │ │
213 {
│ │ │ -
214 // while the kuhnIndex runs from 0,1,2 the actual permutations we need are 0,2,3
│ │ │ - │ │ │ - │ │ │ -
217 }
│ │ │ -
│ │ │ -
218
│ │ │ -
219 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
222 {
│ │ │ -
223 std::vector<CoordVector> corners(1);
│ │ │ -
224 corners[0] = transformCoordinate(referenceToKuhn(backend.coords(),
│ │ │ - │ │ │ -
226 return Geometry(GeometryTypes::vertex, corners);
│ │ │ -
227 }
│ │ │ -
│ │ │ -
228
│ │ │ -
229 template<int dimension, class CoordType>
│ │ │ -
230 int
│ │ │ -
│ │ │ - │ │ │ -
232 index() const
│ │ │ -
233 {
│ │ │ - │ │ │ -
235 }
│ │ │ -
│ │ │ -
236
│ │ │ -
237 // elements
│ │ │ -
238 template<int dimension, class CoordType>
│ │ │ -
│ │ │ -
239 class RefinementIteratorSpecial<dimension, CoordType, 0>
│ │ │ -
240 {
│ │ │ -
241 public:
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
245 typedef typename Refinement::template Codim<0>::Geometry Geometry;
│ │ │ + │ │ │ +
215 }
│ │ │ +
│ │ │ +
216
│ │ │ +
217 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
220 {
│ │ │ +
221 std::vector<CoordVector> corners(1);
│ │ │ + │ │ │ +
223 return Geometry(GeometryTypes::vertex, corners);
│ │ │ +
224 }
│ │ │ +
│ │ │ +
225
│ │ │ +
226 template<int dimension, class CoordType>
│ │ │ +
227 int
│ │ │ +
│ │ │ + │ │ │ +
229 index() const
│ │ │ +
230 {
│ │ │ + │ │ │ +
232 }
│ │ │ +
│ │ │ +
233
│ │ │ +
234 // elements
│ │ │ +
235 template<int dimension, class CoordType>
│ │ │ +
│ │ │ +
236 class RefinementIteratorSpecial<dimension, CoordType, 0>
│ │ │ +
237 {
│ │ │ +
238 public:
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
242 typedef typename Refinement::template Codim<0>::Geometry Geometry;
│ │ │ +
243
│ │ │ +
244 RefinementIteratorSpecial(int nIntervals_, bool end = false);
│ │ │ + │ │ │
246
│ │ │ -
247 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ +
247 void increment();
│ │ │
248
│ │ │ -
249 void increment();
│ │ │ -
250
│ │ │ - │ │ │ -
252 int index() const;
│ │ │ -
253 CoordVector coords() const;
│ │ │ + │ │ │ +
250 int index() const;
│ │ │ +
251 CoordVector coords() const;
│ │ │ +
252
│ │ │ +
253 Geometry geometry() const;
│ │ │
254
│ │ │ -
255 Geometry geometry () const;
│ │ │ -
256
│ │ │ -
257 private:
│ │ │ -
258 CoordVector global(const CoordVector &local) const;
│ │ │ -
259
│ │ │ -
260 protected:
│ │ │ -
261 typedef typename Refinement::BackendRefinement BackendRefinement;
│ │ │ -
262 typedef typename BackendRefinement::template Codim<0>::SubEntityIterator BackendIterator;
│ │ │ -
263 constexpr static int nKuhnSimplices = 3;
│ │ │ +
255 private:
│ │ │ +
256 CoordVector global(const CoordVector &local) const;
│ │ │ +
257
│ │ │ +
258 protected:
│ │ │ +
259 typedef typename Refinement::BackendRefinement BackendRefinement;
│ │ │ +
260 typedef typename BackendRefinement::template Codim<0>::SubEntityIterator BackendIterator;
│ │ │ +
261 constexpr static int nKuhnSimplices = factorial(dimension);
│ │ │ +
262
│ │ │ + │ │ │
264
│ │ │ - │ │ │ -
266
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
270 };
│ │ │ -
│ │ │ -
271
│ │ │ -
272 template<int dimension, class CoordType>
│ │ │ -
│ │ │ - │ │ │ -
274 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ -
275 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ - │ │ │ - │ │ │ -
278 {
│ │ │ -
279 if (end)
│ │ │ - │ │ │ -
281 }
│ │ │ -
│ │ │ -
282
│ │ │ -
283 template<int dimension, class CoordType>
│ │ │ -
284 void
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
287 {
│ │ │ -
288 ++backend;
│ │ │ -
289 if (backend == backendEnd)
│ │ │ -
290 {
│ │ │ - │ │ │ -
292 ++kuhnIndex;
│ │ │ -
293 }
│ │ │ -
294 }
│ │ │ -
│ │ │ -
295
│ │ │ -
296 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
299 vertexIndices() const
│ │ │ -
300 {
│ │ │ -
301 IndexVector indices = backend.vertexIndices();
│ │ │ -
302
│ │ │ - │ │ │ -
304 indices += base;
│ │ │ -
305
│ │ │ -
306 return indices;
│ │ │ -
307 }
│ │ │ -
│ │ │ -
308
│ │ │ -
309 template<int dimension, class CoordType>
│ │ │ -
310 int
│ │ │ -
│ │ │ - │ │ │ -
312 index() const
│ │ │ -
313 {
│ │ │ - │ │ │ -
315 }
│ │ │ -
│ │ │ -
316
│ │ │ -
317 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
320 coords() const
│ │ │ -
321 {
│ │ │ -
322 return global(backend.coords());
│ │ │ -
323 }
│ │ │ -
│ │ │ -
324
│ │ │ -
325 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
328 {
│ │ │ -
329 const typename BackendIterator::Geometry &bgeo =
│ │ │ -
330 backend.geometry();
│ │ │ -
331 std::vector<CoordVector> corners(dimension+1);
│ │ │ -
332 for(int i = 0; i <= dimension; ++i)
│ │ │ -
333 corners[i] = global(bgeo.corner(i));
│ │ │ -
334
│ │ │ -
335 return Geometry(bgeo.type(), corners);
│ │ │ -
336 }
│ │ │ -
│ │ │ -
337
│ │ │ -
338 template<int dimension, class CoordType>
│ │ │ - │ │ │ - │ │ │ -
341 global(const CoordVector &local) const
│ │ │ -
342 {
│ │ │ -
343 // while the kuhnIndex runs from 0,1,2 the actual permutations we need are 0,2,3
│ │ │ -
344 return transformCoordinate(referenceToKuhn(local, getPermutation<dimension>((kuhnIndex+2)%4)));
│ │ │ -
345 }
│ │ │ -
346
│ │ │ -
347 // common
│ │ │ -
348 template<int dimension, class CoordType>
│ │ │ -
349 template<int codimension>
│ │ │ -
│ │ │ -
350 class RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │ -
351 : public ForwardIteratorFacade<typename RefinementImp<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ -
352 public RefinementIteratorSpecial<dimension, CoordType, codimension>
│ │ │ -
353 {
│ │ │ -
354 public:
│ │ │ - │ │ │ - │ │ │ -
357
│ │ │ -
358 SubEntityIterator(int nIntervals, bool end = false);
│ │ │ -
359
│ │ │ -
360 bool equals(const This &other) const;
│ │ │ -
361 protected:
│ │ │ -
362 using RefinementIteratorSpecial<dimension, CoordType, codimension>::kuhnIndex;
│ │ │ -
363 using RefinementIteratorSpecial<dimension, CoordType, codimension>::backend;
│ │ │ -
364 };
│ │ │ -
│ │ │ -
365
│ │ │ -
366#ifndef DOXYGEN
│ │ │ -
367 template<int dimension, class CoordType>
│ │ │ -
368 template<int codimension>
│ │ │ - │ │ │ -
370 SubEntityIterator(int nIntervals, bool end)
│ │ │ -
371 : RefinementIteratorSpecial<dimension, CoordType, codimension>(nIntervals, end)
│ │ │ -
372 {}
│ │ │ -
373
│ │ │ -
374 template<int dimension, class CoordType>
│ │ │ -
375 template<int codimension>
│ │ │ -
376 bool
│ │ │ - │ │ │ -
378 equals(const This &other) const
│ │ │ -
379 {
│ │ │ -
380 return ((kuhnIndex == other.kuhnIndex) && (backend == other.backend));
│ │ │ -
381 }
│ │ │ -
382#endif
│ │ │ -
383
│ │ │ -
384 } // namespace PrismTriangulation
│ │ │ -
│ │ │ -
385 } // namespace RefinementImp
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
268 };
│ │ │ +
│ │ │ +
269
│ │ │ +
270 template<int dimension, class CoordType>
│ │ │ +
│ │ │ + │ │ │ +
272 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ +
273 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ + │ │ │ + │ │ │ +
276 {
│ │ │ +
277 if (end)
│ │ │ + │ │ │ +
279 }
│ │ │ +
│ │ │ +
280 template<int dimension, class CoordType>
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
284 backend(other.backend),
│ │ │ + │ │ │ +
286 {}
│ │ │ +
│ │ │ +
287
│ │ │ +
288 template<int dimension, class CoordType>
│ │ │ +
289 void
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
292 {
│ │ │ +
293 ++backend;
│ │ │ +
294 if (backend == backendEnd)
│ │ │ +
295 {
│ │ │ + │ │ │ +
297 ++kuhnIndex;
│ │ │ +
298 }
│ │ │ +
299 }
│ │ │ +
│ │ │ +
300
│ │ │ +
301 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
304 vertexIndices() const
│ │ │ +
305 {
│ │ │ +
306 IndexVector indices = backend.vertexIndices();
│ │ │ +
307
│ │ │ + │ │ │ +
309 indices += base;
│ │ │ +
310
│ │ │ +
311 return indices;
│ │ │ +
312 }
│ │ │ +
│ │ │ +
313
│ │ │ +
314 template<int dimension, class CoordType>
│ │ │ +
315 int
│ │ │ +
│ │ │ + │ │ │ +
317 index() const
│ │ │ +
318 {
│ │ │ + │ │ │ +
320 }
│ │ │ +
│ │ │ +
321
│ │ │ +
322 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
325 coords() const
│ │ │ +
326 {
│ │ │ +
327 return global(backend.coords());
│ │ │ +
328 }
│ │ │ +
│ │ │ +
329
│ │ │ +
330 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
333 {
│ │ │ +
334 const typename BackendIterator::Geometry &bgeo =
│ │ │ +
335 backend.geometry();
│ │ │ +
336 std::vector<CoordVector> corners(dimension+1);
│ │ │ +
337 for(int i = 0; i <= dimension; ++i)
│ │ │ +
338 corners[i] = global(bgeo.corner(i));
│ │ │ +
339
│ │ │ +
340 return Geometry(bgeo.type(), corners);
│ │ │ +
341 }
│ │ │ +
│ │ │ +
342
│ │ │ +
343 template<int dimension, class CoordType>
│ │ │ + │ │ │ + │ │ │ +
346 global(const CoordVector &local) const
│ │ │ +
347 {
│ │ │ +
348 return referenceToKuhn(local, getPermutation<dimension>(kuhnIndex));
│ │ │ +
349 }
│ │ │ +
350
│ │ │ +
351 // common
│ │ │ +
352 template<int dimension, class CoordType>
│ │ │ +
353 template<int codimension>
│ │ │ +
│ │ │ +
354 class RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │ +
355 : public ForwardIteratorFacade<typename RefinementImp<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ +
356 public RefinementIteratorSpecial<dimension, CoordType, codimension>
│ │ │ +
357 {
│ │ │ +
358 public:
│ │ │ + │ │ │ + │ │ │ +
361
│ │ │ +
362 SubEntityIterator(int nIntervals, bool end = false);
│ │ │ +
363
│ │ │ +
364 bool equals(const This &other) const;
│ │ │ +
365 protected:
│ │ │ +
366 using RefinementIteratorSpecial<dimension, CoordType, codimension>::kuhnIndex;
│ │ │ +
367 using RefinementIteratorSpecial<dimension, CoordType, codimension>::backend;
│ │ │ +
368 };
│ │ │ +
│ │ │ +
369
│ │ │ +
370#ifndef DOXYGEN
│ │ │ +
371 template<int dimension, class CoordType>
│ │ │ +
372 template<int codimension>
│ │ │ + │ │ │ +
374 SubEntityIterator(int nIntervals, bool end)
│ │ │ +
375 : RefinementIteratorSpecial<dimension, CoordType, codimension>(nIntervals, end)
│ │ │ +
376 {}
│ │ │ +
377
│ │ │ +
378 template<int dimension, class CoordType>
│ │ │ +
379 template<int codimension>
│ │ │ +
380 bool
│ │ │ + │ │ │ +
382 equals(const This &other) const
│ │ │ +
383 { return kuhnIndex == other.kuhnIndex && backend == other.backend; }
│ │ │ +
384
│ │ │ +
385#endif // DOXYGEN
│ │ │
386
│ │ │ -
387 namespace RefinementImp
│ │ │ -
388 {
│ │ │ -
389 // ///////////////////////
│ │ │ -
390 //
│ │ │ -
391 // The refinement traits
│ │ │ -
392 //
│ │ │ -
393
│ │ │ -
394#ifndef DOXYGEN
│ │ │ -
395 template<unsigned topologyId, class CoordType, unsigned coerceToId>
│ │ │ -
396 struct Traits<
│ │ │ -
397 topologyId, CoordType, coerceToId, 3,
│ │ │ -
398 typename std::enable_if<
│ │ │ -
399 (GeometryTypes::prism.id() >> 1) ==
│ │ │ -
400 (topologyId >> 1) &&
│ │ │ -
401 (GeometryTypes::simplex(3).id() >> 1) ==
│ │ │ -
402 (coerceToId >> 1)
│ │ │ -
403 >::type>
│ │ │ -
404 {
│ │ │ -
405 typedef PrismTriangulation::RefinementImp<3, CoordType> Imp;
│ │ │ -
406 };
│ │ │ -
407#endif
│ │ │ -
408
│ │ │ -
409 } // namespace RefinementImp
│ │ │ -
410} // namespace Dune
│ │ │ -
411
│ │ │ -
412#endif // DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ -
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │ -
This file contains the parts independent of a particular Refinement implementation.
│ │ │ - │ │ │ +
387 } // namespace HCubeTriangulation
│ │ │ +
│ │ │ +
388 } // namespace RefinementImp
│ │ │ +
389
│ │ │ +
390 namespace RefinementImp
│ │ │ +
391 {
│ │ │ +
392 // ///////////////////////
│ │ │ +
393 //
│ │ │ +
394 // The refinement traits
│ │ │ +
395 //
│ │ │ +
396
│ │ │ +
397#ifndef DOXYGEN
│ │ │ +
398 template<unsigned topologyId, class CoordType, unsigned coerceToId,
│ │ │ +
399 int dim>
│ │ │ +
400 struct Traits<
│ │ │ +
401 topologyId, CoordType, coerceToId, dim,
│ │ │ +
402 typename std::enable_if<
│ │ │ +
403 (dim >= 2 &&
│ │ │ +
404 (GeometryTypes::cube(dim).id() >> 1) ==
│ │ │ +
405 (topologyId >> 1) &&
│ │ │ +
406 (GeometryTypes::simplex(dim).id() >> 1) ==
│ │ │ +
407 (coerceToId >> 1)
│ │ │ +
408 )>::type
│ │ │ +
409 >
│ │ │ +
410 {
│ │ │ +
411 typedef HCubeTriangulation::RefinementImp<dim, CoordType> Imp;
│ │ │ +
412 };
│ │ │ +
413#endif
│ │ │ +
414
│ │ │ +
415 } // namespace RefinementImp
│ │ │ +
416} // namespace Dune
│ │ │ +
417
│ │ │ +
418#endif // DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ + │ │ │ +
This file contains the parts independent of a particular Refinement implementation.
│ │ │ +
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │
constexpr GeometryType vertex
GeometryType representing a vertex.
Definition type.hh:492
│ │ │
STL namespace.
│ │ │
Definition affinegeometry.hh:22
│ │ │ -
This namespace contains the Refinement implementation for triangulating prisms (GeometryType::prism -...
Definition prismtriangulation.cc:27
│ │ │ -
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:293
│ │ │ -
FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from the reference simplex to some Kuhn simplex.
Definition simplex.cc:322
│ │ │ -
FieldVector< CoordType, dimension > transformCoordinate(FieldVector< CoordType, dimension > point)
Definition prismtriangulation.cc:50
│ │ │ +
This namespace contains the Refinement implementation for triangulating hypercubes (GeometryType::cub...
Definition hcubetriangulation.cc:46
│ │ │ +
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:293
│ │ │ +
FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from the reference simplex to some Kuhn simplex.
Definition simplex.cc:322
│ │ │
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:293
│ │ │
FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from the reference simplex to some Kuhn simplex.
Definition simplex.cc:322
│ │ │
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │
generic geometry implementation based on corner coordinates
Definition multilineargeometry.hh:181
│ │ │ - │ │ │ -
Implementation of the refinement of a prism into simplices.
Definition prismtriangulation.cc:67
│ │ │ - │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition prismtriangulation.cc:355
│ │ │ -
static constexpr int dimension
Definition prismtriangulation.cc:69
│ │ │ -
CoordType ctype
Definition prismtriangulation.cc:71
│ │ │ -
static VertexIterator vEnd(int nIntervals)
Definition prismtriangulation.cc:122
│ │ │ -
FieldVector< int, dimension+1 > IndexVector
Definition prismtriangulation.cc:78
│ │ │ -
static ElementIterator eEnd(int nIntervals)
Definition prismtriangulation.cc:146
│ │ │ -
static int nVertices(int nIntervals)
Definition prismtriangulation.cc:106
│ │ │ -
FieldVector< CoordType, dimension > CoordVector
Definition prismtriangulation.cc:76
│ │ │ -
static int nElements(int nIntervals)
Definition prismtriangulation.cc:130
│ │ │ - │ │ │ -
Codim< 0 >::SubEntityIterator ElementIterator
Definition prismtriangulation.cc:77
│ │ │ -
Codim< dimension >::SubEntityIterator VertexIterator
Definition prismtriangulation.cc:75
│ │ │ -
static ElementIterator eBegin(int nIntervals)
Definition prismtriangulation.cc:138
│ │ │ -
static VertexIterator vBegin(int nIntervals)
Definition prismtriangulation.cc:114
│ │ │ - │ │ │ - │ │ │ -
Dune::MultiLinearGeometry< CoordType, dimension-codimension, dimension > Geometry
Definition prismtriangulation.cc:100
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
Refinement::template Codim< dimension >::Geometry Geometry
Definition prismtriangulation.cc:163
│ │ │ -
Refinement::BackendRefinement BackendRefinement
Definition prismtriangulation.cc:174
│ │ │ -
BackendRefinement::template Codim< dimension >::SubEntityIterator BackendIterator
Definition prismtriangulation.cc:175
│ │ │ - │ │ │ - │ │ │ -
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition prismtriangulation.cc:187
│ │ │ - │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition prismtriangulation.cc:161
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
Refinement::template Codim< 0 >::Geometry Geometry
Definition prismtriangulation.cc:245
│ │ │ - │ │ │ - │ │ │ -
Refinement::IndexVector IndexVector
Definition prismtriangulation.cc:243
│ │ │ -
BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator
Definition prismtriangulation.cc:262
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
Refinement::CoordVector CoordVector
Definition prismtriangulation.cc:244
│ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition prismtriangulation.cc:242
│ │ │ - │ │ │ -
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition prismtriangulation.cc:274
│ │ │ - │ │ │ - │ │ │ -
Refinement::BackendRefinement BackendRefinement
Definition prismtriangulation.cc:261
│ │ │ + │ │ │ + │ │ │ +
static VertexIterator vEnd(int nIntervals)
Definition hcubetriangulation.cc:121
│ │ │ +
static VertexIterator vBegin(int nIntervals)
Definition hcubetriangulation.cc:113
│ │ │ +
static int nElements(int nIntervals)
Definition hcubetriangulation.cc:129
│ │ │ + │ │ │ +
FieldVector< CoordType, dimension > CoordVector
Definition hcubetriangulation.cc:76
│ │ │ + │ │ │ + │ │ │ +
CoordType ctype
Definition hcubetriangulation.cc:71
│ │ │ +
Codim< 0 >::SubEntityIterator ElementIterator
Definition hcubetriangulation.cc:77
│ │ │ +
FieldVector< int, dimension+1 > IndexVector
Definition hcubetriangulation.cc:78
│ │ │ +
static ElementIterator eBegin(int nIntervals)
Definition hcubetriangulation.cc:137
│ │ │ +
static ElementIterator eEnd(int nIntervals)
Definition hcubetriangulation.cc:145
│ │ │ +
static constexpr int dimension
Definition hcubetriangulation.cc:69
│ │ │ +
Codim< dimension >::SubEntityIterator VertexIterator
Definition hcubetriangulation.cc:75
│ │ │ +
static int nVertices(int nIntervals)
Definition hcubetriangulation.cc:105
│ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition hcubetriangulation.cc:359
│ │ │ + │ │ │ +
Dune::MultiLinearGeometry< CoordType, dimension-codimension, dimension > Geometry
Definition hcubetriangulation.cc:99
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
Refinement::template Codim< dimension >::Geometry Geometry
Definition hcubetriangulation.cc:162
│ │ │ +
BackendRefinement::template Codim< dimension >::SubEntityIterator BackendIterator
Definition hcubetriangulation.cc:175
│ │ │ +
Refinement::BackendRefinement BackendRefinement
Definition hcubetriangulation.cc:174
│ │ │ + │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition hcubetriangulation.cc:160
│ │ │ + │ │ │ + │ │ │ +
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition hcubetriangulation.cc:187
│ │ │ +
BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator
Definition hcubetriangulation.cc:260
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
RefinementIteratorSpecial(int nIntervals_, bool end=false)
Definition hcubetriangulation.cc:272
│ │ │ +
Refinement::CoordVector CoordVector
Definition hcubetriangulation.cc:241
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
Refinement::BackendRefinement BackendRefinement
Definition hcubetriangulation.cc:259
│ │ │ + │ │ │ +
Refinement::IndexVector IndexVector
Definition hcubetriangulation.cc:240
│ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition hcubetriangulation.cc:239
│ │ │ + │ │ │ +
Refinement::template Codim< 0 >::Geometry Geometry
Definition hcubetriangulation.cc:242
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,72 +1,55 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ * _r_e_f_i_n_e_m_e_n_t │ │ │ │ -prismtriangulation.cc │ │ │ │ +hcubetriangulation.cc │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC │ │ │ │ -_6#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC │ │ │ │ +5#ifndef DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC │ │ │ │ +_6#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ -9#include │ │ │ │ -10 │ │ │ │ -11#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ -12#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -13 │ │ │ │ -14#include "_b_a_s_e_._c_c" │ │ │ │ -15#include "_s_i_m_p_l_e_x_._c_c" │ │ │ │ 16 │ │ │ │ -17namespace _D_u_n_e │ │ │ │ -18{ │ │ │ │ -19 namespace RefinementImp │ │ │ │ -20 { │ │ │ │ -_2_6 namespace _P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ -27 { │ │ │ │ -28 // //////////// │ │ │ │ -29 // │ │ │ │ -30 // Utilities │ │ │ │ -31 // │ │ │ │ -32 │ │ │ │ -33 using _S_i_m_p_l_e_x_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n; │ │ │ │ -34 using _S_i_m_p_l_e_x_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n; │ │ │ │ -35 │ │ │ │ -36 // //////////////////////////////////// │ │ │ │ -37 // │ │ │ │ -38 // Refine a prism with simplices │ │ │ │ -39 // │ │ │ │ -40 │ │ │ │ -41 // forward declaration of the iterator base │ │ │ │ -42 template │ │ │ │ -_4_3 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l; │ │ │ │ -44 /* │ │ │ │ -45 * The permutations 0,2 and 3 of the Kuhn-decomposition of a cube into │ │ │ │ -simplices form a prism. │ │ │ │ -46 * The resulting prism is not oriented the same as the reference prism and so │ │ │ │ -the Kuhn-coordinates │ │ │ │ -47 * have to be transformed using the method below. │ │ │ │ -48 */ │ │ │ │ -49 template FieldVector │ │ │ │ -_5_0 _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e(FieldVector point) │ │ │ │ -51 { │ │ │ │ -52 FieldVector transform; │ │ │ │ -53 transform[0] = point[1]; │ │ │ │ -54 transform[1] = 1 - point[0]; │ │ │ │ -55 transform[2] = point[2]; │ │ │ │ -56 return transform; │ │ │ │ -57 } │ │ │ │ -58 │ │ │ │ +28 │ │ │ │ +29#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +30#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +31 │ │ │ │ +32#include "_b_a_s_e_._c_c" │ │ │ │ +33#include "_s_i_m_p_l_e_x_._c_c" │ │ │ │ +34 │ │ │ │ +35namespace _D_u_n_e │ │ │ │ +36{ │ │ │ │ +37 namespace RefinementImp │ │ │ │ +38 { │ │ │ │ +_4_6 namespace _H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n { │ │ │ │ +47 │ │ │ │ +48 // //////////// │ │ │ │ +49 // │ │ │ │ +50 // Utilities │ │ │ │ +51 // │ │ │ │ +52 │ │ │ │ +53 using _S_i_m_p_l_e_x_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n; │ │ │ │ +54 using _S_i_m_p_l_e_x_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n; │ │ │ │ +55 │ │ │ │ +56 // //////////////////////////////////// │ │ │ │ +57 // │ │ │ │ +58 // Refine a hypercube with simplices │ │ │ │ +59 // │ │ │ │ +60 │ │ │ │ +61 // forward declaration of the iterator base │ │ │ │ +62 template │ │ │ │ +_6_3 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l; │ │ │ │ +64 │ │ │ │ 65 template │ │ │ │ _6_6 class _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ 67 { │ │ │ │ 68 public: │ │ │ │ _6_9 constexpr static int _d_i_m_e_n_s_i_o_n = dimension_; │ │ │ │ 70 │ │ │ │ _7_1 typedef CoordType _c_t_y_p_e; │ │ │ │ @@ -81,106 +64,108 @@ │ │ │ │ _8_0 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ _8_1 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ _8_2 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ 83 │ │ │ │ _8_4 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ _8_5 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_B_e_g_i_n(int nIntervals); │ │ │ │ _8_6 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_E_n_d(int nIntervals); │ │ │ │ -87 │ │ │ │ -88 private: │ │ │ │ -89 friend class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, 0>; │ │ │ │ -90 friend class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, _d_i_m_e_n_s_i_o_n>; │ │ │ │ -91 │ │ │ │ -92 typedef _S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> BackendRefinement; │ │ │ │ -93 }; │ │ │ │ -94 │ │ │ │ -95 template │ │ │ │ -96 template │ │ │ │ -_9_7 struct _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m │ │ │ │ -98 { │ │ │ │ -99 class _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r; │ │ │ │ -_1_0_0 typedef _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ -101 }; │ │ │ │ -102 │ │ │ │ -103 template │ │ │ │ -104 int │ │ │ │ -_1_0_5 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -106_ _n_V_e_r_t_i_c_e_s(int nIntervals) │ │ │ │ -107 { │ │ │ │ -108 return _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(nIntervals) * 3; │ │ │ │ -109 } │ │ │ │ -110 │ │ │ │ -111 template │ │ │ │ -112 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ -_1_1_3 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -114_ _v_B_e_g_i_n(int nIntervals) │ │ │ │ -115 { │ │ │ │ -116 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ -117 } │ │ │ │ -118 │ │ │ │ -119 template │ │ │ │ -120 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ -_1_2_1 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -122_ _v_E_n_d(int nIntervals) │ │ │ │ -123 { │ │ │ │ -124 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ -125 } │ │ │ │ -126 │ │ │ │ -127 template │ │ │ │ -128 int │ │ │ │ -_1_2_9 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -130_ _n_E_l_e_m_e_n_t_s(int nIntervals) │ │ │ │ -131 { │ │ │ │ -132 return _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(nIntervals) * 3; │ │ │ │ -133 } │ │ │ │ -134 │ │ │ │ -135 template │ │ │ │ -136 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ -_1_3_7 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -138_ _e_B_e_g_i_n(int nIntervals) │ │ │ │ -139 { │ │ │ │ -140 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ -141 } │ │ │ │ -142 │ │ │ │ -143 template │ │ │ │ -144 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ -_1_4_5 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -146_ _e_E_n_d(int nIntervals) │ │ │ │ -147 { │ │ │ │ -148 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ -149 } │ │ │ │ -150 │ │ │ │ -151 // ////////////// │ │ │ │ -152 // │ │ │ │ -153 // The iterator │ │ │ │ -154 // │ │ │ │ -155 │ │ │ │ -156 // vertices │ │ │ │ -157 template │ │ │ │ -_1_5_8 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -159 { │ │ │ │ -160 public: │ │ │ │ -_1_6_1 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_1_6_2 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ -_1_6_3 typedef typename Refinement::template _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ -164 │ │ │ │ -165 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ -166 │ │ │ │ -167 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ -168 │ │ │ │ -169 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ -170 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const; │ │ │ │ +87 private: │ │ │ │ +88 friend class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, 0>; │ │ │ │ +89 friend class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, _d_i_m_e_n_s_i_o_n>; │ │ │ │ +90 │ │ │ │ +91 typedef _S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> BackendRefinement; │ │ │ │ +92 }; │ │ │ │ +93 │ │ │ │ +94 template │ │ │ │ +95 template │ │ │ │ +_9_6 struct _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m │ │ │ │ +97 { │ │ │ │ +98 class _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r; │ │ │ │ +_9_9 typedef _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ +_G_e_o_m_e_t_r_y; │ │ │ │ +100 }; │ │ │ │ +101 │ │ │ │ +102 template │ │ │ │ +103 int │ │ │ │ +_1_0_4 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +105_ _n_V_e_r_t_i_c_e_s(int nIntervals) │ │ │ │ +106 { │ │ │ │ +107 return _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(nIntervals) * factorial(int │ │ │ │ +(_d_i_m_e_n_s_i_o_n)); │ │ │ │ +108 } │ │ │ │ +109 │ │ │ │ +110 template │ │ │ │ +111 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ +_1_1_2 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +113_ _v_B_e_g_i_n(int nIntervals) │ │ │ │ +114 { │ │ │ │ +115 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ +116 } │ │ │ │ +117 │ │ │ │ +118 template │ │ │ │ +119 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ +_1_2_0 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +121_ _v_E_n_d(int nIntervals) │ │ │ │ +122 { │ │ │ │ +123 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ +124 } │ │ │ │ +125 │ │ │ │ +126 template │ │ │ │ +127 int │ │ │ │ +_1_2_8 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +129_ _n_E_l_e_m_e_n_t_s(int nIntervals) │ │ │ │ +130 { │ │ │ │ +131 return _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(nIntervals) * factorial(int │ │ │ │ +(_d_i_m_e_n_s_i_o_n)); │ │ │ │ +132 } │ │ │ │ +133 │ │ │ │ +134 template │ │ │ │ +135 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ +_1_3_6 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +137_ _e_B_e_g_i_n(int nIntervals) │ │ │ │ +138 { │ │ │ │ +139 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ +140 } │ │ │ │ +141 │ │ │ │ +142 template │ │ │ │ +143 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ +_1_4_4 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +145_ _e_E_n_d(int nIntervals) │ │ │ │ +146 { │ │ │ │ +147 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ +148 } │ │ │ │ +149 │ │ │ │ +150 // ////////////// │ │ │ │ +151 // │ │ │ │ +152 // The iterator │ │ │ │ +153 // │ │ │ │ +154 │ │ │ │ +155 // vertices │ │ │ │ +156 template │ │ │ │ +_1_5_7 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +158 { │ │ │ │ +159 public: │ │ │ │ +_1_6_0 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_1_6_1 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ +_1_6_2 typedef typename Refinement::template _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ +163 │ │ │ │ +164 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ +165 │ │ │ │ +166 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ +167 │ │ │ │ +168 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ +169 │ │ │ │ +170 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y() const; │ │ │ │ 171 │ │ │ │ 172 int _i_n_d_e_x() const; │ │ │ │ 173 protected: │ │ │ │ _1_7_4 typedef typename Refinement::BackendRefinement _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ _1_7_5 typedef typename BackendRefinement::template _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r; │ │ │ │ -_1_7_6 constexpr static int _n_K_u_h_n_S_i_m_p_l_i_c_e_s = 3; │ │ │ │ +_1_7_6 constexpr static int _n_K_u_h_n_S_i_m_p_l_i_c_e_s = factorial(int(dimension)); │ │ │ │ 177 │ │ │ │ _1_7_8 int _n_I_n_t_e_r_v_a_l_s__; │ │ │ │ 179 │ │ │ │ _1_8_0 int _k_u_h_n_I_n_d_e_x; │ │ │ │ _1_8_1 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d; │ │ │ │ _1_8_2 const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d_E_n_d; │ │ │ │ 183 }; │ │ │ │ @@ -211,262 +196,265 @@ │ │ │ │ 208 │ │ │ │ 209 template │ │ │ │ 210 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ _C_o_o_r_d_V_e_c_t_o_r │ │ │ │ _2_1_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ 212_ _c_o_o_r_d_s() const │ │ │ │ 213 { │ │ │ │ -214 // while the kuhnIndex runs from 0,1,2 the actual permutations we need are │ │ │ │ -0,2,3 │ │ │ │ -215 return _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e(_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(_b_a_c_k_e_n_d.coords(), │ │ │ │ -216 _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>((_k_u_h_n_I_n_d_e_x + 2) % 4))); │ │ │ │ -217 } │ │ │ │ -218 │ │ │ │ -219 template │ │ │ │ -220 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +214 return _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(_b_a_c_k_e_n_d.coords(), _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_> │ │ │ │ +(_k_u_h_n_I_n_d_e_x)); │ │ │ │ +215 } │ │ │ │ +216 │ │ │ │ +217 template │ │ │ │ +218 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ _G_e_o_m_e_t_r_y │ │ │ │ -_2_2_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_:_g_e_o_m_e_t_r_y () │ │ │ │ +_2_1_9 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_:_g_e_o_m_e_t_r_y () │ │ │ │ const │ │ │ │ -222 { │ │ │ │ -223 std::vector corners(1); │ │ │ │ -224 corners[0] = _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e(_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(_b_a_c_k_e_n_d.coords(), │ │ │ │ -225 _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>((_k_u_h_n_I_n_d_e_x + 2) % 4))); │ │ │ │ -226 return _G_e_o_m_e_t_r_y(_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x, corners); │ │ │ │ -227 } │ │ │ │ -228 │ │ │ │ -229 template │ │ │ │ -230 int │ │ │ │ -_2_3_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -232_ _i_n_d_e_x() const │ │ │ │ -233 { │ │ │ │ -234 return _k_u_h_n_I_n_d_e_x*_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(_n_I_n_t_e_r_v_a_l_s__) + _b_a_c_k_e_n_d.index │ │ │ │ +220 { │ │ │ │ +221 std::vector corners(1); │ │ │ │ +222 corners[0] = _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(_b_a_c_k_e_n_d.coords(), _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_> │ │ │ │ +(_k_u_h_n_I_n_d_e_x)); │ │ │ │ +223 return _G_e_o_m_e_t_r_y(_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x, corners); │ │ │ │ +224 } │ │ │ │ +225 │ │ │ │ +226 template │ │ │ │ +227 int │ │ │ │ +_2_2_8 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +229_ _i_n_d_e_x() const │ │ │ │ +230 { │ │ │ │ +231 return _k_u_h_n_I_n_d_e_x*_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(_n_I_n_t_e_r_v_a_l_s__) + _b_a_c_k_e_n_d.index │ │ │ │ (); │ │ │ │ -235 } │ │ │ │ -236 │ │ │ │ -237 // elements │ │ │ │ -238 template │ │ │ │ -_2_3_9 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -240 { │ │ │ │ -241 public: │ │ │ │ -_2_4_2 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_2_4_3 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_I_n_d_e_x_V_e_c_t_o_r _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ -_2_4_4 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ -_2_4_5 typedef typename Refinement::template _C_o_d_i_m_<_0_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ +232 } │ │ │ │ +233 │ │ │ │ +234 // elements │ │ │ │ +235 template │ │ │ │ +_2_3_6 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +237 { │ │ │ │ +238 public: │ │ │ │ +_2_3_9 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_2_4_0 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_I_n_d_e_x_V_e_c_t_o_r _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ +_2_4_1 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ +_2_4_2 typedef typename Refinement::template _C_o_d_i_m_<_0_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ +243 │ │ │ │ +244 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int _n_I_n_t_e_r_v_a_l_s__, bool end = false); │ │ │ │ +245 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(const _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_> &other); │ │ │ │ 246 │ │ │ │ -247 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ +247 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ 248 │ │ │ │ -249 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ -250 │ │ │ │ -251 _I_n_d_e_x_V_e_c_t_o_r _v_e_r_t_e_x_I_n_d_i_c_e_s() const; │ │ │ │ -252 int _i_n_d_e_x() const; │ │ │ │ -253 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ +249 _I_n_d_e_x_V_e_c_t_o_r _v_e_r_t_e_x_I_n_d_i_c_e_s() const; │ │ │ │ +250 int _i_n_d_e_x() const; │ │ │ │ +251 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ +252 │ │ │ │ +253 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y() const; │ │ │ │ 254 │ │ │ │ -255 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const; │ │ │ │ -256 │ │ │ │ -257 private: │ │ │ │ -258 _C_o_o_r_d_V_e_c_t_o_r global(const _C_o_o_r_d_V_e_c_t_o_r &local) const; │ │ │ │ -259 │ │ │ │ -260 protected: │ │ │ │ -_2_6_1 typedef typename Refinement::BackendRefinement _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_2_6_2 typedef typename BackendRefinement::template _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ +255 private: │ │ │ │ +256 _C_o_o_r_d_V_e_c_t_o_r global(const _C_o_o_r_d_V_e_c_t_o_r &local) const; │ │ │ │ +257 │ │ │ │ +258 protected: │ │ │ │ +_2_5_9 typedef typename Refinement::BackendRefinement _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_2_6_0 typedef typename BackendRefinement::template _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r; │ │ │ │ -_2_6_3 constexpr static int _n_K_u_h_n_S_i_m_p_l_i_c_e_s = 3; │ │ │ │ +_2_6_1 constexpr static int _n_K_u_h_n_S_i_m_p_l_i_c_e_s = factorial(dimension); │ │ │ │ +262 │ │ │ │ +_2_6_3 int _n_I_n_t_e_r_v_a_l_s__; │ │ │ │ 264 │ │ │ │ -_2_6_5 int _n_I_n_t_e_r_v_a_l_s__; │ │ │ │ -266 │ │ │ │ -_2_6_7 int _k_u_h_n_I_n_d_e_x; │ │ │ │ -_2_6_8 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d; │ │ │ │ -_2_6_9 const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d_E_n_d; │ │ │ │ -270 }; │ │ │ │ -271 │ │ │ │ -272 template │ │ │ │ -_2_7_3 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -274_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ -275 : _n_I_n_t_e_r_v_a_l_s__(nIntervals), _k_u_h_n_I_n_d_e_x(0), │ │ │ │ -276 _b_a_c_k_e_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eBegin(_n_I_n_t_e_r_v_a_l_s__)), │ │ │ │ -277 _b_a_c_k_e_n_d_E_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eEnd(_n_I_n_t_e_r_v_a_l_s__)) │ │ │ │ -278 { │ │ │ │ -279 if (end) │ │ │ │ -280 _k_u_h_n_I_n_d_e_x = _n_K_u_h_n_S_i_m_p_l_i_c_e_s; │ │ │ │ -281 } │ │ │ │ -282 │ │ │ │ -283 template │ │ │ │ -284 void │ │ │ │ -_2_8_5 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -286_ _i_n_c_r_e_m_e_n_t() │ │ │ │ -287 { │ │ │ │ -288 ++_b_a_c_k_e_n_d; │ │ │ │ -289 if (_b_a_c_k_e_n_d == _b_a_c_k_e_n_d_E_n_d) │ │ │ │ -290 { │ │ │ │ -291 _b_a_c_k_e_n_d = _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ -292 ++_k_u_h_n_I_n_d_e_x; │ │ │ │ -293 } │ │ │ │ -294 } │ │ │ │ -295 │ │ │ │ -296 template │ │ │ │ -297 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ -_2_9_8 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -299_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ -300 { │ │ │ │ -301 _I_n_d_e_x_V_e_c_t_o_r indices = _b_a_c_k_e_n_d.vertexIndices(); │ │ │ │ -302 │ │ │ │ -303 int base = _k_u_h_n_I_n_d_e_x * _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ -304 indices += base; │ │ │ │ -305 │ │ │ │ -306 return indices; │ │ │ │ -307 } │ │ │ │ -308 │ │ │ │ -309 template │ │ │ │ -310 int │ │ │ │ -_3_1_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -312_ _i_n_d_e_x() const │ │ │ │ -313 { │ │ │ │ -314 return _k_u_h_n_I_n_d_e_x*_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(_n_I_n_t_e_r_v_a_l_s__) + _b_a_c_k_e_n_d.index │ │ │ │ +_2_6_5 int _k_u_h_n_I_n_d_e_x; │ │ │ │ +_2_6_6 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d; │ │ │ │ +_2_6_7 const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d_E_n_d; │ │ │ │ +268 }; │ │ │ │ +269 │ │ │ │ +270 template │ │ │ │ +_2_7_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +272_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ +273 : _n_I_n_t_e_r_v_a_l_s__(nIntervals), _k_u_h_n_I_n_d_e_x(0), │ │ │ │ +274 _b_a_c_k_e_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eBegin(_n_I_n_t_e_r_v_a_l_s__)), │ │ │ │ +275 _b_a_c_k_e_n_d_E_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eEnd(_n_I_n_t_e_r_v_a_l_s__)) │ │ │ │ +276 { │ │ │ │ +277 if (end) │ │ │ │ +278 _k_u_h_n_I_n_d_e_x = _n_K_u_h_n_S_i_m_p_l_i_c_e_s; │ │ │ │ +279 } │ │ │ │ +280 template │ │ │ │ +_2_8_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +282_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(const _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_> &other) │ │ │ │ +283 : _n_I_n_t_e_r_v_a_l_s__(other._n_I_n_t_e_r_v_a_l_s__), _k_u_h_n_I_n_d_e_x(other._k_u_h_n_I_n_d_e_x), │ │ │ │ +284 _b_a_c_k_e_n_d(other._b_a_c_k_e_n_d), │ │ │ │ +285 _b_a_c_k_e_n_d_E_n_d(other._b_a_c_k_e_n_d_E_n_d) │ │ │ │ +286 {} │ │ │ │ +287 │ │ │ │ +288 template │ │ │ │ +289 void │ │ │ │ +_2_9_0 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +291_ _i_n_c_r_e_m_e_n_t() │ │ │ │ +292 { │ │ │ │ +293 ++_b_a_c_k_e_n_d; │ │ │ │ +294 if (_b_a_c_k_e_n_d == _b_a_c_k_e_n_d_E_n_d) │ │ │ │ +295 { │ │ │ │ +296 _b_a_c_k_e_n_d = _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ +297 ++_k_u_h_n_I_n_d_e_x; │ │ │ │ +298 } │ │ │ │ +299 } │ │ │ │ +300 │ │ │ │ +301 template │ │ │ │ +302 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ +_3_0_3 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +304_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ +305 { │ │ │ │ +306 _I_n_d_e_x_V_e_c_t_o_r indices = _b_a_c_k_e_n_d.vertexIndices(); │ │ │ │ +307 │ │ │ │ +308 int base = _k_u_h_n_I_n_d_e_x * _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ +309 indices += base; │ │ │ │ +310 │ │ │ │ +311 return indices; │ │ │ │ +312 } │ │ │ │ +313 │ │ │ │ +314 template │ │ │ │ +315 int │ │ │ │ +_3_1_6 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +317_ _i_n_d_e_x() const │ │ │ │ +318 { │ │ │ │ +319 return _k_u_h_n_I_n_d_e_x*_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(_n_I_n_t_e_r_v_a_l_s__) + _b_a_c_k_e_n_d.index │ │ │ │ (); │ │ │ │ -315 } │ │ │ │ -316 │ │ │ │ -317 template │ │ │ │ -318 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -_3_1_9 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -320_ _c_o_o_r_d_s() const │ │ │ │ -321 { │ │ │ │ -322 return global(_b_a_c_k_e_n_d.coords()); │ │ │ │ -323 } │ │ │ │ -324 │ │ │ │ -325 template │ │ │ │ -326 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_G_e_o_m_e_t_r_y │ │ │ │ -_3_2_7 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ -328 { │ │ │ │ -329 const typename BackendIterator::Geometry &bgeo = │ │ │ │ -330 _b_a_c_k_e_n_d.geometry(); │ │ │ │ -331 std::vector corners(dimension+1); │ │ │ │ -332 for(int i = 0; i <= dimension; ++i) │ │ │ │ -333 corners[i] = global(bgeo.corner(i)); │ │ │ │ -334 │ │ │ │ -335 return _G_e_o_m_e_t_r_y(bgeo.type(), corners); │ │ │ │ -336 } │ │ │ │ -337 │ │ │ │ -338 template │ │ │ │ -339 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -340 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -341_ _g_l_o_b_a_l(const CoordVector &local) const │ │ │ │ -342 { │ │ │ │ -343 // while the kuhnIndex runs from 0,1,2 the actual permutations we need are │ │ │ │ -0,2,3 │ │ │ │ -344 return _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e(_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(local, _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_> │ │ │ │ -((kuhnIndex+2)%4))); │ │ │ │ -345 } │ │ │ │ -346 │ │ │ │ -347 // common │ │ │ │ -348 template │ │ │ │ -349 template │ │ │ │ -_3_5_0 class _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m_:_: │ │ │ │ +320 } │ │ │ │ +321 │ │ │ │ +322 template │ │ │ │ +323 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +_3_2_4 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +325_ _c_o_o_r_d_s() const │ │ │ │ +326 { │ │ │ │ +327 return global(_b_a_c_k_e_n_d.coords()); │ │ │ │ +328 } │ │ │ │ +329 │ │ │ │ +330 template │ │ │ │ +331 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_G_e_o_m_e_t_r_y │ │ │ │ +_3_3_2 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ +333 { │ │ │ │ +334 const typename BackendIterator::Geometry &bgeo = │ │ │ │ +335 _b_a_c_k_e_n_d.geometry(); │ │ │ │ +336 std::vector corners(dimension+1); │ │ │ │ +337 for(int i = 0; i <= dimension; ++i) │ │ │ │ +338 corners[i] = global(bgeo.corner(i)); │ │ │ │ +339 │ │ │ │ +340 return _G_e_o_m_e_t_r_y(bgeo.type(), corners); │ │ │ │ +341 } │ │ │ │ +342 │ │ │ │ +343 template │ │ │ │ +344 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +345 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +346_ _g_l_o_b_a_l(const CoordVector &local) const │ │ │ │ +347 { │ │ │ │ +348 return _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(local, _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(kuhnIndex)); │ │ │ │ +349 } │ │ │ │ +350 │ │ │ │ +351 // common │ │ │ │ +352 template │ │ │ │ +353 template │ │ │ │ +_3_5_4 class _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m_:_: │ │ │ │ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ -351 : public ForwardIteratorFacade::template Codim::SubEntityIterator, int>, │ │ │ │ -352 public _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -353 { │ │ │ │ -354 public: │ │ │ │ -_3_5_5 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_3_5_6 typedef _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _T_h_i_s; │ │ │ │ -357 │ │ │ │ -_3_5_8 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end = false); │ │ │ │ -359 │ │ │ │ -_3_6_0 bool _e_q_u_a_l_s(const _T_h_i_s &other) const; │ │ │ │ -361 protected: │ │ │ │ -362 using _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>:: │ │ │ │ +356 public _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +357 { │ │ │ │ +358 public: │ │ │ │ +_3_5_9 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_3_6_0 typedef _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _T_h_i_s; │ │ │ │ +361 │ │ │ │ +_3_6_2 _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end = false); │ │ │ │ +363 │ │ │ │ +_3_6_4 bool _e_q_u_a_l_s(const _T_h_i_s &other) const; │ │ │ │ +365 protected: │ │ │ │ +366 using _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>:: │ │ │ │ kuhnIndex; │ │ │ │ -363 using _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>:: │ │ │ │ +367 using _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>:: │ │ │ │ backend; │ │ │ │ -364 }; │ │ │ │ -365 │ │ │ │ -366#ifndef DOXYGEN │ │ │ │ -367 template │ │ │ │ -368 template │ │ │ │ -369 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +368 }; │ │ │ │ +369 │ │ │ │ +370#ifndef DOXYGEN │ │ │ │ +371 template │ │ │ │ +372 template │ │ │ │ +373 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ -370_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end) │ │ │ │ -371 : _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>(nIntervals, │ │ │ │ +374_ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r(int nIntervals, bool end) │ │ │ │ +375 : _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, codimension>(nIntervals, │ │ │ │ end) │ │ │ │ -372 {} │ │ │ │ -373 │ │ │ │ -374 template │ │ │ │ -375 template │ │ │ │ -376 bool │ │ │ │ -377 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +376 {} │ │ │ │ +377 │ │ │ │ +378 template │ │ │ │ +379 template │ │ │ │ +380 bool │ │ │ │ +381 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ -378_ _e_q_u_a_l_s(const This &other) const │ │ │ │ -379 { │ │ │ │ -380 return ((kuhnIndex == other.kuhnIndex) && (backend == other.backend)); │ │ │ │ -381 } │ │ │ │ -382#endif │ │ │ │ -383 │ │ │ │ -384 } // namespace PrismTriangulation │ │ │ │ -385 } // namespace RefinementImp │ │ │ │ +382_ _e_q_u_a_l_s(const This &other) const │ │ │ │ +383 { return kuhnIndex == other.kuhnIndex && backend == other.backend; } │ │ │ │ +384 │ │ │ │ +385#endif // DOXYGEN │ │ │ │ 386 │ │ │ │ -387 namespace RefinementImp │ │ │ │ -388 { │ │ │ │ -389 // /////////////////////// │ │ │ │ -390 // │ │ │ │ -391 // The refinement traits │ │ │ │ -392 // │ │ │ │ -393 │ │ │ │ -394#ifndef DOXYGEN │ │ │ │ -395 template │ │ │ │ -396 struct Traits< │ │ │ │ -397 topologyId, CoordType, coerceToId, 3, │ │ │ │ -398 typename _s_t_d::enable_if< │ │ │ │ -399 (GeometryTypes::prism.id() >> 1) == │ │ │ │ -400 (topologyId >> 1) && │ │ │ │ -401 (GeometryTypes::simplex(3).id() >> 1) == │ │ │ │ -402 (coerceToId >> 1) │ │ │ │ -403 >::type> │ │ │ │ -404 { │ │ │ │ -405 typedef PrismTriangulation::RefinementImp<3, CoordType> Imp; │ │ │ │ -406 }; │ │ │ │ -407#endif │ │ │ │ -408 │ │ │ │ -409 } // namespace RefinementImp │ │ │ │ -410} // namespace Dune │ │ │ │ -411 │ │ │ │ -412#endif // DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC │ │ │ │ +387 } // namespace HCubeTriangulation │ │ │ │ +388 } // namespace RefinementImp │ │ │ │ +389 │ │ │ │ +390 namespace RefinementImp │ │ │ │ +391 { │ │ │ │ +392 // /////////////////////// │ │ │ │ +393 // │ │ │ │ +394 // The refinement traits │ │ │ │ +395 // │ │ │ │ +396 │ │ │ │ +397#ifndef DOXYGEN │ │ │ │ +398 template │ │ │ │ +400 struct Traits< │ │ │ │ +401 topologyId, CoordType, coerceToId, dim, │ │ │ │ +402 typename _s_t_d::enable_if< │ │ │ │ +403 (dim >= 2 && │ │ │ │ +404 (GeometryTypes::cube(dim).id() >> 1) == │ │ │ │ +405 (topologyId >> 1) && │ │ │ │ +406 (GeometryTypes::simplex(dim).id() >> 1) == │ │ │ │ +407 (coerceToId >> 1) │ │ │ │ +408 )>::type │ │ │ │ +409 > │ │ │ │ +410 { │ │ │ │ +411 typedef HCubeTriangulation::RefinementImp Imp; │ │ │ │ +412 }; │ │ │ │ +413#endif │ │ │ │ +414 │ │ │ │ +415 } // namespace RefinementImp │ │ │ │ +416} // namespace Dune │ │ │ │ +417 │ │ │ │ +418#endif // DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC │ │ │ │ _t_y_p_e_._h_h │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ -_s_i_m_p_l_e_x_._c_c │ │ │ │ -This file contains the Refinement implementation for simplices (triangles, │ │ │ │ -tetrahedrons.... │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ _b_a_s_e_._c_c │ │ │ │ This file contains the parts independent of a particular Refinement │ │ │ │ implementation. │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ +_s_i_m_p_l_e_x_._c_c │ │ │ │ +This file contains the Refinement implementation for simplices (triangles, │ │ │ │ +tetrahedrons.... │ │ │ │ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x │ │ │ │ constexpr GeometryType vertex │ │ │ │ GeometryType representing a vertex. │ │ │ │ DDeeffiinniittiioonn type.hh:492 │ │ │ │ _s_t_d │ │ │ │ STL namespace. │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ -This namespace contains the Refinement implementation for triangulating prisms │ │ │ │ -(GeometryType::prism -... │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:27 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ +This namespace contains the Refinement implementation for triangulating │ │ │ │ +hypercubes (GeometryType::cub... │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:46 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n │ │ │ │ FieldVector< int, n > getPermutation(int m) │ │ │ │ Calculate permutation from it's index. │ │ │ │ DDeeffiinniittiioonn simplex.cc:293 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n │ │ │ │ FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, │ │ │ │ dimension > point, const FieldVector< int, dimension > &kuhn) │ │ │ │ Map from the reference simplex to some Kuhn simplex. │ │ │ │ DDeeffiinniittiioonn simplex.cc:322 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< CoordType, dimension > transformCoordinate(FieldVector< CoordType, │ │ │ │ -dimension > point) │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:50 │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n │ │ │ │ FieldVector< int, n > getPermutation(int m) │ │ │ │ Calculate permutation from it's index. │ │ │ │ DDeeffiinniittiioonn simplex.cc:293 │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n │ │ │ │ FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, │ │ │ │ dimension > point, const FieldVector< int, dimension > &kuhn) │ │ │ │ @@ -474,206 +462,205 @@ │ │ │ │ DDeeffiinniittiioonn simplex.cc:322 │ │ │ │ _D_u_n_e_:_:_C_o_d_i_m │ │ │ │ Static tag representing a codimension. │ │ │ │ DDeeffiinniittiioonn dimension.hh:24 │ │ │ │ _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ generic geometry implementation based on corner coordinates │ │ │ │ DDeeffiinniittiioonn multilineargeometry.hh:181 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:43 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ -Implementation of the refinement of a prism into simplices. │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:67 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ -_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ -SubEntityIterator(int nIntervals, bool end=false) │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ -_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ -RefinementImp< dimension, CoordType > Refinement │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:355 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ -_>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int dimension │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:69 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_c_t_y_p_e │ │ │ │ -CoordType ctype │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:71 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_E_n_d │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:63 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:67 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_E_n_d │ │ │ │ static VertexIterator vEnd(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:122 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ -FieldVector< int, dimension+1 > IndexVector │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:78 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_E_n_d │ │ │ │ -static ElementIterator eEnd(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:146 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ -static int nVertices(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:106 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -FieldVector< CoordType, dimension > CoordVector │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:76 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:121 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_B_e_g_i_n │ │ │ │ +static VertexIterator vBegin(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:113 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ static int nElements(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:130 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:129 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_T_h_i_s │ │ │ │ SubEntityIterator This │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:356 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ -Codim< 0 >::SubEntityIterator ElementIterator │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:77 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ -Codim< dimension >::SubEntityIterator VertexIterator │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:75 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_B_e_g_i_n │ │ │ │ -static ElementIterator eBegin(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:138 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_B_e_g_i_n │ │ │ │ -static VertexIterator vBegin(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:114 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:360 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +FieldVector< CoordType, dimension > CoordVector │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:76 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_e_q_u_a_l_s │ │ │ │ bool equals(const This &other) const │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:98 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ +SubEntityIterator(int nIntervals, bool end=false) │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_c_t_y_p_e │ │ │ │ +CoordType ctype │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:71 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ +Codim< 0 >::SubEntityIterator ElementIterator │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:77 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ +FieldVector< int, dimension+1 > IndexVector │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:78 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_B_e_g_i_n │ │ │ │ +static ElementIterator eBegin(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:137 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_E_n_d │ │ │ │ +static ElementIterator eEnd(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:145 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +_>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ +static constexpr int dimension │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:69 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ +Codim< dimension >::SubEntityIterator VertexIterator │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:75 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ +static int nVertices(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:105 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ +RefinementImp< dimension, CoordType > Refinement │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:359 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:97 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ _G_e_o_m_e_t_r_y │ │ │ │ Dune::MultiLinearGeometry< CoordType, dimension-codimension, dimension > │ │ │ │ Geometry │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:100 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:99 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_n_K_u_h_n_S_i_m_p_l_i_c_e_s │ │ │ │ static constexpr int nKuhnSimplices │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:176 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:176 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_d_e_x │ │ │ │ +int index() const │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:229 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_n_I_n_t_e_r_v_a_l_s__ │ │ │ │ int nIntervals_ │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:178 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:178 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ +void increment() │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:199 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ +int kuhnIndex │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:180 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +Refinement::CoordVector CoordVector │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:161 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ Geometry geometry() const │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:221 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:219 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ Refinement::template Codim< dimension >::Geometry Geometry │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:163 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ -Refinement::BackendRefinement BackendRefinement │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:174 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:162 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r │ │ │ │ BackendRefinement::template Codim< dimension >::SubEntityIterator │ │ │ │ BackendIterator │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:175 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -Refinement::CoordVector CoordVector │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:162 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ -void increment() │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:199 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -RefinementIteratorSpecial(int nIntervals, bool end=false) │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:187 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_b_a_c_k_e_n_d_E_n_d │ │ │ │ -const BackendIterator backendEnd │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:182 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ -RefinementImp< dimension, CoordType > Refinement │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:161 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:175 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ +Refinement::BackendRefinement BackendRefinement │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:174 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_b_a_c_k_e_n_d │ │ │ │ BackendIterator backend │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:181 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_d_e_x │ │ │ │ -int index() const │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:232 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:181 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ +RefinementImp< dimension, CoordType > Refinement │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:160 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_c_o_o_r_d_s │ │ │ │ CoordVector coords() const │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:212 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ -int kuhnIndex │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:180 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_n_I_n_t_e_r_v_a_l_s__ │ │ │ │ -int nIntervals_ │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:265 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ -Refinement::template Codim< 0 >::Geometry Geometry │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:245 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:212 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_b_a_c_k_e_n_d_E_n_d │ │ │ │ +const BackendIterator backendEnd │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:182 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +RefinementIteratorSpecial(int nIntervals, bool end=false) │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:187 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r │ │ │ │ +BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:260 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_i_n_d_e_x │ │ │ │ +int index() const │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:317 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_b_a_c_k_e_n_d │ │ │ │ BackendIterator backend │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:268 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:266 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_c_o_o_r_d_s │ │ │ │ +CoordVector coords() const │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:325 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_n_K_u_h_n_S_i_m_p_l_i_c_e_s │ │ │ │ static constexpr int nKuhnSimplices │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:263 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ -Refinement::IndexVector IndexVector │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:243 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r │ │ │ │ -BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:262 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ -void increment() │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:286 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ -int kuhnIndex │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:267 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:261 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_v_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ IndexVector vertexIndices() const │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:299 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ -Geometry geometry() const │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:327 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:304 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +RefinementIteratorSpecial(int nIntervals_, bool end=false) │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:272 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ Refinement::CoordVector CoordVector │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:244 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ -RefinementImp< dimension, CoordType > Refinement │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:242 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:241 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_b_a_c_k_e_n_d_E_n_d │ │ │ │ const BackendIterator backendEnd │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:269 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -RefinementIteratorSpecial(int nIntervals, bool end=false) │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:274 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_i_n_d_e_x │ │ │ │ -int index() const │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:312 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_c_o_o_r_d_s │ │ │ │ -CoordVector coords() const │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:320 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_r_i_s_m_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:267 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ +int kuhnIndex │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:265 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ +void increment() │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:291 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ Refinement::BackendRefinement BackendRefinement │ │ │ │ -DDeeffiinniittiioonn prismtriangulation.cc:261 │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:259 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_n_I_n_t_e_r_v_a_l_s__ │ │ │ │ +int nIntervals_ │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:263 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ +Refinement::IndexVector IndexVector │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:240 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ +RefinementImp< dimension, CoordType > Refinement │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:239 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ +Geometry geometry() const │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:332 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ +_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ +Refinement::template Codim< 0 >::Geometry Geometry │ │ │ │ +DDeeffiinniittiioonn hcubetriangulation.cc:242 │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ DDeeffiinniittiioonn simplex.cc:361 │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ static int nVertices(int nIntervals) │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ static int nElements(int nIntervals) │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_v_B_e_g_i_n │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00206.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: hcubetriangulation.cc File Reference │ │ │ +dune-geometry: pyramidtriangulation.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -76,68 +76,67 @@ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ Macros | │ │ │ Functions
│ │ │ -
hcubetriangulation.cc File Reference
│ │ │ +
pyramidtriangulation.cc File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

This file contains the Refinement implementation for triangulating hypercubes (quadrilateral -> triangle, hexahedron -> tetrahedron). │ │ │ -More...

│ │ │ -
#include <dune/geometry/referenceelements.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ -#include "base.cc"
│ │ │ -#include "simplex.cc"
│ │ │ +
#include <dune/common/fvector.hh>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ +#include <dune/geometry/type.hh>
│ │ │ +#include "base.cc"
│ │ │ +#include "simplex.cc"
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::RefinementImp::HCubeTriangulation::RefinementImp< dimension_, CoordType >
struct  Dune::RefinementImp::HCubeTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
class  Dune::RefinementImp::HCubeTriangulation::RefinementIteratorSpecial< dimension, CoordType, dimension >
class  Dune::RefinementImp::HCubeTriangulation::RefinementIteratorSpecial< dimension, CoordType, 0 >
class  Dune::RefinementImp::HCubeTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
class  Dune::RefinementImp::PyramidTriangulation::RefinementImp< dimension_, CoordType >
 Implementation of the refinement of a pyramid into simplices. More...
struct  Dune::RefinementImp::PyramidTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
class  Dune::RefinementImp::PyramidTriangulation::RefinementIteratorSpecial< dimension, CoordType, dimension >
class  Dune::RefinementImp::PyramidTriangulation::RefinementIteratorSpecial< dimension, CoordType, 0 >
class  Dune::RefinementImp::PyramidTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension >
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::RefinementImp
 This namespace contains the implementation of Refinement.
namespace  Dune::RefinementImp::HCubeTriangulation
 This namespace contains the Refinement implementation for triangulating hypercubes (GeometryType::cube -> GeometryType::simplex).
namespace  Dune::RefinementImp::PyramidTriangulation
 This namespace contains the Refinement implementation for triangulating pyramids (GeometryType::pyramid -> GeometryType::simplex).
│ │ │ │ │ │ - │ │ │ + │ │ │

│ │ │ Macros

#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC
#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC
│ │ │ │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │

│ │ │ Functions

template<int dimension, class CoordType>
FieldVector< CoordType, dimension > Dune::RefinementImp::PyramidTriangulation::transformCoordinate (FieldVector< CoordType, dimension > point)
template<int n>
FieldVector< int, n > Dune::RefinementImp::HCubeTriangulation::getPermutation (int m)
FieldVector< int, n > Dune::RefinementImp::PyramidTriangulation::getPermutation (int m)
 Calculate permutation from it's index.
template<int dimension, class CoordType>
FieldVector< CoordType, dimension > Dune::RefinementImp::HCubeTriangulation::referenceToKuhn (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
FieldVector< CoordType, dimension > Dune::RefinementImp::PyramidTriangulation::referenceToKuhn (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
 Map from the reference simplex to some Kuhn simplex.
│ │ │ -

Detailed Description

│ │ │ -

This file contains the Refinement implementation for triangulating hypercubes (quadrilateral -> triangle, hexahedron -> tetrahedron).

│ │ │ -

See Refinement implementation for triangulating hypercubes.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │
#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -2,57 +2,61 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ * _r_e_f_i_n_e_m_e_n_t │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -hcubetriangulation.cc File Reference │ │ │ │ -This file contains the _R_e_f_i_n_e_m_e_n_t implementation for triangulating hypercubes │ │ │ │ -(quadrilateral -> triangle, hexahedron -> tetrahedron). _M_o_r_e_._._. │ │ │ │ +pyramidtriangulation.cc File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ #include "_b_a_s_e_._c_c" │ │ │ │ #include "_s_i_m_p_l_e_x_._c_c" │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ _C_o_o_r_d_T_y_p_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ +  Implementation of the refinement of a pyramid into simplices. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ _C_o_o_r_d_T_y_p_e_ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _> │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ + class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n___, │ │ │ │ _C_o_o_r_d_T_y_p_e_ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │   This namespace contains the implementation of _R_e_f_i_n_e_m_e_n_t. │ │ │ │ -namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ +namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ This namespace contains the _R_e_f_i_n_e_m_e_n_t implementation for │ │ │ │ -  triangulating hypercubes (_G_e_o_m_e_t_r_y_T_y_p_e_:_:_c_u_b_e -> _G_e_o_m_e_t_r_y_T_y_p_e_:_: │ │ │ │ +  triangulating pyramids (_G_e_o_m_e_t_r_y_T_y_p_e_:_:_p_y_r_a_m_i_d -> _G_e_o_m_e_t_r_y_T_y_p_e_:_: │ │ │ │ _s_i_m_p_l_e_x). │ │ │ │ MMaaccrrooss │ │ │ │ -#define  _D_U_N_E___G_E_O_M_E_T_R_Y___R_E_F_I_N_E_M_E_N_T___H_C_U_B_E_T_R_I_A_N_G_U_L_A_T_I_O_N___C_C │ │ │ │ +#define  _D_U_N_E___G_E_O_M_E_T_R_Y___R_E_F_I_N_E_M_E_N_T___P_Y_R_A_M_I_D_T_R_I_A_N_G_U_L_A_T_I_O_N___C_C │ │ │ │ FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_: │ │ │ │ + _P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e │ │ │ │ + (FieldVector< CoordType, dimension > │ │ │ │ + point) │ │ │ │ template │ │ │ │ - FieldVector< int, n >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_: │ │ │ │ - _g_e_t_P_e_r_m_u_t_a_t_i_o_n (int m) │ │ │ │ + FieldVector< int, n >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_: │ │ │ │ + _P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n (int │ │ │ │ + m) │ │ │ │   Calculate permutation from it's index. │ │ │ │ template │ │ │ │ -FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_: │ │ │ │ - _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n (FieldVector< CoordType, │ │ │ │ - dimension > point, const FieldVector< int, │ │ │ │ - dimension > &kuhn) │ │ │ │ +FieldVector< CoordType, dimension >  _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_: │ │ │ │ + _P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n │ │ │ │ + (FieldVector< CoordType, dimension > │ │ │ │ + point, const FieldVector< int, dimension > │ │ │ │ + &kuhn) │ │ │ │   Map from the reference simplex to some │ │ │ │ Kuhn simplex. │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -This file contains the _R_e_f_i_n_e_m_e_n_t implementation for triangulating hypercubes │ │ │ │ -(quadrilateral -> triangle, hexahedron -> tetrahedron). │ │ │ │ -See _R_e_f_i_n_e_m_e_n_t_ _i_m_p_l_e_m_e_n_t_a_t_i_o_n_ _f_o_r_ _t_r_i_a_n_g_u_l_a_t_i_n_g_ _h_y_p_e_r_c_u_b_e_s. │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__HHCCUUBBEETTRRIIAANNGGUULLAATTIIOONN__CCCC ********** │ │ │ │ -#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC │ │ │ │ +********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__PPYYRRAAMMIIDDTTRRIIAANNGGUULLAATTIIOONN__CCCC ********** │ │ │ │ +#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00206_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: hcubetriangulation.cc Source File │ │ │ +dune-geometry: pyramidtriangulation.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,523 +71,536 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
hcubetriangulation.cc
│ │ │ +
pyramidtriangulation.cc
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC
│ │ │ -
6#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC
│ │ │ -
7
│ │ │ -
16
│ │ │ -
28
│ │ │ - │ │ │ -
30#include <dune/geometry/type.hh>
│ │ │ -
31
│ │ │ -
32#include "base.cc"
│ │ │ -
33#include "simplex.cc"
│ │ │ -
34
│ │ │ -
35namespace Dune
│ │ │ -
36{
│ │ │ -
37 namespace RefinementImp
│ │ │ -
38 {
│ │ │ -
│ │ │ - │ │ │ -
47
│ │ │ -
48 // ////////////
│ │ │ -
49 //
│ │ │ -
50 // Utilities
│ │ │ -
51 //
│ │ │ -
52
│ │ │ - │ │ │ - │ │ │ -
55
│ │ │ -
56 // ////////////////////////////////////
│ │ │ -
57 //
│ │ │ -
58 // Refine a hypercube with simplices
│ │ │ -
59 //
│ │ │ -
60
│ │ │ -
61 // forward declaration of the iterator base
│ │ │ -
62 template<int dimension, class CoordType, int codimension>
│ │ │ - │ │ │ -
64
│ │ │ -
65 template<int dimension_, class CoordType>
│ │ │ -
│ │ │ - │ │ │ -
67 {
│ │ │ -
68 public:
│ │ │ -
69 constexpr static int dimension = dimension_;
│ │ │ -
70
│ │ │ -
71 typedef CoordType ctype;
│ │ │ -
72
│ │ │ -
73 template<int codimension>
│ │ │ -
74 struct Codim;
│ │ │ - │ │ │ -
76 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ - │ │ │ -
78 typedef FieldVector<int, dimension+1> IndexVector;
│ │ │ -
79
│ │ │ -
80 static int nVertices(int nIntervals);
│ │ │ -
81 static VertexIterator vBegin(int nIntervals);
│ │ │ -
82 static VertexIterator vEnd(int nIntervals);
│ │ │ -
83
│ │ │ -
84 static int nElements(int nIntervals);
│ │ │ -
85 static ElementIterator eBegin(int nIntervals);
│ │ │ -
86 static ElementIterator eEnd(int nIntervals);
│ │ │ -
87 private:
│ │ │ -
88 friend class RefinementIteratorSpecial<dimension, CoordType, 0>;
│ │ │ -
89 friend class RefinementIteratorSpecial<dimension, CoordType, dimension>;
│ │ │ -
90
│ │ │ -
91 typedef Simplex::RefinementImp<dimension, CoordType> BackendRefinement;
│ │ │ -
92 };
│ │ │ -
│ │ │ -
93
│ │ │ -
94 template<int dimension, class CoordType>
│ │ │ -
95 template<int codimension>
│ │ │ -
│ │ │ -
96 struct RefinementImp<dimension, CoordType>::Codim
│ │ │ -
97 {
│ │ │ - │ │ │ -
99 typedef Dune::MultiLinearGeometry<CoordType,dimension-codimension,dimension> Geometry;
│ │ │ -
100 };
│ │ │ -
│ │ │ -
101
│ │ │ -
102 template<int dimension, class CoordType>
│ │ │ -
103 int
│ │ │ -
│ │ │ - │ │ │ -
105 nVertices(int nIntervals)
│ │ │ -
106 {
│ │ │ -
107 return BackendRefinement::nVertices(nIntervals) * factorial(int(dimension));
│ │ │ -
108 }
│ │ │ -
│ │ │ -
109
│ │ │ -
110 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
113 vBegin(int nIntervals)
│ │ │ -
114 {
│ │ │ -
115 return VertexIterator(nIntervals);
│ │ │ -
116 }
│ │ │ -
│ │ │ -
117
│ │ │ -
118 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
121 vEnd(int nIntervals)
│ │ │ -
122 {
│ │ │ -
123 return VertexIterator(nIntervals, true);
│ │ │ -
124 }
│ │ │ -
│ │ │ -
125
│ │ │ -
126 template<int dimension, class CoordType>
│ │ │ -
127 int
│ │ │ -
│ │ │ - │ │ │ -
129 nElements(int nIntervals)
│ │ │ -
130 {
│ │ │ -
131 return BackendRefinement::nElements(nIntervals) * factorial(int(dimension));
│ │ │ -
132 }
│ │ │ -
│ │ │ -
133
│ │ │ -
134 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
137 eBegin(int nIntervals)
│ │ │ -
138 {
│ │ │ -
139 return ElementIterator(nIntervals);
│ │ │ -
140 }
│ │ │ -
│ │ │ -
141
│ │ │ -
142 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
145 eEnd(int nIntervals)
│ │ │ -
146 {
│ │ │ -
147 return ElementIterator(nIntervals, true);
│ │ │ -
148 }
│ │ │ -
│ │ │ -
149
│ │ │ -
150 // //////////////
│ │ │ -
151 //
│ │ │ -
152 // The iterator
│ │ │ -
153 //
│ │ │ -
154
│ │ │ -
155 // vertices
│ │ │ -
156 template<int dimension, class CoordType>
│ │ │ -
│ │ │ -
157 class RefinementIteratorSpecial<dimension, CoordType, dimension>
│ │ │ -
158 {
│ │ │ -
159 public:
│ │ │ - │ │ │ - │ │ │ -
162 typedef typename Refinement::template Codim<dimension>::Geometry Geometry;
│ │ │ -
163
│ │ │ -
164 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ -
165
│ │ │ -
166 void increment();
│ │ │ +
5#ifndef DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC
│ │ │ +
6#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC
│ │ │ +
7
│ │ │ +
8#include <dune/common/fvector.hh>
│ │ │ +
9#include <dune/common/typetraits.hh>
│ │ │ +
10
│ │ │ + │ │ │ +
12#include <dune/geometry/type.hh>
│ │ │ +
13
│ │ │ +
14#include "base.cc"
│ │ │ +
15#include "simplex.cc"
│ │ │ +
16
│ │ │ +
17namespace Dune
│ │ │ +
18{
│ │ │ +
19 namespace RefinementImp
│ │ │ +
20 {
│ │ │ +
│ │ │ + │ │ │ +
27 {
│ │ │ +
28 // ////////////
│ │ │ +
29 //
│ │ │ +
30 // Utilities
│ │ │ +
31 //
│ │ │ +
32
│ │ │ + │ │ │ + │ │ │ +
35
│ │ │ +
36 // ////////////////////////////////////
│ │ │ +
37 //
│ │ │ +
38 // Refine a pyramid with simplices
│ │ │ +
39 //
│ │ │ +
40
│ │ │ +
41 // forward declaration of the iterator base
│ │ │ +
42 template<int dimension, class CoordType, int codimension>
│ │ │ + │ │ │ +
44
│ │ │ +
45 /*
│ │ │ +
46 * The permutations 0 and 1 of the Kuhn-decomposition of a cube into simplices form a pyramid.
│ │ │ +
47 * The resulting pyramid is not oriented the same as the reference pyramid and so the Kuhn-coordinates
│ │ │ +
48 * have to be transformed using the method below.
│ │ │ +
49 */
│ │ │ +
50 template<int dimension, class CoordType> FieldVector<CoordType, dimension>
│ │ │ +
│ │ │ +
51 transformCoordinate( FieldVector<CoordType, dimension> point)
│ │ │ +
52 {
│ │ │ +
53 FieldVector<CoordType, dimension> transform;
│ │ │ +
54 transform[0]=1-point[0];
│ │ │ +
55 transform[1]=1-point[1];
│ │ │ +
56 transform[2]=point[2];
│ │ │ +
57 return transform;
│ │ │ +
58 }
│ │ │ +
│ │ │ +
59
│ │ │ +
66 template<int dimension_, class CoordType>
│ │ │ +
│ │ │ + │ │ │ +
68 {
│ │ │ +
69 public:
│ │ │ +
70 constexpr static int dimension = dimension_;
│ │ │ +
71
│ │ │ +
72 typedef CoordType ctype;
│ │ │ +
73
│ │ │ +
74 template<int codimension>
│ │ │ +
75 struct Codim;
│ │ │ + │ │ │ +
77 typedef FieldVector<CoordType, dimension> CoordVector;
│ │ │ + │ │ │ +
79 typedef FieldVector<int, dimension+1> IndexVector;
│ │ │ +
80
│ │ │ +
81 static int nVertices(int nIntervals);
│ │ │ +
82 static VertexIterator vBegin(int nIntervals);
│ │ │ +
83 static VertexIterator vEnd(int nIntervals);
│ │ │ +
84
│ │ │ +
85 static int nElements(int nIntervals);
│ │ │ +
86 static ElementIterator eBegin(int nIntervals);
│ │ │ +
87 static ElementIterator eEnd(int nIntervals);
│ │ │ +
88
│ │ │ +
89 private:
│ │ │ +
90 friend class RefinementIteratorSpecial<dimension, CoordType, 0>;
│ │ │ +
91 friend class RefinementIteratorSpecial<dimension, CoordType, dimension>;
│ │ │ +
92
│ │ │ +
93 typedef Simplex::RefinementImp<dimension, CoordType> BackendRefinement;
│ │ │ +
94
│ │ │ +
95 constexpr static int nKuhnSimplices = 2;
│ │ │ +
96 };
│ │ │ +
│ │ │ +
97
│ │ │ +
98 template<int dimension, class CoordType>
│ │ │ +
99 template<int codimension>
│ │ │ +
│ │ │ +
100 struct RefinementImp<dimension, CoordType>::Codim
│ │ │ +
101 {
│ │ │ +
102 class SubEntityIterator;
│ │ │ + │ │ │ +
104 };
│ │ │ +
│ │ │ +
105
│ │ │ +
106 template<int dimension, class CoordType>
│ │ │ +
107 int
│ │ │ +
│ │ │ + │ │ │ +
109 nVertices(int nIntervals)
│ │ │ +
110 {
│ │ │ +
111 return BackendRefinement::nVertices(nIntervals) * nKuhnSimplices;
│ │ │ +
112 }
│ │ │ +
│ │ │ +
113
│ │ │ +
114 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
117 vBegin(int nIntervals)
│ │ │ +
118 {
│ │ │ +
119 return VertexIterator(nIntervals);
│ │ │ +
120 }
│ │ │ +
│ │ │ +
121
│ │ │ +
122 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
125 vEnd(int nIntervals)
│ │ │ +
126 {
│ │ │ +
127 return VertexIterator(nIntervals, true);
│ │ │ +
128 }
│ │ │ +
│ │ │ +
129
│ │ │ +
130 template<int dimension, class CoordType>
│ │ │ +
131 int
│ │ │ +
│ │ │ + │ │ │ +
133 nElements(int nIntervals)
│ │ │ +
134 {
│ │ │ +
135 return BackendRefinement::nElements(nIntervals) * nKuhnSimplices;
│ │ │ +
136 }
│ │ │ +
│ │ │ +
137
│ │ │ +
138 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
141 eBegin(int nIntervals)
│ │ │ +
142 {
│ │ │ +
143 return ElementIterator(nIntervals);
│ │ │ +
144 }
│ │ │ +
│ │ │ +
145
│ │ │ +
146 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
149 eEnd(int nIntervals)
│ │ │ +
150 {
│ │ │ +
151 return ElementIterator(nIntervals, true);
│ │ │ +
152 }
│ │ │ +
│ │ │ +
153
│ │ │ +
154 // //////////////
│ │ │ +
155 //
│ │ │ +
156 // The iterator
│ │ │ +
157 //
│ │ │ +
158
│ │ │ +
159 // vertices
│ │ │ +
160 template<int dimension, class CoordType>
│ │ │ +
│ │ │ +
161 class RefinementIteratorSpecial<dimension, CoordType, dimension>
│ │ │ +
162 {
│ │ │ +
163 public:
│ │ │ + │ │ │ + │ │ │ +
166 typedef typename Refinement::template Codim<dimension>::Geometry Geometry;
│ │ │
167
│ │ │ -
168 CoordVector coords() const;
│ │ │ +
168 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │
169
│ │ │ -
170 Geometry geometry() const;
│ │ │ +
170 void increment();
│ │ │
171
│ │ │ -
172 int index() const;
│ │ │ -
173 protected:
│ │ │ -
174 typedef typename Refinement::BackendRefinement BackendRefinement;
│ │ │ -
175 typedef typename BackendRefinement::template Codim<dimension>::SubEntityIterator BackendIterator;
│ │ │ -
176 constexpr static int nKuhnSimplices = factorial(int(dimension));
│ │ │ -
177
│ │ │ - │ │ │ -
179
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
183 };
│ │ │ -
│ │ │ -
184
│ │ │ -
185 template<int dimension, class CoordType>
│ │ │ -
│ │ │ - │ │ │ -
187 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ -
188 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ - │ │ │ - │ │ │ -
191 {
│ │ │ -
192 if (end)
│ │ │ - │ │ │ -
194 }
│ │ │ -
│ │ │ -
195
│ │ │ -
196 template<int dimension, class CoordType>
│ │ │ -
197 void
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
200 {
│ │ │ -
201 ++backend;
│ │ │ -
202 if (backend == backendEnd)
│ │ │ -
203 {
│ │ │ - │ │ │ -
205 ++kuhnIndex;
│ │ │ -
206 }
│ │ │ -
207 }
│ │ │ -
│ │ │ -
208
│ │ │ -
209 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
212 coords() const
│ │ │ -
213 {
│ │ │ - │ │ │ -
215 }
│ │ │ -
│ │ │ -
216
│ │ │ -
217 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
220 {
│ │ │ -
221 std::vector<CoordVector> corners(1);
│ │ │ - │ │ │ -
223 return Geometry(GeometryTypes::vertex, corners);
│ │ │ -
224 }
│ │ │ -
│ │ │ -
225
│ │ │ -
226 template<int dimension, class CoordType>
│ │ │ -
227 int
│ │ │ -
│ │ │ - │ │ │ -
229 index() const
│ │ │ -
230 {
│ │ │ - │ │ │ -
232 }
│ │ │ -
│ │ │ -
233
│ │ │ -
234 // elements
│ │ │ -
235 template<int dimension, class CoordType>
│ │ │ -
│ │ │ -
236 class RefinementIteratorSpecial<dimension, CoordType, 0>
│ │ │ -
237 {
│ │ │ -
238 public:
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
242 typedef typename Refinement::template Codim<0>::Geometry Geometry;
│ │ │ -
243
│ │ │ -
244 RefinementIteratorSpecial(int nIntervals_, bool end = false);
│ │ │ - │ │ │ -
246
│ │ │ -
247 void increment();
│ │ │ +
172 CoordVector coords() const;
│ │ │ +
173
│ │ │ +
174 Geometry geometry() const;
│ │ │ +
175
│ │ │ +
176 int index() const;
│ │ │ +
177 protected:
│ │ │ +
178 typedef typename Refinement::BackendRefinement BackendRefinement;
│ │ │ +
179 typedef typename BackendRefinement::template Codim<dimension>::SubEntityIterator BackendIterator;
│ │ │ +
180 constexpr static int nKuhnSimplices = 2;
│ │ │ +
181
│ │ │ + │ │ │ +
183
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
187 };
│ │ │ +
│ │ │ +
188
│ │ │ +
189 template<int dimension, class CoordType>
│ │ │ +
│ │ │ + │ │ │ +
191 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ +
192 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ + │ │ │ + │ │ │ +
195 {
│ │ │ +
196 if (end)
│ │ │ + │ │ │ +
198 }
│ │ │ +
│ │ │ +
199
│ │ │ +
200 template<int dimension, class CoordType>
│ │ │ +
201 void
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
204 {
│ │ │ +
205 ++backend;
│ │ │ +
206 if(backend == backendEnd)
│ │ │ +
207 {
│ │ │ + │ │ │ +
209 ++kuhnIndex;
│ │ │ +
210 }
│ │ │ +
211 }
│ │ │ +
│ │ │ +
212
│ │ │ +
213 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
216 coords() const
│ │ │ +
217 {
│ │ │ + │ │ │ + │ │ │ +
220 }
│ │ │ +
│ │ │ +
221
│ │ │ +
222 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
225 {
│ │ │ +
226 std::vector<CoordVector> corners(1);
│ │ │ + │ │ │ +
228 return Geometry(GeometryTypes::vertex, corners);
│ │ │ +
229 }
│ │ │ +
│ │ │ +
230
│ │ │ +
231 template<int dimension, class CoordType>
│ │ │ +
232 int
│ │ │ +
│ │ │ + │ │ │ +
234 index() const
│ │ │ +
235 {
│ │ │ + │ │ │ +
237 }
│ │ │ +
│ │ │ +
238
│ │ │ +
239 // elements
│ │ │ +
240 template<int dimension, class CoordType>
│ │ │ +
│ │ │ +
241 class RefinementIteratorSpecial<dimension, CoordType, 0>
│ │ │ +
242 {
│ │ │ +
243 public:
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
247 typedef typename Refinement::template Codim<0>::Geometry Geometry;
│ │ │
248
│ │ │ - │ │ │ -
250 int index() const;
│ │ │ -
251 CoordVector coords() const;
│ │ │ +
249 RefinementIteratorSpecial(int nIntervals, bool end = false);
│ │ │ +
250
│ │ │ +
251 void increment();
│ │ │
252
│ │ │ -
253 Geometry geometry() const;
│ │ │ -
254
│ │ │ -
255 private:
│ │ │ -
256 CoordVector global(const CoordVector &local) const;
│ │ │ -
257
│ │ │ -
258 protected:
│ │ │ -
259 typedef typename Refinement::BackendRefinement BackendRefinement;
│ │ │ -
260 typedef typename BackendRefinement::template Codim<0>::SubEntityIterator BackendIterator;
│ │ │ -
261 constexpr static int nKuhnSimplices = factorial(dimension);
│ │ │ -
262
│ │ │ - │ │ │ -
264
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
268 };
│ │ │ -
│ │ │ -
269
│ │ │ -
270 template<int dimension, class CoordType>
│ │ │ -
│ │ │ - │ │ │ -
272 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ -
273 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ - │ │ │ - │ │ │ -
276 {
│ │ │ -
277 if (end)
│ │ │ - │ │ │ -
279 }
│ │ │ -
│ │ │ -
280 template<int dimension, class CoordType>
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
284 backend(other.backend),
│ │ │ - │ │ │ -
286 {}
│ │ │ -
│ │ │ -
287
│ │ │ -
288 template<int dimension, class CoordType>
│ │ │ -
289 void
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
292 {
│ │ │ -
293 ++backend;
│ │ │ -
294 if (backend == backendEnd)
│ │ │ -
295 {
│ │ │ - │ │ │ -
297 ++kuhnIndex;
│ │ │ -
298 }
│ │ │ -
299 }
│ │ │ -
│ │ │ -
300
│ │ │ -
301 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
304 vertexIndices() const
│ │ │ -
305 {
│ │ │ -
306 IndexVector indices = backend.vertexIndices();
│ │ │ + │ │ │ +
254 int index() const;
│ │ │ +
255 CoordVector coords() const;
│ │ │ +
256
│ │ │ +
257 Geometry geometry() const;
│ │ │ +
258
│ │ │ +
259 private:
│ │ │ +
260 CoordVector global(const CoordVector &local) const;
│ │ │ +
261
│ │ │ +
262 protected:
│ │ │ +
263 typedef typename Refinement::BackendRefinement BackendRefinement;
│ │ │ +
264 typedef typename BackendRefinement::template Codim<0>::SubEntityIterator BackendIterator;
│ │ │ +
265 constexpr static int nKuhnSimplices = 2;
│ │ │ +
266
│ │ │ + │ │ │ +
268
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
272 };
│ │ │ +
│ │ │ +
273
│ │ │ +
274 template<int dimension, class CoordType>
│ │ │ +
│ │ │ + │ │ │ +
276 RefinementIteratorSpecial(int nIntervals, bool end)
│ │ │ +
277 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ + │ │ │ + │ │ │ +
280 {
│ │ │ +
281 if (end)
│ │ │ + │ │ │ +
283 }
│ │ │ +
│ │ │ +
284
│ │ │ +
285 template<int dimension, class CoordType>
│ │ │ +
286 void
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
289 {
│ │ │ +
290 ++backend;
│ │ │ +
291 if (backend == backendEnd)
│ │ │ +
292 {
│ │ │ + │ │ │ +
294 ++kuhnIndex;
│ │ │ +
295 }
│ │ │ +
296 }
│ │ │ +
│ │ │ +
297
│ │ │ +
298 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
301 vertexIndices() const
│ │ │ +
302 {
│ │ │ +
303 IndexVector indices = backend.vertexIndices();
│ │ │ +
304
│ │ │ + │ │ │ +
306 indices += base;
│ │ │
307
│ │ │ - │ │ │ -
309 indices += base;
│ │ │ -
310
│ │ │ -
311 return indices;
│ │ │ -
312 }
│ │ │ +
308 return indices;
│ │ │ +
309 }
│ │ │
│ │ │ -
313
│ │ │ -
314 template<int dimension, class CoordType>
│ │ │ -
315 int
│ │ │ -
│ │ │ - │ │ │ -
317 index() const
│ │ │ -
318 {
│ │ │ - │ │ │ -
320 }
│ │ │ -
│ │ │ -
321
│ │ │ -
322 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
325 coords() const
│ │ │ -
326 {
│ │ │ -
327 return global(backend.coords());
│ │ │ -
328 }
│ │ │ -
│ │ │ -
329
│ │ │ -
330 template<int dimension, class CoordType>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
333 {
│ │ │ -
334 const typename BackendIterator::Geometry &bgeo =
│ │ │ -
335 backend.geometry();
│ │ │ -
336 std::vector<CoordVector> corners(dimension+1);
│ │ │ -
337 for(int i = 0; i <= dimension; ++i)
│ │ │ -
338 corners[i] = global(bgeo.corner(i));
│ │ │ -
339
│ │ │ -
340 return Geometry(bgeo.type(), corners);
│ │ │ -
341 }
│ │ │ -
│ │ │ -
342
│ │ │ -
343 template<int dimension, class CoordType>
│ │ │ - │ │ │ - │ │ │ -
346 global(const CoordVector &local) const
│ │ │ -
347 {
│ │ │ -
348 return referenceToKuhn(local, getPermutation<dimension>(kuhnIndex));
│ │ │ +
310
│ │ │ +
311 template<int dimension, class CoordType>
│ │ │ +
312 int
│ │ │ +
│ │ │ + │ │ │ +
314 index() const
│ │ │ +
315 {
│ │ │ + │ │ │ +
317 }
│ │ │ +
│ │ │ +
318
│ │ │ +
319 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
322 coords() const
│ │ │ +
323 {
│ │ │ +
324 return global(backend.coords());
│ │ │ +
325 }
│ │ │ +
│ │ │ +
326
│ │ │ +
327 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
330 geometry() const
│ │ │ +
331 {
│ │ │ +
332 const typename BackendIterator::Geometry &
│ │ │ +
333 bgeo = backend.geometry();
│ │ │ +
334 std::vector<CoordVector> corners(dimension+1);
│ │ │ +
335 for(int i = 0; i <= dimension; ++i)
│ │ │ +
336 corners[i] = global(bgeo.corner(i));
│ │ │ +
337
│ │ │ +
338 return Geometry(bgeo.type(), corners);
│ │ │ +
339 }
│ │ │ +
│ │ │ +
340
│ │ │ +
341 template<int dimension, class CoordType>
│ │ │ + │ │ │ +
343 CoordVector
│ │ │ + │ │ │ +
345 global(const CoordVector &local) const
│ │ │ +
346 {
│ │ │ + │ │ │ +
348 getPermutation<dimension>(kuhnIndex)));
│ │ │
349 }
│ │ │
350
│ │ │
351 // common
│ │ │
352 template<int dimension, class CoordType>
│ │ │
353 template<int codimension>
│ │ │
│ │ │ -
354 class RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │ +
354 class RefinementImp<dimension, CoordType>::Codim<codimension>::SubEntityIterator
│ │ │
355 : public ForwardIteratorFacade<typename RefinementImp<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ -
356 public RefinementIteratorSpecial<dimension, CoordType, codimension>
│ │ │ +
356 public RefinementIteratorSpecial<dimension, CoordType, codimension>
│ │ │
357 {
│ │ │
358 public:
│ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │
361
│ │ │ -
362 SubEntityIterator(int nIntervals, bool end = false);
│ │ │ +
362 SubEntityIterator(int nIntervals, bool end = false);
│ │ │
363
│ │ │ -
364 bool equals(const This &other) const;
│ │ │ +
364 bool equals(const This &other) const;
│ │ │
365 protected:
│ │ │ -
366 using RefinementIteratorSpecial<dimension, CoordType, codimension>::kuhnIndex;
│ │ │ -
367 using RefinementIteratorSpecial<dimension, CoordType, codimension>::backend;
│ │ │ +
366 using RefinementIteratorSpecial<dimension, CoordType, codimension>::kuhnIndex;
│ │ │ +
367 using RefinementIteratorSpecial<dimension, CoordType, codimension>::backend;
│ │ │
368 };
│ │ │
│ │ │
369
│ │ │
370#ifndef DOXYGEN
│ │ │
371 template<int dimension, class CoordType>
│ │ │
372 template<int codimension>
│ │ │ - │ │ │ -
374 SubEntityIterator(int nIntervals, bool end)
│ │ │ -
375 : RefinementIteratorSpecial<dimension, CoordType, codimension>(nIntervals, end)
│ │ │ + │ │ │ +
374 SubEntityIterator(int nIntervals, bool end)
│ │ │ +
375 : RefinementIteratorSpecial<dimension, CoordType, codimension>(nIntervals, end)
│ │ │
376 {}
│ │ │
377
│ │ │
378 template<int dimension, class CoordType>
│ │ │
379 template<int codimension>
│ │ │
380 bool
│ │ │ - │ │ │ -
382 equals(const This &other) const
│ │ │ -
383 { return kuhnIndex == other.kuhnIndex && backend == other.backend; }
│ │ │ -
384
│ │ │ -
385#endif // DOXYGEN
│ │ │ -
386
│ │ │ -
387 } // namespace HCubeTriangulation
│ │ │ -
│ │ │ -
388 } // namespace RefinementImp
│ │ │ -
389
│ │ │ -
390 namespace RefinementImp
│ │ │ -
391 {
│ │ │ -
392 // ///////////////////////
│ │ │ -
393 //
│ │ │ -
394 // The refinement traits
│ │ │ -
395 //
│ │ │ -
396
│ │ │ + │ │ │ +
382 equals(const This &other) const
│ │ │ +
383 {
│ │ │ +
384 return kuhnIndex == other.kuhnIndex && backend == other.backend;
│ │ │ +
385 }
│ │ │ +
386#endif
│ │ │ +
387
│ │ │ +
388 } // namespace PyramidTriangulation
│ │ │ +
│ │ │ +
389 } // namespace RefinementImp
│ │ │ +
390
│ │ │ +
391 namespace RefinementImp
│ │ │ +
392 {
│ │ │ +
393 // ///////////////////////
│ │ │ +
394 //
│ │ │ +
395 // The refinement traits
│ │ │ +
396 //
│ │ │
397#ifndef DOXYGEN
│ │ │ -
398 template<unsigned topologyId, class CoordType, unsigned coerceToId,
│ │ │ -
399 int dim>
│ │ │ -
400 struct Traits<
│ │ │ -
401 topologyId, CoordType, coerceToId, dim,
│ │ │ -
402 typename std::enable_if<
│ │ │ -
403 (dim >= 2 &&
│ │ │ -
404 (GeometryTypes::cube(dim).id() >> 1) ==
│ │ │ -
405 (topologyId >> 1) &&
│ │ │ -
406 (GeometryTypes::simplex(dim).id() >> 1) ==
│ │ │ -
407 (coerceToId >> 1)
│ │ │ -
408 )>::type
│ │ │ -
409 >
│ │ │ -
410 {
│ │ │ -
411 typedef HCubeTriangulation::RefinementImp<dim, CoordType> Imp;
│ │ │ -
412 };
│ │ │ -
413#endif
│ │ │ +
398 template<unsigned topologyId, class CoordType, unsigned coerceToId>
│ │ │ +
399 struct Traits<
│ │ │ +
400 topologyId, CoordType, coerceToId, 3,
│ │ │ +
401 typename std::enable_if<
│ │ │ +
402 (GeometryTypes::pyramid.id() >> 1) ==
│ │ │ +
403 (topologyId >> 1) &&
│ │ │ +
404 (GeometryTypes::simplex(3).id() >> 1) ==
│ │ │ +
405 (coerceToId >> 1)
│ │ │ +
406 >::type>
│ │ │ +
407 {
│ │ │ +
408 typedef PyramidTriangulation::RefinementImp<3, CoordType> Imp;
│ │ │ +
409 };
│ │ │ +
410#endif
│ │ │ +
411
│ │ │ +
412 } // namespace RefinementImp
│ │ │ +
413} // namespace Dune
│ │ │
414
│ │ │ -
415 } // namespace RefinementImp
│ │ │ -
416} // namespace Dune
│ │ │ -
417
│ │ │ -
418#endif // DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ -
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │ -
This file contains the parts independent of a particular Refinement implementation.
│ │ │ - │ │ │ +
415#endif // DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ + │ │ │ +
This file contains the parts independent of a particular Refinement implementation.
│ │ │ +
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │
constexpr GeometryType vertex
GeometryType representing a vertex.
Definition type.hh:492
│ │ │
STL namespace.
│ │ │
Definition affinegeometry.hh:22
│ │ │ -
This namespace contains the Refinement implementation for triangulating hypercubes (GeometryType::cub...
Definition hcubetriangulation.cc:46
│ │ │ -
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:293
│ │ │ -
FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from the reference simplex to some Kuhn simplex.
Definition simplex.cc:322
│ │ │ +
This namespace contains the Refinement implementation for triangulating pyramids (GeometryType::pyram...
Definition pyramidtriangulation.cc:27
│ │ │ +
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:293
│ │ │ +
FieldVector< CoordType, dimension > transformCoordinate(FieldVector< CoordType, dimension > point)
Definition pyramidtriangulation.cc:51
│ │ │ +
FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from the reference simplex to some Kuhn simplex.
Definition simplex.cc:322
│ │ │
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:293
│ │ │
FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from the reference simplex to some Kuhn simplex.
Definition simplex.cc:322
│ │ │
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │
generic geometry implementation based on corner coordinates
Definition multilineargeometry.hh:181
│ │ │ - │ │ │ - │ │ │ -
static VertexIterator vEnd(int nIntervals)
Definition hcubetriangulation.cc:121
│ │ │ -
static VertexIterator vBegin(int nIntervals)
Definition hcubetriangulation.cc:113
│ │ │ -
static int nElements(int nIntervals)
Definition hcubetriangulation.cc:129
│ │ │ - │ │ │ -
FieldVector< CoordType, dimension > CoordVector
Definition hcubetriangulation.cc:76
│ │ │ - │ │ │ - │ │ │ -
CoordType ctype
Definition hcubetriangulation.cc:71
│ │ │ -
Codim< 0 >::SubEntityIterator ElementIterator
Definition hcubetriangulation.cc:77
│ │ │ -
FieldVector< int, dimension+1 > IndexVector
Definition hcubetriangulation.cc:78
│ │ │ -
static ElementIterator eBegin(int nIntervals)
Definition hcubetriangulation.cc:137
│ │ │ -
static ElementIterator eEnd(int nIntervals)
Definition hcubetriangulation.cc:145
│ │ │ -
static constexpr int dimension
Definition hcubetriangulation.cc:69
│ │ │ -
Codim< dimension >::SubEntityIterator VertexIterator
Definition hcubetriangulation.cc:75
│ │ │ -
static int nVertices(int nIntervals)
Definition hcubetriangulation.cc:105
│ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition hcubetriangulation.cc:359
│ │ │ - │ │ │ -
Dune::MultiLinearGeometry< CoordType, dimension-codimension, dimension > Geometry
Definition hcubetriangulation.cc:99
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
Refinement::template Codim< dimension >::Geometry Geometry
Definition hcubetriangulation.cc:162
│ │ │ -
BackendRefinement::template Codim< dimension >::SubEntityIterator BackendIterator
Definition hcubetriangulation.cc:175
│ │ │ -
Refinement::BackendRefinement BackendRefinement
Definition hcubetriangulation.cc:174
│ │ │ - │ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition hcubetriangulation.cc:160
│ │ │ - │ │ │ - │ │ │ -
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition hcubetriangulation.cc:187
│ │ │ -
BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator
Definition hcubetriangulation.cc:260
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
RefinementIteratorSpecial(int nIntervals_, bool end=false)
Definition hcubetriangulation.cc:272
│ │ │ -
Refinement::CoordVector CoordVector
Definition hcubetriangulation.cc:241
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
Refinement::BackendRefinement BackendRefinement
Definition hcubetriangulation.cc:259
│ │ │ - │ │ │ -
Refinement::IndexVector IndexVector
Definition hcubetriangulation.cc:240
│ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition hcubetriangulation.cc:239
│ │ │ - │ │ │ -
Refinement::template Codim< 0 >::Geometry Geometry
Definition hcubetriangulation.cc:242
│ │ │ + │ │ │ +
Implementation of the refinement of a pyramid into simplices.
Definition pyramidtriangulation.cc:68
│ │ │ +
FieldVector< CoordType, dimension > CoordVector
Definition pyramidtriangulation.cc:77
│ │ │ +
static int nVertices(int nIntervals)
Definition pyramidtriangulation.cc:109
│ │ │ +
static int nElements(int nIntervals)
Definition pyramidtriangulation.cc:133
│ │ │ +
CoordType ctype
Definition pyramidtriangulation.cc:72
│ │ │ +
Codim< dimension >::SubEntityIterator VertexIterator
Definition pyramidtriangulation.cc:76
│ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition pyramidtriangulation.cc:359
│ │ │ +
Codim< 0 >::SubEntityIterator ElementIterator
Definition pyramidtriangulation.cc:78
│ │ │ +
static constexpr int dimension
Definition pyramidtriangulation.cc:70
│ │ │ +
static ElementIterator eBegin(int nIntervals)
Definition pyramidtriangulation.cc:141
│ │ │ + │ │ │ +
static ElementIterator eEnd(int nIntervals)
Definition pyramidtriangulation.cc:149
│ │ │ + │ │ │ +
FieldVector< int, dimension+1 > IndexVector
Definition pyramidtriangulation.cc:79
│ │ │ +
static VertexIterator vBegin(int nIntervals)
Definition pyramidtriangulation.cc:117
│ │ │ + │ │ │ +
static VertexIterator vEnd(int nIntervals)
Definition pyramidtriangulation.cc:125
│ │ │ + │ │ │ +
Dune::MultiLinearGeometry< CoordType, dimension-codimension, dimension > Geometry
Definition pyramidtriangulation.cc:103
│ │ │ + │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition pyramidtriangulation.cc:164
│ │ │ + │ │ │ +
Refinement::template Codim< dimension >::Geometry Geometry
Definition pyramidtriangulation.cc:166
│ │ │ + │ │ │ +
Refinement::BackendRefinement BackendRefinement
Definition pyramidtriangulation.cc:178
│ │ │ + │ │ │ +
BackendRefinement::template Codim< dimension >::SubEntityIterator BackendIterator
Definition pyramidtriangulation.cc:179
│ │ │ + │ │ │ + │ │ │ +
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition pyramidtriangulation.cc:191
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
Refinement::CoordVector CoordVector
Definition pyramidtriangulation.cc:246
│ │ │ + │ │ │ +
Refinement::template Codim< 0 >::Geometry Geometry
Definition pyramidtriangulation.cc:247
│ │ │ +
Refinement::IndexVector IndexVector
Definition pyramidtriangulation.cc:245
│ │ │ + │ │ │ +
RefinementIteratorSpecial(int nIntervals, bool end=false)
Definition pyramidtriangulation.cc:276
│ │ │ +
BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator
Definition pyramidtriangulation.cc:264
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition pyramidtriangulation.cc:244
│ │ │ +
Refinement::BackendRefinement BackendRefinement
Definition pyramidtriangulation.cc:263
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,353 +1,365 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ * _r_e_f_i_n_e_m_e_n_t │ │ │ │ -hcubetriangulation.cc │ │ │ │ +pyramidtriangulation.cc │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC │ │ │ │ -_6#define DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC │ │ │ │ +5#ifndef DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC │ │ │ │ +_6#define DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC │ │ │ │ 7 │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10 │ │ │ │ +11#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +12#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +13 │ │ │ │ +14#include "_b_a_s_e_._c_c" │ │ │ │ +15#include "_s_i_m_p_l_e_x_._c_c" │ │ │ │ 16 │ │ │ │ -28 │ │ │ │ -29#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ -30#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -31 │ │ │ │ -32#include "_b_a_s_e_._c_c" │ │ │ │ -33#include "_s_i_m_p_l_e_x_._c_c" │ │ │ │ -34 │ │ │ │ -35namespace _D_u_n_e │ │ │ │ -36{ │ │ │ │ -37 namespace RefinementImp │ │ │ │ -38 { │ │ │ │ -_4_6 namespace _H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n { │ │ │ │ -47 │ │ │ │ -48 // //////////// │ │ │ │ -49 // │ │ │ │ -50 // Utilities │ │ │ │ -51 // │ │ │ │ -52 │ │ │ │ -53 using _S_i_m_p_l_e_x_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n; │ │ │ │ -54 using _S_i_m_p_l_e_x_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n; │ │ │ │ -55 │ │ │ │ -56 // //////////////////////////////////// │ │ │ │ -57 // │ │ │ │ -58 // Refine a hypercube with simplices │ │ │ │ -59 // │ │ │ │ -60 │ │ │ │ -61 // forward declaration of the iterator base │ │ │ │ -62 template │ │ │ │ -_6_3 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l; │ │ │ │ -64 │ │ │ │ -65 template │ │ │ │ -_6_6 class _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ -67 { │ │ │ │ -68 public: │ │ │ │ -_6_9 constexpr static int _d_i_m_e_n_s_i_o_n = dimension_; │ │ │ │ -70 │ │ │ │ -_7_1 typedef CoordType _c_t_y_p_e; │ │ │ │ -72 │ │ │ │ -73 template │ │ │ │ -74 struct _C_o_d_i_m; │ │ │ │ -_7_5 typedef typename _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _V_e_r_t_e_x_I_t_e_r_a_t_o_r; │ │ │ │ -_7_6 typedef FieldVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ -_7_7 typedef typename _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r; │ │ │ │ -_7_8 typedef FieldVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ -79 │ │ │ │ -_8_0 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ -_8_1 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ -_8_2 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ -83 │ │ │ │ -_8_4 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ -_8_5 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_B_e_g_i_n(int nIntervals); │ │ │ │ -_8_6 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_E_n_d(int nIntervals); │ │ │ │ -87 private: │ │ │ │ -88 friend class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, 0>; │ │ │ │ -89 friend class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, _d_i_m_e_n_s_i_o_n>; │ │ │ │ -90 │ │ │ │ -91 typedef _S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> BackendRefinement; │ │ │ │ -92 }; │ │ │ │ -93 │ │ │ │ -94 template │ │ │ │ -95 template │ │ │ │ -_9_6 struct _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m │ │ │ │ -97 { │ │ │ │ -98 class _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r; │ │ │ │ -_9_9 typedef _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ -_G_e_o_m_e_t_r_y; │ │ │ │ -100 }; │ │ │ │ -101 │ │ │ │ -102 template │ │ │ │ -103 int │ │ │ │ -_1_0_4 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -105_ _n_V_e_r_t_i_c_e_s(int nIntervals) │ │ │ │ -106 { │ │ │ │ -107 return _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(nIntervals) * factorial(int │ │ │ │ -(_d_i_m_e_n_s_i_o_n)); │ │ │ │ -108 } │ │ │ │ -109 │ │ │ │ -110 template │ │ │ │ -111 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ -_1_1_2 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -113_ _v_B_e_g_i_n(int nIntervals) │ │ │ │ -114 { │ │ │ │ -115 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ -116 } │ │ │ │ -117 │ │ │ │ -118 template │ │ │ │ -119 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ -_1_2_0 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -121_ _v_E_n_d(int nIntervals) │ │ │ │ -122 { │ │ │ │ -123 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ -124 } │ │ │ │ -125 │ │ │ │ -126 template │ │ │ │ -127 int │ │ │ │ -_1_2_8 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -129_ _n_E_l_e_m_e_n_t_s(int nIntervals) │ │ │ │ -130 { │ │ │ │ -131 return _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(nIntervals) * factorial(int │ │ │ │ -(_d_i_m_e_n_s_i_o_n)); │ │ │ │ -132 } │ │ │ │ -133 │ │ │ │ -134 template │ │ │ │ -135 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ -_1_3_6 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -137_ _e_B_e_g_i_n(int nIntervals) │ │ │ │ -138 { │ │ │ │ -139 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ -140 } │ │ │ │ -141 │ │ │ │ -142 template │ │ │ │ -143 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ -_1_4_4 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ -145_ _e_E_n_d(int nIntervals) │ │ │ │ -146 { │ │ │ │ -147 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ -148 } │ │ │ │ -149 │ │ │ │ -150 // ////////////// │ │ │ │ -151 // │ │ │ │ -152 // The iterator │ │ │ │ -153 // │ │ │ │ -154 │ │ │ │ -155 // vertices │ │ │ │ -156 template │ │ │ │ -_1_5_7 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -158 { │ │ │ │ -159 public: │ │ │ │ -_1_6_0 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_1_6_1 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ -_1_6_2 typedef typename Refinement::template _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ -163 │ │ │ │ -164 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ -165 │ │ │ │ -166 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ +17namespace _D_u_n_e │ │ │ │ +18{ │ │ │ │ +19 namespace RefinementImp │ │ │ │ +20 { │ │ │ │ +_2_6 namespace _P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ +27 { │ │ │ │ +28 // //////////// │ │ │ │ +29 // │ │ │ │ +30 // Utilities │ │ │ │ +31 // │ │ │ │ +32 │ │ │ │ +33 using _S_i_m_p_l_e_x_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n; │ │ │ │ +34 using _S_i_m_p_l_e_x_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n; │ │ │ │ +35 │ │ │ │ +36 // //////////////////////////////////// │ │ │ │ +37 // │ │ │ │ +38 // Refine a pyramid with simplices │ │ │ │ +39 // │ │ │ │ +40 │ │ │ │ +41 // forward declaration of the iterator base │ │ │ │ +42 template │ │ │ │ +_4_3 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l; │ │ │ │ +44 │ │ │ │ +45 /* │ │ │ │ +46 * The permutations 0 and 1 of the Kuhn-decomposition of a cube into │ │ │ │ +simplices form a pyramid. │ │ │ │ +47 * The resulting pyramid is not oriented the same as the reference pyramid │ │ │ │ +and so the Kuhn-coordinates │ │ │ │ +48 * have to be transformed using the method below. │ │ │ │ +49 */ │ │ │ │ +50 template FieldVector │ │ │ │ +_5_1 _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e( FieldVector point) │ │ │ │ +52 { │ │ │ │ +53 FieldVector transform; │ │ │ │ +54 transform[0]=1-point[0]; │ │ │ │ +55 transform[1]=1-point[1]; │ │ │ │ +56 transform[2]=point[2]; │ │ │ │ +57 return transform; │ │ │ │ +58 } │ │ │ │ +59 │ │ │ │ +66 template │ │ │ │ +_6_7 class _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ +68 { │ │ │ │ +69 public: │ │ │ │ +_7_0 constexpr static int _d_i_m_e_n_s_i_o_n = dimension_; │ │ │ │ +71 │ │ │ │ +_7_2 typedef CoordType _c_t_y_p_e; │ │ │ │ +73 │ │ │ │ +74 template │ │ │ │ +75 struct _C_o_d_i_m; │ │ │ │ +_7_6 typedef typename _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _V_e_r_t_e_x_I_t_e_r_a_t_o_r; │ │ │ │ +_7_7 typedef FieldVector _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ +_7_8 typedef typename _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r; │ │ │ │ +_7_9 typedef FieldVector _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ +80 │ │ │ │ +_8_1 static int _n_V_e_r_t_i_c_e_s(int nIntervals); │ │ │ │ +_8_2 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(int nIntervals); │ │ │ │ +_8_3 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(int nIntervals); │ │ │ │ +84 │ │ │ │ +_8_5 static int _n_E_l_e_m_e_n_t_s(int nIntervals); │ │ │ │ +_8_6 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_B_e_g_i_n(int nIntervals); │ │ │ │ +_8_7 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_E_n_d(int nIntervals); │ │ │ │ +88 │ │ │ │ +89 private: │ │ │ │ +90 friend class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, 0>; │ │ │ │ +91 friend class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l<_d_i_m_e_n_s_i_o_n, CoordType, _d_i_m_e_n_s_i_o_n>; │ │ │ │ +92 │ │ │ │ +93 typedef _S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> BackendRefinement; │ │ │ │ +94 │ │ │ │ +95 constexpr static int nKuhnSimplices = 2; │ │ │ │ +96 }; │ │ │ │ +97 │ │ │ │ +98 template │ │ │ │ +99 template │ │ │ │ +_1_0_0 struct _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m │ │ │ │ +101 { │ │ │ │ +102 class _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r; │ │ │ │ +_1_0_3 typedef _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ +104 }; │ │ │ │ +105 │ │ │ │ +106 template │ │ │ │ +107 int │ │ │ │ +_1_0_8 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +109_ _n_V_e_r_t_i_c_e_s(int nIntervals) │ │ │ │ +110 { │ │ │ │ +111 return _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(nIntervals) * nKuhnSimplices; │ │ │ │ +112 } │ │ │ │ +113 │ │ │ │ +114 template │ │ │ │ +115 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ +_1_1_6 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +117_ _v_B_e_g_i_n(int nIntervals) │ │ │ │ +118 { │ │ │ │ +119 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ +120 } │ │ │ │ +121 │ │ │ │ +122 template │ │ │ │ +123 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ +_1_2_4 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +125_ _v_E_n_d(int nIntervals) │ │ │ │ +126 { │ │ │ │ +127 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ +128 } │ │ │ │ +129 │ │ │ │ +130 template │ │ │ │ +131 int │ │ │ │ +_1_3_2 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +133_ _n_E_l_e_m_e_n_t_s(int nIntervals) │ │ │ │ +134 { │ │ │ │ +135 return _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(nIntervals) * nKuhnSimplices; │ │ │ │ +136 } │ │ │ │ +137 │ │ │ │ +138 template │ │ │ │ +139 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ +_1_4_0 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +141_ _e_B_e_g_i_n(int nIntervals) │ │ │ │ +142 { │ │ │ │ +143 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals); │ │ │ │ +144 } │ │ │ │ +145 │ │ │ │ +146 template │ │ │ │ +147 typename _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ +_1_4_8 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_: │ │ │ │ +149_ _e_E_n_d(int nIntervals) │ │ │ │ +150 { │ │ │ │ +151 return _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r(nIntervals, true); │ │ │ │ +152 } │ │ │ │ +153 │ │ │ │ +154 // ////////////// │ │ │ │ +155 // │ │ │ │ +156 // The iterator │ │ │ │ +157 // │ │ │ │ +158 │ │ │ │ +159 // vertices │ │ │ │ +160 template │ │ │ │ +_1_6_1 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +162 { │ │ │ │ +163 public: │ │ │ │ +_1_6_4 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_1_6_5 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ +_1_6_6 typedef typename Refinement::template _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ 167 │ │ │ │ -168 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ +168 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ 169 │ │ │ │ -170 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y() const; │ │ │ │ +170 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ 171 │ │ │ │ -172 int _i_n_d_e_x() const; │ │ │ │ -173 protected: │ │ │ │ -_1_7_4 typedef typename Refinement::BackendRefinement _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_1_7_5 typedef typename BackendRefinement::template _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +172 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ +173 │ │ │ │ +174 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y() const; │ │ │ │ +175 │ │ │ │ +176 int _i_n_d_e_x() const; │ │ │ │ +177 protected: │ │ │ │ +_1_7_8 typedef typename Refinement::BackendRefinement _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_1_7_9 typedef typename BackendRefinement::template _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r; │ │ │ │ -_1_7_6 constexpr static int _n_K_u_h_n_S_i_m_p_l_i_c_e_s = factorial(int(dimension)); │ │ │ │ -177 │ │ │ │ -_1_7_8 int _n_I_n_t_e_r_v_a_l_s__; │ │ │ │ -179 │ │ │ │ -_1_8_0 int _k_u_h_n_I_n_d_e_x; │ │ │ │ -_1_8_1 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d; │ │ │ │ -_1_8_2 const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d_E_n_d; │ │ │ │ -183 }; │ │ │ │ -184 │ │ │ │ -185 template │ │ │ │ -_1_8_6 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -187_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ -188 : _n_I_n_t_e_r_v_a_l_s__(nIntervals), _k_u_h_n_I_n_d_e_x(0), │ │ │ │ -189 _b_a_c_k_e_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vBegin(_n_I_n_t_e_r_v_a_l_s__)), │ │ │ │ -190 _b_a_c_k_e_n_d_E_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vEnd(_n_I_n_t_e_r_v_a_l_s__)) │ │ │ │ -191 { │ │ │ │ -192 if (end) │ │ │ │ -193 _k_u_h_n_I_n_d_e_x = _n_K_u_h_n_S_i_m_p_l_i_c_e_s; │ │ │ │ -194 } │ │ │ │ -195 │ │ │ │ -196 template │ │ │ │ -197 void │ │ │ │ -_1_9_8 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -199_ _i_n_c_r_e_m_e_n_t() │ │ │ │ -200 { │ │ │ │ -201 ++_b_a_c_k_e_n_d; │ │ │ │ -202 if (_b_a_c_k_e_n_d == _b_a_c_k_e_n_d_E_n_d) │ │ │ │ -203 { │ │ │ │ -204 _b_a_c_k_e_n_d = _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ -205 ++_k_u_h_n_I_n_d_e_x; │ │ │ │ -206 } │ │ │ │ -207 } │ │ │ │ -208 │ │ │ │ -209 template │ │ │ │ -210 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +_1_8_0 constexpr static int _n_K_u_h_n_S_i_m_p_l_i_c_e_s = 2; │ │ │ │ +181 │ │ │ │ +_1_8_2 int _n_I_n_t_e_r_v_a_l_s__; │ │ │ │ +183 │ │ │ │ +_1_8_4 int _k_u_h_n_I_n_d_e_x; │ │ │ │ +_1_8_5 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d; │ │ │ │ +_1_8_6 const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d_E_n_d; │ │ │ │ +187 }; │ │ │ │ +188 │ │ │ │ +189 template │ │ │ │ +_1_9_0 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +191_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ +192 : _n_I_n_t_e_r_v_a_l_s__(nIntervals), _k_u_h_n_I_n_d_e_x(0), │ │ │ │ +193 _b_a_c_k_e_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vBegin(_n_I_n_t_e_r_v_a_l_s__)), │ │ │ │ +194 _b_a_c_k_e_n_d_E_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::vEnd(_n_I_n_t_e_r_v_a_l_s__)) │ │ │ │ +195 { │ │ │ │ +196 if (end) │ │ │ │ +197 _k_u_h_n_I_n_d_e_x = _n_K_u_h_n_S_i_m_p_l_i_c_e_s; │ │ │ │ +198 } │ │ │ │ +199 │ │ │ │ +200 template │ │ │ │ +201 void │ │ │ │ +_2_0_2 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +203_ _i_n_c_r_e_m_e_n_t() │ │ │ │ +204 { │ │ │ │ +205 ++_b_a_c_k_e_n_d; │ │ │ │ +206 if(_b_a_c_k_e_n_d == _b_a_c_k_e_n_d_E_n_d) │ │ │ │ +207 { │ │ │ │ +208 _b_a_c_k_e_n_d = _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ +209 ++_k_u_h_n_I_n_d_e_x; │ │ │ │ +210 } │ │ │ │ +211 } │ │ │ │ +212 │ │ │ │ +213 template │ │ │ │ +214 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ _C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -_2_1_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -212_ _c_o_o_r_d_s() const │ │ │ │ -213 { │ │ │ │ -214 return _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(_b_a_c_k_e_n_d.coords(), _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_> │ │ │ │ -(_k_u_h_n_I_n_d_e_x)); │ │ │ │ -215 } │ │ │ │ -216 │ │ │ │ -217 template │ │ │ │ -218 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +_2_1_5 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +216_ _c_o_o_r_d_s() const │ │ │ │ +217 { │ │ │ │ +218 return _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e(_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(_b_a_c_k_e_n_d.coords(), │ │ │ │ +219 _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(_k_u_h_n_I_n_d_e_x))); │ │ │ │ +220 } │ │ │ │ +221 │ │ │ │ +222 template │ │ │ │ +223 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ _G_e_o_m_e_t_r_y │ │ │ │ -_2_1_9 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_:_g_e_o_m_e_t_r_y () │ │ │ │ +_2_2_4 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_:_g_e_o_m_e_t_r_y () │ │ │ │ const │ │ │ │ -220 { │ │ │ │ -221 std::vector corners(1); │ │ │ │ -222 corners[0] = _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(_b_a_c_k_e_n_d.coords(), _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_> │ │ │ │ +225 { │ │ │ │ +226 std::vector corners(1); │ │ │ │ +227 corners[0] = _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(_b_a_c_k_e_n_d.coords(), _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_> │ │ │ │ (_k_u_h_n_I_n_d_e_x)); │ │ │ │ -223 return _G_e_o_m_e_t_r_y(_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x, corners); │ │ │ │ -224 } │ │ │ │ -225 │ │ │ │ -226 template │ │ │ │ -227 int │ │ │ │ -_2_2_8 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ -229_ _i_n_d_e_x() const │ │ │ │ -230 { │ │ │ │ -231 return _k_u_h_n_I_n_d_e_x*_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(_n_I_n_t_e_r_v_a_l_s__) + _b_a_c_k_e_n_d.index │ │ │ │ +228 return _G_e_o_m_e_t_r_y(_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x, corners); │ │ │ │ +229 } │ │ │ │ +230 │ │ │ │ +231 template │ │ │ │ +232 int │ │ │ │ +_2_3_3 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ +234_ _i_n_d_e_x() const │ │ │ │ +235 { │ │ │ │ +236 return _k_u_h_n_I_n_d_e_x*_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(_n_I_n_t_e_r_v_a_l_s__) + _b_a_c_k_e_n_d.index │ │ │ │ (); │ │ │ │ -232 } │ │ │ │ -233 │ │ │ │ -234 // elements │ │ │ │ -235 template │ │ │ │ -_2_3_6 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -237 { │ │ │ │ -238 public: │ │ │ │ -_2_3_9 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_2_4_0 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_I_n_d_e_x_V_e_c_t_o_r _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ -_2_4_1 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ -_2_4_2 typedef typename Refinement::template _C_o_d_i_m_<_0_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ -243 │ │ │ │ -244 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int _n_I_n_t_e_r_v_a_l_s__, bool end = false); │ │ │ │ -245 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(const _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_> &other); │ │ │ │ -246 │ │ │ │ -247 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ +237 } │ │ │ │ +238 │ │ │ │ +239 // elements │ │ │ │ +240 template │ │ │ │ +_2_4_1 class _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +242 { │ │ │ │ +243 public: │ │ │ │ +_2_4_4 typedef _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_> _R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_2_4_5 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_I_n_d_e_x_V_e_c_t_o_r _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ +_2_4_6 typedef typename _R_e_f_i_n_e_m_e_n_t_:_:_C_o_o_r_d_V_e_c_t_o_r _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ +_2_4_7 typedef typename Refinement::template _C_o_d_i_m_<_0_>_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ 248 │ │ │ │ -249 _I_n_d_e_x_V_e_c_t_o_r _v_e_r_t_e_x_I_n_d_i_c_e_s() const; │ │ │ │ -250 int _i_n_d_e_x() const; │ │ │ │ -251 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ +249 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end = false); │ │ │ │ +250 │ │ │ │ +251 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ 252 │ │ │ │ -253 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y() const; │ │ │ │ -254 │ │ │ │ -255 private: │ │ │ │ -256 _C_o_o_r_d_V_e_c_t_o_r global(const _C_o_o_r_d_V_e_c_t_o_r &local) const; │ │ │ │ -257 │ │ │ │ -258 protected: │ │ │ │ -_2_5_9 typedef typename Refinement::BackendRefinement _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ -_2_6_0 typedef typename BackendRefinement::template _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ +253 _I_n_d_e_x_V_e_c_t_o_r _v_e_r_t_e_x_I_n_d_i_c_e_s() const; │ │ │ │ +254 int _i_n_d_e_x() const; │ │ │ │ +255 _C_o_o_r_d_V_e_c_t_o_r _c_o_o_r_d_s() const; │ │ │ │ +256 │ │ │ │ +257 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y() const; │ │ │ │ +258 │ │ │ │ +259 private: │ │ │ │ +260 _C_o_o_r_d_V_e_c_t_o_r global(const _C_o_o_r_d_V_e_c_t_o_r &local) const; │ │ │ │ +261 │ │ │ │ +262 protected: │ │ │ │ +_2_6_3 typedef typename Refinement::BackendRefinement _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t; │ │ │ │ +_2_6_4 typedef typename BackendRefinement::template _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r; │ │ │ │ -_2_6_1 constexpr static int _n_K_u_h_n_S_i_m_p_l_i_c_e_s = factorial(dimension); │ │ │ │ -262 │ │ │ │ -_2_6_3 int _n_I_n_t_e_r_v_a_l_s__; │ │ │ │ -264 │ │ │ │ -_2_6_5 int _k_u_h_n_I_n_d_e_x; │ │ │ │ -_2_6_6 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d; │ │ │ │ -_2_6_7 const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d_E_n_d; │ │ │ │ -268 }; │ │ │ │ -269 │ │ │ │ -270 template │ │ │ │ -_2_7_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -272_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ -273 : _n_I_n_t_e_r_v_a_l_s__(nIntervals), _k_u_h_n_I_n_d_e_x(0), │ │ │ │ -274 _b_a_c_k_e_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eBegin(_n_I_n_t_e_r_v_a_l_s__)), │ │ │ │ -275 _b_a_c_k_e_n_d_E_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eEnd(_n_I_n_t_e_r_v_a_l_s__)) │ │ │ │ -276 { │ │ │ │ -277 if (end) │ │ │ │ -278 _k_u_h_n_I_n_d_e_x = _n_K_u_h_n_S_i_m_p_l_i_c_e_s; │ │ │ │ -279 } │ │ │ │ -280 template │ │ │ │ -_2_8_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -282_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(const _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_> &other) │ │ │ │ -283 : _n_I_n_t_e_r_v_a_l_s__(other._n_I_n_t_e_r_v_a_l_s__), _k_u_h_n_I_n_d_e_x(other._k_u_h_n_I_n_d_e_x), │ │ │ │ -284 _b_a_c_k_e_n_d(other._b_a_c_k_e_n_d), │ │ │ │ -285 _b_a_c_k_e_n_d_E_n_d(other._b_a_c_k_e_n_d_E_n_d) │ │ │ │ -286 {} │ │ │ │ -287 │ │ │ │ -288 template │ │ │ │ -289 void │ │ │ │ -_2_9_0 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -291_ _i_n_c_r_e_m_e_n_t() │ │ │ │ +_2_6_5 constexpr static int _n_K_u_h_n_S_i_m_p_l_i_c_e_s = 2; │ │ │ │ +266 │ │ │ │ +_2_6_7 int _n_I_n_t_e_r_v_a_l_s__; │ │ │ │ +268 │ │ │ │ +_2_6_9 int _k_u_h_n_I_n_d_e_x; │ │ │ │ +_2_7_0 _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d; │ │ │ │ +_2_7_1 const _B_a_c_k_e_n_d_I_t_e_r_a_t_o_r _b_a_c_k_e_n_d_E_n_d; │ │ │ │ +272 }; │ │ │ │ +273 │ │ │ │ +274 template │ │ │ │ +_2_7_5 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +276_ _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l(int nIntervals, bool end) │ │ │ │ +277 : _n_I_n_t_e_r_v_a_l_s__(nIntervals), _k_u_h_n_I_n_d_e_x(0), │ │ │ │ +278 _b_a_c_k_e_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eBegin(_n_I_n_t_e_r_v_a_l_s__)), │ │ │ │ +279 _b_a_c_k_e_n_d_E_n_d(_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t::eEnd(_n_I_n_t_e_r_v_a_l_s__)) │ │ │ │ +280 { │ │ │ │ +281 if (end) │ │ │ │ +282 _k_u_h_n_I_n_d_e_x = _n_K_u_h_n_S_i_m_p_l_i_c_e_s; │ │ │ │ +283 } │ │ │ │ +284 │ │ │ │ +285 template │ │ │ │ +286 void │ │ │ │ +_2_8_7 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +288_ _i_n_c_r_e_m_e_n_t() │ │ │ │ +289 { │ │ │ │ +290 ++_b_a_c_k_e_n_d; │ │ │ │ +291 if (_b_a_c_k_e_n_d == _b_a_c_k_e_n_d_E_n_d) │ │ │ │ 292 { │ │ │ │ -293 ++_b_a_c_k_e_n_d; │ │ │ │ -294 if (_b_a_c_k_e_n_d == _b_a_c_k_e_n_d_E_n_d) │ │ │ │ -295 { │ │ │ │ -296 _b_a_c_k_e_n_d = _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ -297 ++_k_u_h_n_I_n_d_e_x; │ │ │ │ -298 } │ │ │ │ -299 } │ │ │ │ -300 │ │ │ │ -301 template │ │ │ │ -302 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ -_3_0_3 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -304_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ -305 { │ │ │ │ -306 _I_n_d_e_x_V_e_c_t_o_r indices = _b_a_c_k_e_n_d.vertexIndices(); │ │ │ │ +293 _b_a_c_k_e_n_d = _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ +294 ++_k_u_h_n_I_n_d_e_x; │ │ │ │ +295 } │ │ │ │ +296 } │ │ │ │ +297 │ │ │ │ +298 template │ │ │ │ +299 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ +_3_0_0 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +301_ _v_e_r_t_e_x_I_n_d_i_c_e_s() const │ │ │ │ +302 { │ │ │ │ +303 _I_n_d_e_x_V_e_c_t_o_r indices = _b_a_c_k_e_n_d.vertexIndices(); │ │ │ │ +304 │ │ │ │ +305 int base = _k_u_h_n_I_n_d_e_x * _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ +306 indices += base; │ │ │ │ 307 │ │ │ │ -308 int base = _k_u_h_n_I_n_d_e_x * _B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s(_n_I_n_t_e_r_v_a_l_s__); │ │ │ │ -309 indices += base; │ │ │ │ +308 return indices; │ │ │ │ +309 } │ │ │ │ 310 │ │ │ │ -311 return indices; │ │ │ │ -312 } │ │ │ │ -313 │ │ │ │ -314 template │ │ │ │ -315 int │ │ │ │ -_3_1_6 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -317_ _i_n_d_e_x() const │ │ │ │ -318 { │ │ │ │ -319 return _k_u_h_n_I_n_d_e_x*_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(_n_I_n_t_e_r_v_a_l_s__) + _b_a_c_k_e_n_d.index │ │ │ │ +311 template │ │ │ │ +312 int │ │ │ │ +_3_1_3 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +314_ _i_n_d_e_x() const │ │ │ │ +315 { │ │ │ │ +316 return _k_u_h_n_I_n_d_e_x*_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s(_n_I_n_t_e_r_v_a_l_s__) + _b_a_c_k_e_n_d.index │ │ │ │ (); │ │ │ │ -320 } │ │ │ │ -321 │ │ │ │ -322 template │ │ │ │ -323 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -_3_2_4 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -325_ _c_o_o_r_d_s() const │ │ │ │ -326 { │ │ │ │ -327 return global(_b_a_c_k_e_n_d.coords()); │ │ │ │ -328 } │ │ │ │ -329 │ │ │ │ -330 template │ │ │ │ -331 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_G_e_o_m_e_t_r_y │ │ │ │ -_3_3_2 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ -333 { │ │ │ │ -334 const typename BackendIterator::Geometry &bgeo = │ │ │ │ -335 _b_a_c_k_e_n_d.geometry(); │ │ │ │ -336 std::vector corners(dimension+1); │ │ │ │ -337 for(int i = 0; i <= dimension; ++i) │ │ │ │ -338 corners[i] = global(bgeo.corner(i)); │ │ │ │ -339 │ │ │ │ -340 return _G_e_o_m_e_t_r_y(bgeo.type(), corners); │ │ │ │ -341 } │ │ │ │ -342 │ │ │ │ -343 template │ │ │ │ -344 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -345 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ -346_ _g_l_o_b_a_l(const CoordVector &local) const │ │ │ │ -347 { │ │ │ │ -348 return _r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(local, _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(kuhnIndex)); │ │ │ │ +317 } │ │ │ │ +318 │ │ │ │ +319 template │ │ │ │ +320 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +_3_2_1 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +322_ _c_o_o_r_d_s() const │ │ │ │ +323 { │ │ │ │ +324 return global(_b_a_c_k_e_n_d.coords()); │ │ │ │ +325 } │ │ │ │ +326 │ │ │ │ +327 template │ │ │ │ +328 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_:_G_e_o_m_e_t_r_y │ │ │ │ +_3_2_9 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +330_ _g_e_o_m_e_t_r_y() const │ │ │ │ +331 { │ │ │ │ +332 const typename BackendIterator::Geometry & │ │ │ │ +333 bgeo = _b_a_c_k_e_n_d.geometry(); │ │ │ │ +334 std::vector corners(dimension+1); │ │ │ │ +335 for(int i = 0; i <= dimension; ++i) │ │ │ │ +336 corners[i] = global(bgeo.corner(i)); │ │ │ │ +337 │ │ │ │ +338 return _G_e_o_m_e_t_r_y(bgeo.type(), corners); │ │ │ │ +339 } │ │ │ │ +340 │ │ │ │ +341 template │ │ │ │ +342 typename _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>:: │ │ │ │ +343 CoordVector │ │ │ │ +344 _R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_>_:_: │ │ │ │ +345_ _g_l_o_b_a_l(const CoordVector &local) const │ │ │ │ +346 { │ │ │ │ +347 return _t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e(_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n(local, │ │ │ │ +348 _g_e_t_P_e_r_m_u_t_a_t_i_o_n_<_d_i_m_e_n_s_i_o_n_>(kuhnIndex))); │ │ │ │ 349 } │ │ │ │ 350 │ │ │ │ 351 // common │ │ │ │ 352 template │ │ │ │ 353 template │ │ │ │ _3_5_4 class _R_e_f_i_n_e_m_e_n_t_I_m_p<_d_i_m_e_n_s_i_o_n, CoordType>::_C_o_d_i_m_:_: │ │ │ │ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ @@ -381,76 +393,77 @@ │ │ │ │ 377 │ │ │ │ 378 template │ │ │ │ 379 template │ │ │ │ 380 bool │ │ │ │ 381 _R_e_f_i_n_e_m_e_n_t_I_m_p_<_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_>_:_:_C_o_d_i_m_<_c_o_d_i_m_e_n_s_i_o_n_>_:_: │ │ │ │ _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ 382_ _e_q_u_a_l_s(const This &other) const │ │ │ │ -383 { return kuhnIndex == other.kuhnIndex && backend == other.backend; } │ │ │ │ -384 │ │ │ │ -385#endif // DOXYGEN │ │ │ │ -386 │ │ │ │ -387 } // namespace HCubeTriangulation │ │ │ │ -388 } // namespace RefinementImp │ │ │ │ -389 │ │ │ │ -390 namespace RefinementImp │ │ │ │ -391 { │ │ │ │ -392 // /////////////////////// │ │ │ │ -393 // │ │ │ │ -394 // The refinement traits │ │ │ │ -395 // │ │ │ │ -396 │ │ │ │ +383 { │ │ │ │ +384 return kuhnIndex == other.kuhnIndex && backend == other.backend; │ │ │ │ +385 } │ │ │ │ +386#endif │ │ │ │ +387 │ │ │ │ +388 } // namespace PyramidTriangulation │ │ │ │ +389 } // namespace RefinementImp │ │ │ │ +390 │ │ │ │ +391 namespace RefinementImp │ │ │ │ +392 { │ │ │ │ +393 // /////////////////////// │ │ │ │ +394 // │ │ │ │ +395 // The refinement traits │ │ │ │ +396 // │ │ │ │ 397#ifndef DOXYGEN │ │ │ │ -398 template │ │ │ │ -400 struct Traits< │ │ │ │ -401 topologyId, CoordType, coerceToId, dim, │ │ │ │ -402 typename _s_t_d::enable_if< │ │ │ │ -403 (dim >= 2 && │ │ │ │ -404 (GeometryTypes::cube(dim).id() >> 1) == │ │ │ │ -405 (topologyId >> 1) && │ │ │ │ -406 (GeometryTypes::simplex(dim).id() >> 1) == │ │ │ │ -407 (coerceToId >> 1) │ │ │ │ -408 )>::type │ │ │ │ -409 > │ │ │ │ -410 { │ │ │ │ -411 typedef HCubeTriangulation::RefinementImp Imp; │ │ │ │ -412 }; │ │ │ │ -413#endif │ │ │ │ +398 template │ │ │ │ +399 struct Traits< │ │ │ │ +400 topologyId, CoordType, coerceToId, 3, │ │ │ │ +401 typename _s_t_d::enable_if< │ │ │ │ +402 (GeometryTypes::pyramid.id() >> 1) == │ │ │ │ +403 (topologyId >> 1) && │ │ │ │ +404 (GeometryTypes::simplex(3).id() >> 1) == │ │ │ │ +405 (coerceToId >> 1) │ │ │ │ +406 >::type> │ │ │ │ +407 { │ │ │ │ +408 typedef PyramidTriangulation::RefinementImp<3, CoordType> Imp; │ │ │ │ +409 }; │ │ │ │ +410#endif │ │ │ │ +411 │ │ │ │ +412 } // namespace RefinementImp │ │ │ │ +413} // namespace Dune │ │ │ │ 414 │ │ │ │ -415 } // namespace RefinementImp │ │ │ │ -416} // namespace Dune │ │ │ │ -417 │ │ │ │ -418#endif // DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC │ │ │ │ +415#endif // DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC │ │ │ │ _t_y_p_e_._h_h │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ -_s_i_m_p_l_e_x_._c_c │ │ │ │ -This file contains the Refinement implementation for simplices (triangles, │ │ │ │ -tetrahedrons.... │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ _b_a_s_e_._c_c │ │ │ │ This file contains the parts independent of a particular Refinement │ │ │ │ implementation. │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ +_s_i_m_p_l_e_x_._c_c │ │ │ │ +This file contains the Refinement implementation for simplices (triangles, │ │ │ │ +tetrahedrons.... │ │ │ │ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x │ │ │ │ constexpr GeometryType vertex │ │ │ │ GeometryType representing a vertex. │ │ │ │ DDeeffiinniittiioonn type.hh:492 │ │ │ │ _s_t_d │ │ │ │ STL namespace. │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n │ │ │ │ This namespace contains the Refinement implementation for triangulating │ │ │ │ -hypercubes (GeometryType::cub... │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:46 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n │ │ │ │ +pyramids (GeometryType::pyram... │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:27 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n │ │ │ │ FieldVector< int, n > getPermutation(int m) │ │ │ │ Calculate permutation from it's index. │ │ │ │ DDeeffiinniittiioonn simplex.cc:293 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_C_o_o_r_d_i_n_a_t_e │ │ │ │ +FieldVector< CoordType, dimension > transformCoordinate(FieldVector< CoordType, │ │ │ │ +dimension > point) │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:51 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_r_e_f_e_r_e_n_c_e_T_o_K_u_h_n │ │ │ │ FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, │ │ │ │ dimension > point, const FieldVector< int, dimension > &kuhn) │ │ │ │ Map from the reference simplex to some Kuhn simplex. │ │ │ │ DDeeffiinniittiioonn simplex.cc:322 │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_g_e_t_P_e_r_m_u_t_a_t_i_o_n │ │ │ │ FieldVector< int, n > getPermutation(int m) │ │ │ │ Calculate permutation from it's index. │ │ │ │ @@ -462,205 +475,206 @@ │ │ │ │ DDeeffiinniittiioonn simplex.cc:322 │ │ │ │ _D_u_n_e_:_:_C_o_d_i_m │ │ │ │ Static tag representing a codimension. │ │ │ │ DDeeffiinniittiioonn dimension.hh:24 │ │ │ │ _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ generic geometry implementation based on corner coordinates │ │ │ │ DDeeffiinniittiioonn multilineargeometry.hh:181 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:63 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:67 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_E_n_d │ │ │ │ -static VertexIterator vEnd(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:121 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_B_e_g_i_n │ │ │ │ -static VertexIterator vBegin(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:113 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ -static int nElements(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:129 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ -_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_T_h_i_s │ │ │ │ -SubEntityIterator This │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:360 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:43 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ +Implementation of the refinement of a pyramid into simplices. │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:68 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ FieldVector< CoordType, dimension > CoordVector │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:76 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ -_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const This &other) const │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ -_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ -SubEntityIterator(int nIntervals, bool end=false) │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_c_t_y_p_e │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:77 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ +static int nVertices(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:109 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ +static int nElements(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:133 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_c_t_y_p_e │ │ │ │ CoordType ctype │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:71 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ -Codim< 0 >::SubEntityIterator ElementIterator │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:77 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ -FieldVector< int, dimension+1 > IndexVector │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:78 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_B_e_g_i_n │ │ │ │ -static ElementIterator eBegin(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:137 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_E_n_d │ │ │ │ -static ElementIterator eEnd(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:145 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ -_>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int dimension │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:69 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:72 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ Codim< dimension >::SubEntityIterator VertexIterator │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:75 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ -static int nVertices(int nIntervals) │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:105 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:76 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ RefinementImp< dimension, CoordType > Refinement │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:359 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:97 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:359 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ +Codim< 0 >::SubEntityIterator ElementIterator │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:78 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +_>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ +static constexpr int dimension │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:70 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_B_e_g_i_n │ │ │ │ +static ElementIterator eBegin(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:141 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ +SubEntityIterator(int nIntervals, bool end=false) │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_e_E_n_d │ │ │ │ +static ElementIterator eEnd(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:149 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const This &other) const │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ +FieldVector< int, dimension+1 > IndexVector │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:79 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_B_e_g_i_n │ │ │ │ +static VertexIterator vBegin(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:117 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e │ │ │ │ +_>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _>_:_:_T_h_i_s │ │ │ │ +SubEntityIterator This │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:360 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_v_E_n_d │ │ │ │ +static VertexIterator vEnd(int nIntervals) │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:125 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_C_o_d_i_m │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:101 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_: │ │ │ │ _G_e_o_m_e_t_r_y │ │ │ │ Dune::MultiLinearGeometry< CoordType, dimension-codimension, dimension > │ │ │ │ Geometry │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:99 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_n_K_u_h_n_S_i_m_p_l_i_c_e_s │ │ │ │ -static constexpr int nKuhnSimplices │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:176 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_d_e_x │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:103 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_d_e_x │ │ │ │ int index() const │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:229 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_n_I_n_t_e_r_v_a_l_s__ │ │ │ │ -int nIntervals_ │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:178 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ -void increment() │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:199 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ -int kuhnIndex │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:180 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -Refinement::CoordVector CoordVector │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:161 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:234 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ +RefinementImp< dimension, CoordType > Refinement │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:164 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ Geometry geometry() const │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:219 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:224 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ Refinement::template Codim< dimension >::Geometry Geometry │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:162 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r │ │ │ │ -BackendRefinement::template Codim< dimension >::SubEntityIterator │ │ │ │ -BackendIterator │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:175 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:166 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_n_K_u_h_n_S_i_m_p_l_i_c_e_s │ │ │ │ +static constexpr int nKuhnSimplices │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:180 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ Refinement::BackendRefinement BackendRefinement │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:174 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_b_a_c_k_e_n_d │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:178 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_b_a_c_k_e_n_d │ │ │ │ BackendIterator backend │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:181 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ -RefinementImp< dimension, CoordType > Refinement │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:160 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_c_o_o_r_d_s │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:185 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r │ │ │ │ +BackendRefinement::template Codim< dimension >::SubEntityIterator │ │ │ │ +BackendIterator │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:179 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ +void increment() │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:203 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_c_o_o_r_d_s │ │ │ │ CoordVector coords() const │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:212 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_b_a_c_k_e_n_d_E_n_d │ │ │ │ -const BackendIterator backendEnd │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:182 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:216 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ RefinementIteratorSpecial(int nIntervals, bool end=false) │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:187 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r │ │ │ │ -BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:260 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_i_n_d_e_x │ │ │ │ -int index() const │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:317 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_b_a_c_k_e_n_d │ │ │ │ -BackendIterator backend │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:266 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_c_o_o_r_d_s │ │ │ │ -CoordVector coords() const │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:325 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_n_K_u_h_n_S_i_m_p_l_i_c_e_s │ │ │ │ -static constexpr int nKuhnSimplices │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:261 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_v_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ -IndexVector vertexIndices() const │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:304 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ -RefinementIteratorSpecial(int nIntervals_, bool end=false) │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:272 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:191 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ +int kuhnIndex │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:184 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ Refinement::CoordVector CoordVector │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:241 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_b_a_c_k_e_n_d_E_n_d │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:165 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_b_a_c_k_e_n_d_E_n_d │ │ │ │ const BackendIterator backendEnd │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:267 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ -int kuhnIndex │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:265 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:186 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_n_I_n_t_e_r_v_a_l_s__ │ │ │ │ +int nIntervals_ │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:182 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ void increment() │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:291 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ -Refinement::BackendRefinement BackendRefinement │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:259 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_n_I_n_t_e_r_v_a_l_s__ │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:288 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_b_a_c_k_e_n_d_E_n_d │ │ │ │ +const BackendIterator backendEnd │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:271 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_i_n_d_e_x │ │ │ │ +int index() const │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:314 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ +Refinement::CoordVector CoordVector │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:246 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_n_I_n_t_e_r_v_a_l_s__ │ │ │ │ int nIntervals_ │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:263 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:267 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ +Refinement::template Codim< 0 >::Geometry Geometry │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:247 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ Refinement::IndexVector IndexVector │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:240 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ -RefinementImp< dimension, CoordType > Refinement │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:239 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:245 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_g_e_o_m_e_t_r_y │ │ │ │ Geometry geometry() const │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:332 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_<_ _d_i_m_e_n_s_i_o_n_, │ │ │ │ -_C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ -Refinement::template Codim< 0 >::Geometry Geometry │ │ │ │ -DDeeffiinniittiioonn hcubetriangulation.cc:242 │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:330 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l │ │ │ │ +RefinementIteratorSpecial(int nIntervals, bool end=false) │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:276 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_B_a_c_k_e_n_d_I_t_e_r_a_t_o_r │ │ │ │ +BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:264 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_v_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ +IndexVector vertexIndices() const │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:301 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_n_K_u_h_n_S_i_m_p_l_i_c_e_s │ │ │ │ +static constexpr int nKuhnSimplices │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:265 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_k_u_h_n_I_n_d_e_x │ │ │ │ +int kuhnIndex │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:269 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_c_o_o_r_d_s │ │ │ │ +CoordVector coords() const │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:322 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_b_a_c_k_e_n_d │ │ │ │ +BackendIterator backend │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:270 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_R_e_f_i_n_e_m_e_n_t │ │ │ │ +RefinementImp< dimension, CoordType > Refinement │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:244 │ │ │ │ +_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_P_y_r_a_m_i_d_T_r_i_a_n_g_u_l_a_t_i_o_n_:_:_R_e_f_i_n_e_m_e_n_t_I_t_e_r_a_t_o_r_S_p_e_c_i_a_l_< │ │ │ │ +_d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_,_ _0_ _>_:_:_B_a_c_k_e_n_d_R_e_f_i_n_e_m_e_n_t │ │ │ │ +Refinement::BackendRefinement BackendRefinement │ │ │ │ +DDeeffiinniittiioonn pyramidtriangulation.cc:263 │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ DDeeffiinniittiioonn simplex.cc:361 │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ static int nVertices(int nIntervals) │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ static int nElements(int nIntervals) │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_S_i_m_p_l_e_x_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_<_ _d_i_m_e_n_s_i_o_n_,_ _C_o_o_r_d_T_y_p_e_ _>_:_:_v_B_e_g_i_n │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00209.html │ │ │ @@ -84,17 +84,17 @@ │ │ │
│ │ │ │ │ │

This file contains the Refinement implementation for hypercubes (quadrilaterals, hexahedrons, etc.). │ │ │ More...

│ │ │
#include <cassert>
│ │ │ #include <dune/common/fvector.hh>
│ │ │ #include <dune/common/iteratorfacades.hh>
│ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ -#include <dune/geometry/axisalignedcubegeometry.hh>
│ │ │ -#include "base.cc"
│ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ +#include <dune/geometry/axisalignedcubegeometry.hh>
│ │ │ +#include "base.cc"
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00209_source.html │ │ │ @@ -88,18 +88,18 @@ │ │ │
15
│ │ │
40
│ │ │
41#include <cassert>
│ │ │
42
│ │ │
43#include <dune/common/fvector.hh>
│ │ │
44#include <dune/common/iteratorfacades.hh>
│ │ │
45
│ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │
48
│ │ │ -
49#include "base.cc" // for RefinementTraits
│ │ │ +
49#include "base.cc" // for RefinementTraits
│ │ │
50
│ │ │
51namespace Dune
│ │ │
52{
│ │ │
53 namespace RefinementImp
│ │ │
54 {
│ │ │
│ │ │
61 namespace HCube
│ │ │ @@ -496,17 +496,17 @@ │ │ │
444#endif
│ │ │
445
│ │ │
446 } // namespace RefinementImp
│ │ │
447
│ │ │
448} // namespace Dune
│ │ │
449
│ │ │
450#endif // DUNE_GEOMETRY_REFINEMENT_HCUBE_CC
│ │ │ -
This file contains the parts independent of a particular Refinement implementation.
│ │ │ - │ │ │ -
A geometry implementation for axis-aligned hypercubes.
│ │ │ + │ │ │ +
This file contains the parts independent of a particular Refinement implementation.
│ │ │ +
A geometry implementation for axis-aligned hypercubes.
│ │ │
Definition affinegeometry.hh:22
│ │ │
This namespace contains the Refinement implementation for hypercubes (GeometryType::cube).
Definition hcube.cc:62
│ │ │
A geometry implementation for axis-aligned hypercubes.
Definition axisalignedcubegeometry.hh:50
│ │ │
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │
Mapping from geometryType, CoordType and coerceTo to a particular Refinement implementation.
Definition base.cc:70
│ │ │
Refinement implementation for hypercubes
Definition hcube.cc:74
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -413,18 +413,18 @@ │ │ │ │ 444#endif │ │ │ │ 445 │ │ │ │ 446 } // namespace RefinementImp │ │ │ │ 447 │ │ │ │ 448} // namespace Dune │ │ │ │ 449 │ │ │ │ 450#endif // DUNE_GEOMETRY_REFINEMENT_HCUBE_CC │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ _b_a_s_e_._c_c │ │ │ │ This file contains the parts independent of a particular Refinement │ │ │ │ implementation. │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ _a_x_i_s_a_l_i_g_n_e_d_c_u_b_e_g_e_o_m_e_t_r_y_._h_h │ │ │ │ A geometry implementation for axis-aligned hypercubes. │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_H_C_u_b_e │ │ │ │ This namespace contains the Refinement implementation for hypercubes │ │ │ │ (GeometryType::cube). │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00212.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: base.cc File Reference │ │ │ +dune-geometry: convergence.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,79 +66,33 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Macros | │ │ │ -Functions
│ │ │ -
base.cc File Reference
│ │ │ +Namespaces
│ │ │ +
convergence.hh File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

This file contains the parts independent of a particular Refinement implementation. │ │ │ -More...

│ │ │ -
#include <dune/geometry/type.hh>
│ │ │ +
#include <cmath>
│ │ │ +#include <limits>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │

│ │ │ Classes

class  Dune::RefinementImp::HCube::RefinementImp< dimension_, CoordType >
 Refinement implementation for hypercubes More...
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

struct  Dune::RefinementImp::Traits< topologyId, CoordType, coerceToId, dimension, Dummy >
 Mapping from geometryType, CoordType and coerceTo to a particular Refinement implementation. More...
class  Dune::RefinementIntervals
 Holds the number of refined intervals per axis needed for virtual and static refinement. More...
class  Dune::StaticRefinement< topologyId, CoordType, coerceToId, dimension_ >
 Wrap each Refinement implementation to get a consistent interface. More...
struct  Dune::StaticRefinement< topologyId, CoordType, coerceToId, dimension_ >::Codim< codimension >
 The Codim struct inherited from the Refinement implementation. More...
│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ -

│ │ │ Namespaces

namespace  Dune
namespace  Dune::RefinementImp
 This namespace contains the implementation of Refinement.
│ │ │ - │ │ │ - │ │ │ -

│ │ │ -Macros

#define DUNE_GEOMETRY_REFINEMENT_BASE_CC
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

RefinementIntervals Dune::refinementIntervals (int intervals)
 Creates a RefinementIntervals object.
RefinementIntervals Dune::refinementLevels (int levels)
 Creates a RefinementIntervals object.
│ │ │ -

Detailed Description

│ │ │ -

This file contains the parts independent of a particular Refinement implementation.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ DUNE_GEOMETRY_REFINEMENT_BASE_CC

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define DUNE_GEOMETRY_REFINEMENT_BASE_CC
│ │ │ -
│ │ │ - │ │ │ -
│ │ │ -
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,47 +1,16 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _r_e_f_i_n_e_m_e_n_t │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -base.cc File Reference │ │ │ │ -This file contains the parts independent of a particular _R_e_f_i_n_e_m_e_n_t │ │ │ │ -implementation. _M_o_r_e_._._. │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +convergence.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_T_r_a_i_t_s_<_ _t_o_p_o_l_o_g_y_I_d_,_ _C_o_o_r_d_T_y_p_e_,_ _c_o_e_r_c_e_T_o_I_d_, │ │ │ │ - _d_i_m_e_n_s_i_o_n_,_ _D_u_m_m_y_ _> │ │ │ │ -  Mapping from ggeeoommeettrryyTTyyppee, CCoooorrddTTyyppee and ccooeerrcceeTToo to a particular │ │ │ │ - _R_e_f_i_n_e_m_e_n_t implementation. _M_o_r_e_._._. │ │ │ │ - class   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s │ │ │ │ -  Holds the number of refined intervals per axis needed for virtual and │ │ │ │ - static refinement. _M_o_r_e_._._. │ │ │ │ - class   _D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_<_ _t_o_p_o_l_o_g_y_I_d_,_ _C_o_o_r_d_T_y_p_e_,_ _c_o_e_r_c_e_T_o_I_d_,_ _d_i_m_e_n_s_i_o_n__ │ │ │ │ - _> │ │ │ │ -  Wrap each _R_e_f_i_n_e_m_e_n_t implementation to get a consistent interface. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_<_ _t_o_p_o_l_o_g_y_I_d_,_ _C_o_o_r_d_T_y_p_e_,_ _c_o_e_r_c_e_T_o_I_d_,_ _d_i_m_e_n_s_i_o_n__ │ │ │ │ - _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_e_n_s_i_o_n_ _> │ │ │ │ -  The _C_o_d_i_m struct inherited from the _R_e_f_i_n_e_m_e_n_t implementation. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ -namespace   _D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ -  This namespace contains the implementation of _R_e_f_i_n_e_m_e_n_t. │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  _D_U_N_E___G_E_O_M_E_T_R_Y___R_E_F_I_N_E_M_E_N_T___B_A_S_E___C_C │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s  _D_u_n_e_:_:_r_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s (int intervals) │ │ │ │ -  Creates a _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s object. │ │ │ │ -_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s  _D_u_n_e_:_:_r_e_f_i_n_e_m_e_n_t_L_e_v_e_l_s (int levels) │ │ │ │ -  Creates a _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s object. │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -This file contains the parts independent of a particular _R_e_f_i_n_e_m_e_n_t │ │ │ │ -implementation. │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? DDUUNNEE__GGEEOOMMEETTRRYY__RREEFFIINNEEMMEENNTT__BBAASSEE__CCCC ********** │ │ │ │ -#define DUNE_GEOMETRY_REFINEMENT_BASE_CC │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00212_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: base.cc Source File │ │ │ +dune-geometry: convergence.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,204 +66,45 @@ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
base.cc
│ │ │ +
convergence.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_REFINEMENT_BASE_CC
│ │ │ -
6#define DUNE_GEOMETRY_REFINEMENT_BASE_CC
│ │ │ -
7
│ │ │ -
14
│ │ │ -
15#include <dune/geometry/type.hh>
│ │ │ -
16
│ │ │ -
17namespace Dune
│ │ │ -
18{
│ │ │ -
23
│ │ │ -
│ │ │ -
28 namespace RefinementImp
│ │ │ -
29 {
│ │ │ -
30 // /////////////////////////////////
│ │ │ -
31 //
│ │ │ -
32 // Declaration of RefinementImp::Traits
│ │ │ -
33 //
│ │ │ -
34
│ │ │ -
35#ifdef DOXYGEN
│ │ │ -
36 // This is just for Doxygen
│ │ │ -
67 template<unsigned topologyId, class CoordType,
│ │ │ -
68 unsigned coerceToId, int dimension, class Dummy = void>
│ │ │ -
│ │ │ -
69 struct Traits
│ │ │ -
70 {
│ │ │ -
72 typedef SquaringTheCircle::Refinement Imp;
│ │ │ -
73 };
│ │ │ -
│ │ │ -
74
│ │ │ -
75#else // !DOXYGEN
│ │ │ -
76
│ │ │ -
77 // Doxygen won't see this
│ │ │ -
78
│ │ │ -
79 template<unsigned topologyId, class CoordType,
│ │ │ -
80 unsigned coerceToId, int dimension, class = void>
│ │ │ -
81 struct Traits;
│ │ │ -
82
│ │ │ -
83#endif // !DOXYGEN
│ │ │ -
84 } // namespace RefinementImp
│ │ │ -
│ │ │ -
85
│ │ │ -
86
│ │ │ -
│ │ │ - │ │ │ -
95 int intervals_=1;
│ │ │ -
96
│ │ │ -
97 public:
│ │ │ -
98 explicit RefinementIntervals(int i) : intervals_(i) {}
│ │ │ -
99
│ │ │ -
100 int intervals() const { return intervals_; }
│ │ │ -
101 };
│ │ │ -
│ │ │ -
102
│ │ │ -
│ │ │ - │ │ │ -
109 {
│ │ │ -
110 return RefinementIntervals{intervals};
│ │ │ -
111 }
│ │ │ -
│ │ │ -
112
│ │ │ -
│ │ │ - │ │ │ -
118 {
│ │ │ -
119 return RefinementIntervals{1<<levels};
│ │ │ -
120 }
│ │ │ -
│ │ │ -
121
│ │ │ -
122 // ///////////////
│ │ │ -
123 //
│ │ │ -
124 // Static Refinement
│ │ │ -
125 //
│ │ │ -
126
│ │ │ -
136 template<unsigned topologyId, class CoordType,
│ │ │ -
137 unsigned coerceToId, int dimension_>
│ │ │ -
│ │ │ - │ │ │ -
139 : public RefinementImp::Traits<topologyId, CoordType,
│ │ │ -
140 coerceToId, dimension_ >::Imp
│ │ │ -
141 {
│ │ │ -
142 public:
│ │ │ -
143#ifdef DOXYGEN
│ │ │ -
149 template<int codimension>
│ │ │ -
│ │ │ -
150 struct Codim
│ │ │ -
151 {
│ │ │ - │ │ │ -
158 };
│ │ │ -
│ │ │ -
159
│ │ │ - │ │ │ - │ │ │ -
164
│ │ │ -
170 typedef CoordVector;
│ │ │ -
171
│ │ │ -
177 typedef IndexVector;
│ │ │ -
178#endif
│ │ │ -
179
│ │ │ -
180 typedef typename RefinementImp::Traits< topologyId, CoordType, coerceToId, dimension_>::Imp RefinementImp;
│ │ │ -
181
│ │ │ -
182 using RefinementImp::dimension;
│ │ │ -
183
│ │ │ -
184 using RefinementImp::Codim;
│ │ │ -
185
│ │ │ -
186 using typename RefinementImp::VertexIterator;
│ │ │ -
187 using typename RefinementImp::CoordVector;
│ │ │ -
188
│ │ │ -
189 using typename RefinementImp::ElementIterator;
│ │ │ -
190 using typename RefinementImp::IndexVector;
│ │ │ -
191
│ │ │ -
│ │ │ - │ │ │ -
198 {
│ │ │ -
199 return RefinementImp::nVertices(tag.intervals());
│ │ │ -
200 }
│ │ │ -
│ │ │ -
201
│ │ │ -
│ │ │ - │ │ │ -
208 {
│ │ │ -
209 return RefinementImp::vBegin(tag.intervals());
│ │ │ -
210 }
│ │ │ -
│ │ │ -
211
│ │ │ -
│ │ │ - │ │ │ -
218 {
│ │ │ -
219 return RefinementImp::vEnd(tag.intervals());
│ │ │ -
220 }
│ │ │ -
│ │ │ -
221
│ │ │ -
│ │ │ - │ │ │ -
228 {
│ │ │ -
229 return RefinementImp::nElements(tag.intervals());
│ │ │ -
230 }
│ │ │ -
│ │ │ -
231
│ │ │ -
│ │ │ - │ │ │ -
238 {
│ │ │ -
239 return RefinementImp::eBegin(tag.intervals());
│ │ │ -
240 }
│ │ │ -
│ │ │ -
241
│ │ │ -
│ │ │ - │ │ │ -
248 {
│ │ │ -
249 return RefinementImp::eEnd(tag.intervals());
│ │ │ -
250 }
│ │ │ -
│ │ │ -
251 };
│ │ │ -
│ │ │ -
252
│ │ │ -
254} // namespace Dune
│ │ │ -
255
│ │ │ -
256#endif // DUNE_GEOMETRY_REFINEMENT_BASE_CC
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ -
RefinementIntervals refinementIntervals(int intervals)
Creates a RefinementIntervals object.
Definition base.cc:108
│ │ │ -
RefinementIntervals refinementLevels(int levels)
Creates a RefinementIntervals object.
Definition base.cc:117
│ │ │ -
Definition affinegeometry.hh:22
│ │ │ -
This namespace contains the implementation of Refinement.
Definition base.cc:29
│ │ │ -
Mapping from geometryType, CoordType and coerceTo to a particular Refinement implementation.
Definition base.cc:70
│ │ │ -
Holds the number of refined intervals per axis needed for virtual and static refinement.
Definition base.cc:94
│ │ │ -
RefinementIntervals(int i)
Definition base.cc:98
│ │ │ -
int intervals() const
Definition base.cc:100
│ │ │ -
Wrap each Refinement implementation to get a consistent interface.
Definition base.cc:141
│ │ │ -
static ElementIterator eEnd(Dune::RefinementIntervals tag)
Get an ElementIterator.
Definition base.cc:247
│ │ │ -
static ElementIterator eBegin(Dune::RefinementIntervals tag)
Get an ElementIterator.
Definition base.cc:237
│ │ │ -
static int nElements(Dune::RefinementIntervals tag)
Get the number of Elements.
Definition base.cc:227
│ │ │ -
Codim< 0 >::SubEntityIterator ElementIterator
The ElementIterator of the Refinement.
Definition base.cc:163
│ │ │ -
static int nVertices(Dune::RefinementIntervals tag)
Get the number of Vertices.
Definition base.cc:197
│ │ │ -
static VertexIterator vBegin(Dune::RefinementIntervals tag)
Get a VertexIterator.
Definition base.cc:207
│ │ │ -
Codim< dimension >::SubEntityIterator VertexIterator
The VertexIterator of the Refinement.
Definition base.cc:161
│ │ │ - │ │ │ - │ │ │ -
RefinementImp::Traits< topologyId, CoordType, coerceToId, dimension_ >::Imp RefinementImp
Definition base.cc:180
│ │ │ -
static VertexIterator vEnd(Dune::RefinementIntervals tag)
Get a VertexIterator.
Definition base.cc:217
│ │ │ -
The Codim struct inherited from the Refinement implementation.
Definition base.cc:151
│ │ │ -
typedef SubEntityIterator
Definition base.cc:157
│ │ │ +
5#ifndef DUNE_GEOMETRY_UTILITY_CONVERGENCE_HH
│ │ │ +
6#define DUNE_GEOMETRY_UTILITY_CONVERGENCE_HH
│ │ │ +
7
│ │ │ +
8#include <cmath>
│ │ │ +
9#include <limits>
│ │ │ +
10
│ │ │ +
11namespace Dune::Impl {
│ │ │ +
12
│ │ │ +
13template <class R = double>
│ │ │ +
14struct ConvergenceOptions
│ │ │ +
15{
│ │ │ +
17 int maxIt = 100;
│ │ │ +
18
│ │ │ +
20 R absTol = []{ using std::sqrt; return sqrt(std::numeric_limits<R>::epsilon()); }();
│ │ │ +
21};
│ │ │ +
22
│ │ │ +
23} // end namespace Dune::Impl
│ │ │ +
24
│ │ │ +
25#endif // DUNE_GEOMETRY_UTILITY_CONVERGENCE_HH
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,228 +1,36 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _r_e_f_i_n_e_m_e_n_t │ │ │ │ -base.cc │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ +convergence.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_REFINEMENT_BASE_CC │ │ │ │ -_6#define DUNE_GEOMETRY_REFINEMENT_BASE_CC │ │ │ │ +5#ifndef DUNE_GEOMETRY_UTILITY_CONVERGENCE_HH │ │ │ │ +6#define DUNE_GEOMETRY_UTILITY_CONVERGENCE_HH │ │ │ │ 7 │ │ │ │ -14 │ │ │ │ -15#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -16 │ │ │ │ -17namespace _D_u_n_e │ │ │ │ -18{ │ │ │ │ -23 │ │ │ │ -_2_8 namespace _R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ -29 { │ │ │ │ -30 // ///////////////////////////////// │ │ │ │ -31 // │ │ │ │ -32 // Declaration of RefinementImp::Traits │ │ │ │ -33 // │ │ │ │ -34 │ │ │ │ -35#ifdef DOXYGEN │ │ │ │ -36 // This is just for Doxygen │ │ │ │ -67 template │ │ │ │ -_6_9 struct _T_r_a_i_t_s │ │ │ │ -70 { │ │ │ │ -72 typedef SquaringTheCircle::Refinement Imp; │ │ │ │ -73 }; │ │ │ │ -74 │ │ │ │ -75#else // !DOXYGEN │ │ │ │ -76 │ │ │ │ -77 // Doxygen won't see this │ │ │ │ -78 │ │ │ │ -79 template │ │ │ │ -81 struct _T_r_a_i_t_s; │ │ │ │ -82 │ │ │ │ -83#endif // !DOXYGEN │ │ │ │ -84 } // namespace RefinementImp │ │ │ │ -85 │ │ │ │ -86 │ │ │ │ -_9_4 class _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s{ │ │ │ │ -95 int intervals_=1; │ │ │ │ -96 │ │ │ │ -97 public: │ │ │ │ -_9_8 explicit _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s(int i) : intervals_(i) {} │ │ │ │ -99 │ │ │ │ -_1_0_0 int _i_n_t_e_r_v_a_l_s() const { return intervals_; } │ │ │ │ -101 }; │ │ │ │ -102 │ │ │ │ -_1_0_8 inline _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s _r_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s(int intervals) │ │ │ │ -109 { │ │ │ │ -110 return _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s{intervals}; │ │ │ │ -111 } │ │ │ │ -112 │ │ │ │ -_1_1_7 inline _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s _r_e_f_i_n_e_m_e_n_t_L_e_v_e_l_s(int levels) │ │ │ │ -118 { │ │ │ │ -119 return _R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s{1< │ │ │ │ -_1_3_8 class _S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t │ │ │ │ -139 : public _R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_T_r_a_i_t_s::Imp │ │ │ │ -141 { │ │ │ │ -142 public: │ │ │ │ -143#ifdef DOXYGEN │ │ │ │ -149 template │ │ │ │ -_1_5_0 struct _C_o_d_i_m │ │ │ │ -151 { │ │ │ │ -_1_5_7 typedef _S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r; │ │ │ │ -158 }; │ │ │ │ -159 │ │ │ │ -_1_6_1 typedef _C_o_d_i_m_<_d_i_m_e_n_s_i_o_n_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _V_e_r_t_e_x_I_t_e_r_a_t_o_r; │ │ │ │ -_1_6_3 typedef _C_o_d_i_m_<_0_>_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r; │ │ │ │ -164 │ │ │ │ -_1_7_0 typedef _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ -171 │ │ │ │ -_1_7_7 typedef _I_n_d_e_x_V_e_c_t_o_r; │ │ │ │ -178#endif │ │ │ │ -179 │ │ │ │ -_1_8_0 typedef typename RefinementImp::Traits< topologyId, CoordType, coerceToId, │ │ │ │ -dimension_>::Imp _R_e_f_i_n_e_m_e_n_t_I_m_p; │ │ │ │ -181 │ │ │ │ -182 using RefinementImp::dimension; │ │ │ │ -183 │ │ │ │ -184 using RefinementImp::Codim; │ │ │ │ -185 │ │ │ │ -186 using typename RefinementImp::VertexIterator; │ │ │ │ -187 using typename RefinementImp::CoordVector; │ │ │ │ -188 │ │ │ │ -189 using typename RefinementImp::ElementIterator; │ │ │ │ -190 using typename RefinementImp::IndexVector; │ │ │ │ -191 │ │ │ │ -_1_9_7 static int _n_V_e_r_t_i_c_e_s(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ -198 { │ │ │ │ -199 return RefinementImp::nVertices(tag._i_n_t_e_r_v_a_l_s()); │ │ │ │ -200 } │ │ │ │ -201 │ │ │ │ -_2_0_7 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_B_e_g_i_n(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ -208 { │ │ │ │ -209 return RefinementImp::vBegin(tag._i_n_t_e_r_v_a_l_s()); │ │ │ │ -210 } │ │ │ │ -211 │ │ │ │ -_2_1_7 static _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_E_n_d(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ -218 { │ │ │ │ -219 return RefinementImp::vEnd(tag._i_n_t_e_r_v_a_l_s()); │ │ │ │ -220 } │ │ │ │ -221 │ │ │ │ -_2_2_7 static int _n_E_l_e_m_e_n_t_s(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ -228 { │ │ │ │ -229 return RefinementImp::nElements(tag._i_n_t_e_r_v_a_l_s()); │ │ │ │ -230 } │ │ │ │ -231 │ │ │ │ -_2_3_7 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_B_e_g_i_n(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ -238 { │ │ │ │ -239 return RefinementImp::eBegin(tag._i_n_t_e_r_v_a_l_s()); │ │ │ │ -240 } │ │ │ │ -241 │ │ │ │ -_2_4_7 static _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r _e_E_n_d(_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s tag) │ │ │ │ -248 { │ │ │ │ -249 return RefinementImp::eEnd(tag._i_n_t_e_r_v_a_l_s()); │ │ │ │ -250 } │ │ │ │ -251 }; │ │ │ │ -252 │ │ │ │ -254} // namespace Dune │ │ │ │ -255 │ │ │ │ -256#endif // DUNE_GEOMETRY_REFINEMENT_BASE_CC │ │ │ │ -_t_y_p_e_._h_h │ │ │ │ -A unique label for each type of element that can occur in a grid. │ │ │ │ -_D_u_n_e_:_:_r_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s │ │ │ │ -RefinementIntervals refinementIntervals(int intervals) │ │ │ │ -Creates a RefinementIntervals object. │ │ │ │ -DDeeffiinniittiioonn base.cc:108 │ │ │ │ -_D_u_n_e_:_:_r_e_f_i_n_e_m_e_n_t_L_e_v_e_l_s │ │ │ │ -RefinementIntervals refinementLevels(int levels) │ │ │ │ -Creates a RefinementIntervals object. │ │ │ │ -DDeeffiinniittiioonn base.cc:117 │ │ │ │ -_D_u_n_e │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ -This namespace contains the implementation of Refinement. │ │ │ │ -DDeeffiinniittiioonn base.cc:29 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p_:_:_T_r_a_i_t_s │ │ │ │ -Mapping from geometryType, CoordType and coerceTo to a particular Refinement │ │ │ │ -implementation. │ │ │ │ -DDeeffiinniittiioonn base.cc:70 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s │ │ │ │ -Holds the number of refined intervals per axis needed for virtual and static │ │ │ │ -refinement. │ │ │ │ -DDeeffiinniittiioonn base.cc:94 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s │ │ │ │ -RefinementIntervals(int i) │ │ │ │ -DDeeffiinniittiioonn base.cc:98 │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_m_e_n_t_I_n_t_e_r_v_a_l_s_:_:_i_n_t_e_r_v_a_l_s │ │ │ │ -int intervals() const │ │ │ │ -DDeeffiinniittiioonn base.cc:100 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t │ │ │ │ -Wrap each Refinement implementation to get a consistent interface. │ │ │ │ -DDeeffiinniittiioonn base.cc:141 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_e_E_n_d │ │ │ │ -static ElementIterator eEnd(Dune::RefinementIntervals tag) │ │ │ │ -Get an ElementIterator. │ │ │ │ -DDeeffiinniittiioonn base.cc:247 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_e_B_e_g_i_n │ │ │ │ -static ElementIterator eBegin(Dune::RefinementIntervals tag) │ │ │ │ -Get an ElementIterator. │ │ │ │ -DDeeffiinniittiioonn base.cc:237 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_n_E_l_e_m_e_n_t_s │ │ │ │ -static int nElements(Dune::RefinementIntervals tag) │ │ │ │ -Get the number of Elements. │ │ │ │ -DDeeffiinniittiioonn base.cc:227 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_E_l_e_m_e_n_t_I_t_e_r_a_t_o_r │ │ │ │ -Codim< 0 >::SubEntityIterator ElementIterator │ │ │ │ -The ElementIterator of the Refinement. │ │ │ │ -DDeeffiinniittiioonn base.cc:163 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_n_V_e_r_t_i_c_e_s │ │ │ │ -static int nVertices(Dune::RefinementIntervals tag) │ │ │ │ -Get the number of Vertices. │ │ │ │ -DDeeffiinniittiioonn base.cc:197 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_v_B_e_g_i_n │ │ │ │ -static VertexIterator vBegin(Dune::RefinementIntervals tag) │ │ │ │ -Get a VertexIterator. │ │ │ │ -DDeeffiinniittiioonn base.cc:207 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ -Codim< dimension >::SubEntityIterator VertexIterator │ │ │ │ -The VertexIterator of the Refinement. │ │ │ │ -DDeeffiinniittiioonn base.cc:161 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_<_ _t_o_p_o_l_o_g_y_I_d_,_ _C_o_o_r_d_T_y_p_e_,_ _c_o_e_r_c_e_T_o_I_d_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ -_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ -typedef CoordVector │ │ │ │ -DDeeffiinniittiioonn base.cc:170 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_<_ _t_o_p_o_l_o_g_y_I_d_,_ _C_o_o_r_d_T_y_p_e_,_ _c_o_e_r_c_e_T_o_I_d_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ -_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ -typedef IndexVector │ │ │ │ -DDeeffiinniittiioonn base.cc:177 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_R_e_f_i_n_e_m_e_n_t_I_m_p │ │ │ │ -RefinementImp::Traits< topologyId, CoordType, coerceToId, dimension_ >::Imp │ │ │ │ -RefinementImp │ │ │ │ -DDeeffiinniittiioonn base.cc:180 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_v_E_n_d │ │ │ │ -static VertexIterator vEnd(Dune::RefinementIntervals tag) │ │ │ │ -Get a VertexIterator. │ │ │ │ -DDeeffiinniittiioonn base.cc:217 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_C_o_d_i_m │ │ │ │ -The Codim struct inherited from the Refinement implementation. │ │ │ │ -DDeeffiinniittiioonn base.cc:151 │ │ │ │ -_D_u_n_e_:_:_S_t_a_t_i_c_R_e_f_i_n_e_m_e_n_t_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r_:_:_S_u_b_E_n_t_i_t_y_I_t_e_r_a_t_o_r │ │ │ │ -typedef SubEntityIterator │ │ │ │ -DDeeffiinniittiioonn base.cc:157 │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10 │ │ │ │ +11namespace Dune::Impl { │ │ │ │ +12 │ │ │ │ +13template │ │ │ │ +14struct ConvergenceOptions │ │ │ │ +15{ │ │ │ │ +17 int maxIt = 100; │ │ │ │ +18 │ │ │ │ +20 R absTol = []{ using std::sqrt; return sqrt(std::numeric_limits::epsilon │ │ │ │ +()); }(); │ │ │ │ +21}; │ │ │ │ +22 │ │ │ │ +23} // end namespace Dune::Impl │ │ │ │ +24 │ │ │ │ +25#endif // DUNE_GEOMETRY_UTILITY_CONVERGENCE_HH │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00215.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: refinement.hh File Reference │ │ │ +dune-geometry: typefromvertexcount.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,36 +66,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
refinement.hh File Reference
│ │ │ +
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
typefromvertexcount.hh File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

This file simply includes all Refinement implementations so you don't have to do them separately. │ │ │ -More...

│ │ │ -
#include "refinement/base.cc"
│ │ │ -#include "refinement/hcube.cc"
│ │ │ -#include "refinement/simplex.cc"
│ │ │ -#include "refinement/hcubetriangulation.cc"
│ │ │ -#include "refinement/prismtriangulation.cc"
│ │ │ -#include "refinement/pyramidtriangulation.cc"
│ │ │ +
#include <dune/geometry/type.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ -

Detailed Description

│ │ │ -

This file simply includes all Refinement implementations so you don't have to do them separately.

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

│ │ │ +Namespaces

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

│ │ │ +Functions

GeometryType Dune::geometryTypeFromVertexCount (unsigned int dim, unsigned int vertices)
 Utility function to construct the correct geometry type given the dimension and the number of vertices.
│ │ │ +
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,20 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -refinement.hh File Reference │ │ │ │ -This file simply includes all _R_e_f_i_n_e_m_e_n_t implementations so you don't have to │ │ │ │ -do them separately. _M_o_r_e_._._. │ │ │ │ -#include "_r_e_f_i_n_e_m_e_n_t_/_b_a_s_e_._c_c" │ │ │ │ -#include "_r_e_f_i_n_e_m_e_n_t_/_h_c_u_b_e_._c_c" │ │ │ │ -#include "_r_e_f_i_n_e_m_e_n_t_/_s_i_m_p_l_e_x_._c_c" │ │ │ │ -#include "_r_e_f_i_n_e_m_e_n_t_/_h_c_u_b_e_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c" │ │ │ │ -#include "_r_e_f_i_n_e_m_e_n_t_/_p_r_i_s_m_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c" │ │ │ │ -#include "_r_e_f_i_n_e_m_e_n_t_/_p_y_r_a_m_i_d_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c" │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +typefromvertexcount.hh File Reference │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -This file simply includes all _R_e_f_i_n_e_m_e_n_t implementations so you don't have to │ │ │ │ -do them separately. │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _D_u_n_e │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +_G_e_o_m_e_t_r_y_T_y_p_e  _D_u_n_e_:_:_g_e_o_m_e_t_r_y_T_y_p_e_F_r_o_m_V_e_r_t_e_x_C_o_u_n_t (unsigned int dim, unsigned int │ │ │ │ + vertices) │ │ │ │ +  Utility function to construct the correct geometry type given the │ │ │ │ + dimension and the number of vertices. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00215_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: refinement.hh Source File │ │ │ +dune-geometry: typefromvertexcount.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,48 +66,86 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
refinement.hh
│ │ │ +
typefromvertexcount.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_REFINEMENT_HH
│ │ │ -
6#define DUNE_GEOMETRY_REFINEMENT_HH
│ │ │ -
7
│ │ │ -
13
│ │ │ -
239// The interface (template<...> class StaticRefinement) is not included here
│ │ │ -
240// since it derives from parts which I consider implementation. Look
│ │ │ -
241// into refinement/base.cc if the documentation is above is not enough.
│ │ │ -
242#include "refinement/base.cc"
│ │ │ -
243
│ │ │ -
244#include "refinement/hcube.cc"
│ │ │ -
245#include "refinement/simplex.cc"
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
249
│ │ │ -
250#endif // DUNE_GEOMETRY_REFINEMENT_HH
│ │ │ -
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │ - │ │ │ - │ │ │ -
This file contains the Refinement implementation for triangulating hypercubes (quadrilateral -> trian...
│ │ │ -
This file contains the Refinement implementation for hypercubes (quadrilaterals, hexahedrons,...
│ │ │ -
This file contains the parts independent of a particular Refinement implementation.
│ │ │ +
5#ifndef DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH
│ │ │ +
6#define DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH
│ │ │ +
7
│ │ │ + │ │ │ +
9
│ │ │ +
10namespace Dune {
│ │ │ +
11
│ │ │ +
16 inline
│ │ │ +
│ │ │ +
17 GeometryType geometryTypeFromVertexCount(unsigned int dim, unsigned int vertices)
│ │ │ +
18 {
│ │ │ +
19 switch (dim)
│ │ │ +
20 {
│ │ │ +
21 case 0 :
│ │ │ + │ │ │ +
23 case 1 :
│ │ │ + │ │ │ +
25 case 2 :
│ │ │ +
26 switch (vertices) {
│ │ │ +
27 case 3 :
│ │ │ + │ │ │ +
29 case 4 :
│ │ │ + │ │ │ +
31 default :
│ │ │ +
32 DUNE_THROW(NotImplemented, "2d elements with " << vertices << " corners are not supported!");
│ │ │ +
33 }
│ │ │ +
34 case 3 :
│ │ │ +
35 switch (vertices) {
│ │ │ +
36 case 4 :
│ │ │ + │ │ │ +
38 case 5 :
│ │ │ + │ │ │ +
40 case 6 :
│ │ │ + │ │ │ +
42 case 8 :
│ │ │ + │ │ │ +
44 default :
│ │ │ +
45 DUNE_THROW(NotImplemented, "3d elements with " << vertices << " corners are not supported!");
│ │ │ +
46 }
│ │ │ +
47 default :
│ │ │ +
48 DUNE_THROW(NotImplemented, "geometryTypeFromVertexCount works only up to dim=3");
│ │ │ +
49 }
│ │ │ +
50 }
│ │ │ +
│ │ │ +
51
│ │ │ +
52}
│ │ │ +
53
│ │ │ +
54#endif // DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ +
constexpr GeometryType line
GeometryType representing a line.
Definition type.hh:498
│ │ │ +
constexpr GeometryType prism
GeometryType representing a 3D prism.
Definition type.hh:528
│ │ │ +
constexpr GeometryType triangle
GeometryType representing a triangle.
Definition type.hh:504
│ │ │ +
constexpr GeometryType quadrilateral
GeometryType representing a quadrilateral (a square).
Definition type.hh:510
│ │ │ +
constexpr GeometryType hexahedron
GeometryType representing a hexahedron.
Definition type.hh:534
│ │ │ +
constexpr GeometryType pyramid
GeometryType representing a 3D pyramid.
Definition type.hh:522
│ │ │ +
constexpr GeometryType tetrahedron
GeometryType representing a tetrahedron.
Definition type.hh:516
│ │ │ +
constexpr GeometryType vertex
GeometryType representing a vertex.
Definition type.hh:492
│ │ │ +
Definition affinegeometry.hh:22
│ │ │ +
GeometryType geometryTypeFromVertexCount(unsigned int dim, unsigned int vertices)
Utility function to construct the correct geometry type given the dimension and the number of vertice...
Definition typefromvertexcount.hh:17
│ │ │ +
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,45 +1,111 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -refinement.hh │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ +typefromvertexcount.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_REFINEMENT_HH │ │ │ │ -6#define DUNE_GEOMETRY_REFINEMENT_HH │ │ │ │ +5#ifndef DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH │ │ │ │ +6#define DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH │ │ │ │ 7 │ │ │ │ -13 │ │ │ │ -239// The interface (template<...> class StaticRefinement) is not included here │ │ │ │ -240// since it derives from parts which I consider implementation. Look │ │ │ │ -241// into refinement/base.cc if the documentation is above is not enough. │ │ │ │ -242#include "_r_e_f_i_n_e_m_e_n_t_/_b_a_s_e_._c_c" │ │ │ │ -243 │ │ │ │ -244#include "_r_e_f_i_n_e_m_e_n_t_/_h_c_u_b_e_._c_c" │ │ │ │ -245#include "_r_e_f_i_n_e_m_e_n_t_/_s_i_m_p_l_e_x_._c_c" │ │ │ │ -246#include "_r_e_f_i_n_e_m_e_n_t_/_h_c_u_b_e_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c" │ │ │ │ -247#include "_r_e_f_i_n_e_m_e_n_t_/_p_r_i_s_m_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c" │ │ │ │ -248#include "_r_e_f_i_n_e_m_e_n_t_/_p_y_r_a_m_i_d_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c" │ │ │ │ -249 │ │ │ │ -250#endif // DUNE_GEOMETRY_REFINEMENT_HH │ │ │ │ -_s_i_m_p_l_e_x_._c_c │ │ │ │ -This file contains the Refinement implementation for simplices (triangles, │ │ │ │ -tetrahedrons.... │ │ │ │ -_p_y_r_a_m_i_d_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c │ │ │ │ -_p_r_i_s_m_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c │ │ │ │ -_h_c_u_b_e_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c │ │ │ │ -This file contains the Refinement implementation for triangulating hypercubes │ │ │ │ -(quadrilateral -> trian... │ │ │ │ -_h_c_u_b_e_._c_c │ │ │ │ -This file contains the Refinement implementation for hypercubes │ │ │ │ -(quadrilaterals, hexahedrons,... │ │ │ │ -_b_a_s_e_._c_c │ │ │ │ -This file contains the parts independent of a particular Refinement │ │ │ │ -implementation. │ │ │ │ +8#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +9 │ │ │ │ +10namespace _D_u_n_e { │ │ │ │ +11 │ │ │ │ +16 inline │ │ │ │ +_1_7 _G_e_o_m_e_t_r_y_T_y_p_e _g_e_o_m_e_t_r_y_T_y_p_e_F_r_o_m_V_e_r_t_e_x_C_o_u_n_t(unsigned int dim, unsigned int │ │ │ │ +vertices) │ │ │ │ +18 { │ │ │ │ +19 switch (dim) │ │ │ │ +20 { │ │ │ │ +21 case 0 : │ │ │ │ +22 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x; │ │ │ │ +23 case 1 : │ │ │ │ +24 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_l_i_n_e; │ │ │ │ +25 case 2 : │ │ │ │ +26 switch (vertices) { │ │ │ │ +27 case 3 : │ │ │ │ +28 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_r_i_a_n_g_l_e; │ │ │ │ +29 case 4 : │ │ │ │ +30 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_q_u_a_d_r_i_l_a_t_e_r_a_l; │ │ │ │ +31 default : │ │ │ │ +32 DUNE_THROW(NotImplemented, "2d elements with " << vertices << " corners are │ │ │ │ +not supported!"); │ │ │ │ +33 } │ │ │ │ +34 case 3 : │ │ │ │ +35 switch (vertices) { │ │ │ │ +36 case 4 : │ │ │ │ +37 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_e_t_r_a_h_e_d_r_o_n; │ │ │ │ +38 case 5 : │ │ │ │ +39 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_y_r_a_m_i_d; │ │ │ │ +40 case 6 : │ │ │ │ +41 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m; │ │ │ │ +42 case 8 : │ │ │ │ +43 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_h_e_x_a_h_e_d_r_o_n; │ │ │ │ +44 default : │ │ │ │ +45 DUNE_THROW(NotImplemented, "3d elements with " << vertices << " corners are │ │ │ │ +not supported!"); │ │ │ │ +46 } │ │ │ │ +47 default : │ │ │ │ +48 DUNE_THROW(NotImplemented, "geometryTypeFromVertexCount works only up to │ │ │ │ +dim=3"); │ │ │ │ +49 } │ │ │ │ +50 } │ │ │ │ +51 │ │ │ │ +52} │ │ │ │ +53 │ │ │ │ +54#endif // DUNE_GEOMETRY_TYPE_FROM_VERTEX_COUNT_HH │ │ │ │ +_t_y_p_e_._h_h │ │ │ │ +A unique label for each type of element that can occur in a grid. │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_l_i_n_e │ │ │ │ +constexpr GeometryType line │ │ │ │ +GeometryType representing a line. │ │ │ │ +DDeeffiinniittiioonn type.hh:498 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m │ │ │ │ +constexpr GeometryType prism │ │ │ │ +GeometryType representing a 3D prism. │ │ │ │ +DDeeffiinniittiioonn type.hh:528 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_r_i_a_n_g_l_e │ │ │ │ +constexpr GeometryType triangle │ │ │ │ +GeometryType representing a triangle. │ │ │ │ +DDeeffiinniittiioonn type.hh:504 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_q_u_a_d_r_i_l_a_t_e_r_a_l │ │ │ │ +constexpr GeometryType quadrilateral │ │ │ │ +GeometryType representing a quadrilateral (a square). │ │ │ │ +DDeeffiinniittiioonn type.hh:510 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_h_e_x_a_h_e_d_r_o_n │ │ │ │ +constexpr GeometryType hexahedron │ │ │ │ +GeometryType representing a hexahedron. │ │ │ │ +DDeeffiinniittiioonn type.hh:534 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_y_r_a_m_i_d │ │ │ │ +constexpr GeometryType pyramid │ │ │ │ +GeometryType representing a 3D pyramid. │ │ │ │ +DDeeffiinniittiioonn type.hh:522 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_t_e_t_r_a_h_e_d_r_o_n │ │ │ │ +constexpr GeometryType tetrahedron │ │ │ │ +GeometryType representing a tetrahedron. │ │ │ │ +DDeeffiinniittiioonn type.hh:516 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_v_e_r_t_e_x │ │ │ │ +constexpr GeometryType vertex │ │ │ │ +GeometryType representing a vertex. │ │ │ │ +DDeeffiinniittiioonn type.hh:492 │ │ │ │ +_D_u_n_e │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ +_D_u_n_e_:_:_g_e_o_m_e_t_r_y_T_y_p_e_F_r_o_m_V_e_r_t_e_x_C_o_u_n_t │ │ │ │ +GeometryType geometryTypeFromVertexCount(unsigned int dim, unsigned int │ │ │ │ +vertices) │ │ │ │ +Utility function to construct the correct geometry type given the dimension and │ │ │ │ +the number of vertice... │ │ │ │ +DDeeffiinniittiioonn typefromvertexcount.hh:17 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ +DDeeffiinniittiioonn type.hh:114 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00218.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelements.hh File Reference │ │ │ +dune-geometry: algorithms.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,72 +66,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
│ │ │ -
referenceelements.hh File Reference
│ │ │ +Namespaces
│ │ │ +
algorithms.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <cassert>
│ │ │ -#include <algorithm>
│ │ │ +
#include <algorithm>
│ │ │ +#include <cmath>
│ │ │ #include <limits>
│ │ │ -#include <tuple>
│ │ │ -#include <utility>
│ │ │ -#include <vector>
│ │ │ -#include <array>
│ │ │ -#include <dune/common/typetraits.hh>
│ │ │ -#include <dune/common/std/type_traits.hh>
│ │ │ -#include <dune/common/visibility.hh>
│ │ │ -#include <dune/geometry/dimension.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ -#include <dune/geometry/referenceelement.hh>
│ │ │ -#include <dune/geometry/referenceelementimplementation.hh>
│ │ │ +#include <optional>
│ │ │ +#include <type_traits>
│ │ │ +#include <dune/common/debugstream.hh>
│ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ +#include <dune/common/ftraits.hh>
│ │ │ +#include <dune/common/fvector.hh>
│ │ │ +#include <dune/geometry/utility/defaultmatrixhelper.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ -Classes

struct  Dune::Geo::ReferenceElements< ctype_, dim >
 Class providing access to the singletons of the reference elements. More...
struct  Dune::ReferenceElements< ctype_, dim >
 Class providing access to the singletons of the reference elements. More...
│ │ │ │ │ │ │ │ │ - │ │ │ -

│ │ │ Namespaces

namespace  Dune
namespace  Dune::Geo
│ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Typedefs

template<typename... T>
using Dune::ReferenceElement = decltype(referenceElement(std::declval<T>()...))
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

template<typename... T>
unspecified value type Dune::referenceElement (T &&... t)
 Returns a reference element for the objects t....
template<typename T, int dim>
auto Dune::referenceElement (const Dune::GeometryType &gt, Dune::Dim< dim >={})
 Returns a reference element of dimension dim for the given geometry type and coordinate field type.
template<typename T, int dim, std::enable_if_t< IsNumber< std::decay_t< T > >::value, int > = 0>
auto Dune::referenceElement (const T &, const Dune::GeometryType &gt, Dune::Dim< dim >)
 Returns a reference element of dimension dim for the given geometry type and coordinate field type.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,54 +1,24 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -referenceelements.hh File Reference │ │ │ │ -#include │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +algorithms.hh File Reference │ │ │ │ #include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_d_i_m_e_n_s_i_o_n_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_i_m_p_l_e_m_e_n_t_a_t_i_o_n_._h_h> │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e___,_ _d_i_m_ _> │ │ │ │ -  Class providing access to the singletons of the reference elements. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e___,_ _d_i_m_ _> │ │ │ │ -  Class providing access to the singletons of the reference elements. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ -namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -template │ │ │ │ -using  _D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = decltype(_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(std::declval │ │ │ │ - ()...)) │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -unspecified value type  _D_u_n_e_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t (T &&... t) │ │ │ │ -  Returns a reference element for the objects t.... │ │ │ │ -template │ │ │ │ - auto  _D_u_n_e_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t (const _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e >, │ │ │ │ - _D_u_n_e_:_:_D_i_m< dim >={}) │ │ │ │ -  Returns a reference element of dimension dim for the │ │ │ │ - given geometry type and coordinate field type. │ │ │ │ -template │ │ │ │ ->::value, int > = 0> │ │ │ │ - auto  _D_u_n_e_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t (const T &, const _D_u_n_e_:_: │ │ │ │ - _G_e_o_m_e_t_r_y_T_y_p_e >, _D_u_n_e_:_:_D_i_m< dim >) │ │ │ │ -  Returns a reference element of dimension dim for the │ │ │ │ - given geometry type and coordinate field type. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00218_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelements.hh Source File │ │ │ +dune-geometry: algorithms.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,273 +66,125 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
referenceelements.hh
│ │ │ +
algorithms.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_REFERENCEELEMENTS_HH
│ │ │ -
6#define DUNE_GEOMETRY_REFERENCEELEMENTS_HH
│ │ │ +
5#ifndef DUNE_GEOMETRY_UTILITY_ALGORITHMS_HH
│ │ │ +
6#define DUNE_GEOMETRY_UTILITY_ALGORITHMS_HH
│ │ │
7
│ │ │ -
8#include <cassert>
│ │ │ -
9
│ │ │ -
10#include <algorithm>
│ │ │ -
11#include <limits>
│ │ │ -
12#include <tuple>
│ │ │ -
13#include <utility>
│ │ │ -
14#include <vector>
│ │ │ -
15#include <array>
│ │ │ -
16
│ │ │ -
17#include <dune/common/typetraits.hh>
│ │ │ -
18#include <dune/common/std/type_traits.hh>
│ │ │ -
19#include <dune/common/visibility.hh>
│ │ │ -
20
│ │ │ - │ │ │ -
22#include <dune/geometry/type.hh>
│ │ │ - │ │ │ - │ │ │ -
25
│ │ │ -
26namespace Dune
│ │ │ -
27{
│ │ │ -
28
│ │ │ -
29 namespace Geo
│ │ │ -
30 {
│ │ │ -
31
│ │ │ -
32#ifndef DOXYGEN
│ │ │ -
33
│ │ │ -
34
│ │ │ -
35 namespace Impl
│ │ │ -
36 {
│ │ │ -
37
│ │ │ -
38 // ReferenceElementContainer
│ │ │ -
39 // -------------------------
│ │ │ -
40
│ │ │ -
41 template< class ctype, int dim >
│ │ │ -
42 class ReferenceElementContainer
│ │ │ -
43 {
│ │ │ -
44 static const unsigned int numTopologies = dim >= 0 ? (1u << dim) : 0;
│ │ │ -
45
│ │ │ -
46 using Implementation = ReferenceElementImplementation< ctype, dim >;
│ │ │ -
47
│ │ │ -
48 public:
│ │ │ -
49
│ │ │ -
50 using ReferenceElement = Dune::Geo::ReferenceElement< Implementation >;
│ │ │ -
51 using value_type = ReferenceElement;
│ │ │ -
52 using const_iterator = const value_type*;
│ │ │ -
53
│ │ │ -
54 ReferenceElementContainer ()
│ │ │ -
55 {
│ │ │ -
56 for( unsigned int topologyId = 0; topologyId < numTopologies; ++topologyId )
│ │ │ -
57 {
│ │ │ -
58 implementations_[ topologyId ].initialize( topologyId );
│ │ │ -
59 reference_elements_[ topologyId ].setImplementation( implementations_[ topologyId ] );
│ │ │ -
60 }
│ │ │ -
61 }
│ │ │ -
62
│ │ │ -
63 const ReferenceElement& operator() ( const GeometryType &type ) const
│ │ │ -
64 {
│ │ │ -
65 assert( type.dim() == dim );
│ │ │ -
66 return reference_elements_[ type.id() ];
│ │ │ -
67 }
│ │ │ -
68
│ │ │ -
69 const ReferenceElement& simplex () const
│ │ │ -
70 {
│ │ │ -
71 return reference_elements_[ Dune::GeometryTypes::simplex(dim).id() ];
│ │ │ -
72 }
│ │ │ +
8#include <algorithm>
│ │ │ +
9#include <cmath>
│ │ │ +
10#include <limits>
│ │ │ +
11#include <optional>
│ │ │ +
12#include <type_traits>
│ │ │ +
13
│ │ │ +
14#include <dune/common/debugstream.hh>
│ │ │ +
15#include <dune/common/fmatrix.hh>
│ │ │ +
16#include <dune/common/ftraits.hh>
│ │ │ +
17#include <dune/common/fvector.hh>
│ │ │ + │ │ │ +
19
│ │ │ +
20namespace Dune {
│ │ │ +
21namespace Impl {
│ │ │ +
22
│ │ │ +
23template <class R = double>
│ │ │ +
24struct GaussNewtonOptions
│ │ │ +
25{
│ │ │ +
27 int maxIt = 100;
│ │ │ +
28
│ │ │ +
30 R absTol = []{ using std::sqrt; return sqrt(std::numeric_limits<R>::epsilon()); }();
│ │ │ +
31
│ │ │ +
33 int maxInnerIt = 10;
│ │ │ +
34
│ │ │ +
36 R theta = 0.5;
│ │ │ +
37};
│ │ │ +
38
│ │ │ +
39
│ │ │ +
41enum class GaussNewtonErrorCode
│ │ │ +
42{
│ │ │ +
43 OK = 0, //< A solution is found
│ │ │ +
44 JACOBIAN_NOT_INVERTIBLE, //< The Jacobian is not invertible at the current point
│ │ │ +
45 STAGNATION, //< No reduction of the residul norm possible
│ │ │ +
46 TOLERANCE_NOT_REACHED //< The break tolerance for the resodual norm is not reached
│ │ │ +
47};
│ │ │ +
48
│ │ │ +
49
│ │ │ +
62template <class F, class DF, class Domain,
│ │ │ +
63 class Range = std::invoke_result_t<F, Domain>,
│ │ │ +
64 class R = typename Dune::FieldTraits<Domain>::real_type>
│ │ │ +
65GaussNewtonErrorCode gaussNewton (const F& f, const DF& df, Range y, Domain& x0,
│ │ │ +
66 GaussNewtonOptions<R> opts = {})
│ │ │ +
67{
│ │ │ +
68 Domain x = x0;
│ │ │ +
69 Domain dx{};
│ │ │ +
70 Range dy = f(x0) - y;
│ │ │ +
71 R resNorm0 = dy.two_norm();
│ │ │ +
72 R resNorm = 0;
│ │ │
73
│ │ │ -
74 const ReferenceElement& cube () const
│ │ │ -
75 {
│ │ │ -
76 return reference_elements_[ Dune::GeometryTypes::cube(dim).id() ];
│ │ │ -
77 }
│ │ │ +
74 for (int i = 0; i < opts.maxIt; ++i)
│ │ │ +
75 {
│ │ │ +
76 // Get descent direction dx: (J^T*J)dx = J^T*dy
│ │ │ +
77 const bool invertible = FieldMatrixHelper<R>::xTRightInvA(df(x), dy, dx);
│ │ │
78
│ │ │ -
79 const ReferenceElement& pyramid () const
│ │ │ -
80 {
│ │ │ -
81 return reference_elements_[ Dune::GeometryTypes::pyramid.id() ];
│ │ │ -
82 }
│ │ │ -
83
│ │ │ -
84 const ReferenceElement& prism () const
│ │ │ -
85 {
│ │ │ -
86 return reference_elements_[ Dune::GeometryTypes::prism.id() ];
│ │ │ -
87 }
│ │ │ -
88
│ │ │ -
89 const_iterator begin () const
│ │ │ -
90 {
│ │ │ -
91 return reference_elements_.data();
│ │ │ -
92 }
│ │ │ -
93
│ │ │ -
94 const_iterator end () const
│ │ │ -
95 {
│ │ │ -
96 return reference_elements_.data() + numTopologies;
│ │ │ -
97 }
│ │ │ -
98
│ │ │ -
99 private:
│ │ │ -
100
│ │ │ -
101 std::array<Implementation,numTopologies> implementations_;
│ │ │ -
102 std::array<ReferenceElement,numTopologies> reference_elements_;
│ │ │ -
103
│ │ │ -
104 };
│ │ │ -
105
│ │ │ -
106
│ │ │ -
107 } // namespace Impl
│ │ │ -
108
│ │ │ -
109
│ │ │ -
110#endif // DOXYGEN
│ │ │ +
79 // break if jacobian is not invertible
│ │ │ +
80 if (!invertible)
│ │ │ +
81 return GaussNewtonErrorCode::JACOBIAN_NOT_INVERTIBLE;
│ │ │ +
82
│ │ │ +
83 // line-search procedure to update x with correction dx
│ │ │ +
84 R alpha = 1;
│ │ │ +
85 for (int j = 0; j < opts.maxInnerIt; ++j) {
│ │ │ +
86 x = x0 - alpha * dx;
│ │ │ +
87 dy = f(x) - y;
│ │ │ +
88 resNorm = dy.two_norm();
│ │ │ +
89
│ │ │ +
90 if (resNorm < resNorm0)
│ │ │ +
91 break;
│ │ │ +
92
│ │ │ +
93 alpha *= opts.theta;
│ │ │ +
94 }
│ │ │ +
95
│ │ │ +
96 // cannot reduce the residual
│ │ │ +
97 if (!(resNorm < resNorm0))
│ │ │ +
98 return GaussNewtonErrorCode::STAGNATION;
│ │ │ +
99
│ │ │ +
100 x0 = x;
│ │ │ +
101 resNorm0 = resNorm;
│ │ │ +
102
│ │ │ +
103 // break if tolerance is reached.
│ │ │ +
104 if (resNorm < opts.absTol)
│ │ │ +
105 return GaussNewtonErrorCode::OK;
│ │ │ +
106 }
│ │ │ +
107
│ │ │ +
108 // tolerance could not be reached
│ │ │ +
109 if (!(resNorm < opts.absTol))
│ │ │ +
110 return GaussNewtonErrorCode::TOLERANCE_NOT_REACHED;
│ │ │
111
│ │ │ -
112
│ │ │ -
113 // ReferenceElements
│ │ │ -
114 // ------------------------
│ │ │ -
115
│ │ │ -
126 template< class ctype_, int dim >
│ │ │ -
│ │ │ - │ │ │ -
128 {
│ │ │ -
129
│ │ │ -
131 using ctype = ctype_;
│ │ │ -
132
│ │ │ - │ │ │ -
135
│ │ │ -
137 static constexpr int dimension = dim;
│ │ │ -
138
│ │ │ -
139 private:
│ │ │ -
140
│ │ │ -
141 using Container = Impl::ReferenceElementContainer< ctype, dim >;
│ │ │ -
142
│ │ │ -
143 public:
│ │ │ -
144
│ │ │ -
146 using ReferenceElement = typename Container::ReferenceElement;
│ │ │ -
147
│ │ │ -
149 using Iterator = typename Container::const_iterator;
│ │ │ -
150
│ │ │ - │ │ │ -
153
│ │ │ -
155 static const ReferenceElement&
│ │ │ -
│ │ │ -
156 general ( const GeometryType& type )
│ │ │ -
157 {
│ │ │ -
158 return container() ( type );
│ │ │ -
159 }
│ │ │ -
│ │ │ -
160
│ │ │ -
│ │ │ -
162 static const ReferenceElement& simplex ()
│ │ │ -
163 {
│ │ │ -
164 return container().simplex();
│ │ │ -
165 }
│ │ │ -
│ │ │ -
166
│ │ │ -
│ │ │ -
168 static const ReferenceElement& cube ()
│ │ │ -
169 {
│ │ │ -
170 return container().cube();
│ │ │ -
171 }
│ │ │ -
│ │ │ -
172
│ │ │ -
│ │ │ -
173 static Iterator begin ()
│ │ │ -
174 {
│ │ │ -
175 return container().begin();
│ │ │ -
176 }
│ │ │ -
│ │ │ -
177
│ │ │ -
│ │ │ -
178 static Iterator end ()
│ │ │ -
179 {
│ │ │ -
180 return container().end();
│ │ │ -
181 }
│ │ │ -
│ │ │ -
182
│ │ │ -
183 private:
│ │ │ -
184
│ │ │ -
185 DUNE_EXPORT static const Container& container ()
│ │ │ -
186 {
│ │ │ -
187 static Container container;
│ │ │ -
188 return container;
│ │ │ -
189 }
│ │ │ -
190 };
│ │ │ -
│ │ │ -
191
│ │ │ -
192 } // namespace Geo
│ │ │ -
193
│ │ │ - │ │ │ -
196
│ │ │ -
197
│ │ │ -
198#ifdef DOXYGEN
│ │ │ -
199
│ │ │ -
201
│ │ │ -
244 template<typename... T>
│ │ │ -
245 unspecified-value-type referenceElement(T&&... t);
│ │ │ -
246
│ │ │ -
247#endif
│ │ │ -
248
│ │ │ -
249
│ │ │ -
251
│ │ │ -
264 template<typename T, int dim>
│ │ │ -
│ │ │ - │ │ │ -
266 {
│ │ │ - │ │ │ -
268 }
│ │ │ -
│ │ │ -
269
│ │ │ -
270
│ │ │ -
272
│ │ │ -
284 template<typename T, int dim, std::enable_if_t<IsNumber<std::decay_t<T>>::value, int> = 0>
│ │ │ -
│ │ │ - │ │ │ -
286 {
│ │ │ - │ │ │ -
288 }
│ │ │ -
│ │ │ -
289
│ │ │ -
290 template<typename... T>
│ │ │ -
291 using ReferenceElement = decltype(referenceElement(std::declval<T>()...));
│ │ │ -
292
│ │ │ -
293} // namespace Dune
│ │ │ -
294
│ │ │ -
295#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTS_HH
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
constexpr GeometryType cube(unsigned int dim)
Returns a GeometryType representing a hypercube of dimension dim.
Definition type.hh:462
│ │ │ -
constexpr GeometryType prism
GeometryType representing a 3D prism.
Definition type.hh:528
│ │ │ -
constexpr GeometryType pyramid
GeometryType representing a 3D pyramid.
Definition type.hh:522
│ │ │ -
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition type.hh:453
│ │ │ -
unspecified value type referenceElement(T &&... t)
Returns a reference element for the objects t....
│ │ │ +
112 return GaussNewtonErrorCode::OK;
│ │ │ +
113}
│ │ │ +
114
│ │ │ +
115} // end namespace Impl
│ │ │ +
116} // end namespace Dune
│ │ │ +
117
│ │ │ +
118#endif // DUNE_GEOMETRY_UTILITY_ALGORITHMS_HH
│ │ │ + │ │ │
Definition affinegeometry.hh:22
│ │ │ -
decltype(referenceElement(std::declval< T >()...)) ReferenceElement
Definition referenceelements.hh:291
│ │ │ -
Definition affinegeometry.hh:28
│ │ │ -
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │ -
static Iterator begin()
Definition referenceelements.hh:173
│ │ │ -
Iterator iterator
Definition referenceelements.hh:152
│ │ │ -
typename Container::ReferenceElement ReferenceElement
Definition referenceelements.hh:146
│ │ │ -
static const ReferenceElement & cube()
get hypercube reference elements
Definition referenceelements.hh:168
│ │ │ -
static Iterator end()
Definition referenceelements.hh:178
│ │ │ -
ctype ctype
Definition referenceelements.hh:131
│ │ │ -
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition referenceelements.hh:156
│ │ │ -
static const ReferenceElement & simplex()
get simplex reference elements
Definition referenceelements.hh:162
│ │ │ -
typename Container::const_iterator Iterator
Definition referenceelements.hh:149
│ │ │ -
static constexpr int dimension
Definition referenceelements.hh:137
│ │ │ -
ctype CoordinateField
Definition referenceelements.hh:134
│ │ │ -
Static tag representing a dimension.
Definition dimension.hh:16
│ │ │ -
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ -
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:365
│ │ │ -
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition referenceelements.hh:156
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,305 +1,120 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -referenceelements.hh │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ +algorithms.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_REFERENCEELEMENTS_HH │ │ │ │ -6#define DUNE_GEOMETRY_REFERENCEELEMENTS_HH │ │ │ │ +5#ifndef DUNE_GEOMETRY_UTILITY_ALGORITHMS_HH │ │ │ │ +6#define DUNE_GEOMETRY_UTILITY_ALGORITHMS_HH │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ -9 │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ -13#include │ │ │ │ -14#include │ │ │ │ -15#include │ │ │ │ -16 │ │ │ │ -17#include │ │ │ │ -18#include │ │ │ │ -19#include │ │ │ │ -20 │ │ │ │ -21#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_d_i_m_e_n_s_i_o_n_._h_h> │ │ │ │ -22#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -23#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h> │ │ │ │ -24#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_i_m_p_l_e_m_e_n_t_a_t_i_o_n_._h_h> │ │ │ │ -25 │ │ │ │ -26namespace _D_u_n_e │ │ │ │ -27{ │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13 │ │ │ │ +14#include │ │ │ │ +15#include │ │ │ │ +16#include │ │ │ │ +17#include │ │ │ │ +18#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ +19 │ │ │ │ +20namespace _D_u_n_e { │ │ │ │ +21namespace Impl { │ │ │ │ +22 │ │ │ │ +23template │ │ │ │ +24struct GaussNewtonOptions │ │ │ │ +25{ │ │ │ │ +27 int maxIt = 100; │ │ │ │ 28 │ │ │ │ -29 namespace _G_e_o │ │ │ │ -30 { │ │ │ │ +30 R absTol = []{ using std::sqrt; return sqrt(std::numeric_limits::epsilon │ │ │ │ +()); }(); │ │ │ │ 31 │ │ │ │ -32#ifndef DOXYGEN │ │ │ │ -33 │ │ │ │ +33 int maxInnerIt = 10; │ │ │ │ 34 │ │ │ │ -35 namespace Impl │ │ │ │ -36 { │ │ │ │ -37 │ │ │ │ -38 // ReferenceElementContainer │ │ │ │ -39 // ------------------------- │ │ │ │ -40 │ │ │ │ -41 template< class ctype, int dim > │ │ │ │ -42 class ReferenceElementContainer │ │ │ │ -43 { │ │ │ │ -44 static const unsigned int numTopologies = dim >= 0 ? (1u << dim) : 0; │ │ │ │ -45 │ │ │ │ -46 using Implementation = ReferenceElementImplementation< ctype, dim >; │ │ │ │ -47 │ │ │ │ -48 public: │ │ │ │ +36 R theta = 0.5; │ │ │ │ +37}; │ │ │ │ +38 │ │ │ │ +39 │ │ │ │ +41enum class GaussNewtonErrorCode │ │ │ │ +42{ │ │ │ │ +43 OK = 0, //< A solution is found │ │ │ │ +44 JACOBIAN_NOT_INVERTIBLE, //< The Jacobian is not invertible at the current │ │ │ │ +point │ │ │ │ +45 STAGNATION, //< No reduction of the residul norm possible │ │ │ │ +46 TOLERANCE_NOT_REACHED //< The break tolerance for the resodual norm is not │ │ │ │ +reached │ │ │ │ +47}; │ │ │ │ +48 │ │ │ │ 49 │ │ │ │ -50 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = Dune::Geo::ReferenceElement< Implementation >; │ │ │ │ -51 using value_type = _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ -52 using const_iterator = const value_type*; │ │ │ │ -53 │ │ │ │ -54 ReferenceElementContainer () │ │ │ │ -55 { │ │ │ │ -56 for( unsigned int topologyId = 0; topologyId < numTopologies; ++topologyId ) │ │ │ │ -57 { │ │ │ │ -58 implementations_[ topologyId ].initialize( topologyId ); │ │ │ │ -59 reference_elements_[ topologyId ].setImplementation( implementations_ │ │ │ │ -[ topologyId ] ); │ │ │ │ -60 } │ │ │ │ -61 } │ │ │ │ -62 │ │ │ │ -63 const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& operator() ( const GeometryType &type ) const │ │ │ │ -64 { │ │ │ │ -65 assert( type.dim() == dim ); │ │ │ │ -66 return reference_elements_[ type.id() ]; │ │ │ │ -67 } │ │ │ │ -68 │ │ │ │ -69 const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _s_i_m_p_l_e_x () const │ │ │ │ -70 { │ │ │ │ -71 return reference_elements_[ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_s_i_m_p_l_e_x(dim)._i_d() ]; │ │ │ │ -72 } │ │ │ │ +62template , │ │ │ │ +64 class R = typename Dune::FieldTraits::real_type> │ │ │ │ +65GaussNewtonErrorCode gaussNewton (const F& f, const DF& df, Range y, Domain& │ │ │ │ +x0, │ │ │ │ +66 GaussNewtonOptions opts = {}) │ │ │ │ +67{ │ │ │ │ +68 Domain x = x0; │ │ │ │ +69 Domain dx{}; │ │ │ │ +70 Range dy = f(x0) - y; │ │ │ │ +71 R resNorm0 = dy.two_norm(); │ │ │ │ +72 R resNorm = 0; │ │ │ │ 73 │ │ │ │ -74 const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _c_u_b_e () const │ │ │ │ +74 for (int i = 0; i < opts.maxIt; ++i) │ │ │ │ 75 { │ │ │ │ -76 return reference_elements_[ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_u_b_e(dim)._i_d() ]; │ │ │ │ -77 } │ │ │ │ +76 // Get descent direction dx: (J^T*J)dx = J^T*dy │ │ │ │ +77 const bool invertible = FieldMatrixHelper::xTRightInvA(df(x), dy, dx); │ │ │ │ 78 │ │ │ │ -79 const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _p_y_r_a_m_i_d () const │ │ │ │ -80 { │ │ │ │ -81 return reference_elements_[ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_y_r_a_m_i_d._i_d() ]; │ │ │ │ -82 } │ │ │ │ -83 │ │ │ │ -84 const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _p_r_i_s_m () const │ │ │ │ -85 { │ │ │ │ -86 return reference_elements_[ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m._i_d() ]; │ │ │ │ -87 } │ │ │ │ -88 │ │ │ │ -89 const_iterator begin () const │ │ │ │ -90 { │ │ │ │ -91 return reference_elements_.data(); │ │ │ │ -92 } │ │ │ │ -93 │ │ │ │ -94 const_iterator end () const │ │ │ │ -95 { │ │ │ │ -96 return reference_elements_.data() + numTopologies; │ │ │ │ -97 } │ │ │ │ -98 │ │ │ │ -99 private: │ │ │ │ -100 │ │ │ │ -101 std::array implementations_; │ │ │ │ -102 std::array reference_elements_; │ │ │ │ -103 │ │ │ │ -104 }; │ │ │ │ -105 │ │ │ │ -106 │ │ │ │ -107 } // namespace Impl │ │ │ │ -108 │ │ │ │ -109 │ │ │ │ -110#endif // DOXYGEN │ │ │ │ +79 // break if jacobian is not invertible │ │ │ │ +80 if (!invertible) │ │ │ │ +81 return GaussNewtonErrorCode::JACOBIAN_NOT_INVERTIBLE; │ │ │ │ +82 │ │ │ │ +83 // line-search procedure to update x with correction dx │ │ │ │ +84 R alpha = 1; │ │ │ │ +85 for (int j = 0; j < opts.maxInnerIt; ++j) { │ │ │ │ +86 x = x0 - alpha * dx; │ │ │ │ +87 dy = f(x) - y; │ │ │ │ +88 resNorm = dy.two_norm(); │ │ │ │ +89 │ │ │ │ +90 if (resNorm < resNorm0) │ │ │ │ +91 break; │ │ │ │ +92 │ │ │ │ +93 alpha *= opts.theta; │ │ │ │ +94 } │ │ │ │ +95 │ │ │ │ +96 // cannot reduce the residual │ │ │ │ +97 if (!(resNorm < resNorm0)) │ │ │ │ +98 return GaussNewtonErrorCode::STAGNATION; │ │ │ │ +99 │ │ │ │ +100 x0 = x; │ │ │ │ +101 resNorm0 = resNorm; │ │ │ │ +102 │ │ │ │ +103 // break if tolerance is reached. │ │ │ │ +104 if (resNorm < opts.absTol) │ │ │ │ +105 return GaussNewtonErrorCode::OK; │ │ │ │ +106 } │ │ │ │ +107 │ │ │ │ +108 // tolerance could not be reached │ │ │ │ +109 if (!(resNorm < opts.absTol)) │ │ │ │ +110 return GaussNewtonErrorCode::TOLERANCE_NOT_REACHED; │ │ │ │ 111 │ │ │ │ -112 │ │ │ │ -113 // ReferenceElements │ │ │ │ -114 // ------------------------ │ │ │ │ -115 │ │ │ │ -126 template< class ctype_, int dim > │ │ │ │ -_1_2_7 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ -128 { │ │ │ │ -129 │ │ │ │ -_1_3_1 using _c_t_y_p_e = ctype_; │ │ │ │ -132 │ │ │ │ -_1_3_4 using _C_o_o_r_d_i_n_a_t_e_F_i_e_l_d = _c_t_y_p_e; │ │ │ │ -135 │ │ │ │ -_1_3_7 static constexpr int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ -138 │ │ │ │ -139 private: │ │ │ │ -140 │ │ │ │ -141 using Container = Impl::ReferenceElementContainer< ctype, dim >; │ │ │ │ -142 │ │ │ │ -143 public: │ │ │ │ -144 │ │ │ │ -_1_4_6 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = typename Container::ReferenceElement; │ │ │ │ -147 │ │ │ │ -_1_4_9 using _I_t_e_r_a_t_o_r = typename Container::const_iterator; │ │ │ │ -150 │ │ │ │ -_1_5_2 using _i_t_e_r_a_t_o_r = _I_t_e_r_a_t_o_r; │ │ │ │ -153 │ │ │ │ -155 static const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& │ │ │ │ -_1_5_6 _g_e_n_e_r_a_l ( const _G_e_o_m_e_t_r_y_T_y_p_e& type ) │ │ │ │ -157 { │ │ │ │ -158 return container() ( type ); │ │ │ │ -159 } │ │ │ │ -160 │ │ │ │ -_1_6_2 static const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _s_i_m_p_l_e_x () │ │ │ │ -163 { │ │ │ │ -164 return container().simplex(); │ │ │ │ -165 } │ │ │ │ -166 │ │ │ │ -_1_6_8 static const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& _c_u_b_e () │ │ │ │ -169 { │ │ │ │ -170 return container().cube(); │ │ │ │ -171 } │ │ │ │ -172 │ │ │ │ -_1_7_3 static _I_t_e_r_a_t_o_r _b_e_g_i_n () │ │ │ │ -174 { │ │ │ │ -175 return container().begin(); │ │ │ │ -176 } │ │ │ │ -177 │ │ │ │ -_1_7_8 static _I_t_e_r_a_t_o_r _e_n_d () │ │ │ │ -179 { │ │ │ │ -180 return container().end(); │ │ │ │ -181 } │ │ │ │ -182 │ │ │ │ -183 private: │ │ │ │ -184 │ │ │ │ -185 DUNE_EXPORT static const Container& container () │ │ │ │ -186 { │ │ │ │ -187 static Container container; │ │ │ │ -188 return container; │ │ │ │ -189 } │ │ │ │ -190 }; │ │ │ │ -191 │ │ │ │ -192 } // namespace Geo │ │ │ │ -193 │ │ │ │ -195 using _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ -196 │ │ │ │ -197 │ │ │ │ -198#ifdef DOXYGEN │ │ │ │ -199 │ │ │ │ -201 │ │ │ │ -244 template │ │ │ │ -_2_4_5 unspecified-value-type _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(T&&... t); │ │ │ │ -246 │ │ │ │ -247#endif │ │ │ │ -248 │ │ │ │ -249 │ │ │ │ -251 │ │ │ │ -264 template │ │ │ │ -_2_6_5 auto _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(const _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e& gt, _D_u_n_e_:_:_D_i_m_<_d_i_m_> = {}) │ │ │ │ -266 { │ │ │ │ -267 return _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_T_,_d_i_m_>_:_:_g_e_n_e_r_a_l(gt); │ │ │ │ -268 } │ │ │ │ -269 │ │ │ │ -270 │ │ │ │ -272 │ │ │ │ -284 template>:: │ │ │ │ -value, int> = 0> │ │ │ │ -_2_8_5 auto _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(const T&, const _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e& gt, _D_u_n_e_:_: │ │ │ │ -_D_i_m_<_d_i_m_>) │ │ │ │ -286 { │ │ │ │ -287 return _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_T_,_d_i_m_>_:_:_g_e_n_e_r_a_l(gt); │ │ │ │ -288 } │ │ │ │ -289 │ │ │ │ -290 template │ │ │ │ -_2_9_1 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = decltype(_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(std::declval()...)); │ │ │ │ -292 │ │ │ │ -293} // namespace Dune │ │ │ │ -294 │ │ │ │ -295#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTS_HH │ │ │ │ -_t_y_p_e_._h_h │ │ │ │ -A unique label for each type of element that can occur in a grid. │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_i_m_p_l_e_m_e_n_t_a_t_i_o_n_._h_h │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h │ │ │ │ -_d_i_m_e_n_s_i_o_n_._h_h │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_u_b_e │ │ │ │ -constexpr GeometryType cube(unsigned int dim) │ │ │ │ -Returns a GeometryType representing a hypercube of dimension dim. │ │ │ │ -DDeeffiinniittiioonn type.hh:462 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_r_i_s_m │ │ │ │ -constexpr GeometryType prism │ │ │ │ -GeometryType representing a 3D prism. │ │ │ │ -DDeeffiinniittiioonn type.hh:528 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_p_y_r_a_m_i_d │ │ │ │ -constexpr GeometryType pyramid │ │ │ │ -GeometryType representing a 3D pyramid. │ │ │ │ -DDeeffiinniittiioonn type.hh:522 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_s_i_m_p_l_e_x │ │ │ │ -constexpr GeometryType simplex(unsigned int dim) │ │ │ │ -Returns a GeometryType representing a simplex of dimension dim. │ │ │ │ -DDeeffiinniittiioonn type.hh:453 │ │ │ │ -_D_u_n_e_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -unspecified value type referenceElement(T &&... t) │ │ │ │ -Returns a reference element for the objects t.... │ │ │ │ +112 return GaussNewtonErrorCode::OK; │ │ │ │ +113} │ │ │ │ +114 │ │ │ │ +115} // end namespace Impl │ │ │ │ +116} // end namespace Dune │ │ │ │ +117 │ │ │ │ +118#endif // DUNE_GEOMETRY_UTILITY_ALGORITHMS_HH │ │ │ │ +_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -decltype(referenceElement(std::declval< T >()...)) ReferenceElement │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:291 │ │ │ │ -_D_u_n_e_:_:_G_e_o │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:28 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ -Class providing access to the singletons of the reference elements. │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_b_e_g_i_n │ │ │ │ -static Iterator begin() │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:173 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _>_:_:_i_t_e_r_a_t_o_r │ │ │ │ -Iterator iterator │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:152 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _>_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -typename Container::ReferenceElement ReferenceElement │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:146 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_c_u_b_e │ │ │ │ -static const ReferenceElement & cube() │ │ │ │ -get hypercube reference elements │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:168 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_e_n_d │ │ │ │ -static Iterator end() │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:178 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _>_:_:_c_t_y_p_e │ │ │ │ -ctype ctype │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:131 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_g_e_n_e_r_a_l │ │ │ │ -static const ReferenceElement & general(const GeometryType &type) │ │ │ │ -get general reference elements │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:156 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_s_i_m_p_l_e_x │ │ │ │ -static const ReferenceElement & simplex() │ │ │ │ -get simplex reference elements │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:162 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _>_:_:_I_t_e_r_a_t_o_r │ │ │ │ -typename Container::const_iterator Iterator │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:149 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int dimension │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:137 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _>_:_:_C_o_o_r_d_i_n_a_t_e_F_i_e_l_d │ │ │ │ -ctype CoordinateField │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:134 │ │ │ │ -_D_u_n_e_:_:_D_i_m │ │ │ │ -Static tag representing a dimension. │ │ │ │ -DDeeffiinniittiioonn dimension.hh:16 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ -Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ -DDeeffiinniittiioonn type.hh:114 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_d │ │ │ │ -constexpr unsigned int id() const │ │ │ │ -Return the topology id of the type. │ │ │ │ -DDeeffiinniittiioonn type.hh:365 │ │ │ │ -_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_g_e_n_e_r_a_l │ │ │ │ -static const ReferenceElement & general(const GeometryType &type) │ │ │ │ -get general reference elements │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:156 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00221.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelementimplementation.hh File Reference │ │ │ +dune-geometry: defaultmatrixhelper.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,48 +66,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Namespaces
│ │ │ -
referenceelementimplementation.hh File Reference
│ │ │ +
defaultmatrixhelper.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <cassert>
│ │ │ -#include <algorithm>
│ │ │ -#include <limits>
│ │ │ -#include <tuple>
│ │ │ -#include <utility>
│ │ │ -#include <vector>
│ │ │ -#include <array>
│ │ │ -#include <bitset>
│ │ │ +
#include <cmath>
│ │ │ #include <dune/common/fmatrix.hh>
│ │ │ #include <dune/common/fvector.hh>
│ │ │ -#include <dune/common/hybridutilities.hh>
│ │ │ -#include <dune/common/typetraits.hh>
│ │ │ -#include <dune/common/iteratorrange.hh>
│ │ │ -#include <dune/common/math.hh>
│ │ │ -#include <dune/geometry/referenceelement.hh>
│ │ │ -#include <dune/geometry/affinegeometry.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Namespaces

namespace  Dune
namespace  Dune::Geo
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,31 +1,17 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ -referenceelementimplementation.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +defaultmatrixhelper.hh File Reference │ │ │ │ +#include │ │ │ │ #include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_a_f_f_i_n_e_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ -namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00221_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelementimplementation.hh Source File │ │ │ +dune-geometry: defaultmatrixhelper.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -66,733 +66,450 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
referenceelementimplementation.hh
│ │ │ +
defaultmatrixhelper.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH
│ │ │ -
6#define DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH
│ │ │ +
5#ifndef DUNE_GEOMETRY_UTILITY_DEFAULTMATRIXHELPER_HH
│ │ │ +
6#define DUNE_GEOMETRY_UTILITY_DEFAULTMATRIXHELPER_HH
│ │ │
7
│ │ │ -
8#include <cassert>
│ │ │ +
8#include <cmath>
│ │ │
9
│ │ │ -
10#include <algorithm>
│ │ │ -
11#include <limits>
│ │ │ -
12#include <tuple>
│ │ │ -
13#include <utility>
│ │ │ -
14#include <vector>
│ │ │ -
15#include <array>
│ │ │ -
16#include <bitset>
│ │ │ -
17
│ │ │ -
18#include <dune/common/fmatrix.hh>
│ │ │ -
19#include <dune/common/fvector.hh>
│ │ │ -
20#include <dune/common/hybridutilities.hh>
│ │ │ -
21#include <dune/common/typetraits.hh>
│ │ │ -
22#include <dune/common/iteratorrange.hh>
│ │ │ -
23#include <dune/common/math.hh>
│ │ │ -
24
│ │ │ - │ │ │ - │ │ │ -
27#include <dune/geometry/type.hh>
│ │ │ -
28
│ │ │ -
29namespace Dune
│ │ │ -
30{
│ │ │ -
31
│ │ │ -
32 namespace Geo
│ │ │ -
33 {
│ │ │ -
34
│ │ │ -
35#ifndef DOXYGEN
│ │ │ -
36
│ │ │ -
37 // Internal Forward Declarations
│ │ │ -
38 // -----------------------------
│ │ │ -
39
│ │ │ -
40 namespace Impl
│ │ │ -
41 {
│ │ │ -
42 template< class ctype, int dim >
│ │ │ -
43 class ReferenceElementContainer;
│ │ │ -
44 }
│ │ │ -
45
│ │ │ -
46 template< class ctype, int dim >
│ │ │ -
47 struct ReferenceElements;
│ │ │ -
48
│ │ │ -
49
│ │ │ -
50
│ │ │ -
51 namespace Impl
│ │ │ -
52 {
│ │ │ -
53
│ │ │ -
54 using Dune::Impl::isPrism;
│ │ │ -
55 using Dune::Impl::isPyramid;
│ │ │ -
56 using Dune::Impl::baseTopologyId;
│ │ │ -
57 using Dune::Impl::prismConstruction;
│ │ │ -
58 using Dune::Impl::pyramidConstruction;
│ │ │ -
59 using Dune::Impl::numTopologies;
│ │ │ -
60
│ │ │ -
62 unsigned int size ( unsigned int topologyId, int dim, int codim );
│ │ │ -
63
│ │ │ -
64
│ │ │ -
65
│ │ │ -
73 unsigned int subTopologyId ( unsigned int topologyId, int dim, int codim, unsigned int i );
│ │ │ -
74
│ │ │ -
75
│ │ │ -
76
│ │ │ -
77 // subTopologyNumbering
│ │ │ -
78 // --------------------
│ │ │ -
79
│ │ │ -
80 void subTopologyNumbering ( unsigned int topologyId, int dim, int codim, unsigned int i, int subcodim,
│ │ │ -
81 unsigned int *beginOut, unsigned int *endOut );
│ │ │ -
82
│ │ │ -
83
│ │ │ -
84
│ │ │ -
85
│ │ │ -
86 // checkInside
│ │ │ -
87 // -----------
│ │ │ -
88
│ │ │ -
89 template< class ct, int cdim >
│ │ │ -
90 inline bool
│ │ │ -
91 checkInside ( unsigned int topologyId, int dim, const FieldVector< ct, cdim > &x, ct tolerance, ct factor = ct( 1 ) )
│ │ │ -
92 {
│ │ │ -
93 assert( (dim >= 0) && (dim <= cdim) );
│ │ │ -
94 assert( topologyId < numTopologies( dim ) );
│ │ │ -
95
│ │ │ -
96 if( dim > 0 )
│ │ │ -
97 {
│ │ │ -
98 const ct baseFactor = (isPrism( topologyId, dim ) ? factor : factor - x[ dim-1 ]);
│ │ │ -
99 if( (x[ dim-1 ] > -tolerance) && (factor - x[ dim-1 ] > -tolerance) )
│ │ │ -
100 return checkInside< ct, cdim >( baseTopologyId( topologyId, dim ), dim-1, x, tolerance, baseFactor );
│ │ │ -
101 else
│ │ │ -
102 return false;
│ │ │ -
103 }
│ │ │ -
104 else
│ │ │ -
105 return true;
│ │ │ -
106 }
│ │ │ -
107
│ │ │ -
108
│ │ │ -
109
│ │ │ -
110 // referenceCorners
│ │ │ -
111 // ----------------
│ │ │ -
112
│ │ │ -
113 template< class ct, int cdim >
│ │ │ -
114 inline unsigned int
│ │ │ -
115 referenceCorners ( unsigned int topologyId, int dim, FieldVector< ct, cdim > *corners )
│ │ │ -
116 {
│ │ │ -
117 assert( (dim >= 0) && (dim <= cdim) );
│ │ │ -
118 assert( topologyId < numTopologies( dim ) );
│ │ │ -
119
│ │ │ -
120 if( dim > 0 )
│ │ │ -
121 {
│ │ │ -
122 const unsigned int nBaseCorners
│ │ │ -
123 = referenceCorners( baseTopologyId( topologyId, dim ), dim-1, corners );
│ │ │ -
124 assert( nBaseCorners == size( baseTopologyId( topologyId, dim ), dim-1, dim-1 ) );
│ │ │ -
125 if( isPrism( topologyId, dim ) )
│ │ │ -
126 {
│ │ │ -
127 std::copy( corners, corners + nBaseCorners, corners + nBaseCorners );
│ │ │ -
128 for( unsigned int i = 0; i < nBaseCorners; ++i )
│ │ │ -
129 corners[ i+nBaseCorners ][ dim-1 ] = ct( 1 );
│ │ │ -
130 return 2*nBaseCorners;
│ │ │ -
131 }
│ │ │ -
132 else
│ │ │ -
133 {
│ │ │ -
134 corners[ nBaseCorners ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ -
135 corners[ nBaseCorners ][ dim-1 ] = ct( 1 );
│ │ │ -
136 return nBaseCorners+1;
│ │ │ -
137 }
│ │ │ -
138 }
│ │ │ -
139 else
│ │ │ -
140 {
│ │ │ -
141 *corners = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ -
142 return 1;
│ │ │ -
143 }
│ │ │ -
144 }
│ │ │ -
145
│ │ │ -
146
│ │ │ -
147
│ │ │ -
148 // referenceVolume
│ │ │ -
149 // ---------------
│ │ │ -
150
│ │ │ -
151 unsigned long referenceVolumeInverse ( unsigned int topologyId, int dim );
│ │ │ -
152
│ │ │ -
153 template< class ct >
│ │ │ -
154 inline ct referenceVolume ( unsigned int topologyId, int dim )
│ │ │ +
10#include <dune/common/fmatrix.hh>
│ │ │ +
11#include <dune/common/fvector.hh>
│ │ │ +
12
│ │ │ +
13namespace Dune {
│ │ │ +
14namespace Impl {
│ │ │ +
15
│ │ │ +
16// FieldMatrixHelper
│ │ │ +
17// -----------------
│ │ │ +
18
│ │ │ +
19template< class ct >
│ │ │ +
20struct FieldMatrixHelper
│ │ │ +
21{
│ │ │ +
22 using ctype = ct;
│ │ │ +
23
│ │ │ +
25 template< int m, int n >
│ │ │ +
26 [[ deprecated("Use A.mv(x,y) instead.") ]]
│ │ │ +
27 static void Ax ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, n > &x, FieldVector< ctype, m > &ret )
│ │ │ +
28 {
│ │ │ +
29 A.mv(x,ret);
│ │ │ +
30 }
│ │ │ +
31
│ │ │ +
33 template< int m, int n >
│ │ │ +
34 [[ deprecated("Use A.mtv(x,y) instead.") ]]
│ │ │ +
35 static void ATx ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, m > &x, FieldVector< ctype, n > &ret )
│ │ │ +
36 {
│ │ │ +
37 A.mtv(x,ret);
│ │ │ +
38 }
│ │ │ +
39
│ │ │ +
41 template< int m, int n, int p >
│ │ │ +
42 [[ deprecated("Use FMatrixHelp::multMatrix(A,B,ret)") ]]
│ │ │ +
43 static void AB ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< ctype, n, p > &B, FieldMatrix< ctype, m, p > &ret )
│ │ │ +
44 {
│ │ │ +
45 FMatrixHelp::multMatrix(A,B,ret);
│ │ │ +
46 }
│ │ │ +
47
│ │ │ +
49 template< int m, int n, int p >
│ │ │ +
50 static void ATBT ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< ctype, p, m > &B, FieldMatrix< ctype, n, p > &ret )
│ │ │ +
51 {
│ │ │ +
52 for( int i = 0; i < n; ++i )
│ │ │ +
53 {
│ │ │ +
54 for( int j = 0; j < p; ++j )
│ │ │ +
55 {
│ │ │ +
56 ret[ i ][ j ] = ctype( 0 );
│ │ │ +
57 for( int k = 0; k < m; ++k )
│ │ │ +
58 ret[ i ][ j ] += A[ k ][ i ] * B[ j ][ k ];
│ │ │ +
59 }
│ │ │ +
60 }
│ │ │ +
61 }
│ │ │ +
62
│ │ │ +
64 template< int m, int n >
│ │ │ +
65 static void ATA_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, n > &ret )
│ │ │ +
66 {
│ │ │ +
67 for( int i = 0; i < n; ++i )
│ │ │ +
68 {
│ │ │ +
69 for( int j = 0; j <= i; ++j )
│ │ │ +
70 {
│ │ │ +
71 ret[ i ][ j ] = ctype( 0 );
│ │ │ +
72 for( int k = 0; k < m; ++k )
│ │ │ +
73 ret[ i ][ j ] += A[ k ][ i ] * A[ k ][ j ];
│ │ │ +
74 }
│ │ │ +
75 }
│ │ │ +
76 }
│ │ │ +
77
│ │ │ +
79 template< int m, int n >
│ │ │ +
80 [[ deprecated("Use FMatrixHelp::multTransposedMatrix(A,ret)") ]]
│ │ │ +
81 static void ATA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, n > &ret )
│ │ │ +
82 {
│ │ │ +
83 return FMatrixHelp::multTransposedMatrix(A,ret);
│ │ │ +
84 }
│ │ │ +
85
│ │ │ +
87 template< int m, int n >
│ │ │ +
88 static void AAT_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, m, m > &ret )
│ │ │ +
89 {
│ │ │ +
90 for( int i = 0; i < m; ++i )
│ │ │ +
91 {
│ │ │ +
92 for( int j = 0; j <= i; ++j )
│ │ │ +
93 {
│ │ │ +
94 ctype &retij = ret[ i ][ j ];
│ │ │ +
95 retij = A[ i ][ 0 ] * A[ j ][ 0 ];
│ │ │ +
96 for( int k = 1; k < n; ++k )
│ │ │ +
97 retij += A[ i ][ k ] * A[ j ][ k ];
│ │ │ +
98 }
│ │ │ +
99 }
│ │ │ +
100 }
│ │ │ +
101
│ │ │ +
103 template< int m, int n >
│ │ │ +
104 static void AAT ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, m, m > &ret )
│ │ │ +
105 {
│ │ │ +
106 for( int i = 0; i < m; ++i )
│ │ │ +
107 {
│ │ │ +
108 for( int j = 0; j < i; ++j )
│ │ │ +
109 {
│ │ │ +
110 ret[ i ][ j ] = ctype( 0 );
│ │ │ +
111 for( int k = 0; k < n; ++k )
│ │ │ +
112 ret[ i ][ j ] += A[ i ][ k ] * A[ j ][ k ];
│ │ │ +
113 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ +
114 }
│ │ │ +
115 ret[ i ][ i ] = ctype( 0 );
│ │ │ +
116 for( int k = 0; k < n; ++k )
│ │ │ +
117 ret[ i ][ i ] += A[ i ][ k ] * A[ i ][ k ];
│ │ │ +
118 }
│ │ │ +
119 }
│ │ │ +
120
│ │ │ +
122 // [[ expects: L is lower triangular ]]
│ │ │ +
123 template< int n >
│ │ │ +
124 static void Lx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< ctype, n > &x, FieldVector< ctype, n > &ret )
│ │ │ +
125 {
│ │ │ +
126 for( int i = 0; i < n; ++i )
│ │ │ +
127 {
│ │ │ +
128 ret[ i ] = ctype( 0 );
│ │ │ +
129 for( int j = 0; j <= i; ++j )
│ │ │ +
130 ret[ i ] += L[ i ][ j ] * x[ j ];
│ │ │ +
131 }
│ │ │ +
132 }
│ │ │ +
133
│ │ │ +
135 // [[ expects: L is lower triangular ]]
│ │ │ +
136 template< int n >
│ │ │ +
137 static void LTx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< ctype, n > &x, FieldVector< ctype, n > &ret )
│ │ │ +
138 {
│ │ │ +
139 for( int i = 0; i < n; ++i )
│ │ │ +
140 {
│ │ │ +
141 ret[ i ] = ctype( 0 );
│ │ │ +
142 for( int j = i; j < n; ++j )
│ │ │ +
143 ret[ i ] += L[ j ][ i ] * x[ j ];
│ │ │ +
144 }
│ │ │ +
145 }
│ │ │ +
146
│ │ │ +
148 // [[ expects: L is lower triangular ]]
│ │ │ +
149 template< int n >
│ │ │ +
150 static void LTL ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, n, n > &ret )
│ │ │ +
151 {
│ │ │ +
152 for( int i = 0; i < n; ++i )
│ │ │ +
153 {
│ │ │ +
154 for( int j = 0; j < i; ++j )
│ │ │
155 {
│ │ │ -
156 return ct( 1 ) / ct( referenceVolumeInverse( topologyId, dim ) );
│ │ │ -
157 }
│ │ │ -
158
│ │ │ -
159
│ │ │ -
160
│ │ │ -
161 // referenceOrigins
│ │ │ -
162 // ----------------
│ │ │ -
163
│ │ │ -
164 template< class ct, int cdim >
│ │ │ -
165 inline unsigned int
│ │ │ -
166 referenceOrigins ( unsigned int topologyId, int dim, int codim, FieldVector< ct, cdim > *origins )
│ │ │ -
167 {
│ │ │ -
168 assert( (dim >= 0) && (dim <= cdim) );
│ │ │ -
169 assert( topologyId < numTopologies( dim ) );
│ │ │ -
170 assert( (codim >= 0) && (codim <= dim) );
│ │ │ -
171
│ │ │ -
172 if( codim > 0 )
│ │ │ -
173 {
│ │ │ -
174 const unsigned int baseId = baseTopologyId( topologyId, dim );
│ │ │ -
175 if( isPrism( topologyId, dim ) )
│ │ │ -
176 {
│ │ │ -
177 const unsigned int n = (codim < dim ? referenceOrigins( baseId, dim-1, codim, origins ) : 0);
│ │ │ -
178 const unsigned int m = referenceOrigins( baseId, dim-1, codim-1, origins+n );
│ │ │ -
179 for( unsigned int i = 0; i < m; ++i )
│ │ │ -
180 {
│ │ │ -
181 origins[ n+m+i ] = origins[ n+i ];
│ │ │ -
182 origins[ n+m+i ][ dim-1 ] = ct( 1 );
│ │ │ -
183 }
│ │ │ -
184 return n+2*m;
│ │ │ -
185 }
│ │ │ -
186 else
│ │ │ -
187 {
│ │ │ -
188 const unsigned int m = referenceOrigins( baseId, dim-1, codim-1, origins );
│ │ │ -
189 if( codim == dim )
│ │ │ -
190 {
│ │ │ -
191 origins[ m ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ -
192 origins[ m ][ dim-1 ] = ct( 1 );
│ │ │ -
193 return m+1;
│ │ │ -
194 }
│ │ │ -
195 else
│ │ │ -
196 return m+referenceOrigins( baseId, dim-1, codim, origins+m );
│ │ │ -
197 }
│ │ │ -
198 }
│ │ │ -
199 else
│ │ │ -
200 {
│ │ │ -
201 origins[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ -
202 return 1;
│ │ │ -
203 }
│ │ │ -
204 }
│ │ │ -
205
│ │ │ +
156 ret[ i ][ j ] = ctype( 0 );
│ │ │ +
157 for( int k = i; k < n; ++k )
│ │ │ +
158 ret[ i ][ j ] += L[ k ][ i ] * L[ k ][ j ];
│ │ │ +
159 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ +
160 }
│ │ │ +
161 ret[ i ][ i ] = ctype( 0 );
│ │ │ +
162 for( int k = i; k < n; ++k )
│ │ │ +
163 ret[ i ][ i ] += L[ k ][ i ] * L[ k ][ i ];
│ │ │ +
164 }
│ │ │ +
165 }
│ │ │ +
166
│ │ │ +
168 // [[ expects: L is lower triangular ]]
│ │ │ +
169 template< int n >
│ │ │ +
170 static void LLT ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, n, n > &ret )
│ │ │ +
171 {
│ │ │ +
172 for( int i = 0; i < n; ++i )
│ │ │ +
173 {
│ │ │ +
174 for( int j = 0; j < i; ++j )
│ │ │ +
175 {
│ │ │ +
176 ret[ i ][ j ] = ctype( 0 );
│ │ │ +
177 for( int k = 0; k <= j; ++k )
│ │ │ +
178 ret[ i ][ j ] += L[ i ][ k ] * L[ j ][ k ];
│ │ │ +
179 ret[ j ][ i ] = ret[ i ][ j ];
│ │ │ +
180 }
│ │ │ +
181 ret[ i ][ i ] = ctype( 0 );
│ │ │ +
182 for( int k = 0; k <= i; ++k )
│ │ │ +
183 ret[ i ][ i ] += L[ i ][ k ] * L[ i ][ k ];
│ │ │ +
184 }
│ │ │ +
185 }
│ │ │ +
186
│ │ │ +
189 // [[ expects: A is spd ]]
│ │ │ +
190 template< int n >
│ │ │ +
191 static bool cholesky_L ( const FieldMatrix< ctype, n, n > &A, FieldMatrix< ctype, n, n > &ret, const bool checkSingular = false )
│ │ │ +
192 {
│ │ │ +
193 using std::sqrt;
│ │ │ +
194 for( int i = 0; i < n; ++i )
│ │ │ +
195 {
│ │ │ +
196 ctype &rii = ret[ i ][ i ];
│ │ │ +
197
│ │ │ +
198 ctype xDiag = A[ i ][ i ];
│ │ │ +
199 for( int j = 0; j < i; ++j )
│ │ │ +
200 xDiag -= ret[ i ][ j ] * ret[ i ][ j ];
│ │ │ +
201
│ │ │ +
202 // in some cases A can be singular, e.g. when checking local for
│ │ │ +
203 // outside points during checkInside
│ │ │ +
204 if( checkSingular && ! ( xDiag > ctype( 0 )) )
│ │ │ +
205 return false ;
│ │ │
206
│ │ │ -
207
│ │ │ -
208 // referenceEmbeddings
│ │ │ -
209 // -------------------
│ │ │ +
207 // otherwise this should be true always
│ │ │ +
208 assert( xDiag > ctype( 0 ) );
│ │ │ +
209 rii = sqrt( xDiag );
│ │ │
210
│ │ │ -
211 template< class ct, int cdim, int mydim >
│ │ │ -
212 inline unsigned int
│ │ │ -
213 referenceEmbeddings ( unsigned int topologyId, int dim, int codim,
│ │ │ -
214 FieldVector< ct, cdim > *origins,
│ │ │ -
215 FieldMatrix< ct, mydim, cdim > *jacobianTransposeds )
│ │ │ -
216 {
│ │ │ -
217 assert( (0 <= codim) && (codim <= dim) && (dim <= cdim) );
│ │ │ -
218 assert( (dim - codim <= mydim) && (mydim <= cdim) );
│ │ │ -
219 assert( topologyId < numTopologies( dim ) );
│ │ │ +
211 ctype invrii = ctype( 1 ) / rii;
│ │ │ +
212 for( int k = i+1; k < n; ++k )
│ │ │ +
213 {
│ │ │ +
214 ctype x = A[ k ][ i ];
│ │ │ +
215 for( int j = 0; j < i; ++j )
│ │ │ +
216 x -= ret[ i ][ j ] * ret[ k ][ j ];
│ │ │ +
217 ret[ k ][ i ] = invrii * x;
│ │ │ +
218 }
│ │ │ +
219 }
│ │ │
220
│ │ │ -
221 if( (0 < codim) && (codim <= dim) )
│ │ │ -
222 {
│ │ │ -
223 const unsigned int baseId = baseTopologyId( topologyId, dim );
│ │ │ -
224 if( isPrism( topologyId, dim ) )
│ │ │ -
225 {
│ │ │ -
226 const unsigned int n = (codim < dim ? referenceEmbeddings( baseId, dim-1, codim, origins, jacobianTransposeds ) : 0);
│ │ │ -
227 for( unsigned int i = 0; i < n; ++i )
│ │ │ -
228 jacobianTransposeds[ i ][ dim-codim-1 ][ dim-1 ] = ct( 1 );
│ │ │ -
229
│ │ │ -
230 const unsigned int m = referenceEmbeddings( baseId, dim-1, codim-1, origins+n, jacobianTransposeds+n );
│ │ │ -
231 std::copy( origins+n, origins+n+m, origins+n+m );
│ │ │ -
232 std::copy( jacobianTransposeds+n, jacobianTransposeds+n+m, jacobianTransposeds+n+m );
│ │ │ -
233 for( unsigned int i = 0; i < m; ++i )
│ │ │ -
234 origins[ n+m+i ][ dim-1 ] = ct( 1 );
│ │ │ -
235
│ │ │ -
236 return n+2*m;
│ │ │ -
237 }
│ │ │ -
238 else // !isPrism
│ │ │ -
239 {
│ │ │ -
240 const unsigned int m = referenceEmbeddings( baseId, dim-1, codim-1, origins, jacobianTransposeds );
│ │ │ -
241 if( codim == dim )
│ │ │ -
242 {
│ │ │ -
243 origins[ m ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ -
244 origins[ m ][ dim-1 ] = ct( 1 );
│ │ │ -
245 jacobianTransposeds[ m ] = FieldMatrix< ct, mydim, cdim >( ct( 0 ) );
│ │ │ -
246 return m+1;
│ │ │ -
247 }
│ │ │ -
248 else if( codim < dim )
│ │ │ -
249 {
│ │ │ -
250 const unsigned int n = referenceEmbeddings( baseId, dim-1, codim, origins+m, jacobianTransposeds+m );
│ │ │ -
251 for( unsigned int i = 0; i < n; ++i )
│ │ │ -
252 {
│ │ │ -
253 for( int k = 0; k < dim-1; ++k )
│ │ │ -
254 jacobianTransposeds[ m+i ][ dim-codim-1 ][ k ] = -origins[ m+i ][ k ];
│ │ │ -
255 jacobianTransposeds[ m+i ][ dim-codim-1 ][ dim-1 ] = ct( 1 );
│ │ │ -
256 }
│ │ │ -
257 return m+n;
│ │ │ -
258 }
│ │ │ -
259 }
│ │ │ -
260 }
│ │ │ -
261 else if( codim == 0 )
│ │ │ -
262 {
│ │ │ -
263 origins[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ -
264 jacobianTransposeds[ 0 ] = FieldMatrix< ct, mydim, cdim >( ct( 0 ) );
│ │ │ -
265 for( int k = 0; k < dim; ++k )
│ │ │ -
266 jacobianTransposeds[ 0 ][ k ][ k ] = ct( 1 );
│ │ │ -
267 return 1;
│ │ │ -
268 }
│ │ │ -
269
│ │ │ -
270 // this point should not be reached since all cases are handled before.
│ │ │ -
271 std::abort();
│ │ │ -
272 return 0;
│ │ │ -
273 }
│ │ │ -
274
│ │ │ -
275
│ │ │ -
276
│ │ │ -
277 // referenceIntegrationOuterNormals
│ │ │ -
278 // --------------------------------
│ │ │ -
279
│ │ │ -
280 template< class ct, int cdim >
│ │ │ -
281 inline unsigned int
│ │ │ -
282 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim,
│ │ │ -
283 const FieldVector< ct, cdim > *origins,
│ │ │ -
284 FieldVector< ct, cdim > *normals )
│ │ │ -
285 {
│ │ │ -
286 assert( (dim > 0) && (dim <= cdim) );
│ │ │ -
287 assert( topologyId < numTopologies( dim ) );
│ │ │ -
288
│ │ │ -
289 if( dim > 1 )
│ │ │ -
290 {
│ │ │ -
291 const unsigned int baseId = baseTopologyId( topologyId, dim );
│ │ │ -
292 if( isPrism( topologyId, dim ) )
│ │ │ -
293 {
│ │ │ -
294 const unsigned int numBaseFaces
│ │ │ -
295 = referenceIntegrationOuterNormals( baseId, dim-1, origins, normals );
│ │ │ -
296
│ │ │ -
297 for( unsigned int i = 0; i < 2; ++i )
│ │ │ -
298 {
│ │ │ -
299 normals[ numBaseFaces+i ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ -
300 normals[ numBaseFaces+i ][ dim-1 ] = ct( 2*int( i )-1 );
│ │ │ -
301 }
│ │ │ -
302
│ │ │ -
303 return numBaseFaces+2;
│ │ │ -
304 }
│ │ │ -
305 else
│ │ │ -
306 {
│ │ │ -
307 normals[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ -
308 normals[ 0 ][ dim-1 ] = ct( -1 );
│ │ │ -
309
│ │ │ -
310 const unsigned int numBaseFaces
│ │ │ -
311 = referenceIntegrationOuterNormals( baseId, dim-1, origins+1, normals+1 );
│ │ │ -
312 for( unsigned int i = 1; i <= numBaseFaces; ++i )
│ │ │ -
313 normals[ i ][ dim-1 ] = normals[ i ]*origins[ i ];
│ │ │ -
314
│ │ │ -
315 return numBaseFaces+1;
│ │ │ -
316 }
│ │ │ -
317 }
│ │ │ -
318 else
│ │ │ -
319 {
│ │ │ -
320 for( unsigned int i = 0; i < 2; ++i )
│ │ │ -
321 {
│ │ │ -
322 normals[ i ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ -
323 normals[ i ][ 0 ] = ct( 2*int( i )-1 );
│ │ │ -
324 }
│ │ │ -
325
│ │ │ -
326 return 2;
│ │ │ -
327 }
│ │ │ -
328 }
│ │ │ -
329
│ │ │ -
330 template< class ct, int cdim >
│ │ │ -
331 inline unsigned int
│ │ │ -
332 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim,
│ │ │ -
333 FieldVector< ct, cdim > *normals )
│ │ │ -
334 {
│ │ │ -
335 assert( (dim > 0) && (dim <= cdim) );
│ │ │ -
336
│ │ │ -
337 FieldVector< ct, cdim > *origins
│ │ │ -
338 = new FieldVector< ct, cdim >[ size( topologyId, dim, 1 ) ];
│ │ │ -
339 referenceOrigins( topologyId, dim, 1, origins );
│ │ │ -
340
│ │ │ -
341 const unsigned int numFaces
│ │ │ -
342 = referenceIntegrationOuterNormals( topologyId, dim, origins, normals );
│ │ │ -
343 assert( numFaces == size( topologyId, dim, 1 ) );
│ │ │ -
344
│ │ │ -
345 delete[] origins;
│ │ │ -
346
│ │ │ -
347 return numFaces;
│ │ │ -
348 }
│ │ │ -
349
│ │ │ -
350 } // namespace Impl
│ │ │ -
351
│ │ │ -
352
│ │ │ -
353
│ │ │ -
354 // ReferenceElement
│ │ │ -
355 // ----------------
│ │ │ -
356
│ │ │ -
375 template< class ctype_, int dim >
│ │ │ - │ │ │ -
377 {
│ │ │ -
378
│ │ │ -
379 public:
│ │ │ -
380
│ │ │ -
382 using ctype = ctype_;
│ │ │ -
383
│ │ │ -
385 using CoordinateField = ctype;
│ │ │ -
386
│ │ │ -
388 using Coordinate = Dune::FieldVector<ctype,dim>;
│ │ │ -
389
│ │ │ -
391 static constexpr int dimension = dim;
│ │ │ -
392
│ │ │ -
394 typedef ctype Volume;
│ │ │ -
395
│ │ │ -
396 private:
│ │ │ -
397
│ │ │ -
398 friend class Impl::ReferenceElementContainer< ctype, dim >;
│ │ │ -
399
│ │ │ -
400 struct SubEntityInfo;
│ │ │ -
401
│ │ │ -
402 template< int codim > struct CreateGeometries;
│ │ │ -
403
│ │ │ -
404 public:
│ │ │ -
406 template< int codim >
│ │ │ -
407 struct Codim
│ │ │ -
408 {
│ │ │ -
410 typedef AffineGeometry< ctype, dim-codim, dim > Geometry;
│ │ │ -
411 };
│ │ │ -
412
│ │ │ -
413 // ReferenceElement cannot be copied.
│ │ │ -
414 ReferenceElementImplementation ( const ReferenceElementImplementation& ) = delete;
│ │ │ -
415
│ │ │ -
416 // ReferenceElementImplementation cannot be copied.
│ │ │ -
417 ReferenceElementImplementation& operator= ( const ReferenceElementImplementation& ) = delete;
│ │ │ -
418
│ │ │ -
419 // ReferenceElementImplementation is default-constructible (required for storage in std::array)
│ │ │ -
420 ReferenceElementImplementation () = default;
│ │ │ -
421
│ │ │ -
426 int size ( int c ) const
│ │ │ -
427 {
│ │ │ -
428 assert( (c >= 0) && (c <= dim) );
│ │ │ -
429 return info_[ c ].size();
│ │ │ -
430 }
│ │ │ -
431
│ │ │ -
443 int size ( int i, int c, int cc ) const
│ │ │ -
444 {
│ │ │ -
445 assert( (i >= 0) && (i < size( c )) );
│ │ │ -
446 return info_[ c ][ i ].size( cc );
│ │ │ -
447 }
│ │ │ -
448
│ │ │ -
462 int subEntity ( int i, int c, int ii, int cc ) const
│ │ │ -
463 {
│ │ │ -
464 assert( (i >= 0) && (i < size( c )) );
│ │ │ -
465 return info_[ c ][ i ].number( ii, cc );
│ │ │ -
466 }
│ │ │ -
467
│ │ │ -
483 auto subEntities ( int i, int c, int cc ) const
│ │ │ -
484 {
│ │ │ -
485 assert( (i >= 0) && (i < size( c )) );
│ │ │ -
486 return info_[ c ][ i ].numbers( cc );
│ │ │ -
487 }
│ │ │ -
488
│ │ │ -
497 const GeometryType &type ( int i, int c ) const
│ │ │ -
498 {
│ │ │ -
499 assert( (i >= 0) && (i < size( c )) );
│ │ │ -
500 return info_[ c ][ i ].type();
│ │ │ -
501 }
│ │ │ -
502
│ │ │ -
504 const GeometryType &type () const { return type( 0, 0 ); }
│ │ │ -
505
│ │ │ -
515 const Coordinate &position( int i, int c ) const
│ │ │ -
516 {
│ │ │ -
517 assert( (c >= 0) && (c <= dim) );
│ │ │ -
518 return baryCenters_[ c ][ i ];
│ │ │ -
519 }
│ │ │ -
520
│ │ │ -
528 bool checkInside ( const Coordinate &local ) const
│ │ │ -
529 {
│ │ │ -
530 const ctype tolerance = ctype( 64 ) * std::numeric_limits< ctype >::epsilon();
│ │ │ -
531 return Impl::template checkInside< ctype, dim >( type().id(), dim, local, tolerance );
│ │ │ -
532 }
│ │ │ -
533
│ │ │ -
545 template< int codim >
│ │ │ -
546 typename Codim< codim >::Geometry geometry ( int i ) const
│ │ │ -
547 {
│ │ │ -
548 return std::get< codim >( geometries_ )[ i ];
│ │ │ -
549 }
│ │ │ -
550
│ │ │ -
552 Volume volume () const
│ │ │ -
553 {
│ │ │ -
554 return volume_;
│ │ │ -
555 }
│ │ │ -
556
│ │ │ -
564 const Coordinate &integrationOuterNormal ( int face ) const
│ │ │ -
565 {
│ │ │ -
566 assert( (face >= 0) && (face < int( integrationNormals_.size() )) );
│ │ │ -
567 return integrationNormals_[ face ];
│ │ │ -
568 }
│ │ │ -
569
│ │ │ -
570 private:
│ │ │ -
571 void initialize ( unsigned int topologyId )
│ │ │ -
572 {
│ │ │ -
573 assert( topologyId < Impl::numTopologies( dim ) );
│ │ │ -
574
│ │ │ -
575 // set up subentities
│ │ │ -
576 for( int codim = 0; codim <= dim; ++codim )
│ │ │ -
577 {
│ │ │ -
578 const unsigned int size = Impl::size( topologyId, dim, codim );
│ │ │ -
579 info_[ codim ].resize( size );
│ │ │ -
580 for( unsigned int i = 0; i < size; ++i )
│ │ │ -
581 info_[ codim ][ i ].initialize( topologyId, codim, i );
│ │ │ -
582 }
│ │ │ -
583
│ │ │ -
584 // compute corners
│ │ │ -
585 const unsigned int numVertices = size( dim );
│ │ │ -
586 baryCenters_[ dim ].resize( numVertices );
│ │ │ -
587 Impl::referenceCorners( topologyId, dim, &(baryCenters_[ dim ][ 0 ]) );
│ │ │ -
588
│ │ │ -
589 // compute barycenters
│ │ │ -
590 for( int codim = 0; codim < dim; ++codim )
│ │ │ -
591 {
│ │ │ -
592 baryCenters_[ codim ].resize( size(codim) );
│ │ │ -
593 for( int i = 0; i < size( codim ); ++i )
│ │ │ -
594 {
│ │ │ -
595 baryCenters_[ codim ][ i ] = Coordinate( ctype( 0 ) );
│ │ │ -
596 const unsigned int numCorners = size( i, codim, dim );
│ │ │ -
597 for( unsigned int j = 0; j < numCorners; ++j )
│ │ │ -
598 baryCenters_[ codim ][ i ] += baryCenters_[ dim ][ subEntity( i, codim, j, dim ) ];
│ │ │ -
599 baryCenters_[ codim ][ i ] *= ctype( 1 ) / ctype( numCorners );
│ │ │ -
600 }
│ │ │ -
601 }
│ │ │ -
602
│ │ │ -
603 // compute reference element volume
│ │ │ -
604 volume_ = Impl::template referenceVolume< ctype >( topologyId, dim );
│ │ │ -
605
│ │ │ -
606 // compute integration outer normals
│ │ │ -
607 if( dim > 0 )
│ │ │ -
608 {
│ │ │ -
609 integrationNormals_.resize( size( 1 ) );
│ │ │ -
610 Impl::referenceIntegrationOuterNormals( topologyId, dim, &(integrationNormals_[ 0 ]) );
│ │ │ -
611 }
│ │ │ -
612
│ │ │ -
613 // set up geometries
│ │ │ -
614 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ CreateGeometries< i >::apply( *this, geometries_ ); } );
│ │ │ -
615 }
│ │ │ -
616
│ │ │ -
617 template< int... codim >
│ │ │ -
618 static std::tuple< std::vector< typename Codim< codim >::Geometry >... >
│ │ │ -
619 makeGeometryTable ( std::integer_sequence< int, codim... > );
│ │ │ -
620
│ │ │ -
622 typedef decltype( makeGeometryTable( std::make_integer_sequence< int, dim+1 >() ) ) GeometryTable;
│ │ │ -
623
│ │ │ -
625 ctype volume_;
│ │ │ -
626
│ │ │ -
627 std::vector< Coordinate > baryCenters_[ dim+1 ];
│ │ │ -
628 std::vector< Coordinate > integrationNormals_;
│ │ │ -
629
│ │ │ -
631 GeometryTable geometries_;
│ │ │ -
632
│ │ │ -
633 std::vector< SubEntityInfo > info_[ dim+1 ];
│ │ │ -
634 };
│ │ │ -
635
│ │ │ -
637 template< class ctype, int dim >
│ │ │ -
638 struct ReferenceElementImplementation< ctype, dim >::SubEntityInfo
│ │ │ -
639 {
│ │ │ -
640 // Compute upper bound for the number of subsentities.
│ │ │ -
641 // If someone knows an explicit formal feel free to
│ │ │ -
642 // implement it here.
│ │ │ -
643 static constexpr std::size_t maxSubEntityCount()
│ │ │ -
644 {
│ │ │ -
645 std::size_t maxCount=0;
│ │ │ -
646 for(std::size_t codim=0; codim<=dim; ++codim)
│ │ │ -
647 maxCount = std::max(maxCount, binomial(std::size_t(dim),codim)*(1 << codim));
│ │ │ -
648 return maxCount;
│ │ │ -
649 }
│ │ │ -
650
│ │ │ -
651 using SubEntityFlags = std::bitset<maxSubEntityCount()>;
│ │ │ -
652
│ │ │ -
653 class SubEntityRange
│ │ │ -
654 : public Dune::IteratorRange<const unsigned int*>
│ │ │ -
655 {
│ │ │ -
656 using Base = typename Dune::IteratorRange<const unsigned int*>;
│ │ │ -
657
│ │ │ -
658 public:
│ │ │ -
659
│ │ │ -
660 using iterator = Base::iterator;
│ │ │ -
661 using const_iterator = Base::const_iterator;
│ │ │ -
662
│ │ │ -
663 SubEntityRange(const iterator& begin, const iterator& end, const SubEntityFlags& contains) :
│ │ │ -
664 Base(begin, end),
│ │ │ -
665 containsPtr_(&contains),
│ │ │ -
666 size_(end-begin)
│ │ │ -
667 {}
│ │ │ -
668
│ │ │ -
669 SubEntityRange() :
│ │ │ -
670 Base(),
│ │ │ -
671 containsPtr_(nullptr),
│ │ │ -
672 size_(0)
│ │ │ -
673 {}
│ │ │ -
674
│ │ │ -
675 std::size_t size() const
│ │ │ -
676 {
│ │ │ -
677 return size_;
│ │ │ -
678 }
│ │ │ -
679
│ │ │ -
680 bool contains(std::size_t i) const
│ │ │ -
681 {
│ │ │ -
682 return (*containsPtr_)[i];
│ │ │ -
683 }
│ │ │ -
684
│ │ │ -
685 private:
│ │ │ -
686 const SubEntityFlags* containsPtr_;
│ │ │ -
687 std::size_t size_;
│ │ │ -
688 std::size_t offset_;
│ │ │ -
689 };
│ │ │ -
690
│ │ │ -
691 using NumberRange = typename Dune::IteratorRange<const unsigned int*>;
│ │ │ -
692
│ │ │ -
693 SubEntityInfo ()
│ │ │ -
694 : numbering_( nullptr )
│ │ │ -
695 {
│ │ │ -
696 std::fill( offset_.begin(), offset_.end(), 0 );
│ │ │ -
697 }
│ │ │ -
698
│ │ │ -
699 SubEntityInfo ( const SubEntityInfo &other )
│ │ │ -
700 : offset_( other.offset_ ),
│ │ │ -
701 type_( other.type_ ),
│ │ │ -
702 containsSubentity_( other.containsSubentity_ )
│ │ │ -
703 {
│ │ │ -
704 numbering_ = allocate();
│ │ │ -
705 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ );
│ │ │ -
706 }
│ │ │ -
707
│ │ │ -
708 ~SubEntityInfo () { deallocate( numbering_ ); }
│ │ │ -
709
│ │ │ -
710 const SubEntityInfo &operator= ( const SubEntityInfo &other )
│ │ │ -
711 {
│ │ │ -
712 type_ = other.type_;
│ │ │ -
713 offset_ = other.offset_;
│ │ │ -
714
│ │ │ -
715 deallocate( numbering_ );
│ │ │ -
716 numbering_ = allocate();
│ │ │ -
717 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ );
│ │ │ -
718
│ │ │ -
719 containsSubentity_ = other.containsSubentity_;
│ │ │ -
720
│ │ │ -
721 return *this;
│ │ │ -
722 }
│ │ │ -
723
│ │ │ -
724 int size ( int cc ) const
│ │ │ -
725 {
│ │ │ -
726 assert( (cc >= 0) && (cc <= dim) );
│ │ │ -
727 return (offset_[ cc+1 ] - offset_[ cc ]);
│ │ │ -
728 }
│ │ │ -
729
│ │ │ -
730 int number ( int ii, int cc ) const
│ │ │ -
731 {
│ │ │ -
732 assert( (ii >= 0) && (ii < size( cc )) );
│ │ │ -
733 return numbering_[ offset_[ cc ] + ii ];
│ │ │ -
734 }
│ │ │ -
735
│ │ │ -
736 auto numbers ( int cc ) const
│ │ │ -
737 {
│ │ │ -
738 return SubEntityRange( numbering_ + offset_[ cc ], numbering_ + offset_[ cc+1 ], containsSubentity_[cc]);
│ │ │ -
739 }
│ │ │ -
740
│ │ │ -
741 const GeometryType &type () const { return type_; }
│ │ │ -
742
│ │ │ -
743 void initialize ( unsigned int topologyId, int codim, unsigned int i )
│ │ │ -
744 {
│ │ │ -
745 const unsigned int subId = Impl::subTopologyId( topologyId, dim, codim, i );
│ │ │ -
746 type_ = GeometryType( subId, dim-codim );
│ │ │ -
747
│ │ │ -
748 // compute offsets
│ │ │ -
749 for( int cc = 0; cc <= codim; ++cc )
│ │ │ -
750 offset_[ cc ] = 0;
│ │ │ -
751 for( int cc = codim; cc <= dim; ++cc )
│ │ │ -
752 offset_[ cc+1 ] = offset_[ cc ] + Impl::size( subId, dim-codim, cc-codim );
│ │ │ -
753
│ │ │ -
754 // compute subnumbering
│ │ │ -
755 deallocate( numbering_ );
│ │ │ -
756 numbering_ = allocate();
│ │ │ -
757 for( int cc = codim; cc <= dim; ++cc )
│ │ │ -
758 Impl::subTopologyNumbering( topologyId, dim, codim, i, cc-codim, numbering_+offset_[ cc ], numbering_+offset_[ cc+1 ] );
│ │ │ -
759
│ │ │ -
760 // initialize containsSubentity lookup-table
│ │ │ -
761 for(std::size_t cc=0; cc<= dim; ++cc)
│ │ │ -
762 {
│ │ │ -
763 containsSubentity_[cc].reset();
│ │ │ -
764 for(std::size_t idx=0; idx<std::size_t(size(cc)); ++idx)
│ │ │ -
765 containsSubentity_[cc][number(idx,cc)] = true;
│ │ │ -
766 }
│ │ │ -
767 }
│ │ │ -
768
│ │ │ -
769 protected:
│ │ │ -
770 int codim () const { return dim - type().dim(); }
│ │ │ -
771
│ │ │ -
772 unsigned int *allocate () { return (capacity() != 0 ? new unsigned int[ capacity() ] : nullptr); }
│ │ │ -
773 void deallocate ( unsigned int *ptr ) { delete[] ptr; }
│ │ │ -
774 unsigned int capacity () const { return offset_[ dim+1 ]; }
│ │ │ -
775
│ │ │ -
776 private:
│ │ │ -
777 unsigned int *numbering_;
│ │ │ -
778 std::array< unsigned int, dim+2 > offset_;
│ │ │ -
779 GeometryType type_;
│ │ │ -
780 std::array< SubEntityFlags, dim+1> containsSubentity_;
│ │ │ -
781 };
│ │ │ -
782
│ │ │ -
783
│ │ │ -
784 template< class ctype, int dim >
│ │ │ -
785 template< int codim >
│ │ │ -
786 struct ReferenceElementImplementation< ctype, dim >::CreateGeometries
│ │ │ -
787 {
│ │ │ -
788 template< int cc >
│ │ │ -
789 static typename ReferenceElements< ctype, dim-cc >::ReferenceElement
│ │ │ -
790 subRefElement( const ReferenceElementImplementation< ctype, dim > &refElement, int i, std::integral_constant< int, cc > )
│ │ │ -
791 {
│ │ │ -
792 return ReferenceElements< ctype, dim-cc >::general( refElement.type( i, cc ) );
│ │ │ -
793 }
│ │ │ -
794
│ │ │ - │ │ │ -
796 subRefElement(const ReferenceElementImplementation< ctype, dim > &refElement,
│ │ │ -
797 [[maybe_unused]] int i, std::integral_constant<int, 0>)
│ │ │ -
798 {
│ │ │ -
799 return refElement;
│ │ │ -
800 }
│ │ │ -
801
│ │ │ -
802 static void apply ( const ReferenceElementImplementation< ctype, dim > &refElement, GeometryTable &geometries )
│ │ │ -
803 {
│ │ │ -
804 const int size = refElement.size( codim );
│ │ │ -
805 std::vector< FieldVector< ctype, dim > > origins( size );
│ │ │ -
806 std::vector< FieldMatrix< ctype, dim - codim, dim > > jacobianTransposeds( size );
│ │ │ -
807 Impl::referenceEmbeddings( refElement.type().id(), dim, codim, &(origins[ 0 ]), &(jacobianTransposeds[ 0 ]) );
│ │ │ -
808
│ │ │ -
809 std::get< codim >( geometries ).reserve( size );
│ │ │ -
810 for( int i = 0; i < size; ++i )
│ │ │ -
811 {
│ │ │ -
812 typename Codim< codim >::Geometry geometry( subRefElement( refElement, i, std::integral_constant< int, codim >() ), origins[ i ], jacobianTransposeds[ i ] );
│ │ │ -
813 std::get< codim >( geometries ).push_back( geometry );
│ │ │ -
814 }
│ │ │ -
815 }
│ │ │ -
816 };
│ │ │ -
817
│ │ │ -
818#endif // DOXYGEN
│ │ │ -
819
│ │ │ -
820 } // namespace Geo
│ │ │ -
821
│ │ │ -
822} // namespace Dune
│ │ │ -
823
│ │ │ -
824#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ - │ │ │ -
An implementation of the Geometry interface for affine geometries.
│ │ │ +
221 // return true for meaning A is non-singular
│ │ │ +
222 return true;
│ │ │ +
223 }
│ │ │ +
224
│ │ │ +
226 // [[ expects: L is lower triangular ]]
│ │ │ +
227 template< int n >
│ │ │ +
228 static ctype detL ( const FieldMatrix< ctype, n, n > &L )
│ │ │ +
229 {
│ │ │ +
230 ctype det( 1 );
│ │ │ +
231 for( int i = 0; i < n; ++i )
│ │ │ +
232 det *= L[ i ][ i ];
│ │ │ +
233 return det;
│ │ │ +
234 }
│ │ │ +
235
│ │ │ +
237 // [[ expects: L is lower triangular ]]
│ │ │ +
238 template< int n >
│ │ │ +
239 static ctype invL ( FieldMatrix< ctype, n, n > &L )
│ │ │ +
240 {
│ │ │ +
241 ctype det( 1 );
│ │ │ +
242 for( int i = 0; i < n; ++i )
│ │ │ +
243 {
│ │ │ +
244 ctype &lii = L[ i ][ i ];
│ │ │ +
245 det *= lii;
│ │ │ +
246 lii = ctype( 1 ) / lii;
│ │ │ +
247 for( int j = 0; j < i; ++j )
│ │ │ +
248 {
│ │ │ +
249 ctype &lij = L[ i ][ j ];
│ │ │ +
250 ctype x = lij * L[ j ][ j ];
│ │ │ +
251 for( int k = j+1; k < i; ++k )
│ │ │ +
252 x += L[ i ][ k ] * L[ k ][ j ];
│ │ │ +
253 lij = (-lii) * x;
│ │ │ +
254 }
│ │ │ +
255 }
│ │ │ +
256 return det;
│ │ │ +
257 }
│ │ │ +
258
│ │ │ +
260 // [[ expects: L is lower triangular ]]
│ │ │ +
261 template< int n >
│ │ │ +
262 static void invLx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > &x )
│ │ │ +
263 {
│ │ │ +
264 for( int i = 0; i < n; ++i )
│ │ │ +
265 {
│ │ │ +
266 for( int j = 0; j < i; ++j )
│ │ │ +
267 x[ i ] -= L[ i ][ j ] * x[ j ];
│ │ │ +
268 x[ i ] /= L[ i ][ i ];
│ │ │ +
269 }
│ │ │ +
270 }
│ │ │ +
271
│ │ │ +
273 // [[ expects: L is lower triangular ]]
│ │ │ +
274 template< int n >
│ │ │ +
275 static void invLTx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > &x )
│ │ │ +
276 {
│ │ │ +
277 for( int i = n; i > 0; --i )
│ │ │ +
278 {
│ │ │ +
279 for( int j = i; j < n; ++j )
│ │ │ +
280 x[ i-1 ] -= L[ j ][ i-1 ] * x[ j ];
│ │ │ +
281 x[ i-1 ] /= L[ i-1 ][ i-1 ];
│ │ │ +
282 }
│ │ │ +
283 }
│ │ │ +
284
│ │ │ +
286 // [[ expects: A is spd ]]
│ │ │ +
287 template< int n >
│ │ │ +
288 static ctype spdDetA ( const FieldMatrix< ctype, n, n > &A )
│ │ │ +
289 {
│ │ │ +
290 FieldMatrix< ctype, n, n > L;
│ │ │ +
291 cholesky_L( A, L );
│ │ │ +
292 return detL( L );
│ │ │ +
293 }
│ │ │ +
294
│ │ │ +
296 // [[ expects: A is spd ]]
│ │ │ +
297 template< int n >
│ │ │ +
298 static ctype spdInvA ( FieldMatrix< ctype, n, n > &A )
│ │ │ +
299 {
│ │ │ +
300 FieldMatrix< ctype, n, n > L;
│ │ │ +
301 cholesky_L( A, L );
│ │ │ +
302 const ctype det = invL( L );
│ │ │ +
303 LTL( L, A );
│ │ │ +
304 return det;
│ │ │ +
305 }
│ │ │ +
306
│ │ │ +
308 // [[ expects: A is spd ]]
│ │ │ +
309 template< int n >
│ │ │ +
310 static bool spdInvAx ( FieldMatrix< ctype, n, n > &A, FieldVector< ctype, n > &x, const bool checkSingular = false )
│ │ │ +
311 {
│ │ │ +
312 FieldMatrix< ctype, n, n > L;
│ │ │ +
313 const bool invertible = cholesky_L( A, L, checkSingular );
│ │ │ +
314 if( ! invertible ) return invertible ;
│ │ │ +
315 invLx( L, x );
│ │ │ +
316 invLTx( L, x );
│ │ │ +
317 return invertible;
│ │ │ +
318 }
│ │ │ +
319
│ │ │ +
321 template< int m, int n >
│ │ │ +
322 static ctype detATA ( const FieldMatrix< ctype, m, n > &A )
│ │ │ +
323 {
│ │ │ +
324 if constexpr( m >= n )
│ │ │ +
325 {
│ │ │ +
326 FieldMatrix< ctype, n, n > ata;
│ │ │ +
327 ATA_L( A, ata );
│ │ │ +
328 return spdDetA( ata );
│ │ │ +
329 }
│ │ │ +
330 else
│ │ │ +
331 return ctype( 0 );
│ │ │ +
332 }
│ │ │ +
333
│ │ │ +
339 template< int m, int n >
│ │ │ +
340 static ctype sqrtDetAAT ( const FieldMatrix< ctype, m, n > &A )
│ │ │ +
341 {
│ │ │ +
342 using std::abs;
│ │ │ +
343 using std::sqrt;
│ │ │ +
344 // These special cases are here not only for speed reasons:
│ │ │ +
345 // The general implementation aborts if the matrix is almost singular,
│ │ │ +
346 // and the special implementation provide a stable way to handle that case.
│ │ │ +
347 if constexpr( (n == 2) && (m == 2) )
│ │ │ +
348 {
│ │ │ +
349 // Special implementation for 2x2 matrices: faster and more stable
│ │ │ +
350 return abs( A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ] );
│ │ │ +
351 }
│ │ │ +
352 else if constexpr( (n == 3) && (m == 3) )
│ │ │ +
353 {
│ │ │ +
354 // Special implementation for 3x3 matrices
│ │ │ +
355 const ctype v0 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 1 ][ 1 ] * A[ 0 ][ 2 ];
│ │ │ +
356 const ctype v1 = A[ 0 ][ 2 ] * A[ 1 ][ 0 ] - A[ 1 ][ 2 ] * A[ 0 ][ 0 ];
│ │ │ +
357 const ctype v2 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 1 ][ 0 ] * A[ 0 ][ 1 ];
│ │ │ +
358 return abs( v0 * A[ 2 ][ 0 ] + v1 * A[ 2 ][ 1 ] + v2 * A[ 2 ][ 2 ] );
│ │ │ +
359 }
│ │ │ +
360 else if constexpr( (n == 3) && (m == 2) )
│ │ │ +
361 {
│ │ │ +
362 // Special implementation for 2x3 matrices
│ │ │ +
363 const ctype v0 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 0 ][ 1 ] * A[ 1 ][ 0 ];
│ │ │ +
364 const ctype v1 = A[ 0 ][ 0 ] * A[ 1 ][ 2 ] - A[ 1 ][ 0 ] * A[ 0 ][ 2 ];
│ │ │ +
365 const ctype v2 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 0 ][ 2 ] * A[ 1 ][ 1 ];
│ │ │ +
366 return sqrt( v0*v0 + v1*v1 + v2*v2);
│ │ │ +
367 }
│ │ │ +
368 else if constexpr( n >= m )
│ │ │ +
369 {
│ │ │ +
370 // General case
│ │ │ +
371 FieldMatrix< ctype, m, m > aat;
│ │ │ +
372 AAT_L( A, aat );
│ │ │ +
373 return spdDetA( aat );
│ │ │ +
374 }
│ │ │ +
375 else
│ │ │ +
376 return ctype( 0 );
│ │ │ +
377 }
│ │ │ +
378
│ │ │ +
380 // => A^{-1}_L A = I
│ │ │ +
381 template< int m, int n >
│ │ │ +
382 static ctype leftInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, m > &ret )
│ │ │ +
383 {
│ │ │ +
384 using std::abs;
│ │ │ +
385 if constexpr( (n == 2) && (m == 2) )
│ │ │ +
386 {
│ │ │ +
387 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]);
│ │ │ +
388 const ctype detInv = ctype( 1 ) / det;
│ │ │ +
389 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv;
│ │ │ +
390 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv;
│ │ │ +
391 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv;
│ │ │ +
392 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv;
│ │ │ +
393 return abs( det );
│ │ │ +
394 }
│ │ │ +
395 else
│ │ │ +
396 {
│ │ │ +
397 FieldMatrix< ctype, n, n > ata;
│ │ │ +
398 ATA_L( A, ata );
│ │ │ +
399 const ctype det = spdInvA( ata );
│ │ │ +
400 ATBT( ata, A, ret );
│ │ │ +
401 return det;
│ │ │ +
402 }
│ │ │ +
403 }
│ │ │ +
404
│ │ │ +
406 template< int m, int n >
│ │ │ +
407 static bool leftInvAx ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, m > &x, FieldVector< ctype, n > &y )
│ │ │ +
408 {
│ │ │ +
409 static_assert((m >= n), "Matrix has no left inverse.");
│ │ │ +
410 FieldMatrix< ctype, n, n > ata;
│ │ │ +
411 A.mtv(x, y);
│ │ │ +
412 ATA_L( A, ata );
│ │ │ +
413 return spdInvAx( ata, y, true );
│ │ │ +
414 }
│ │ │ +
415
│ │ │ +
417 template< int m, int n >
│ │ │ +
418 static ctype rightInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, m > &ret )
│ │ │ +
419 {
│ │ │ +
420 static_assert((n >= m), "Matrix has no right inverse.");
│ │ │ +
421 using std::abs;
│ │ │ +
422 if constexpr( (n == 2) && (m == 2) )
│ │ │ +
423 {
│ │ │ +
424 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]);
│ │ │ +
425 const ctype detInv = ctype( 1 ) / det;
│ │ │ +
426 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv;
│ │ │ +
427 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv;
│ │ │ +
428 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv;
│ │ │ +
429 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv;
│ │ │ +
430 return abs( det );
│ │ │ +
431 }
│ │ │ +
432 else
│ │ │ +
433 {
│ │ │ +
434 FieldMatrix< ctype, m , m > aat;
│ │ │ +
435 AAT_L( A, aat );
│ │ │ +
436 const ctype det = spdInvA( aat );
│ │ │ +
437 ATBT( A , aat , ret );
│ │ │ +
438 return det;
│ │ │ +
439 }
│ │ │ +
440 }
│ │ │ +
441
│ │ │ +
443 template< int m, int n >
│ │ │ +
444 static bool xTRightInvA ( const FieldMatrix< ctype, m, n > &A, const FieldVector< ctype, n > &x, FieldVector< ctype, m > &y )
│ │ │ +
445 {
│ │ │ +
446 static_assert((n >= m), "Matrix has no right inverse.");
│ │ │ +
447 FieldMatrix< ctype, m, m > aat;
│ │ │ +
448 A.mv(x, y);
│ │ │ +
449 AAT_L( A, aat );
│ │ │ +
450 // check whether aat is singular and return true if non-singular
│ │ │ +
451 return spdInvAx( aat, y, true );
│ │ │ +
452 }
│ │ │ +
453};
│ │ │ +
454
│ │ │ +
455} // namespace Impl
│ │ │ +
456} // namespace Dune
│ │ │ +
457
│ │ │ +
458#endif // DUNE_GEOMETRY_UTILITY_DEFAULTMATRIXHELPER_HH
│ │ │
Definition affinegeometry.hh:22
│ │ │ -
decltype(referenceElement(std::declval< T >()...)) ReferenceElement
Definition referenceelements.hh:291
│ │ │ -
Definition affinegeometry.hh:28
│ │ │ -
@ size
Definition quadraturerules.hh:194
│ │ │ -
Definition affinegeometry.hh:34
│ │ │ -
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │ -
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:146
│ │ │ -
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition referenceelements.hh:156
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,777 +1,461 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -referenceelementimplementation.hh │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ +defaultmatrixhelper.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH │ │ │ │ -6#define DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH │ │ │ │ +5#ifndef DUNE_GEOMETRY_UTILITY_DEFAULTMATRIXHELPER_HH │ │ │ │ +6#define DUNE_GEOMETRY_UTILITY_DEFAULTMATRIXHELPER_HH │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ +8#include │ │ │ │ 9 │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ -13#include │ │ │ │ -14#include │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ -17 │ │ │ │ -18#include │ │ │ │ -19#include │ │ │ │ -20#include │ │ │ │ -21#include │ │ │ │ -22#include │ │ │ │ -23#include │ │ │ │ -24 │ │ │ │ -25#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h> │ │ │ │ -26#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_a_f_f_i_n_e_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ -27#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -28 │ │ │ │ -29namespace _D_u_n_e │ │ │ │ -30{ │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12 │ │ │ │ +13namespace _D_u_n_e { │ │ │ │ +14namespace Impl { │ │ │ │ +15 │ │ │ │ +16// FieldMatrixHelper │ │ │ │ +17// ----------------- │ │ │ │ +18 │ │ │ │ +19template< class ct > │ │ │ │ +20struct FieldMatrixHelper │ │ │ │ +21{ │ │ │ │ +22 using ctype = ct; │ │ │ │ +23 │ │ │ │ +25 template< int m, int n > │ │ │ │ +26 [[ deprecated("Use A.mv(x,y) instead.") ]] │ │ │ │ +27 static void Ax ( const FieldMatrix< ctype, m, n > &A, const FieldVector< │ │ │ │ +ctype, n > &x, FieldVector< ctype, m > &ret ) │ │ │ │ +28 { │ │ │ │ +29 A.mv(x,ret); │ │ │ │ +30 } │ │ │ │ 31 │ │ │ │ -32 namespace _G_e_o │ │ │ │ -33 { │ │ │ │ -34 │ │ │ │ -35#ifndef DOXYGEN │ │ │ │ -36 │ │ │ │ -37 // Internal Forward Declarations │ │ │ │ -38 // ----------------------------- │ │ │ │ +33 template< int m, int n > │ │ │ │ +34 [[ deprecated("Use A.mtv(x,y) instead.") ]] │ │ │ │ +35 static void ATx ( const FieldMatrix< ctype, m, n > &A, const FieldVector< │ │ │ │ +ctype, m > &x, FieldVector< ctype, n > &ret ) │ │ │ │ +36 { │ │ │ │ +37 A.mtv(x,ret); │ │ │ │ +38 } │ │ │ │ 39 │ │ │ │ -40 namespace Impl │ │ │ │ -41 { │ │ │ │ -42 template< class ctype, int dim > │ │ │ │ -43 class ReferenceElementContainer; │ │ │ │ -44 } │ │ │ │ -45 │ │ │ │ -46 template< class ctype, int dim > │ │ │ │ -47 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ -48 │ │ │ │ -49 │ │ │ │ -50 │ │ │ │ -51 namespace Impl │ │ │ │ -52 { │ │ │ │ -53 │ │ │ │ -54 using Dune::Impl::isPrism; │ │ │ │ -55 using Dune::Impl::isPyramid; │ │ │ │ -56 using Dune::Impl::baseTopologyId; │ │ │ │ -57 using Dune::Impl::prismConstruction; │ │ │ │ -58 using Dune::Impl::pyramidConstruction; │ │ │ │ -59 using Dune::Impl::numTopologies; │ │ │ │ -60 │ │ │ │ -62 unsigned int size ( unsigned int topologyId, int dim, int codim ); │ │ │ │ -63 │ │ │ │ -64 │ │ │ │ -65 │ │ │ │ -73 unsigned int subTopologyId ( unsigned int topologyId, int dim, int codim, │ │ │ │ -unsigned int i ); │ │ │ │ -74 │ │ │ │ -75 │ │ │ │ -76 │ │ │ │ -77 // subTopologyNumbering │ │ │ │ -78 // -------------------- │ │ │ │ -79 │ │ │ │ -80 void subTopologyNumbering ( unsigned int topologyId, int dim, int codim, │ │ │ │ -unsigned int i, int subcodim, │ │ │ │ -81 unsigned int *beginOut, unsigned int *endOut ); │ │ │ │ -82 │ │ │ │ -83 │ │ │ │ -84 │ │ │ │ +41 template< int m, int n, int p > │ │ │ │ +42 [[ deprecated("Use FMatrixHelp::multMatrix(A,B,ret)") ]] │ │ │ │ +43 static void AB ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< │ │ │ │ +ctype, n, p > &B, FieldMatrix< ctype, m, p > &ret ) │ │ │ │ +44 { │ │ │ │ +45 FMatrixHelp::multMatrix(A,B,ret); │ │ │ │ +46 } │ │ │ │ +47 │ │ │ │ +49 template< int m, int n, int p > │ │ │ │ +50 static void ATBT ( const FieldMatrix< ctype, m, n > &A, const FieldMatrix< │ │ │ │ +ctype, p, m > &B, FieldMatrix< ctype, n, p > &ret ) │ │ │ │ +51 { │ │ │ │ +52 for( int i = 0; i < n; ++i ) │ │ │ │ +53 { │ │ │ │ +54 for( int j = 0; j < p; ++j ) │ │ │ │ +55 { │ │ │ │ +56 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ +57 for( int k = 0; k < m; ++k ) │ │ │ │ +58 ret[ i ][ j ] += A[ k ][ i ] * B[ j ][ k ]; │ │ │ │ +59 } │ │ │ │ +60 } │ │ │ │ +61 } │ │ │ │ +62 │ │ │ │ +64 template< int m, int n > │ │ │ │ +65 static void ATA_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, │ │ │ │ +n, n > &ret ) │ │ │ │ +66 { │ │ │ │ +67 for( int i = 0; i < n; ++i ) │ │ │ │ +68 { │ │ │ │ +69 for( int j = 0; j <= i; ++j ) │ │ │ │ +70 { │ │ │ │ +71 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ +72 for( int k = 0; k < m; ++k ) │ │ │ │ +73 ret[ i ][ j ] += A[ k ][ i ] * A[ k ][ j ]; │ │ │ │ +74 } │ │ │ │ +75 } │ │ │ │ +76 } │ │ │ │ +77 │ │ │ │ +79 template< int m, int n > │ │ │ │ +80 [[ deprecated("Use FMatrixHelp::multTransposedMatrix(A,ret)") ]] │ │ │ │ +81 static void ATA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, │ │ │ │ +n, n > &ret ) │ │ │ │ +82 { │ │ │ │ +83 return FMatrixHelp::multTransposedMatrix(A,ret); │ │ │ │ +84 } │ │ │ │ 85 │ │ │ │ -86 // checkInside │ │ │ │ -87 // ----------- │ │ │ │ -88 │ │ │ │ -89 template< class ct, int cdim > │ │ │ │ -90 inline bool │ │ │ │ -91 checkInside ( unsigned int topologyId, int dim, const FieldVector< ct, cdim │ │ │ │ -> &x, ct tolerance, ct factor = ct( 1 ) ) │ │ │ │ -92 { │ │ │ │ -93 assert( (dim >= 0) && (dim <= cdim) ); │ │ │ │ -94 assert( topologyId < numTopologies( dim ) ); │ │ │ │ -95 │ │ │ │ -96 if( dim > 0 ) │ │ │ │ -97 { │ │ │ │ -98 const ct baseFactor = (isPrism( topologyId, dim ) ? factor : factor - x │ │ │ │ -[ dim-1 ]); │ │ │ │ -99 if( (x[ dim-1 ] > -tolerance) && (factor - x[ dim-1 ] > -tolerance) ) │ │ │ │ -100 return checkInside< ct, cdim >( baseTopologyId( topologyId, dim ), dim-1, │ │ │ │ -x, tolerance, baseFactor ); │ │ │ │ -101 else │ │ │ │ -102 return false; │ │ │ │ -103 } │ │ │ │ -104 else │ │ │ │ -105 return true; │ │ │ │ -106 } │ │ │ │ -107 │ │ │ │ -108 │ │ │ │ -109 │ │ │ │ -110 // referenceCorners │ │ │ │ -111 // ---------------- │ │ │ │ -112 │ │ │ │ -113 template< class ct, int cdim > │ │ │ │ -114 inline unsigned int │ │ │ │ -115 referenceCorners ( unsigned int topologyId, int dim, FieldVector< ct, cdim │ │ │ │ -> *corners ) │ │ │ │ -116 { │ │ │ │ -117 assert( (dim >= 0) && (dim <= cdim) ); │ │ │ │ -118 assert( topologyId < numTopologies( dim ) ); │ │ │ │ -119 │ │ │ │ -120 if( dim > 0 ) │ │ │ │ -121 { │ │ │ │ -122 const unsigned int nBaseCorners │ │ │ │ -123 = referenceCorners( baseTopologyId( topologyId, dim ), dim-1, corners ); │ │ │ │ -124 assert( nBaseCorners == size( baseTopologyId( topologyId, dim ), dim-1, │ │ │ │ -dim-1 ) ); │ │ │ │ -125 if( isPrism( topologyId, dim ) ) │ │ │ │ -126 { │ │ │ │ -127 std::copy( corners, corners + nBaseCorners, corners + nBaseCorners ); │ │ │ │ -128 for( unsigned int i = 0; i < nBaseCorners; ++i ) │ │ │ │ -129 corners[ i+nBaseCorners ][ dim-1 ] = ct( 1 ); │ │ │ │ -130 return 2*nBaseCorners; │ │ │ │ +87 template< int m, int n > │ │ │ │ +88 static void AAT_L ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, │ │ │ │ +m, m > &ret ) │ │ │ │ +89 { │ │ │ │ +90 for( int i = 0; i < m; ++i ) │ │ │ │ +91 { │ │ │ │ +92 for( int j = 0; j <= i; ++j ) │ │ │ │ +93 { │ │ │ │ +94 ctype &retij = ret[ i ][ j ]; │ │ │ │ +95 retij = A[ i ][ 0 ] * A[ j ][ 0 ]; │ │ │ │ +96 for( int k = 1; k < n; ++k ) │ │ │ │ +97 retij += A[ i ][ k ] * A[ j ][ k ]; │ │ │ │ +98 } │ │ │ │ +99 } │ │ │ │ +100 } │ │ │ │ +101 │ │ │ │ +103 template< int m, int n > │ │ │ │ +104 static void AAT ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, │ │ │ │ +m, m > &ret ) │ │ │ │ +105 { │ │ │ │ +106 for( int i = 0; i < m; ++i ) │ │ │ │ +107 { │ │ │ │ +108 for( int j = 0; j < i; ++j ) │ │ │ │ +109 { │ │ │ │ +110 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ +111 for( int k = 0; k < n; ++k ) │ │ │ │ +112 ret[ i ][ j ] += A[ i ][ k ] * A[ j ][ k ]; │ │ │ │ +113 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ +114 } │ │ │ │ +115 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ +116 for( int k = 0; k < n; ++k ) │ │ │ │ +117 ret[ i ][ i ] += A[ i ][ k ] * A[ i ][ k ]; │ │ │ │ +118 } │ │ │ │ +119 } │ │ │ │ +120 │ │ │ │ +122 // [[ expects: L is lower triangular ]] │ │ │ │ +123 template< int n > │ │ │ │ +124 static void Lx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< │ │ │ │ +ctype, n > &x, FieldVector< ctype, n > &ret ) │ │ │ │ +125 { │ │ │ │ +126 for( int i = 0; i < n; ++i ) │ │ │ │ +127 { │ │ │ │ +128 ret[ i ] = ctype( 0 ); │ │ │ │ +129 for( int j = 0; j <= i; ++j ) │ │ │ │ +130 ret[ i ] += L[ i ][ j ] * x[ j ]; │ │ │ │ 131 } │ │ │ │ -132 else │ │ │ │ -133 { │ │ │ │ -134 corners[ nBaseCorners ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ -135 corners[ nBaseCorners ][ dim-1 ] = ct( 1 ); │ │ │ │ -136 return nBaseCorners+1; │ │ │ │ -137 } │ │ │ │ -138 } │ │ │ │ -139 else │ │ │ │ +132 } │ │ │ │ +133 │ │ │ │ +135 // [[ expects: L is lower triangular ]] │ │ │ │ +136 template< int n > │ │ │ │ +137 static void LTx ( const FieldMatrix< ctype, n, n > &L, const FieldVector< │ │ │ │ +ctype, n > &x, FieldVector< ctype, n > &ret ) │ │ │ │ +138 { │ │ │ │ +139 for( int i = 0; i < n; ++i ) │ │ │ │ 140 { │ │ │ │ -141 *corners = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ -142 return 1; │ │ │ │ -143 } │ │ │ │ +141 ret[ i ] = ctype( 0 ); │ │ │ │ +142 for( int j = i; j < n; ++j ) │ │ │ │ +143 ret[ i ] += L[ j ][ i ] * x[ j ]; │ │ │ │ 144 } │ │ │ │ -145 │ │ │ │ +145 } │ │ │ │ 146 │ │ │ │ -147 │ │ │ │ -148 // referenceVolume │ │ │ │ -149 // --------------- │ │ │ │ -150 │ │ │ │ -151 unsigned long referenceVolumeInverse ( unsigned int topologyId, int dim ); │ │ │ │ -152 │ │ │ │ -153 template< class ct > │ │ │ │ -154 inline ct referenceVolume ( unsigned int topologyId, int dim ) │ │ │ │ +148 // [[ expects: L is lower triangular ]] │ │ │ │ +149 template< int n > │ │ │ │ +150 static void LTL ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, │ │ │ │ +n, n > &ret ) │ │ │ │ +151 { │ │ │ │ +152 for( int i = 0; i < n; ++i ) │ │ │ │ +153 { │ │ │ │ +154 for( int j = 0; j < i; ++j ) │ │ │ │ 155 { │ │ │ │ -156 return ct( 1 ) / ct( referenceVolumeInverse( topologyId, dim ) ); │ │ │ │ -157 } │ │ │ │ -158 │ │ │ │ -159 │ │ │ │ -160 │ │ │ │ -161 // referenceOrigins │ │ │ │ -162 // ---------------- │ │ │ │ -163 │ │ │ │ -164 template< class ct, int cdim > │ │ │ │ -165 inline unsigned int │ │ │ │ -166 referenceOrigins ( unsigned int topologyId, int dim, int codim, │ │ │ │ -FieldVector< ct, cdim > *origins ) │ │ │ │ -167 { │ │ │ │ -168 assert( (dim >= 0) && (dim <= cdim) ); │ │ │ │ -169 assert( topologyId < numTopologies( dim ) ); │ │ │ │ -170 assert( (codim >= 0) && (codim <= dim) ); │ │ │ │ -171 │ │ │ │ -172 if( codim > 0 ) │ │ │ │ +156 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ +157 for( int k = i; k < n; ++k ) │ │ │ │ +158 ret[ i ][ j ] += L[ k ][ i ] * L[ k ][ j ]; │ │ │ │ +159 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ +160 } │ │ │ │ +161 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ +162 for( int k = i; k < n; ++k ) │ │ │ │ +163 ret[ i ][ i ] += L[ k ][ i ] * L[ k ][ i ]; │ │ │ │ +164 } │ │ │ │ +165 } │ │ │ │ +166 │ │ │ │ +168 // [[ expects: L is lower triangular ]] │ │ │ │ +169 template< int n > │ │ │ │ +170 static void LLT ( const FieldMatrix< ctype, n, n > &L, FieldMatrix< ctype, │ │ │ │ +n, n > &ret ) │ │ │ │ +171 { │ │ │ │ +172 for( int i = 0; i < n; ++i ) │ │ │ │ 173 { │ │ │ │ -174 const unsigned int baseId = baseTopologyId( topologyId, dim ); │ │ │ │ -175 if( isPrism( topologyId, dim ) ) │ │ │ │ -176 { │ │ │ │ -177 const unsigned int n = (codim < dim ? referenceOrigins( baseId, dim-1, │ │ │ │ -codim, origins ) : 0); │ │ │ │ -178 const unsigned int m = referenceOrigins( baseId, dim-1, codim-1, origins+n │ │ │ │ -); │ │ │ │ -179 for( unsigned int i = 0; i < m; ++i ) │ │ │ │ -180 { │ │ │ │ -181 origins[ n+m+i ] = origins[ n+i ]; │ │ │ │ -182 origins[ n+m+i ][ dim-1 ] = ct( 1 ); │ │ │ │ -183 } │ │ │ │ -184 return n+2*m; │ │ │ │ +174 for( int j = 0; j < i; ++j ) │ │ │ │ +175 { │ │ │ │ +176 ret[ i ][ j ] = ctype( 0 ); │ │ │ │ +177 for( int k = 0; k <= j; ++k ) │ │ │ │ +178 ret[ i ][ j ] += L[ i ][ k ] * L[ j ][ k ]; │ │ │ │ +179 ret[ j ][ i ] = ret[ i ][ j ]; │ │ │ │ +180 } │ │ │ │ +181 ret[ i ][ i ] = ctype( 0 ); │ │ │ │ +182 for( int k = 0; k <= i; ++k ) │ │ │ │ +183 ret[ i ][ i ] += L[ i ][ k ] * L[ i ][ k ]; │ │ │ │ +184 } │ │ │ │ 185 } │ │ │ │ -186 else │ │ │ │ -187 { │ │ │ │ -188 const unsigned int m = referenceOrigins( baseId, dim-1, codim-1, origins ); │ │ │ │ -189 if( codim == dim ) │ │ │ │ -190 { │ │ │ │ -191 origins[ m ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ -192 origins[ m ][ dim-1 ] = ct( 1 ); │ │ │ │ -193 return m+1; │ │ │ │ -194 } │ │ │ │ -195 else │ │ │ │ -196 return m+referenceOrigins( baseId, dim-1, codim, origins+m ); │ │ │ │ -197 } │ │ │ │ -198 } │ │ │ │ -199 else │ │ │ │ -200 { │ │ │ │ -201 origins[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ -202 return 1; │ │ │ │ -203 } │ │ │ │ -204 } │ │ │ │ -205 │ │ │ │ +186 │ │ │ │ +189 // [[ expects: A is spd ]] │ │ │ │ +190 template< int n > │ │ │ │ +191 static bool cholesky_L ( const FieldMatrix< ctype, n, n > &A, FieldMatrix< │ │ │ │ +ctype, n, n > &ret, const bool checkSingular = false ) │ │ │ │ +192 { │ │ │ │ +193 using std::sqrt; │ │ │ │ +194 for( int i = 0; i < n; ++i ) │ │ │ │ +195 { │ │ │ │ +196 ctype &rii = ret[ i ][ i ]; │ │ │ │ +197 │ │ │ │ +198 ctype xDiag = A[ i ][ i ]; │ │ │ │ +199 for( int j = 0; j < i; ++j ) │ │ │ │ +200 xDiag -= ret[ i ][ j ] * ret[ i ][ j ]; │ │ │ │ +201 │ │ │ │ +202 // in some cases A can be singular, e.g. when checking local for │ │ │ │ +203 // outside points during checkInside │ │ │ │ +204 if( checkSingular && ! ( xDiag > ctype( 0 )) ) │ │ │ │ +205 return false ; │ │ │ │ 206 │ │ │ │ -207 │ │ │ │ -208 // referenceEmbeddings │ │ │ │ -209 // ------------------- │ │ │ │ +207 // otherwise this should be true always │ │ │ │ +208 assert( xDiag > ctype( 0 ) ); │ │ │ │ +209 rii = sqrt( xDiag ); │ │ │ │ 210 │ │ │ │ -211 template< class ct, int cdim, int mydim > │ │ │ │ -212 inline unsigned int │ │ │ │ -213 referenceEmbeddings ( unsigned int topologyId, int dim, int codim, │ │ │ │ -214 FieldVector< ct, cdim > *origins, │ │ │ │ -215 FieldMatrix< ct, mydim, cdim > *jacobianTransposeds ) │ │ │ │ -216 { │ │ │ │ -217 assert( (0 <= codim) && (codim <= dim) && (dim <= cdim) ); │ │ │ │ -218 assert( (dim - codim <= mydim) && (mydim <= cdim) ); │ │ │ │ -219 assert( topologyId < numTopologies( dim ) ); │ │ │ │ +211 ctype invrii = ctype( 1 ) / rii; │ │ │ │ +212 for( int k = i+1; k < n; ++k ) │ │ │ │ +213 { │ │ │ │ +214 ctype x = A[ k ][ i ]; │ │ │ │ +215 for( int j = 0; j < i; ++j ) │ │ │ │ +216 x -= ret[ i ][ j ] * ret[ k ][ j ]; │ │ │ │ +217 ret[ k ][ i ] = invrii * x; │ │ │ │ +218 } │ │ │ │ +219 } │ │ │ │ 220 │ │ │ │ -221 if( (0 < codim) && (codim <= dim) ) │ │ │ │ -222 { │ │ │ │ -223 const unsigned int baseId = baseTopologyId( topologyId, dim ); │ │ │ │ -224 if( isPrism( topologyId, dim ) ) │ │ │ │ -225 { │ │ │ │ -226 const unsigned int n = (codim < dim ? referenceEmbeddings( baseId, dim-1, │ │ │ │ -codim, origins, jacobianTransposeds ) : 0); │ │ │ │ -227 for( unsigned int i = 0; i < n; ++i ) │ │ │ │ -228 jacobianTransposeds[ i ][ dim-codim-1 ][ dim-1 ] = ct( 1 ); │ │ │ │ -229 │ │ │ │ -230 const unsigned int m = referenceEmbeddings( baseId, dim-1, codim-1, │ │ │ │ -origins+n, jacobianTransposeds+n ); │ │ │ │ -231 std::copy( origins+n, origins+n+m, origins+n+m ); │ │ │ │ -232 std::copy( jacobianTransposeds+n, jacobianTransposeds+n+m, │ │ │ │ -jacobianTransposeds+n+m ); │ │ │ │ -233 for( unsigned int i = 0; i < m; ++i ) │ │ │ │ -234 origins[ n+m+i ][ dim-1 ] = ct( 1 ); │ │ │ │ +221 // return true for meaning A is non-singular │ │ │ │ +222 return true; │ │ │ │ +223 } │ │ │ │ +224 │ │ │ │ +226 // [[ expects: L is lower triangular ]] │ │ │ │ +227 template< int n > │ │ │ │ +228 static ctype detL ( const FieldMatrix< ctype, n, n > &L ) │ │ │ │ +229 { │ │ │ │ +230 ctype det( 1 ); │ │ │ │ +231 for( int i = 0; i < n; ++i ) │ │ │ │ +232 det *= L[ i ][ i ]; │ │ │ │ +233 return det; │ │ │ │ +234 } │ │ │ │ 235 │ │ │ │ -236 return n+2*m; │ │ │ │ -237 } │ │ │ │ -238 else // !isPrism │ │ │ │ -239 { │ │ │ │ -240 const unsigned int m = referenceEmbeddings( baseId, dim-1, codim-1, │ │ │ │ -origins, jacobianTransposeds ); │ │ │ │ -241 if( codim == dim ) │ │ │ │ -242 { │ │ │ │ -243 origins[ m ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ -244 origins[ m ][ dim-1 ] = ct( 1 ); │ │ │ │ -245 jacobianTransposeds[ m ] = FieldMatrix< ct, mydim, cdim >( ct( 0 ) ); │ │ │ │ -246 return m+1; │ │ │ │ -247 } │ │ │ │ -248 else if( codim < dim ) │ │ │ │ -249 { │ │ │ │ -250 const unsigned int n = referenceEmbeddings( baseId, dim-1, codim, │ │ │ │ -origins+m, jacobianTransposeds+m ); │ │ │ │ -251 for( unsigned int i = 0; i < n; ++i ) │ │ │ │ -252 { │ │ │ │ -253 for( int k = 0; k < dim-1; ++k ) │ │ │ │ -254 jacobianTransposeds[ m+i ][ dim-codim-1 ][ k ] = -origins[ m+i ][ k ]; │ │ │ │ -255 jacobianTransposeds[ m+i ][ dim-codim-1 ][ dim-1 ] = ct( 1 ); │ │ │ │ -256 } │ │ │ │ -257 return m+n; │ │ │ │ -258 } │ │ │ │ -259 } │ │ │ │ -260 } │ │ │ │ -261 else if( codim == 0 ) │ │ │ │ -262 { │ │ │ │ -263 origins[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ -264 jacobianTransposeds[ 0 ] = FieldMatrix< ct, mydim, cdim >( ct( 0 ) ); │ │ │ │ -265 for( int k = 0; k < dim; ++k ) │ │ │ │ -266 jacobianTransposeds[ 0 ][ k ][ k ] = ct( 1 ); │ │ │ │ -267 return 1; │ │ │ │ -268 } │ │ │ │ -269 │ │ │ │ -270 // this point should not be reached since all cases are handled before. │ │ │ │ -271 std::abort(); │ │ │ │ -272 return 0; │ │ │ │ -273 } │ │ │ │ -274 │ │ │ │ -275 │ │ │ │ -276 │ │ │ │ -277 // referenceIntegrationOuterNormals │ │ │ │ -278 // -------------------------------- │ │ │ │ -279 │ │ │ │ -280 template< class ct, int cdim > │ │ │ │ -281 inline unsigned int │ │ │ │ -282 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim, │ │ │ │ -283 const FieldVector< ct, cdim > *origins, │ │ │ │ -284 FieldVector< ct, cdim > *normals ) │ │ │ │ -285 { │ │ │ │ -286 assert( (dim > 0) && (dim <= cdim) ); │ │ │ │ -287 assert( topologyId < numTopologies( dim ) ); │ │ │ │ -288 │ │ │ │ -289 if( dim > 1 ) │ │ │ │ -290 { │ │ │ │ -291 const unsigned int baseId = baseTopologyId( topologyId, dim ); │ │ │ │ -292 if( isPrism( topologyId, dim ) ) │ │ │ │ -293 { │ │ │ │ -294 const unsigned int numBaseFaces │ │ │ │ -295 = referenceIntegrationOuterNormals( baseId, dim-1, origins, normals ); │ │ │ │ -296 │ │ │ │ -297 for( unsigned int i = 0; i < 2; ++i ) │ │ │ │ -298 { │ │ │ │ -299 normals[ numBaseFaces+i ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ -300 normals[ numBaseFaces+i ][ dim-1 ] = ct( 2*int( i )-1 ); │ │ │ │ -301 } │ │ │ │ -302 │ │ │ │ -303 return numBaseFaces+2; │ │ │ │ -304 } │ │ │ │ -305 else │ │ │ │ -306 { │ │ │ │ -307 normals[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ -308 normals[ 0 ][ dim-1 ] = ct( -1 ); │ │ │ │ -309 │ │ │ │ -310 const unsigned int numBaseFaces │ │ │ │ -311 = referenceIntegrationOuterNormals( baseId, dim-1, origins+1, normals+1 ); │ │ │ │ -312 for( unsigned int i = 1; i <= numBaseFaces; ++i ) │ │ │ │ -313 normals[ i ][ dim-1 ] = normals[ i ]*origins[ i ]; │ │ │ │ -314 │ │ │ │ -315 return numBaseFaces+1; │ │ │ │ -316 } │ │ │ │ -317 } │ │ │ │ -318 else │ │ │ │ -319 { │ │ │ │ -320 for( unsigned int i = 0; i < 2; ++i ) │ │ │ │ -321 { │ │ │ │ -322 normals[ i ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ -323 normals[ i ][ 0 ] = ct( 2*int( i )-1 ); │ │ │ │ -324 } │ │ │ │ -325 │ │ │ │ -326 return 2; │ │ │ │ -327 } │ │ │ │ -328 } │ │ │ │ -329 │ │ │ │ -330 template< class ct, int cdim > │ │ │ │ -331 inline unsigned int │ │ │ │ -332 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim, │ │ │ │ -333 FieldVector< ct, cdim > *normals ) │ │ │ │ -334 { │ │ │ │ -335 assert( (dim > 0) && (dim <= cdim) ); │ │ │ │ -336 │ │ │ │ -337 FieldVector< ct, cdim > *origins │ │ │ │ -338 = new FieldVector< ct, cdim >[ size( topologyId, dim, 1 ) ]; │ │ │ │ -339 referenceOrigins( topologyId, dim, 1, origins ); │ │ │ │ -340 │ │ │ │ -341 const unsigned int numFaces │ │ │ │ -342 = referenceIntegrationOuterNormals( topologyId, dim, origins, normals ); │ │ │ │ -343 assert( numFaces == size( topologyId, dim, 1 ) ); │ │ │ │ -344 │ │ │ │ -345 delete[] origins; │ │ │ │ -346 │ │ │ │ -347 return numFaces; │ │ │ │ -348 } │ │ │ │ -349 │ │ │ │ -350 } // namespace Impl │ │ │ │ -351 │ │ │ │ -352 │ │ │ │ -353 │ │ │ │ -354 // ReferenceElement │ │ │ │ -355 // ---------------- │ │ │ │ -356 │ │ │ │ -375 template< class ctype_, int dim > │ │ │ │ -376 class _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ -377 { │ │ │ │ +237 // [[ expects: L is lower triangular ]] │ │ │ │ +238 template< int n > │ │ │ │ +239 static ctype invL ( FieldMatrix< ctype, n, n > &L ) │ │ │ │ +240 { │ │ │ │ +241 ctype det( 1 ); │ │ │ │ +242 for( int i = 0; i < n; ++i ) │ │ │ │ +243 { │ │ │ │ +244 ctype &lii = L[ i ][ i ]; │ │ │ │ +245 det *= lii; │ │ │ │ +246 lii = ctype( 1 ) / lii; │ │ │ │ +247 for( int j = 0; j < i; ++j ) │ │ │ │ +248 { │ │ │ │ +249 ctype &lij = L[ i ][ j ]; │ │ │ │ +250 ctype x = lij * L[ j ][ j ]; │ │ │ │ +251 for( int k = j+1; k < i; ++k ) │ │ │ │ +252 x += L[ i ][ k ] * L[ k ][ j ]; │ │ │ │ +253 lij = (-lii) * x; │ │ │ │ +254 } │ │ │ │ +255 } │ │ │ │ +256 return det; │ │ │ │ +257 } │ │ │ │ +258 │ │ │ │ +260 // [[ expects: L is lower triangular ]] │ │ │ │ +261 template< int n > │ │ │ │ +262 static void invLx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > │ │ │ │ +&x ) │ │ │ │ +263 { │ │ │ │ +264 for( int i = 0; i < n; ++i ) │ │ │ │ +265 { │ │ │ │ +266 for( int j = 0; j < i; ++j ) │ │ │ │ +267 x[ i ] -= L[ i ][ j ] * x[ j ]; │ │ │ │ +268 x[ i ] /= L[ i ][ i ]; │ │ │ │ +269 } │ │ │ │ +270 } │ │ │ │ +271 │ │ │ │ +273 // [[ expects: L is lower triangular ]] │ │ │ │ +274 template< int n > │ │ │ │ +275 static void invLTx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > │ │ │ │ +&x ) │ │ │ │ +276 { │ │ │ │ +277 for( int i = n; i > 0; --i ) │ │ │ │ +278 { │ │ │ │ +279 for( int j = i; j < n; ++j ) │ │ │ │ +280 x[ i-1 ] -= L[ j ][ i-1 ] * x[ j ]; │ │ │ │ +281 x[ i-1 ] /= L[ i-1 ][ i-1 ]; │ │ │ │ +282 } │ │ │ │ +283 } │ │ │ │ +284 │ │ │ │ +286 // [[ expects: A is spd ]] │ │ │ │ +287 template< int n > │ │ │ │ +288 static ctype spdDetA ( const FieldMatrix< ctype, n, n > &A ) │ │ │ │ +289 { │ │ │ │ +290 FieldMatrix< ctype, n, n > L; │ │ │ │ +291 cholesky_L( A, L ); │ │ │ │ +292 return detL( L ); │ │ │ │ +293 } │ │ │ │ +294 │ │ │ │ +296 // [[ expects: A is spd ]] │ │ │ │ +297 template< int n > │ │ │ │ +298 static ctype spdInvA ( FieldMatrix< ctype, n, n > &A ) │ │ │ │ +299 { │ │ │ │ +300 FieldMatrix< ctype, n, n > L; │ │ │ │ +301 cholesky_L( A, L ); │ │ │ │ +302 const ctype det = invL( L ); │ │ │ │ +303 LTL( L, A ); │ │ │ │ +304 return det; │ │ │ │ +305 } │ │ │ │ +306 │ │ │ │ +308 // [[ expects: A is spd ]] │ │ │ │ +309 template< int n > │ │ │ │ +310 static bool spdInvAx ( FieldMatrix< ctype, n, n > &A, FieldVector< ctype, n │ │ │ │ +> &x, const bool checkSingular = false ) │ │ │ │ +311 { │ │ │ │ +312 FieldMatrix< ctype, n, n > L; │ │ │ │ +313 const bool invertible = cholesky_L( A, L, checkSingular ); │ │ │ │ +314 if( ! invertible ) return invertible ; │ │ │ │ +315 invLx( L, x ); │ │ │ │ +316 invLTx( L, x ); │ │ │ │ +317 return invertible; │ │ │ │ +318 } │ │ │ │ +319 │ │ │ │ +321 template< int m, int n > │ │ │ │ +322 static ctype detATA ( const FieldMatrix< ctype, m, n > &A ) │ │ │ │ +323 { │ │ │ │ +324 if constexpr( m >= n ) │ │ │ │ +325 { │ │ │ │ +326 FieldMatrix< ctype, n, n > ata; │ │ │ │ +327 ATA_L( A, ata ); │ │ │ │ +328 return spdDetA( ata ); │ │ │ │ +329 } │ │ │ │ +330 else │ │ │ │ +331 return ctype( 0 ); │ │ │ │ +332 } │ │ │ │ +333 │ │ │ │ +339 template< int m, int n > │ │ │ │ +340 static ctype sqrtDetAAT ( const FieldMatrix< ctype, m, n > &A ) │ │ │ │ +341 { │ │ │ │ +342 using std::abs; │ │ │ │ +343 using std::sqrt; │ │ │ │ +344 // These special cases are here not only for speed reasons: │ │ │ │ +345 // The general implementation aborts if the matrix is almost singular, │ │ │ │ +346 // and the special implementation provide a stable way to handle that case. │ │ │ │ +347 if constexpr( (n == 2) && (m == 2) ) │ │ │ │ +348 { │ │ │ │ +349 // Special implementation for 2x2 matrices: faster and more stable │ │ │ │ +350 return abs( A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ] ); │ │ │ │ +351 } │ │ │ │ +352 else if constexpr( (n == 3) && (m == 3) ) │ │ │ │ +353 { │ │ │ │ +354 // Special implementation for 3x3 matrices │ │ │ │ +355 const ctype v0 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 1 ][ 1 ] * A[ 0 ][ 2 ]; │ │ │ │ +356 const ctype v1 = A[ 0 ][ 2 ] * A[ 1 ][ 0 ] - A[ 1 ][ 2 ] * A[ 0 ][ 0 ]; │ │ │ │ +357 const ctype v2 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 1 ][ 0 ] * A[ 0 ][ 1 ]; │ │ │ │ +358 return abs( v0 * A[ 2 ][ 0 ] + v1 * A[ 2 ][ 1 ] + v2 * A[ 2 ][ 2 ] ); │ │ │ │ +359 } │ │ │ │ +360 else if constexpr( (n == 3) && (m == 2) ) │ │ │ │ +361 { │ │ │ │ +362 // Special implementation for 2x3 matrices │ │ │ │ +363 const ctype v0 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 0 ][ 1 ] * A[ 1 ][ 0 ]; │ │ │ │ +364 const ctype v1 = A[ 0 ][ 0 ] * A[ 1 ][ 2 ] - A[ 1 ][ 0 ] * A[ 0 ][ 2 ]; │ │ │ │ +365 const ctype v2 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 0 ][ 2 ] * A[ 1 ][ 1 ]; │ │ │ │ +366 return sqrt( v0*v0 + v1*v1 + v2*v2); │ │ │ │ +367 } │ │ │ │ +368 else if constexpr( n >= m ) │ │ │ │ +369 { │ │ │ │ +370 // General case │ │ │ │ +371 FieldMatrix< ctype, m, m > aat; │ │ │ │ +372 AAT_L( A, aat ); │ │ │ │ +373 return spdDetA( aat ); │ │ │ │ +374 } │ │ │ │ +375 else │ │ │ │ +376 return ctype( 0 ); │ │ │ │ +377 } │ │ │ │ 378 │ │ │ │ -379 public: │ │ │ │ -380 │ │ │ │ -382 using ctype = ctype_; │ │ │ │ -383 │ │ │ │ -385 using CoordinateField = ctype; │ │ │ │ -386 │ │ │ │ -388 using Coordinate = Dune::FieldVector; │ │ │ │ -389 │ │ │ │ -391 static constexpr int dimension = dim; │ │ │ │ -392 │ │ │ │ -394 typedef ctype Volume; │ │ │ │ -395 │ │ │ │ -396 private: │ │ │ │ -397 │ │ │ │ -398 friend class Impl::ReferenceElementContainer< ctype, dim >; │ │ │ │ -399 │ │ │ │ -400 struct SubEntityInfo; │ │ │ │ -401 │ │ │ │ -402 template< int codim > struct CreateGeometries; │ │ │ │ -403 │ │ │ │ -404 public: │ │ │ │ -406 template< int codim > │ │ │ │ -407 struct Codim │ │ │ │ +380 // => A^{-1}_L A = I │ │ │ │ +381 template< int m, int n > │ │ │ │ +382 static ctype leftInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< │ │ │ │ +ctype, n, m > &ret ) │ │ │ │ +383 { │ │ │ │ +384 using std::abs; │ │ │ │ +385 if constexpr( (n == 2) && (m == 2) ) │ │ │ │ +386 { │ │ │ │ +387 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]); │ │ │ │ +388 const ctype detInv = ctype( 1 ) / det; │ │ │ │ +389 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv; │ │ │ │ +390 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv; │ │ │ │ +391 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv; │ │ │ │ +392 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv; │ │ │ │ +393 return abs( det ); │ │ │ │ +394 } │ │ │ │ +395 else │ │ │ │ +396 { │ │ │ │ +397 FieldMatrix< ctype, n, n > ata; │ │ │ │ +398 ATA_L( A, ata ); │ │ │ │ +399 const ctype det = spdInvA( ata ); │ │ │ │ +400 ATBT( ata, A, ret ); │ │ │ │ +401 return det; │ │ │ │ +402 } │ │ │ │ +403 } │ │ │ │ +404 │ │ │ │ +406 template< int m, int n > │ │ │ │ +407 static bool leftInvAx ( const FieldMatrix< ctype, m, n > &A, const │ │ │ │ +FieldVector< ctype, m > &x, FieldVector< ctype, n > &y ) │ │ │ │ 408 { │ │ │ │ -410 typedef AffineGeometry< ctype, dim-codim, dim > Geometry; │ │ │ │ -411 }; │ │ │ │ -412 │ │ │ │ -413 // ReferenceElement cannot be copied. │ │ │ │ -414 ReferenceElementImplementation ( const ReferenceElementImplementation& ) = │ │ │ │ -delete; │ │ │ │ +409 static_assert((m >= n), "Matrix has no left inverse."); │ │ │ │ +410 FieldMatrix< ctype, n, n > ata; │ │ │ │ +411 A.mtv(x, y); │ │ │ │ +412 ATA_L( A, ata ); │ │ │ │ +413 return spdInvAx( ata, y, true ); │ │ │ │ +414 } │ │ │ │ 415 │ │ │ │ -416 // ReferenceElementImplementation cannot be copied. │ │ │ │ -417 ReferenceElementImplementation& operator= ( const │ │ │ │ -ReferenceElementImplementation& ) = delete; │ │ │ │ -418 │ │ │ │ -419 // ReferenceElementImplementation is default-constructible (required for │ │ │ │ -storage in std::array) │ │ │ │ -420 ReferenceElementImplementation () = default; │ │ │ │ -421 │ │ │ │ -426 int _s_i_z_e ( int c ) const │ │ │ │ -427 { │ │ │ │ -428 assert( (c >= 0) && (c <= dim) ); │ │ │ │ -429 return info_[ c ].size(); │ │ │ │ -430 } │ │ │ │ -431 │ │ │ │ -443 int _s_i_z_e ( int i, int c, int cc ) const │ │ │ │ -444 { │ │ │ │ -445 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ -446 return info_[ c ][ i ].size( cc ); │ │ │ │ -447 } │ │ │ │ -448 │ │ │ │ -462 int subEntity ( int i, int c, int ii, int cc ) const │ │ │ │ -463 { │ │ │ │ -464 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ -465 return info_[ c ][ i ].number( ii, cc ); │ │ │ │ -466 } │ │ │ │ -467 │ │ │ │ -483 auto subEntities ( int i, int c, int cc ) const │ │ │ │ -484 { │ │ │ │ -485 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ -486 return info_[ c ][ i ].numbers( cc ); │ │ │ │ -487 } │ │ │ │ -488 │ │ │ │ -497 const GeometryType &type ( int i, int c ) const │ │ │ │ -498 { │ │ │ │ -499 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ -500 return info_[ c ][ i ].type(); │ │ │ │ -501 } │ │ │ │ -502 │ │ │ │ -504 const GeometryType &type () const { return type( 0, 0 ); } │ │ │ │ -505 │ │ │ │ -515 const Coordinate &position( int i, int c ) const │ │ │ │ -516 { │ │ │ │ -517 assert( (c >= 0) && (c <= dim) ); │ │ │ │ -518 return baryCenters_[ c ][ i ]; │ │ │ │ -519 } │ │ │ │ -520 │ │ │ │ -528 bool checkInside ( const Coordinate &local ) const │ │ │ │ -529 { │ │ │ │ -530 const ctype tolerance = ctype( 64 ) * std::numeric_limits< ctype >::epsilon │ │ │ │ -(); │ │ │ │ -531 return Impl::template checkInside< ctype, dim >( type().id(), dim, local, │ │ │ │ -tolerance ); │ │ │ │ -532 } │ │ │ │ -533 │ │ │ │ -545 template< int codim > │ │ │ │ -546 typename Codim< codim >::Geometry geometry ( int i ) const │ │ │ │ -547 { │ │ │ │ -548 return std::get< codim >( geometries_ )[ i ]; │ │ │ │ -549 } │ │ │ │ -550 │ │ │ │ -552 Volume volume () const │ │ │ │ -553 { │ │ │ │ -554 return volume_; │ │ │ │ -555 } │ │ │ │ -556 │ │ │ │ -564 const Coordinate &integrationOuterNormal ( int face ) const │ │ │ │ -565 { │ │ │ │ -566 assert( (face >= 0) && (face < int( integrationNormals_.size() )) ); │ │ │ │ -567 return integrationNormals_[ face ]; │ │ │ │ -568 } │ │ │ │ -569 │ │ │ │ -570 private: │ │ │ │ -571 void initialize ( unsigned int topologyId ) │ │ │ │ -572 { │ │ │ │ -573 assert( topologyId < Impl::numTopologies( dim ) ); │ │ │ │ -574 │ │ │ │ -575 // set up subentities │ │ │ │ -576 for( int codim = 0; codim <= dim; ++codim ) │ │ │ │ -577 { │ │ │ │ -578 const unsigned int _s_i_z_e = Impl::size( topologyId, dim, codim ); │ │ │ │ -579 info_[ codim ].resize( size ); │ │ │ │ -580 for( unsigned int i = 0; i < _s_i_z_e; ++i ) │ │ │ │ -581 info_[ codim ][ i ].initialize( topologyId, codim, i ); │ │ │ │ -582 } │ │ │ │ -583 │ │ │ │ -584 // compute corners │ │ │ │ -585 const unsigned int numVertices = _s_i_z_e( dim ); │ │ │ │ -586 baryCenters_[ dim ].resize( numVertices ); │ │ │ │ -587 Impl::referenceCorners( topologyId, dim, &(baryCenters_[ dim ][ 0 ]) ); │ │ │ │ -588 │ │ │ │ -589 // compute barycenters │ │ │ │ -590 for( int codim = 0; codim < dim; ++codim ) │ │ │ │ -591 { │ │ │ │ -592 baryCenters_[ codim ].resize( _s_i_z_e(codim) ); │ │ │ │ -593 for( int i = 0; i < _s_i_z_e( codim ); ++i ) │ │ │ │ -594 { │ │ │ │ -595 baryCenters_[ codim ][ i ] = Coordinate( ctype( 0 ) ); │ │ │ │ -596 const unsigned int numCorners = _s_i_z_e( i, codim, dim ); │ │ │ │ -597 for( unsigned int j = 0; j < numCorners; ++j ) │ │ │ │ -598 baryCenters_[ codim ][ i ] += baryCenters_[ dim ][ subEntity( i, codim, j, │ │ │ │ -dim ) ]; │ │ │ │ -599 baryCenters_[ codim ][ i ] *= ctype( 1 ) / ctype( numCorners ); │ │ │ │ -600 } │ │ │ │ -601 } │ │ │ │ -602 │ │ │ │ -603 // compute reference element volume │ │ │ │ -604 volume_ = Impl::template referenceVolume< ctype >( topologyId, dim ); │ │ │ │ -605 │ │ │ │ -606 // compute integration outer normals │ │ │ │ -607 if( dim > 0 ) │ │ │ │ -608 { │ │ │ │ -609 integrationNormals_.resize( _s_i_z_e( 1 ) ); │ │ │ │ -610 Impl::referenceIntegrationOuterNormals( topologyId, dim, & │ │ │ │ -(integrationNormals_[ 0 ]) ); │ │ │ │ -611 } │ │ │ │ -612 │ │ │ │ -613 // set up geometries │ │ │ │ -614 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ -{ CreateGeometries< i >::apply( *this, geometries_ ); } ); │ │ │ │ -615 } │ │ │ │ -616 │ │ │ │ -617 template< int... codim > │ │ │ │ -618 static std::tuple< std::vector< typename Codim< codim >::Geometry >... > │ │ │ │ -619 makeGeometryTable ( std::integer_sequence< int, codim... > ); │ │ │ │ -620 │ │ │ │ -622 typedef decltype( makeGeometryTable( std::make_integer_sequence< int, dim+1 │ │ │ │ ->() ) ) GeometryTable; │ │ │ │ -623 │ │ │ │ -625 ctype volume_; │ │ │ │ -626 │ │ │ │ -627 std::vector< Coordinate > baryCenters_[ dim+1 ]; │ │ │ │ -628 std::vector< Coordinate > integrationNormals_; │ │ │ │ -629 │ │ │ │ -631 GeometryTable geometries_; │ │ │ │ -632 │ │ │ │ -633 std::vector< SubEntityInfo > info_[ dim+1 ]; │ │ │ │ -634 }; │ │ │ │ -635 │ │ │ │ -637 template< class ctype, int dim > │ │ │ │ -638 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n< ctype, dim >::SubEntityInfo │ │ │ │ -639 { │ │ │ │ -640 // Compute upper bound for the number of subsentities. │ │ │ │ -641 // If someone knows an explicit formal feel free to │ │ │ │ -642 // implement it here. │ │ │ │ -643 static constexpr std::size_t maxSubEntityCount() │ │ │ │ -644 { │ │ │ │ -645 std::size_t maxCount=0; │ │ │ │ -646 for(std::size_t codim=0; codim<=dim; ++codim) │ │ │ │ -647 maxCount = std::max(maxCount, binomial(std::size_t(dim),codim)*(1 << │ │ │ │ -codim)); │ │ │ │ -648 return maxCount; │ │ │ │ -649 } │ │ │ │ -650 │ │ │ │ -651 using SubEntityFlags = std::bitset; │ │ │ │ -652 │ │ │ │ -653 class SubEntityRange │ │ │ │ -654 : public Dune::IteratorRange │ │ │ │ -655 { │ │ │ │ -656 using Base = typename Dune::IteratorRange; │ │ │ │ -657 │ │ │ │ -658 public: │ │ │ │ -659 │ │ │ │ -660 using iterator = Base::iterator; │ │ │ │ -661 using const_iterator = Base::const_iterator; │ │ │ │ -662 │ │ │ │ -663 SubEntityRange(const iterator& begin, const iterator& end, const │ │ │ │ -SubEntityFlags& contains) : │ │ │ │ -664 Base(begin, end), │ │ │ │ -665 containsPtr_(&contains), │ │ │ │ -666 size_(end-begin) │ │ │ │ -667 {} │ │ │ │ -668 │ │ │ │ -669 SubEntityRange() : │ │ │ │ -670 Base(), │ │ │ │ -671 containsPtr_(nullptr), │ │ │ │ -672 size_(0) │ │ │ │ -673 {} │ │ │ │ -674 │ │ │ │ -675 std::size_t _s_i_z_e() const │ │ │ │ -676 { │ │ │ │ -677 return size_; │ │ │ │ -678 } │ │ │ │ -679 │ │ │ │ -680 bool contains(std::size_t i) const │ │ │ │ -681 { │ │ │ │ -682 return (*containsPtr_)[i]; │ │ │ │ -683 } │ │ │ │ -684 │ │ │ │ -685 private: │ │ │ │ -686 const SubEntityFlags* containsPtr_; │ │ │ │ -687 std::size_t size_; │ │ │ │ -688 std::size_t offset_; │ │ │ │ -689 }; │ │ │ │ -690 │ │ │ │ -691 using NumberRange = typename Dune::IteratorRange; │ │ │ │ -692 │ │ │ │ -693 SubEntityInfo () │ │ │ │ -694 : numbering_( nullptr ) │ │ │ │ -695 { │ │ │ │ -696 std::fill( offset_.begin(), offset_.end(), 0 ); │ │ │ │ -697 } │ │ │ │ -698 │ │ │ │ -699 SubEntityInfo ( const SubEntityInfo &other ) │ │ │ │ -700 : offset_( other.offset_ ), │ │ │ │ -701 type_( other.type_ ), │ │ │ │ -702 containsSubentity_( other.containsSubentity_ ) │ │ │ │ -703 { │ │ │ │ -704 numbering_ = allocate(); │ │ │ │ -705 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ ); │ │ │ │ -706 } │ │ │ │ -707 │ │ │ │ -708 ~SubEntityInfo () { deallocate( numbering_ ); } │ │ │ │ -709 │ │ │ │ -710 const SubEntityInfo &operator= ( const SubEntityInfo &other ) │ │ │ │ -711 { │ │ │ │ -712 type_ = other.type_; │ │ │ │ -713 offset_ = other.offset_; │ │ │ │ -714 │ │ │ │ -715 deallocate( numbering_ ); │ │ │ │ -716 numbering_ = allocate(); │ │ │ │ -717 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ ); │ │ │ │ -718 │ │ │ │ -719 containsSubentity_ = other.containsSubentity_; │ │ │ │ -720 │ │ │ │ -721 return *this; │ │ │ │ -722 } │ │ │ │ -723 │ │ │ │ -724 int _s_i_z_e ( int cc ) const │ │ │ │ -725 { │ │ │ │ -726 assert( (cc >= 0) && (cc <= dim) ); │ │ │ │ -727 return (offset_[ cc+1 ] - offset_[ cc ]); │ │ │ │ -728 } │ │ │ │ -729 │ │ │ │ -730 int number ( int ii, int cc ) const │ │ │ │ -731 { │ │ │ │ -732 assert( (ii >= 0) && (ii < _s_i_z_e( cc )) ); │ │ │ │ -733 return numbering_[ offset_[ cc ] + ii ]; │ │ │ │ -734 } │ │ │ │ -735 │ │ │ │ -736 auto numbers ( int cc ) const │ │ │ │ -737 { │ │ │ │ -738 return SubEntityRange( numbering_ + offset_[ cc ], numbering_ + offset_ │ │ │ │ -[ cc+1 ], containsSubentity_[cc]); │ │ │ │ -739 } │ │ │ │ -740 │ │ │ │ -741 const GeometryType &type () const { return type_; } │ │ │ │ -742 │ │ │ │ -743 void initialize ( unsigned int topologyId, int codim, unsigned int i ) │ │ │ │ -744 { │ │ │ │ -745 const unsigned int subId = Impl::subTopologyId( topologyId, dim, codim, i │ │ │ │ -); │ │ │ │ -746 type_ = GeometryType( subId, dim-codim ); │ │ │ │ -747 │ │ │ │ -748 // compute offsets │ │ │ │ -749 for( int cc = 0; cc <= codim; ++cc ) │ │ │ │ -750 offset_[ cc ] = 0; │ │ │ │ -751 for( int cc = codim; cc <= dim; ++cc ) │ │ │ │ -752 offset_[ cc+1 ] = offset_[ cc ] + Impl::size( subId, dim-codim, cc-codim ); │ │ │ │ -753 │ │ │ │ -754 // compute subnumbering │ │ │ │ -755 deallocate( numbering_ ); │ │ │ │ -756 numbering_ = allocate(); │ │ │ │ -757 for( int cc = codim; cc <= dim; ++cc ) │ │ │ │ -758 Impl::subTopologyNumbering( topologyId, dim, codim, i, cc-codim, │ │ │ │ -numbering_+offset_[ cc ], numbering_+offset_[ cc+1 ] ); │ │ │ │ -759 │ │ │ │ -760 // initialize containsSubentity lookup-table │ │ │ │ -761 for(std::size_t cc=0; cc<= dim; ++cc) │ │ │ │ -762 { │ │ │ │ -763 containsSubentity_[cc].reset(); │ │ │ │ -764 for(std::size_t idx=0; idx offset_; │ │ │ │ -779 GeometryType type_; │ │ │ │ -780 std::array< SubEntityFlags, dim+1> containsSubentity_; │ │ │ │ -781 }; │ │ │ │ -782 │ │ │ │ -783 │ │ │ │ -784 template< class ctype, int dim > │ │ │ │ -785 template< int codim > │ │ │ │ -786 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n< ctype, dim >::CreateGeometries │ │ │ │ -787 { │ │ │ │ -788 template< int cc > │ │ │ │ -789 static typename ReferenceElements< ctype, dim-cc >_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -790 subRefElement( const ReferenceElementImplementation< ctype, dim > │ │ │ │ -&refElement, int i, std::integral_constant< int, cc > ) │ │ │ │ -791 { │ │ │ │ -792 return _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _d_i_m_-_c_c_ _>_:_:_g_e_n_e_r_a_l( refElement.type( i, cc │ │ │ │ -) ); │ │ │ │ -793 } │ │ │ │ -794 │ │ │ │ -795 static typename _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -796 subRefElement(const ReferenceElementImplementation< ctype, dim > │ │ │ │ -&refElement, │ │ │ │ -797 [[maybe_unused]] int i, std::integral_constant) │ │ │ │ -798 { │ │ │ │ -799 return refElement; │ │ │ │ -800 } │ │ │ │ -801 │ │ │ │ -802 static void apply ( const ReferenceElementImplementation< ctype, dim > │ │ │ │ -&refElement, GeometryTable &geometries ) │ │ │ │ -803 { │ │ │ │ -804 const int _s_i_z_e = refElement.size( codim ); │ │ │ │ -805 std::vector< FieldVector< ctype, dim > > origins( size ); │ │ │ │ -806 std::vector< FieldMatrix< ctype, dim - codim, dim > > jacobianTransposeds │ │ │ │ -( size ); │ │ │ │ -807 Impl::referenceEmbeddings( refElement.type().id(), dim, codim, &(origins[ 0 │ │ │ │ -]), &(jacobianTransposeds[ 0 ]) ); │ │ │ │ -808 │ │ │ │ -809 std::get< codim >( geometries ).reserve( size ); │ │ │ │ -810 for( int i = 0; i < _s_i_z_e; ++i ) │ │ │ │ -811 { │ │ │ │ -812 typename Codim< codim >::Geometry geometry( subRefElement( refElement, i, │ │ │ │ -std::integral_constant< int, codim >() ), origins[ i ], jacobianTransposeds[ i │ │ │ │ -] ); │ │ │ │ -813 std::get< codim >( geometries ).push_back( geometry ); │ │ │ │ -814 } │ │ │ │ -815 } │ │ │ │ -816 }; │ │ │ │ -817 │ │ │ │ -818#endif // DOXYGEN │ │ │ │ -819 │ │ │ │ -820 } // namespace Geo │ │ │ │ -821 │ │ │ │ -822} // namespace Dune │ │ │ │ -823 │ │ │ │ -824#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH │ │ │ │ -_t_y_p_e_._h_h │ │ │ │ -A unique label for each type of element that can occur in a grid. │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h │ │ │ │ -_a_f_f_i_n_e_g_e_o_m_e_t_r_y_._h_h │ │ │ │ -An implementation of the Geometry interface for affine geometries. │ │ │ │ +417 template< int m, int n > │ │ │ │ +418 static ctype rightInvA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< │ │ │ │ +ctype, n, m > &ret ) │ │ │ │ +419 { │ │ │ │ +420 static_assert((n >= m), "Matrix has no right inverse."); │ │ │ │ +421 using std::abs; │ │ │ │ +422 if constexpr( (n == 2) && (m == 2) ) │ │ │ │ +423 { │ │ │ │ +424 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]); │ │ │ │ +425 const ctype detInv = ctype( 1 ) / det; │ │ │ │ +426 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv; │ │ │ │ +427 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv; │ │ │ │ +428 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv; │ │ │ │ +429 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv; │ │ │ │ +430 return abs( det ); │ │ │ │ +431 } │ │ │ │ +432 else │ │ │ │ +433 { │ │ │ │ +434 FieldMatrix< ctype, m , m > aat; │ │ │ │ +435 AAT_L( A, aat ); │ │ │ │ +436 const ctype det = spdInvA( aat ); │ │ │ │ +437 ATBT( A , aat , ret ); │ │ │ │ +438 return det; │ │ │ │ +439 } │ │ │ │ +440 } │ │ │ │ +441 │ │ │ │ +443 template< int m, int n > │ │ │ │ +444 static bool xTRightInvA ( const FieldMatrix< ctype, m, n > &A, const │ │ │ │ +FieldVector< ctype, n > &x, FieldVector< ctype, m > &y ) │ │ │ │ +445 { │ │ │ │ +446 static_assert((n >= m), "Matrix has no right inverse."); │ │ │ │ +447 FieldMatrix< ctype, m, m > aat; │ │ │ │ +448 A.mv(x, y); │ │ │ │ +449 AAT_L( A, aat ); │ │ │ │ +450 // check whether aat is singular and return true if non-singular │ │ │ │ +451 return spdInvAx( aat, y, true ); │ │ │ │ +452 } │ │ │ │ +453}; │ │ │ │ +454 │ │ │ │ +455} // namespace Impl │ │ │ │ +456} // namespace Dune │ │ │ │ +457 │ │ │ │ +458#endif // DUNE_GEOMETRY_UTILITY_DEFAULTMATRIXHELPER_HH │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -decltype(referenceElement(std::declval< T >()...)) ReferenceElement │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:291 │ │ │ │ -_D_u_n_e_:_:_G_e_o │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:28 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_s_i_z_e │ │ │ │ -@ size │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:194 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:34 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ -Class providing access to the singletons of the reference elements. │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -typename Container::ReferenceElement ReferenceElement │ │ │ │ -The reference element type. │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:146 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_g_e_n_e_r_a_l │ │ │ │ -static const ReferenceElement & general(const GeometryType &type) │ │ │ │ -get general reference elements │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:156 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00224.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelementimplementation.cc File Reference │ │ │ +dune-geometry: quadraturerules.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,25 +72,112 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
referenceelementimplementation.cc File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Enumerations
│ │ │ +
quadraturerules.hh File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ +
#include <algorithm>
│ │ │ +#include <iostream>
│ │ │ +#include <limits>
│ │ │ +#include <mutex>
│ │ │ +#include <utility>
│ │ │ +#include <vector>
│ │ │ +#include <dune/common/fvector.hh>
│ │ │ +#include <dune/common/exceptions.hh>
│ │ │ +#include <dune/common/stdstreams.hh>
│ │ │ +#include <dune/common/stdthread.hh>
│ │ │ +#include <dune/common/visibility.hh>
│ │ │ +#include <dune/geometry/type.hh>
│ │ │ +#include <dune/geometry/typeindex.hh>
│ │ │ +#include "quadraturerules/pointquadrature.hh"
│ │ │ +#include "quadraturerules/gausslobattoquadrature.hh"
│ │ │ +#include "quadraturerules/gaussquadrature.hh"
│ │ │ +#include "quadraturerules/gaussradauleftquadrature.hh"
│ │ │ +#include "quadraturerules/gaussradaurightquadrature.hh"
│ │ │ +#include "quadraturerules/jacobi1quadrature.hh"
│ │ │ +#include "quadraturerules/jacobi2quadrature.hh"
│ │ │ +#include "quadraturerules/jacobiNquadrature.hh"
│ │ │ +#include "quadraturerules/prismquadrature.hh"
│ │ │ +#include "quadraturerules/simplexquadrature.hh"
│ │ │ +#include "quadraturerules/tensorproductquadrature.hh"
│ │ │ +
│ │ │ +

Go to the source code of this file.

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

│ │ │ +Classes

struct  std::tuple_size< Dune::QuadraturePoint< ct, dim > >
struct  std::tuple_element< 0, Dune::QuadraturePoint< ct, dim > >
struct  std::tuple_element< 1, Dune::QuadraturePoint< ct, dim > >
class  Dune::QuadratureOrderOutOfRange
 Exception thrown if a desired QuadratureRule is not available, because the requested order is to high. More...
class  Dune::QuadraturePoint< ct, dim >
 Single evaluation point in a quadrature rule. More...
class  Dune::QuadratureRule< ct, dim >
 Abstract base class for quadrature rules. More...
class  Dune::QuadratureRules< ctype, dim >
 A container for all quadrature rules of dimension dim. More...
class  Dune::QuadratureRuleFactory< ctype, dim >
 Factory class for creation of quadrature rules, depending on GeometryType, order and QuadratureType. More...
class  Dune::QuadratureRuleFactory< ctype, 0 >
class  Dune::QuadratureRuleFactory< ctype, 1 >
class  Dune::QuadratureRuleFactory< ctype, 2 >
class  Dune::QuadratureRuleFactory< ctype, 3 >
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ Namespaces

namespace  Dune
namespace  Dune::Geo
namespace  std
 STL namespace.
namespace  Dune::QuadratureType
 Defines an enum for currently available quadrature rules.
│ │ │ + │ │ │ + │ │ │ +

│ │ │ +Macros

#define DUNE_INCLUDING_IMPLEMENTATION
│ │ │ + │ │ │ + │ │ │

│ │ │ +Enumerations

enum  Dune::QuadratureType::Enum {
│ │ │ +  Dune::QuadratureType::GaussLegendre = 0 │ │ │ +, Dune::QuadratureType::GaussJacobi_1_0 = 1 │ │ │ +, Dune::QuadratureType::GaussJacobi_2_0 = 2 │ │ │ +, Dune::QuadratureType::GaussJacobi_n_0 = 3 │ │ │ +,
│ │ │ +  Dune::QuadratureType::GaussLobatto = 4 │ │ │ +, Dune::QuadratureType::GaussRadauLeft = 5 │ │ │ +, Dune::QuadratureType::GaussRadauRight = 6 │ │ │ +, Dune::QuadratureType::size │ │ │ +
│ │ │ + }
│ │ │ +

Detailed Description

│ │ │ +

Interface for quadrature points and rules

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ DUNE_INCLUDING_IMPLEMENTATION

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define DUNE_INCLUDING_IMPLEMENTATION
│ │ │ +
│ │ │ + │ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,14 +1,77 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -referenceelementimplementation.cc File Reference │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_i_m_p_l_e_m_e_n_t_a_t_i_o_n_._h_h> │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _E_n_u_m_e_r_a_t_i_o_n_s │ │ │ │ +quadraturerules.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_i_n_d_e_x_._h_h> │ │ │ │ +#include "quadraturerules/pointquadrature.hh" │ │ │ │ +#include "quadraturerules/gausslobattoquadrature.hh" │ │ │ │ +#include "quadraturerules/gaussquadrature.hh" │ │ │ │ +#include "quadraturerules/gaussradauleftquadrature.hh" │ │ │ │ +#include "quadraturerules/gaussradaurightquadrature.hh" │ │ │ │ +#include "quadraturerules/jacobi1quadrature.hh" │ │ │ │ +#include "quadraturerules/jacobi2quadrature.hh" │ │ │ │ +#include "quadraturerules/jacobiNquadrature.hh" │ │ │ │ +#include "quadraturerules/prismquadrature.hh" │ │ │ │ +#include "quadraturerules/simplexquadrature.hh" │ │ │ │ +#include "quadraturerules/tensorproductquadrature.hh" │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _s_t_d_:_:_t_u_p_l_e___s_i_z_e_<_ _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_<_ _c_t_,_ _d_i_m_ _>_ _> │ │ │ │ +struct   _s_t_d_:_:_t_u_p_l_e___e_l_e_m_e_n_t_<_ _0_,_ _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_<_ _c_t_,_ _d_i_m_ _>_ _> │ │ │ │ +struct   _s_t_d_:_:_t_u_p_l_e___e_l_e_m_e_n_t_<_ _1_,_ _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_<_ _c_t_,_ _d_i_m_ _>_ _> │ │ │ │ + class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_O_r_d_e_r_O_u_t_O_f_R_a_n_g_e │ │ │ │ +  Exception thrown if a desired _Q_u_a_d_r_a_t_u_r_e_R_u_l_e is not available, because │ │ │ │ + the requested order is to high. _M_o_r_e_._._. │ │ │ │ + class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_<_ _c_t_,_ _d_i_m_ _> │ │ │ │ +  Single evaluation point in a quadrature rule. _M_o_r_e_._._. │ │ │ │ + class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_ _c_t_,_ _d_i_m_ _> │ │ │ │ +  Abstract base class for quadrature rules. _M_o_r_e_._._. │ │ │ │ + class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ +  A container for all quadrature rules of dimension dim. _M_o_r_e_._._. │ │ │ │ + class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ +  Factory class for creation of quadrature rules, depending on │ │ │ │ + _G_e_o_m_e_t_r_y_T_y_p_e, order and _Q_u_a_d_r_a_t_u_r_e_T_y_p_e. _M_o_r_e_._._. │ │ │ │ + class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y_<_ _c_t_y_p_e_,_ _0_ _> │ │ │ │ + class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y_<_ _c_t_y_p_e_,_ _1_ _> │ │ │ │ + class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y_<_ _c_t_y_p_e_,_ _2_ _> │ │ │ │ + class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y_<_ _c_t_y_p_e_,_ _3_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ -namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ +namespace   _s_t_d │ │ │ │ +  STL namespace. │ │ │ │ +namespace   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e │ │ │ │ +  Defines an enum for currently available quadrature rules. │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _D_U_N_E___I_N_C_L_U_D_I_N_G___I_M_P_L_E_M_E_N_T_A_T_I_O_N │ │ │ │ +EEnnuummeerraattiioonnss │ │ │ │ +enum   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m { │ │ │ │ +   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_e_g_e_n_d_r_e = 0 , _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_: │ │ │ │ + _G_a_u_s_s_J_a_c_o_b_i___1___0 = 1 , _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_J_a_c_o_b_i___2___0 = 2 , _D_u_n_e_:_: │ │ │ │ + _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_J_a_c_o_b_i___n___0 = 3 , │ │ │ │ +   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_o_b_a_t_t_o = 4 , _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_: │ │ │ │ + _G_a_u_s_s_R_a_d_a_u_L_e_f_t = 5 , _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_R_a_d_a_u_R_i_g_h_t = 6 , _D_u_n_e_:_: │ │ │ │ + _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_s_i_z_e │ │ │ │ + } │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +Interface for quadrature points and rules │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? DDUUNNEE__IINNCCLLUUDDIINNGG__IIMMPPLLEEMMEENNTTAATTIIOONN ********** │ │ │ │ +#define DUNE_INCLUDING_IMPLEMENTATION │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00227.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelement.hh File Reference │ │ │ +dune-geometry: multilineargeometry.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,32 +74,48 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
referenceelement.hh File Reference
│ │ │ +
multilineargeometry.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/geometry/type.hh>
│ │ │ +
#include <cassert>
│ │ │ +#include <functional>
│ │ │ +#include <iterator>
│ │ │ +#include <limits>
│ │ │ +#include <vector>
│ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ +#include <dune/common/fvector.hh>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ +#include <dune/geometry/type.hh>
│ │ │ +#include <dune/geometry/utility/defaultmatrixhelper.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::Geo::ReferenceElement< Implementation >
 This class provides access to geometric and topological properties of a reference element. More...
struct  Dune::Geo::ReferenceElement< Implementation >::Codim< codim >
 Collection of types depending on the codimension. More...
struct  Dune::MultiLinearGeometryTraits< ct >
 default traits class for MultiLinearGeometry More...
struct  Dune::MultiLinearGeometryTraits< ct >::CornerStorage< mydim, cdim >
 template specifying the storage for the corners More...
struct  Dune::MultiLinearGeometryTraits< ct >::hasSingleGeometryType< dim >
 will there be only one geometry type for a dimension? More...
class  Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >
 generic geometry implementation based on corner coordinates More...
class  Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed
class  Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >
 Implement a MultiLinearGeometry with additional caching. More...
│ │ │ │ │ │ │ │ │ - │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::Geo
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,37 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -referenceelement.hh File Reference │ │ │ │ +multilineargeometry.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_ _> │ │ │ │ -  This class provides access to geometric and topological properties of │ │ │ │ - a reference element. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_ _>_:_:_C_o_d_i_m_<_ _c_o_d_i_m_ _> │ │ │ │ -  Collection of types depending on the codimension. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_<_ _c_t_ _> │ │ │ │ +  default traits class for _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_<_ _c_t_ _>_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_<_ _m_y_d_i_m_,_ _c_d_i_m_ _> │ │ │ │ +  template specifying the storage for the corners _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_<_ _c_t_ _>_:_:_h_a_s_S_i_n_g_l_e_G_e_o_m_e_t_r_y_T_y_p_e_<_ _d_i_m_ _> │ │ │ │ +  will there be only one geometry type for a dimension? _M_o_r_e_._._. │ │ │ │ + class   _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ +  generic geometry implementation based on corner coordinates _M_o_r_e_._._. │ │ │ │ + class   _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_: │ │ │ │ + _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ + class   _D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ +  Implement a _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y with additional caching. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ -namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00227_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: referenceelement.hh Source File │ │ │ +dune-geometry: multilineargeometry.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,262 +71,817 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
referenceelement.hh
│ │ │ +
multilineargeometry.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_REFERENCEELEMENT_HH
│ │ │ -
6#define DUNE_GEOMETRY_REFERENCEELEMENT_HH
│ │ │ +
5#ifndef DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH
│ │ │ +
6#define DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH
│ │ │
7
│ │ │ - │ │ │ -
9
│ │ │ -
10namespace Dune {
│ │ │ -
11 namespace Geo {
│ │ │ -
12
│ │ │ -
13 namespace Impl {
│ │ │ -
14
│ │ │ -
15 // forward declaration for friend declaration
│ │ │ -
16 template<typename ctype, int dim>
│ │ │ -
17 class ReferenceElementContainer;
│ │ │ -
18
│ │ │ -
19 }
│ │ │ -
20
│ │ │ -
21 // forward declaration for constructing default reference element type
│ │ │ -
22 template<typename ctype, int dim>
│ │ │ - │ │ │ +
8#include <cassert>
│ │ │ +
9#include <functional>
│ │ │ +
10#include <iterator>
│ │ │ +
11#include <limits>
│ │ │ +
12#include <vector>
│ │ │ +
13
│ │ │ +
14#include <dune/common/fmatrix.hh>
│ │ │ +
15#include <dune/common/fvector.hh>
│ │ │ +
16#include <dune/common/typetraits.hh>
│ │ │ +
17
│ │ │ + │ │ │ +
19#include <dune/geometry/type.hh>
│ │ │ + │ │ │ +
21
│ │ │ +
22namespace Dune
│ │ │ +
23{
│ │ │
24
│ │ │ -
25 // forward declaration for backwards compatibility conversion
│ │ │ -
26 template<typename ctype, int dim>
│ │ │ -
27 struct ReferenceElements;
│ │ │ -
28
│ │ │ -
29 // ReferenceElement
│ │ │ -
30 // ----------------
│ │ │ -
31
│ │ │ -
50 template<typename Implementation>
│ │ │ -
│ │ │ - │ │ │ -
52 {
│ │ │ -
53
│ │ │ -
54 public:
│ │ │ -
55
│ │ │ -
56#ifndef DOXYGEN
│ │ │ -
57
│ │ │ -
59 template<int codim>
│ │ │ -
60 using Codim = typename Implementation::template Codim<codim>;
│ │ │ -
61
│ │ │ -
62#else
│ │ │ -
63
│ │ │ -
65 template< int codim >
│ │ │ -
│ │ │ -
66 struct Codim
│ │ │ -
67 {
│ │ │ -
69 using Geometry = implementation-defined;
│ │ │ -
70 };
│ │ │ -
│ │ │ -
71
│ │ │ -
72#endif // DOXYGEN
│ │ │ -
73
│ │ │ -
75 using ctype = typename Implementation::ctype;
│ │ │ -
76
│ │ │ - │ │ │ -
79
│ │ │ -
81 using Coordinate = typename Implementation::Coordinate;
│ │ │ -
82
│ │ │ -
84 typedef ctype Volume;
│ │ │ -
85
│ │ │ -
87 static constexpr int dimension = Implementation::dimension;
│ │ │ -
88
│ │ │ -
89
│ │ │ -
│ │ │ -
94 int size(int c) const
│ │ │ -
95 {
│ │ │ -
96 return _impl->size(c);
│ │ │ -
97 }
│ │ │ -
│ │ │ -
98
│ │ │ -
99
│ │ │ -
│ │ │ -
111 int size(int i, int c, int cc) const
│ │ │ -
112 {
│ │ │ -
113 return _impl->size(i,c,cc);
│ │ │ -
114 }
│ │ │ -
│ │ │ -
115
│ │ │ -
116
│ │ │ -
│ │ │ -
130 int subEntity(int i, int c, int ii, int cc) const
│ │ │ -
131 {
│ │ │ -
132 return _impl->subEntity(i,c,ii,cc);
│ │ │ -
133 }
│ │ │ -
│ │ │ -
134
│ │ │ -
│ │ │ -
153 auto subEntities ( int i, int c, int cc ) const
│ │ │ -
154 {
│ │ │ -
155 return _impl->subEntities(i,c,cc);
│ │ │ -
156 }
│ │ │ -
│ │ │ -
157
│ │ │ +
25 // MultiLinearGeometryTraits
│ │ │ +
26 // -------------------------
│ │ │ +
27
│ │ │ +
37 template< class ct >
│ │ │ +
│ │ │ + │ │ │ +
39 {
│ │ │ +
58 typedef Impl::FieldMatrixHelper< ct > MatrixHelper;
│ │ │ +
59
│ │ │ +
61 static ct tolerance () { return ct( 16 ) * std::numeric_limits< ct >::epsilon(); }
│ │ │ +
62
│ │ │ +
127 template< int mydim, int cdim >
│ │ │ +
│ │ │ + │ │ │ +
129 {
│ │ │ +
130 typedef std::vector< FieldVector< ct, cdim > > Type;
│ │ │ +
131 };
│ │ │ +
│ │ │ +
132
│ │ │ +
146 template< int dim >
│ │ │ +
│ │ │ + │ │ │ +
148 {
│ │ │ +
149 static const bool v = false;
│ │ │ +
150 static const unsigned int topologyId = ~0u;
│ │ │ +
151 };
│ │ │ +
│ │ │ +
152 };
│ │ │ +
│ │ │ +
153
│ │ │ +
154
│ │ │ +
155
│ │ │ +
156 // MultiLinearGeometry
│ │ │ +
157 // -------------------
│ │ │
158
│ │ │ -
│ │ │ -
167 GeometryType type(int i, int c) const
│ │ │ -
168 {
│ │ │ -
169 return _impl->type(i,c);
│ │ │ -
170 }
│ │ │ -
│ │ │ -
171
│ │ │ -
172
│ │ │ -
│ │ │ - │ │ │ -
176 {
│ │ │ -
177 return _impl->type();
│ │ │ -
178 }
│ │ │ -
│ │ │ -
179
│ │ │ -
180
│ │ │ -
│ │ │ -
190 Coordinate position(int i, int c) const
│ │ │ -
191 {
│ │ │ -
192 return _impl->position(i,c);
│ │ │ -
193 }
│ │ │ -
│ │ │ -
194
│ │ │ -
195
│ │ │ -
│ │ │ -
203 bool checkInside(const Coordinate& local) const
│ │ │ -
204 {
│ │ │ -
205 return _impl->checkInside(local);
│ │ │ -
206 }
│ │ │ -
│ │ │ -
207
│ │ │ +
179 template< class ct, int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct > >
│ │ │ +
│ │ │ + │ │ │ +
181 {
│ │ │ + │ │ │ +
183
│ │ │ +
184 public:
│ │ │ +
186 typedef ct ctype;
│ │ │ +
187
│ │ │ +
189 static const int mydimension= mydim;
│ │ │ +
191 static const int coorddimension = cdim;
│ │ │ +
192
│ │ │ +
194 typedef FieldVector< ctype, mydimension > LocalCoordinate;
│ │ │ +
196 typedef FieldVector< ctype, coorddimension > GlobalCoordinate;
│ │ │ +
198 typedef ctype Volume;
│ │ │ +
199
│ │ │ +
201 typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed;
│ │ │ +
202
│ │ │ +
204 class JacobianInverseTransposed;
│ │ │ +
205
│ │ │ +
207 typedef FieldMatrix< ctype, coorddimension, mydimension > Jacobian;
│ │ │
208
│ │ │ -
220 template<int codim>
│ │ │ -
│ │ │ -
221 typename Codim<codim>::Geometry geometry(int i) const
│ │ │ -
222 {
│ │ │ -
223 return _impl->template geometry<codim>(i);
│ │ │ -
224 }
│ │ │ -
│ │ │ -
225
│ │ │ -
226
│ │ │ -
│ │ │ - │ │ │ -
229 {
│ │ │ -
230 return _impl->volume();
│ │ │ -
231 }
│ │ │ -
│ │ │ -
232
│ │ │ -
233
│ │ │ -
│ │ │ - │ │ │ -
242 {
│ │ │ -
243 return _impl->integrationOuterNormal(face);
│ │ │ -
244 }
│ │ │ -
│ │ │ -
245
│ │ │ -
246
│ │ │ -
│ │ │ - │ │ │ -
255 : _impl(nullptr)
│ │ │ -
256 {}
│ │ │ -
│ │ │ -
257
│ │ │ -
│ │ │ -
263 const Implementation& impl() const
│ │ │ -
264 {
│ │ │ -
265 return *_impl;
│ │ │ -
266 }
│ │ │ +
210 typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse;
│ │ │ +
211
│ │ │ +
212 protected:
│ │ │ +
213
│ │ │ + │ │ │ +
215
│ │ │ +
216 public:
│ │ │ +
217
│ │ │ + │ │ │ +
220
│ │ │ +
221 private:
│ │ │ +
222 static const bool hasSingleGeometryType = Traits::template hasSingleGeometryType< mydimension >::v;
│ │ │ +
223
│ │ │ +
224 protected:
│ │ │ +
225 typedef typename Traits::MatrixHelper MatrixHelper;
│ │ │ +
226 typedef typename std::conditional< hasSingleGeometryType, std::integral_constant< unsigned int, Traits::template hasSingleGeometryType< mydimension >::topologyId >, unsigned int >::type TopologyId;
│ │ │ +
227
│ │ │ +
228 public:
│ │ │ +
238 template< class Corners >
│ │ │ +
│ │ │ + │ │ │ +
240 const Corners &corners )
│ │ │ +
241 : refElement_( refElement ),
│ │ │ +
242 corners_( corners )
│ │ │ +
243 {}
│ │ │ +
│ │ │ +
244
│ │ │ +
254 template< class Corners >
│ │ │ +
│ │ │ + │ │ │ +
256 const Corners &corners )
│ │ │ +
257 : refElement_( ReferenceElements::general( gt ) ),
│ │ │ +
258 corners_( corners )
│ │ │ +
259 {}
│ │ │ +
│ │ │ +
260
│ │ │ +
│ │ │ +
262 bool affine () const
│ │ │ +
263 {
│ │ │ + │ │ │ +
265 return affine( jt );
│ │ │ +
266 }
│ │ │
│ │ │
267
│ │ │ -
│ │ │ -
269 bool operator==(const ReferenceElement& r) const
│ │ │ -
270 {
│ │ │ -
271 return _impl == r._impl;
│ │ │ -
272 }
│ │ │ -
│ │ │ +
269 Dune::GeometryType type () const { return GeometryType( toUnsignedInt(topologyId()), mydimension ); }
│ │ │ +
270
│ │ │ +
272 int corners () const { return refElement().size( mydimension ); }
│ │ │
273
│ │ │
│ │ │ -
275 bool operator!=(const ReferenceElement& r) const
│ │ │ -
276 {
│ │ │ -
277 return not (*this == r);
│ │ │ -
278 }
│ │ │ -
│ │ │ -
279
│ │ │ -
│ │ │ -
281 friend std::size_t hash_value(const ReferenceElement& r)
│ │ │ -
282 {
│ │ │ -
283 return reinterpret_cast<std::size_t>(r._impl);
│ │ │ -
284 }
│ │ │ -
│ │ │ -
285
│ │ │ -
286 private:
│ │ │ -
287
│ │ │ -
288 // The implementation must be a friend to construct a wrapper around itself.
│ │ │ -
289 friend Implementation;
│ │ │ -
290
│ │ │ -
291 // The reference container is a friend to be able to call setImplementation.
│ │ │ -
292 friend class Impl::ReferenceElementContainer<ctype,dimension>;
│ │ │ +
275 GlobalCoordinate corner ( int i ) const
│ │ │ +
276 {
│ │ │ +
277 assert( (i >= 0) && (i < corners()) );
│ │ │ +
278 return std::cref(corners_).get()[ i ];
│ │ │ +
279 }
│ │ │ +
│ │ │ +
280
│ │ │ +
282 GlobalCoordinate center () const { return global( refElement().position( 0, 0 ) ); }
│ │ │ +
283
│ │ │ +
│ │ │ + │ │ │ +
291 {
│ │ │ +
292 using std::begin;
│ │ │
293
│ │ │ -
294 // Constructor for wrapping an implementation reference (required internally by the default implementation)
│ │ │ -
295 ReferenceElement(const Implementation& impl)
│ │ │ -
296 : _impl(&impl)
│ │ │ -
297 {}
│ │ │ -
298
│ │ │ -
299 void setImplementation(const Implementation& impl)
│ │ │ -
300 {
│ │ │ -
301 _impl = &impl;
│ │ │ -
302 }
│ │ │ -
303
│ │ │ -
304 const Implementation* _impl;
│ │ │ -
305
│ │ │ -
306 };
│ │ │ -
│ │ │ -
307
│ │ │ -
308 }
│ │ │ -
309
│ │ │ -
310}
│ │ │ -
311
│ │ │ -
312
│ │ │ -
313#endif // DUNE_GEOMETRY_REFERENCEELEMENT_HH
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ +
294 auto cit = begin(std::cref(corners_).get());
│ │ │ + │ │ │ +
296 global< false >( topologyId(), std::integral_constant< int, mydimension >(), cit, ctype( 1 ), local, ctype( 1 ), y );
│ │ │ +
297 return y;
│ │ │ +
298 }
│ │ │ +
│ │ │ +
299
│ │ │ +
│ │ │ +
312 LocalCoordinate local ( const GlobalCoordinate &globalCoord ) const
│ │ │ +
313 {
│ │ │ +
314 const ctype tolerance = Traits::tolerance();
│ │ │ +
315 LocalCoordinate x = refElement().position( 0, 0 );
│ │ │ + │ │ │ +
317 const bool affineMapping = this->affine();
│ │ │ +
318 do
│ │ │ +
319 {
│ │ │ +
320 // Newton's method: DF^n dx^n = F^n, x^{n+1} -= dx^n
│ │ │ +
321 const GlobalCoordinate dglobal = (*this).global( x ) - globalCoord;
│ │ │ +
322 const bool invertible =
│ │ │ +
323 MatrixHelper::xTRightInvA( jacobianTransposed( x ), dglobal, dx );
│ │ │ +
324 if( ! invertible )
│ │ │ +
325 return LocalCoordinate( std::numeric_limits< ctype > :: max() );
│ │ │ +
326
│ │ │ +
327 // update x with correction
│ │ │ +
328 x -= dx;
│ │ │ +
329
│ │ │ +
330 // for affine mappings only one iteration is needed
│ │ │ +
331 if ( affineMapping ) break;
│ │ │ +
332 } while( dx.two_norm2() > tolerance );
│ │ │ +
333 return x;
│ │ │ +
334 }
│ │ │ +
│ │ │ +
335
│ │ │ +
│ │ │ + │ │ │ +
351 {
│ │ │ +
352 return MatrixHelper::sqrtDetAAT( jacobianTransposed( local ) );
│ │ │ +
353 }
│ │ │ +
│ │ │ +
354
│ │ │ +
│ │ │ +
363 Volume volume () const
│ │ │ +
364 {
│ │ │ +
365 return integrationElement( refElement().position( 0, 0 ) ) * refElement().volume();
│ │ │ +
366 }
│ │ │ +
│ │ │ +
367
│ │ │ +
│ │ │ + │ │ │ +
378 {
│ │ │ +
379 using std::begin;
│ │ │ +
380
│ │ │ + │ │ │ +
382 auto cit = begin(std::cref(corners_).get());
│ │ │ +
383 jacobianTransposed< false >( topologyId(), std::integral_constant< int, mydimension >(), cit, ctype( 1 ), local, ctype( 1 ), jt );
│ │ │ +
384 return jt;
│ │ │ +
385 }
│ │ │ +
│ │ │ +
386
│ │ │ +
393 JacobianInverseTransposed jacobianInverseTransposed ( const LocalCoordinate &local ) const;
│ │ │ +
394
│ │ │ +
│ │ │ + │ │ │ +
396 {
│ │ │ +
397 return geometry.refElement();
│ │ │ +
398 }
│ │ │ +
│ │ │ +
399
│ │ │ +
400
│ │ │ +
│ │ │ + │ │ │ +
408 {
│ │ │ +
409 return jacobianTransposed(local).transposed();
│ │ │ +
410 }
│ │ │ +
│ │ │ +
411
│ │ │ +
│ │ │ + │ │ │ +
419 {
│ │ │ +
420 return jacobianInverseTransposed(local).transposed();
│ │ │ +
421 }
│ │ │ +
│ │ │ +
422
│ │ │ +
423 protected:
│ │ │ +
424
│ │ │ +
│ │ │ + │ │ │ +
426 {
│ │ │ +
427 return refElement_;
│ │ │ +
428 }
│ │ │ +
│ │ │ +
429
│ │ │ +
│ │ │ + │ │ │ +
431 {
│ │ │ +
432 return topologyId( std::integral_constant< bool, hasSingleGeometryType >() );
│ │ │ +
433 }
│ │ │ +
│ │ │ +
434
│ │ │ +
435 template< bool add, int dim, class CornerIterator >
│ │ │ +
436 static void global ( TopologyId topologyId, std::integral_constant< int, dim >,
│ │ │ +
437 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
│ │ │ +
438 const ctype &rf, GlobalCoordinate &y );
│ │ │ +
439 template< bool add, class CornerIterator >
│ │ │ +
440 static void global ( TopologyId topologyId, std::integral_constant< int, 0 >,
│ │ │ +
441 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
│ │ │ +
442 const ctype &rf, GlobalCoordinate &y );
│ │ │ +
443
│ │ │ +
444 template< bool add, int rows, int dim, class CornerIterator >
│ │ │ +
445 static void jacobianTransposed ( TopologyId topologyId, std::integral_constant< int, dim >,
│ │ │ +
446 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
│ │ │ +
447 const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt );
│ │ │ +
448 template< bool add, int rows, class CornerIterator >
│ │ │ +
449 static void jacobianTransposed ( TopologyId topologyId, std::integral_constant< int, 0 >,
│ │ │ +
450 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
│ │ │ +
451 const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt );
│ │ │ +
452
│ │ │ +
453 template< int dim, class CornerIterator >
│ │ │ +
454 static bool affine ( TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, JacobianTransposed &jt );
│ │ │ +
455 template< class CornerIterator >
│ │ │ +
456 static bool affine ( TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, JacobianTransposed &jt );
│ │ │ +
457
│ │ │ +
│ │ │ +
458 bool affine ( JacobianTransposed &jacobianT ) const
│ │ │ +
459 {
│ │ │ +
460 using std::begin;
│ │ │ +
461
│ │ │ +
462 auto cit = begin(std::cref(corners_).get());
│ │ │ +
463 return affine( topologyId(), std::integral_constant< int, mydimension >(), cit, jacobianT );
│ │ │ +
464 }
│ │ │ +
│ │ │ +
465
│ │ │ +
466 private:
│ │ │ +
467 // The following methods are needed to convert the return type of topologyId to
│ │ │ +
468 // unsigned int with g++-4.4. It has problems casting integral_constant to the
│ │ │ +
469 // integral type.
│ │ │ +
470 static unsigned int toUnsignedInt(unsigned int i) { return i; }
│ │ │ +
471 template<unsigned int v>
│ │ │ +
472 static unsigned int toUnsignedInt(std::integral_constant<unsigned int,v> ) { return v; }
│ │ │ +
473 TopologyId topologyId ( std::integral_constant< bool, true > ) const { return TopologyId(); }
│ │ │ +
474 unsigned int topologyId ( std::integral_constant< bool, false > ) const { return refElement().type().id(); }
│ │ │ +
475
│ │ │ +
476 ReferenceElement refElement_;
│ │ │ +
477 typename Traits::template CornerStorage< mydimension, coorddimension >::Type corners_;
│ │ │ +
478 };
│ │ │ +
│ │ │ +
479
│ │ │ +
480
│ │ │ +
481
│ │ │ +
482 // MultiLinearGeometry::JacobianInverseTransposed
│ │ │ +
483 // ----------------------------------------------
│ │ │ +
484
│ │ │ +
485 template< class ct, int mydim, int cdim, class Traits >
│ │ │ +
│ │ │ +
486 class MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed
│ │ │ +
487 : public FieldMatrix< ctype, coorddimension, mydimension >
│ │ │ +
488 {
│ │ │ +
489 typedef FieldMatrix< ctype, coorddimension, mydimension > Base;
│ │ │ +
490
│ │ │ +
491 public:
│ │ │ +
492 void setup ( const JacobianTransposed &jt )
│ │ │ +
493 {
│ │ │ +
494 detInv_ = MatrixHelper::rightInvA( jt, static_cast< Base & >( *this ) );
│ │ │ +
495 }
│ │ │ +
496
│ │ │ +
497 void setupDeterminant ( const JacobianTransposed &jt )
│ │ │ +
498 {
│ │ │ +
499 detInv_ = MatrixHelper::sqrtDetAAT( jt );
│ │ │ +
500 }
│ │ │ +
501
│ │ │ +
502 ctype det () const { return ctype( 1 ) / detInv_; }
│ │ │ +
503 ctype detInv () const { return detInv_; }
│ │ │ +
504
│ │ │ +
505 private:
│ │ │ +
506 ctype detInv_;
│ │ │ +
507 };
│ │ │ +
│ │ │ +
508
│ │ │ +
509
│ │ │ +
510
│ │ │ +
523 template< class ct, int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct > >
│ │ │ +
│ │ │ + │ │ │ +
525 : public MultiLinearGeometry< ct, mydim, cdim, Traits >
│ │ │ +
526 {
│ │ │ + │ │ │ + │ │ │ +
529
│ │ │ +
530 protected:
│ │ │ + │ │ │ +
532
│ │ │ +
533 public:
│ │ │ + │ │ │ +
535
│ │ │ +
536 typedef typename Base::ctype ctype;
│ │ │ +
537
│ │ │ +
538 using Base::mydimension;
│ │ │ + │ │ │ +
540
│ │ │ + │ │ │ + │ │ │ +
543 typedef typename Base::Volume Volume;
│ │ │ +
544
│ │ │ + │ │ │ +
546 typedef typename Base::JacobianInverseTransposed JacobianInverseTransposed;
│ │ │ +
547 typedef typename Base::Jacobian Jacobian;
│ │ │ + │ │ │ +
549
│ │ │ +
550 template< class CornerStorage >
│ │ │ +
│ │ │ +
551 CachedMultiLinearGeometry ( const ReferenceElement &referenceElement, const CornerStorage &cornerStorage )
│ │ │ +
552 : Base( referenceElement, cornerStorage ),
│ │ │ +
553 affine_( Base::affine( jacobianTransposed_ ) ),
│ │ │ +
554 jacobianInverseTransposedComputed_( false ),
│ │ │ +
555 integrationElementComputed_( false )
│ │ │ +
556 {}
│ │ │ +
│ │ │ +
557
│ │ │ +
558 template< class CornerStorage >
│ │ │ +
│ │ │ +
559 CachedMultiLinearGeometry ( Dune::GeometryType gt, const CornerStorage &cornerStorage )
│ │ │ +
560 : Base( gt, cornerStorage ),
│ │ │ +
561 affine_( Base::affine( jacobianTransposed_ ) ),
│ │ │ +
562 jacobianInverseTransposedComputed_( false ),
│ │ │ +
563 integrationElementComputed_( false )
│ │ │ +
564 {}
│ │ │ +
│ │ │ +
565
│ │ │ +
567 bool affine () const { return affine_; }
│ │ │ +
568
│ │ │ +
569 using Base::corner;
│ │ │ +
570
│ │ │ +
572 GlobalCoordinate center () const { return global( refElement().position( 0, 0 ) ); }
│ │ │ +
573
│ │ │ +
│ │ │ + │ │ │ +
581 {
│ │ │ +
582 if( affine() )
│ │ │ +
583 {
│ │ │ + │ │ │ +
585 jacobianTransposed_.umtv( local, global );
│ │ │ +
586 return global;
│ │ │ +
587 }
│ │ │ +
588 else
│ │ │ +
589 return Base::global( local );
│ │ │ +
590 }
│ │ │ +
│ │ │ +
591
│ │ │ +
│ │ │ + │ │ │ +
605 {
│ │ │ +
606 if( affine() )
│ │ │ +
607 {
│ │ │ + │ │ │ +
609 if( jacobianInverseTransposedComputed_ )
│ │ │ +
610 jacobianInverseTransposed_.mtv( global - corner( 0 ), local );
│ │ │ +
611 else
│ │ │ +
612 MatrixHelper::xTRightInvA( jacobianTransposed_, global - corner( 0 ), local );
│ │ │ +
613 return local;
│ │ │ +
614 }
│ │ │ +
615 else
│ │ │ +
616 return Base::local( global );
│ │ │ +
617 }
│ │ │ +
│ │ │ +
618
│ │ │ +
│ │ │ + │ │ │ +
634 {
│ │ │ +
635 if( affine() )
│ │ │ +
636 {
│ │ │ +
637 if( !integrationElementComputed_ )
│ │ │ +
638 {
│ │ │ +
639 jacobianInverseTransposed_.setupDeterminant( jacobianTransposed_ );
│ │ │ +
640 integrationElementComputed_ = true;
│ │ │ +
641 }
│ │ │ +
642 return jacobianInverseTransposed_.detInv();
│ │ │ +
643 }
│ │ │ +
644 else
│ │ │ + │ │ │ +
646 }
│ │ │ +
│ │ │ +
647
│ │ │ +
│ │ │ +
649 Volume volume () const
│ │ │ +
650 {
│ │ │ +
651 if( affine() )
│ │ │ +
652 return integrationElement( refElement().position( 0, 0 ) ) * refElement().volume();
│ │ │ +
653 else
│ │ │ +
654 return Base::volume();
│ │ │ +
655 }
│ │ │ +
│ │ │ +
656
│ │ │ +
│ │ │ + │ │ │ +
667 {
│ │ │ +
668 if( affine() )
│ │ │ +
669 return jacobianTransposed_;
│ │ │ +
670 else
│ │ │ + │ │ │ +
672 }
│ │ │ +
│ │ │ +
673
│ │ │ +
│ │ │ + │ │ │ +
681 {
│ │ │ +
682 if( affine() )
│ │ │ +
683 {
│ │ │ +
684 if( !jacobianInverseTransposedComputed_ )
│ │ │ +
685 {
│ │ │ +
686 jacobianInverseTransposed_.setup( jacobianTransposed_ );
│ │ │ +
687 jacobianInverseTransposedComputed_ = true;
│ │ │ +
688 integrationElementComputed_ = true;
│ │ │ +
689 }
│ │ │ +
690 return jacobianInverseTransposed_;
│ │ │ +
691 }
│ │ │ +
692 else
│ │ │ + │ │ │ +
694 }
│ │ │ +
│ │ │ +
695
│ │ │ +
│ │ │ + │ │ │ +
703 {
│ │ │ +
704 return jacobianTransposed(local).transposed();
│ │ │ +
705 }
│ │ │ +
│ │ │ +
706
│ │ │ +
│ │ │ + │ │ │ +
714 {
│ │ │ +
715 return jacobianInverseTransposed(local).transposed();
│ │ │ +
716 }
│ │ │ +
│ │ │ +
717
│ │ │ +
718 protected:
│ │ │ +
719 using Base::refElement;
│ │ │ +
720
│ │ │ +
721 private:
│ │ │ +
722 mutable JacobianTransposed jacobianTransposed_;
│ │ │ +
723 mutable JacobianInverseTransposed jacobianInverseTransposed_;
│ │ │ +
724
│ │ │ +
725 mutable bool affine_ : 1;
│ │ │ +
726
│ │ │ +
727 mutable bool jacobianInverseTransposedComputed_ : 1;
│ │ │ +
728 mutable bool integrationElementComputed_ : 1;
│ │ │ +
729 };
│ │ │ +
│ │ │ +
730
│ │ │ +
731
│ │ │ +
732
│ │ │ +
733 // Implementation of MultiLinearGeometry
│ │ │ +
734 // -------------------------------------
│ │ │ +
735
│ │ │ +
736 template< class ct, int mydim, int cdim, class Traits >
│ │ │ +
737 inline typename MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed
│ │ │ +
│ │ │ + │ │ │ +
739 {
│ │ │ + │ │ │ +
741 jit.setup( jacobianTransposed( local ) );
│ │ │ +
742 return jit;
│ │ │ +
743 }
│ │ │ +
│ │ │ +
744
│ │ │ +
745
│ │ │ +
746 template< class ct, int mydim, int cdim, class Traits >
│ │ │ +
747 template< bool add, int dim, class CornerIterator >
│ │ │ + │ │ │ +
│ │ │ +
749 ::global ( TopologyId topologyId, std::integral_constant< int, dim >,
│ │ │ +
750 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
│ │ │ +
751 const ctype &rf, GlobalCoordinate &y )
│ │ │ +
752 {
│ │ │ +
753 const ctype xn = df*x[ dim-1 ];
│ │ │ +
754 const ctype cxn = ctype( 1 ) - xn;
│ │ │ +
755
│ │ │ +
756 if( Impl::isPrism( toUnsignedInt(topologyId), mydimension, mydimension-dim ) )
│ │ │ +
757 {
│ │ │ +
758 // apply (1-xn) times mapping for bottom
│ │ │ +
759 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, rf*cxn, y );
│ │ │ +
760 // apply xn times mapping for top
│ │ │ +
761 global< true >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, rf*xn, y );
│ │ │ +
762 }
│ │ │ +
763 else
│ │ │ +
764 {
│ │ │ +
765 assert( Impl::isPyramid( toUnsignedInt(topologyId), mydimension, mydimension-dim ) );
│ │ │ +
766 // apply (1-xn) times mapping for bottom (with argument x/(1-xn))
│ │ │ +
767 if( cxn > Traits::tolerance() || cxn < -Traits::tolerance() )
│ │ │ +
768 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, df/cxn, x, rf*cxn, y );
│ │ │ +
769 else
│ │ │ +
770 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, ctype( 0 ), y );
│ │ │ +
771 // apply xn times the tip
│ │ │ +
772 y.axpy( rf*xn, *cit );
│ │ │ +
773 ++cit;
│ │ │ +
774 }
│ │ │ +
775 }
│ │ │ +
│ │ │ +
776
│ │ │ +
777 template< class ct, int mydim, int cdim, class Traits >
│ │ │ +
778 template< bool add, class CornerIterator >
│ │ │ + │ │ │ +
│ │ │ +
780 ::global ( TopologyId, std::integral_constant< int, 0 >,
│ │ │ +
781 CornerIterator &cit, const ctype &, const LocalCoordinate &,
│ │ │ +
782 const ctype &rf, GlobalCoordinate &y )
│ │ │ +
783 {
│ │ │ +
784 const GlobalCoordinate &origin = *cit;
│ │ │ +
785 ++cit;
│ │ │ +
786 for( int i = 0; i < coorddimension; ++i )
│ │ │ +
787 y[ i ] = (add ? y[ i ] + rf*origin[ i ] : rf*origin[ i ]);
│ │ │ +
788 }
│ │ │ +
│ │ │ +
789
│ │ │ +
790
│ │ │ +
791 template< class ct, int mydim, int cdim, class Traits >
│ │ │ +
792 template< bool add, int rows, int dim, class CornerIterator >
│ │ │ + │ │ │ +
│ │ │ +
794 ::jacobianTransposed ( TopologyId topologyId, std::integral_constant< int, dim >,
│ │ │ +
795 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
│ │ │ +
796 const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt )
│ │ │ +
797 {
│ │ │ +
798 assert( rows >= dim );
│ │ │ +
799
│ │ │ +
800 const ctype xn = df*x[ dim-1 ];
│ │ │ +
801 const ctype cxn = ctype( 1 ) - xn;
│ │ │ +
802
│ │ │ +
803 auto cit2( cit );
│ │ │ +
804 if( Impl::isPrism( toUnsignedInt(topologyId), mydimension, mydimension-dim ) )
│ │ │ +
805 {
│ │ │ +
806 // apply (1-xn) times Jacobian for bottom
│ │ │ +
807 jacobianTransposed< add >( topologyId, std::integral_constant< int, dim-1 >(), cit2, df, x, rf*cxn, jt );
│ │ │ +
808 // apply xn times Jacobian for top
│ │ │ +
809 jacobianTransposed< true >( topologyId, std::integral_constant< int, dim-1 >(), cit2, df, x, rf*xn, jt );
│ │ │ +
810 // compute last row as difference between top value and bottom value
│ │ │ +
811 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, -rf, jt[ dim-1 ] );
│ │ │ +
812 global< true >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, rf, jt[ dim-1 ] );
│ │ │ +
813 }
│ │ │ +
814 else
│ │ │ +
815 {
│ │ │ +
816 assert( Impl::isPyramid( toUnsignedInt(topologyId), mydimension, mydimension-dim ) );
│ │ │ +
817 /*
│ │ │ +
818 * In the pyramid case, we need a transformation Tb: B -> R^n for the
│ │ │ +
819 * base B \subset R^{n-1}. The pyramid transformation is then defined as
│ │ │ +
820 * T: P \subset R^n -> R^n
│ │ │ +
821 * (x, xn) |-> (1-xn) Tb(x*) + xn t (x \in R^{n-1}, xn \in R)
│ │ │ +
822 * with the tip of the pyramid mapped to t and x* = x/(1-xn)
│ │ │ +
823 * the projection of (x,xn) onto the base.
│ │ │ +
824 *
│ │ │ +
825 * For the Jacobi matrix DT we get
│ │ │ +
826 * DT = ( A | b )
│ │ │ +
827 * with A = DTb(x*) (n x n-1 matrix)
│ │ │ +
828 * and b = dT/dxn (n-dim column vector).
│ │ │ +
829 * Furthermore
│ │ │ +
830 * b = -Tb(x*) + t + \sum_i dTb/dx_i(x^*) x_i/(1-xn)
│ │ │ +
831 *
│ │ │ +
832 * Note that both A and b are not defined in the pyramid tip (x=0, xn=1)!
│ │ │ +
833 * Indeed for B the unit square, Tb mapping B to the quadrilateral given
│ │ │ +
834 * by the vertices (0,0,0), (2,0,0), (0,1,0), (1,1,0) and t=(0,0,1), we get
│ │ │ +
835 *
│ │ │ +
836 * T(x,y,xn) = ( x(2-y/(1-xn)), y, xn )
│ │ │ +
837 * / 2-y/(1-xn) -x 0 \
│ │ │ +
838 * DT(x,y,xn) = | 0 1 0 |
│ │ │ +
839 * \ 0 0 1 /
│ │ │ +
840 * which is not continuous for xn -> 1, choose for example
│ │ │ +
841 * x=0, y=1-xn, xn -> 1 --> DT -> diag(1,1,1)
│ │ │ +
842 * x=1-xn, y=0, xn -> 1 --> DT -> diag(2,1,1)
│ │ │ +
843 *
│ │ │ +
844 * However, for Tb affine-linear, Tb(y) = My + y0, DTb = M:
│ │ │ +
845 * A = M
│ │ │ +
846 * b = -M x* - y0 + t + \sum_i M_i x_i/(1-xn)
│ │ │ +
847 * = -M x* - y0 + t + M x*
│ │ │ +
848 * = -y0 + t
│ │ │ +
849 * which is continuous for xn -> 1. Note that this b is also given by
│ │ │ +
850 * b = -Tb(0) + t + \sum_i dTb/dx_i(0) x_i/1
│ │ │ +
851 * that is replacing x* by 1 and 1-xn by 1 in the formular above.
│ │ │ +
852 *
│ │ │ +
853 * For xn -> 1, we can thus set x*=0, "1-xn"=1 (or anything != 0) and get
│ │ │ +
854 * the right result in case Tb is affine-linear.
│ │ │ +
855 */
│ │ │ +
856
│ │ │ +
857 /* The second case effectively results in x* = 0 */
│ │ │ +
858 ctype dfcxn = (cxn > Traits::tolerance() || cxn < -Traits::tolerance()) ? ctype(df / cxn) : ctype(0);
│ │ │ +
859
│ │ │ +
860 // initialize last row
│ │ │ +
861 // b = -Tb(x*)
│ │ │ +
862 // (b = -Tb(0) = -y0 in case xn -> 1 and Tb affine-linear)
│ │ │ +
863 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, dfcxn, x, -rf, jt[ dim-1 ] );
│ │ │ +
864 // b += t
│ │ │ +
865 jt[ dim-1 ].axpy( rf, *cit );
│ │ │ +
866 ++cit;
│ │ │ +
867 // apply Jacobian for bottom (with argument x/(1-xn)) and correct last row
│ │ │ +
868 if( add )
│ │ │ +
869 {
│ │ │ +
870 FieldMatrix< ctype, dim-1, coorddimension > jt2;
│ │ │ +
871 // jt2 = dTb/dx_i(x*)
│ │ │ +
872 jacobianTransposed< false >( topologyId, std::integral_constant< int, dim-1 >(), cit2, dfcxn, x, rf, jt2 );
│ │ │ +
873 // A = dTb/dx_i(x*) (jt[j], j=0..dim-1)
│ │ │ +
874 // b += \sum_i dTb/dx_i(x*) x_i/(1-xn) (jt[dim-1])
│ │ │ +
875 // (b += 0 in case xn -> 1)
│ │ │ +
876 for( int j = 0; j < dim-1; ++j )
│ │ │ +
877 {
│ │ │ +
878 jt[ j ] += jt2[ j ];
│ │ │ +
879 jt[ dim-1 ].axpy( dfcxn*x[ j ], jt2[ j ] );
│ │ │ +
880 }
│ │ │ +
881 }
│ │ │ +
882 else
│ │ │ +
883 {
│ │ │ +
884 // jt = dTb/dx_i(x*)
│ │ │ +
885 jacobianTransposed< false >( topologyId, std::integral_constant< int, dim-1 >(), cit2, dfcxn, x, rf, jt );
│ │ │ +
886 // b += \sum_i dTb/dx_i(x*) x_i/(1-xn)
│ │ │ +
887 for( int j = 0; j < dim-1; ++j )
│ │ │ +
888 jt[ dim-1 ].axpy( dfcxn*x[ j ], jt[ j ] );
│ │ │ +
889 }
│ │ │ +
890 }
│ │ │ +
891 }
│ │ │ +
│ │ │ +
892
│ │ │ +
893 template< class ct, int mydim, int cdim, class Traits >
│ │ │ +
894 template< bool add, int rows, class CornerIterator >
│ │ │ + │ │ │ +
│ │ │ +
896 ::jacobianTransposed ( TopologyId, std::integral_constant< int, 0 >,
│ │ │ +
897 CornerIterator &cit, const ctype &, const LocalCoordinate &,
│ │ │ +
898 const ctype &, FieldMatrix< ctype, rows, cdim > & )
│ │ │ +
899 {
│ │ │ +
900 ++cit;
│ │ │ +
901 }
│ │ │ +
│ │ │ +
902
│ │ │ +
903
│ │ │ +
904
│ │ │ +
905 template< class ct, int mydim, int cdim, class Traits >
│ │ │ +
906 template< int dim, class CornerIterator >
│ │ │ + │ │ │ +
│ │ │ +
908 ::affine ( TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, JacobianTransposed &jt )
│ │ │ +
909 {
│ │ │ +
910 const GlobalCoordinate &orgBottom = *cit;
│ │ │ +
911 if( !affine( topologyId, std::integral_constant< int, dim-1 >(), cit, jt ) )
│ │ │ +
912 return false;
│ │ │ +
913 const GlobalCoordinate &orgTop = *cit;
│ │ │ +
914
│ │ │ +
915 if( Impl::isPrism( toUnsignedInt(topologyId), mydimension, mydimension-dim ) )
│ │ │ +
916 {
│ │ │ +
917 JacobianTransposed jtTop;
│ │ │ +
918 if( !affine( topologyId, std::integral_constant< int, dim-1 >(), cit, jtTop ) )
│ │ │ +
919 return false;
│ │ │ +
920
│ │ │ +
921 // check whether both jacobians are identical
│ │ │ +
922 ctype norm( 0 );
│ │ │ +
923 for( int i = 0; i < dim-1; ++i )
│ │ │ +
924 norm += (jtTop[ i ] - jt[ i ]).two_norm2();
│ │ │ +
925 if( norm >= Traits::tolerance() )
│ │ │ +
926 return false;
│ │ │ +
927 }
│ │ │ +
928 else
│ │ │ +
929 ++cit;
│ │ │ +
930 jt[ dim-1 ] = orgTop - orgBottom;
│ │ │ +
931 return true;
│ │ │ +
932 }
│ │ │ +
│ │ │ +
933
│ │ │ +
934 template< class ct, int mydim, int cdim, class Traits >
│ │ │ +
935 template< class CornerIterator >
│ │ │ + │ │ │ +
│ │ │ +
937 ::affine ( TopologyId, std::integral_constant< int, 0 >, CornerIterator &cit, JacobianTransposed & )
│ │ │ +
938 {
│ │ │ +
939 ++cit;
│ │ │ +
940 return true;
│ │ │ +
941 }
│ │ │ +
│ │ │ +
942
│ │ │ +
943} // namespace Dune
│ │ │ +
944
│ │ │ +
945#endif // #ifndef DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ + │ │ │ + │ │ │
Definition affinegeometry.hh:22
│ │ │ -
Definition affinegeometry.hh:28
│ │ │ -
CoordinateField volume() const
obtain the volume of the reference element
Definition referenceelement.hh:228
│ │ │ -
GeometryType type(int i, int c) const
obtain the type of subentity (i,c)
Definition referenceelement.hh:167
│ │ │ -
ReferenceElement()
Constructs an empty reference element.
Definition referenceelement.hh:254
│ │ │ -
bool operator!=(const ReferenceElement &r) const
Compares for inequality with another reference element.
Definition referenceelement.hh:275
│ │ │ -
Coordinate position(int i, int c) const
position of the barycenter of entity (i,c)
Definition referenceelement.hh:190
│ │ │ -
typename Geo::ReferenceElementImplementation< ctype, mydimension >::Coordinate Coordinate
Definition referenceelement.hh:81
│ │ │ -
Codim< codim >::Geometry geometry(int i) const
obtain the embedding of subentity (i,codim) into the reference element
Definition referenceelement.hh:221
│ │ │ - │ │ │ -
int size(int i, int c, int cc) const
number of subentities of codimension cc of subentity (i,c)
Definition referenceelement.hh:111
│ │ │ -
int subEntity(int i, int c, int ii, int cc) const
obtain number of ii-th subentity with codim cc of (i,c)
Definition referenceelement.hh:130
│ │ │ -
typename Geo::ReferenceElementImplementation< ctype, mydimension >::ctype ctype
Definition referenceelement.hh:75
│ │ │ -
int size(int c) const
number of subentities of codimension c
Definition referenceelement.hh:94
│ │ │ -
GeometryType type() const
obtain the type of this reference element
Definition referenceelement.hh:175
│ │ │ -
const Implementation & impl() const
Returns a reference to the internal implementation object.
Definition referenceelement.hh:263
│ │ │ -
bool checkInside(const Coordinate &local) const
check if a coordinate is in the reference element
Definition referenceelement.hh:203
│ │ │ -
Coordinate integrationOuterNormal(int face) const
obtain the integration outer normal of the reference element
Definition referenceelement.hh:241
│ │ │ - │ │ │ -
bool operator==(const ReferenceElement &r) const
Compares for equality with another reference element.
Definition referenceelement.hh:269
│ │ │ -
friend std::size_t hash_value(const ReferenceElement &r)
Yields a hash value suitable for storing the reference element a in hash table.
Definition referenceelement.hh:281
│ │ │ -
auto subEntities(int i, int c, int cc) const
Obtain the range of numbers of subentities with codim cc of (i,c).
Definition referenceelement.hh:153
│ │ │ - │ │ │ -
Definition affinegeometry.hh:34
│ │ │
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │ -
Collection of types depending on the codimension.
Definition referenceelement.hh:67
│ │ │ -
implementation-defined Geometry
type of geometry embedding a subentity into the reference element
Definition referenceelement.hh:69
│ │ │ +
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:146
│ │ │ +
default traits class for MultiLinearGeometry
Definition multilineargeometry.hh:39
│ │ │ +
Impl::FieldMatrixHelper< ct > MatrixHelper
helper structure containing some matrix routines
Definition multilineargeometry.hh:58
│ │ │ +
static ct tolerance()
tolerance to numerical algorithms
Definition multilineargeometry.hh:61
│ │ │ +
template specifying the storage for the corners
Definition multilineargeometry.hh:129
│ │ │ +
std::vector< FieldVector< ct, cdim > > Type
Definition multilineargeometry.hh:130
│ │ │ +
will there be only one geometry type for a dimension?
Definition multilineargeometry.hh:148
│ │ │ +
static const unsigned int topologyId
Definition multilineargeometry.hh:150
│ │ │ +
static const bool v
Definition multilineargeometry.hh:149
│ │ │ + │ │ │ +
static void global(TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, GlobalCoordinate &y)
Definition multilineargeometry.hh:749
│ │ │ +
static const int mydimension
Definition multilineargeometry.hh:189
│ │ │ +
Dune::GeometryType type() const
Definition multilineargeometry.hh:269
│ │ │ +
Traits::MatrixHelper MatrixHelper
Definition multilineargeometry.hh:225
│ │ │ +
FieldVector< ctype, coorddimension > GlobalCoordinate
Definition multilineargeometry.hh:196
│ │ │ +
static void jacobianTransposed(TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt)
Definition multilineargeometry.hh:896
│ │ │ +
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
obtain the transposed of the Jacobian
Definition multilineargeometry.hh:377
│ │ │ +
ReferenceElement refElement() const
Definition multilineargeometry.hh:425
│ │ │ +
GlobalCoordinate global(const LocalCoordinate &local) const
evaluate the mapping
Definition multilineargeometry.hh:290
│ │ │ +
GlobalCoordinate center() const
obtain the centroid of the mapping's image
Definition multilineargeometry.hh:282
│ │ │ +
GlobalCoordinate corner(int i) const
obtain coordinates of the i-th corner
Definition multilineargeometry.hh:275
│ │ │ +
Dune::ReferenceElements< ctype, mydimension > ReferenceElements
Definition multilineargeometry.hh:214
│ │ │ +
ct ctype
Definition multilineargeometry.hh:186
│ │ │ +
static void jacobianTransposed(TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt)
Definition multilineargeometry.hh:794
│ │ │ +
static const int coorddimension
Definition multilineargeometry.hh:191
│ │ │ +
int corners() const
Definition multilineargeometry.hh:272
│ │ │ +
TopologyId topologyId() const
Definition multilineargeometry.hh:430
│ │ │ +
friend ReferenceElement referenceElement(const MultiLinearGeometry &geometry)
Definition multilineargeometry.hh:395
│ │ │ +
LocalCoordinate local(const GlobalCoordinate &globalCoord) const
Definition multilineargeometry.hh:312
│ │ │ +
static void global(TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, GlobalCoordinate &y)
Definition multilineargeometry.hh:780
│ │ │ +
Volume volume() const
obtain the volume of the mapping's image
Definition multilineargeometry.hh:363
│ │ │ +
FieldVector< ctype, mydimension > LocalCoordinate
Definition multilineargeometry.hh:194
│ │ │ +
MultiLinearGeometry(const ReferenceElement &refElement, const Corners &corners)
constructor
Definition multilineargeometry.hh:239
│ │ │ +
static bool affine(TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, JacobianTransposed &jt)
Definition multilineargeometry.hh:937
│ │ │ +
std::conditional< hasSingleGeometryType, std::integral_constant< unsignedint, Traits::templatehasSingleGeometryType< mydimension >::topologyId >, unsignedint >::type TopologyId
Definition multilineargeometry.hh:226
│ │ │ +
ctype Volume
Definition multilineargeometry.hh:198
│ │ │ +
static bool affine(TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, JacobianTransposed &jt)
Definition multilineargeometry.hh:908
│ │ │ +
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition multilineargeometry.hh:418
│ │ │ +
MultiLinearGeometry(Dune::GeometryType gt, const Corners &corners)
constructor
Definition multilineargeometry.hh:255
│ │ │ +
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
Definition multilineargeometry.hh:201
│ │ │ +
ReferenceElements::ReferenceElement ReferenceElement
Definition multilineargeometry.hh:219
│ │ │ +
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
obtain the transposed of the Jacobian's inverse
Definition multilineargeometry.hh:738
│ │ │ +
FieldMatrix< ctype, coorddimension, mydimension > Jacobian
Definition multilineargeometry.hh:207
│ │ │ +
bool affine() const
is this mapping affine?
Definition multilineargeometry.hh:262
│ │ │ +
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
Definition multilineargeometry.hh:210
│ │ │ +
bool affine(JacobianTransposed &jacobianT) const
Definition multilineargeometry.hh:458
│ │ │ +
Volume integrationElement(const LocalCoordinate &local) const
obtain the integration element
Definition multilineargeometry.hh:350
│ │ │ +
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition multilineargeometry.hh:407
│ │ │ +
Definition multilineargeometry.hh:488
│ │ │ + │ │ │ +
GlobalCoordinate global(const LocalCoordinate &local) const
evaluate the mapping
Definition multilineargeometry.hh:580
│ │ │ +
Base::ReferenceElement ReferenceElement
Definition multilineargeometry.hh:534
│ │ │ +
bool affine() const
Definition multilineargeometry.hh:567
│ │ │ +
CachedMultiLinearGeometry(const ReferenceElement &referenceElement, const CornerStorage &cornerStorage)
Definition multilineargeometry.hh:551
│ │ │ +
ReferenceElement refElement() const
Definition multilineargeometry.hh:425
│ │ │ +
LocalCoordinate local(const GlobalCoordinate &global) const
Definition multilineargeometry.hh:604
│ │ │ +
Base::MatrixHelper MatrixHelper
Definition multilineargeometry.hh:531
│ │ │ +
Base::LocalCoordinate LocalCoordinate
Definition multilineargeometry.hh:541
│ │ │ +
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition multilineargeometry.hh:713
│ │ │ +
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
obtain the transposed of the Jacobian
Definition multilineargeometry.hh:666
│ │ │ +
GlobalCoordinate corner(int i) const
obtain coordinates of the i-th corner
Definition multilineargeometry.hh:275
│ │ │ +
Volume volume() const
obtain the volume of the mapping's image
Definition multilineargeometry.hh:649
│ │ │ +
CachedMultiLinearGeometry(Dune::GeometryType gt, const CornerStorage &cornerStorage)
Definition multilineargeometry.hh:559
│ │ │ +
ctype integrationElement(const LocalCoordinate &local) const
obtain the integration element
Definition multilineargeometry.hh:633
│ │ │ +
Base::ctype ctype
Definition multilineargeometry.hh:536
│ │ │ +
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition multilineargeometry.hh:702
│ │ │ +
Base::JacobianInverseTransposed JacobianInverseTransposed
Definition multilineargeometry.hh:546
│ │ │ +
Base::JacobianTransposed JacobianTransposed
Definition multilineargeometry.hh:545
│ │ │ +
Base::JacobianInverse JacobianInverse
Definition multilineargeometry.hh:548
│ │ │ +
Base::Jacobian Jacobian
Definition multilineargeometry.hh:547
│ │ │ +
Base::Volume Volume
Definition multilineargeometry.hh:543
│ │ │ +
Base::GlobalCoordinate GlobalCoordinate
Definition multilineargeometry.hh:542
│ │ │ +
GlobalCoordinate center() const
obtain the centroid of the mapping's image
Definition multilineargeometry.hh:572
│ │ │ +
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
obtain the transposed of the Jacobian's inverse
Definition multilineargeometry.hh:680
│ │ │
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,301 +1,987 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -referenceelement.hh │ │ │ │ +multilineargeometry.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_REFERENCEELEMENT_HH │ │ │ │ -6#define DUNE_GEOMETRY_REFERENCEELEMENT_HH │ │ │ │ +5#ifndef DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH │ │ │ │ +6#define DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH │ │ │ │ 7 │ │ │ │ -8#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -9 │ │ │ │ -10namespace _D_u_n_e { │ │ │ │ -11 namespace _G_e_o { │ │ │ │ -12 │ │ │ │ -13 namespace Impl { │ │ │ │ -14 │ │ │ │ -15 // forward declaration for friend declaration │ │ │ │ -16 template │ │ │ │ -17 class ReferenceElementContainer; │ │ │ │ -18 │ │ │ │ -19 } │ │ │ │ -20 │ │ │ │ -21 // forward declaration for constructing default reference element type │ │ │ │ -22 template │ │ │ │ -23 class _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n; │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13 │ │ │ │ +14#include │ │ │ │ +15#include │ │ │ │ +16#include │ │ │ │ +17 │ │ │ │ +18#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +19#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +20#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ +21 │ │ │ │ +22namespace _D_u_n_e │ │ │ │ +23{ │ │ │ │ 24 │ │ │ │ -25 // forward declaration for backwards compatibility conversion │ │ │ │ -26 template │ │ │ │ -27 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ -28 │ │ │ │ -29 // ReferenceElement │ │ │ │ -30 // ---------------- │ │ │ │ -31 │ │ │ │ -50 template │ │ │ │ -_5_1 class _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -52 { │ │ │ │ -53 │ │ │ │ -54 public: │ │ │ │ -55 │ │ │ │ -56#ifndef DOXYGEN │ │ │ │ -57 │ │ │ │ -59 template │ │ │ │ -60 using _C_o_d_i_m = typename Implementation::template _C_o_d_i_m_<_c_o_d_i_m_>; │ │ │ │ -61 │ │ │ │ -62#else │ │ │ │ -63 │ │ │ │ -65 template< int codim > │ │ │ │ -_6_6 struct _C_o_d_i_m │ │ │ │ -67 { │ │ │ │ -_6_9 using _G_e_o_m_e_t_r_y = implementation-defined; │ │ │ │ -70 }; │ │ │ │ -71 │ │ │ │ -72#endif // DOXYGEN │ │ │ │ -73 │ │ │ │ -_7_5 using _c_t_y_p_e = typename Implementation::ctype; │ │ │ │ -76 │ │ │ │ -_7_8 using _C_o_o_r_d_i_n_a_t_e_F_i_e_l_d = _c_t_y_p_e; │ │ │ │ -79 │ │ │ │ -_8_1 using _C_o_o_r_d_i_n_a_t_e = typename Implementation::Coordinate; │ │ │ │ -82 │ │ │ │ -_8_4 typedef _c_t_y_p_e _V_o_l_u_m_e; │ │ │ │ -85 │ │ │ │ -_8_7 static constexpr int _d_i_m_e_n_s_i_o_n = Implementation::dimension; │ │ │ │ -88 │ │ │ │ -89 │ │ │ │ -_9_4 int _s_i_z_e(int c) const │ │ │ │ -95 { │ │ │ │ -96 return _impl->size(c); │ │ │ │ -97 } │ │ │ │ -98 │ │ │ │ -99 │ │ │ │ -_1_1_1 int _s_i_z_e(int i, int c, int cc) const │ │ │ │ -112 { │ │ │ │ -113 return _impl->size(i,c,cc); │ │ │ │ -114 } │ │ │ │ -115 │ │ │ │ -116 │ │ │ │ -_1_3_0 int _s_u_b_E_n_t_i_t_y(int i, int c, int ii, int cc) const │ │ │ │ -131 { │ │ │ │ -132 return _impl->subEntity(i,c,ii,cc); │ │ │ │ -133 } │ │ │ │ -134 │ │ │ │ -_1_5_3 auto _s_u_b_E_n_t_i_t_i_e_s ( int i, int c, int cc ) const │ │ │ │ -154 { │ │ │ │ -155 return _impl->subEntities(i,c,cc); │ │ │ │ -156 } │ │ │ │ -157 │ │ │ │ +25 // MultiLinearGeometryTraits │ │ │ │ +26 // ------------------------- │ │ │ │ +27 │ │ │ │ +37 template< class ct > │ │ │ │ +_3_8 struct _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s │ │ │ │ +39 { │ │ │ │ +_5_8 typedef Impl::FieldMatrixHelper< ct > _M_a_t_r_i_x_H_e_l_p_e_r; │ │ │ │ +59 │ │ │ │ +_6_1 static ct _t_o_l_e_r_a_n_c_e () { return ct( 16 ) * std::numeric_limits< ct >:: │ │ │ │ +epsilon(); } │ │ │ │ +62 │ │ │ │ +127 template< int mydim, int cdim > │ │ │ │ +_1_2_8 struct _C_o_r_n_e_r_S_t_o_r_a_g_e │ │ │ │ +129 { │ │ │ │ +_1_3_0 typedef std::vector< FieldVector< ct, cdim > > _T_y_p_e; │ │ │ │ +131 }; │ │ │ │ +132 │ │ │ │ +146 template< int dim > │ │ │ │ +_1_4_7 struct _h_a_s_S_i_n_g_l_e_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +148 { │ │ │ │ +_1_4_9 static const bool _v = false; │ │ │ │ +_1_5_0 static const unsigned int _t_o_p_o_l_o_g_y_I_d = ~0u; │ │ │ │ +151 }; │ │ │ │ +152 }; │ │ │ │ +153 │ │ │ │ +154 │ │ │ │ +155 │ │ │ │ +156 // MultiLinearGeometry │ │ │ │ +157 // ------------------- │ │ │ │ 158 │ │ │ │ -_1_6_7 _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e(int i, int c) const │ │ │ │ -168 { │ │ │ │ -169 return _impl->type(i,c); │ │ │ │ -170 } │ │ │ │ -171 │ │ │ │ -172 │ │ │ │ -_1_7_5 _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e() const │ │ │ │ -176 { │ │ │ │ -177 return _impl->type(); │ │ │ │ -178 } │ │ │ │ -179 │ │ │ │ -180 │ │ │ │ -_1_9_0 _C_o_o_r_d_i_n_a_t_e _p_o_s_i_t_i_o_n(int i, int c) const │ │ │ │ -191 { │ │ │ │ -192 return _impl->position(i,c); │ │ │ │ -193 } │ │ │ │ -194 │ │ │ │ -195 │ │ │ │ -_2_0_3 bool _c_h_e_c_k_I_n_s_i_d_e(const _C_o_o_r_d_i_n_a_t_e& local) const │ │ │ │ -204 { │ │ │ │ -205 return _impl->checkInside(local); │ │ │ │ -206 } │ │ │ │ -207 │ │ │ │ +179 template< class ct, int mydim, int cdim, class Traits = │ │ │ │ +MultiLinearGeometryTraits< ct > > │ │ │ │ +_1_8_0 class _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ +181 { │ │ │ │ +182 typedef _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> This; │ │ │ │ +183 │ │ │ │ +184 public: │ │ │ │ +_1_8_6 typedef ct _c_t_y_p_e; │ │ │ │ +187 │ │ │ │ +_1_8_9 static const int _m_y_d_i_m_e_n_s_i_o_n= mydim; │ │ │ │ +_1_9_1 static const int _c_o_o_r_d_d_i_m_e_n_s_i_o_n = cdim; │ │ │ │ +192 │ │ │ │ +_1_9_4 typedef FieldVector< ctype, mydimension > _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ +_1_9_6 typedef FieldVector< ctype, coorddimension > _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ +_1_9_8 typedef _c_t_y_p_e _V_o_l_u_m_e; │ │ │ │ +199 │ │ │ │ +_2_0_1 typedef FieldMatrix< ctype, mydimension, coorddimension > │ │ │ │ +_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ +202 │ │ │ │ +204 class JacobianInverseTransposed; │ │ │ │ +205 │ │ │ │ +_2_0_7 typedef FieldMatrix< ctype, coorddimension, mydimension > _J_a_c_o_b_i_a_n; │ │ │ │ 208 │ │ │ │ -220 template │ │ │ │ -_2_2_1 typename _C_o_d_i_m_<_c_o_d_i_m_>_:_:_G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y(int i) const │ │ │ │ -222 { │ │ │ │ -223 return _impl->template _g_e_o_m_e_t_r_y_<_c_o_d_i_m_>(i); │ │ │ │ -224 } │ │ │ │ -225 │ │ │ │ -226 │ │ │ │ -_2_2_8 _C_o_o_r_d_i_n_a_t_e_F_i_e_l_d _v_o_l_u_m_e() const │ │ │ │ -229 { │ │ │ │ -230 return _impl->volume(); │ │ │ │ -231 } │ │ │ │ -232 │ │ │ │ -233 │ │ │ │ -_2_4_1 _C_o_o_r_d_i_n_a_t_e _i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l(int face) const │ │ │ │ -242 { │ │ │ │ -243 return _impl->integrationOuterNormal(face); │ │ │ │ -244 } │ │ │ │ -245 │ │ │ │ -246 │ │ │ │ -_2_5_4 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t() │ │ │ │ -255 : _impl(nullptr) │ │ │ │ -256 {} │ │ │ │ -257 │ │ │ │ -_2_6_3 const Implementation& _i_m_p_l() const │ │ │ │ -264 { │ │ │ │ -265 return *_impl; │ │ │ │ +_2_1_0 typedef FieldMatrix< ctype, mydimension, coorddimension > _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e; │ │ │ │ +211 │ │ │ │ +212 protected: │ │ │ │ +213 │ │ │ │ +_2_1_4 typedef _D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _> _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ +215 │ │ │ │ +216 public: │ │ │ │ +217 │ │ │ │ +_2_1_9 typedef typename _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ +220 │ │ │ │ +221 private: │ │ │ │ +222 static const bool hasSingleGeometryType = Traits::template │ │ │ │ +hasSingleGeometryType< mydimension >::v; │ │ │ │ +223 │ │ │ │ +224 protected: │ │ │ │ +_2_2_5 typedef typename Traits::MatrixHelper _M_a_t_r_i_x_H_e_l_p_e_r; │ │ │ │ +_2_2_6 typedef typename std::conditional< hasSingleGeometryType, std:: │ │ │ │ +integral_constant< unsigned int, Traits::template hasSingleGeometryType< │ │ │ │ +mydimension >::topologyId >, unsigned int >_:_:_t_y_p_e _T_o_p_o_l_o_g_y_I_d; │ │ │ │ +227 │ │ │ │ +228 public: │ │ │ │ +238 template< class Corners > │ │ │ │ +_2_3_9 _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y ( const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t &_r_e_f_E_l_e_m_e_n_t, │ │ │ │ +240 const Corners &_c_o_r_n_e_r_s ) │ │ │ │ +241 : refElement_( _r_e_f_E_l_e_m_e_n_t ), │ │ │ │ +242 corners_( _c_o_r_n_e_r_s ) │ │ │ │ +243 {} │ │ │ │ +244 │ │ │ │ +254 template< class Corners > │ │ │ │ +_2_5_5 _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y ( _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e gt, │ │ │ │ +256 const Corners &_c_o_r_n_e_r_s ) │ │ │ │ +257 : refElement_( _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s::general( gt ) ), │ │ │ │ +258 corners_( _c_o_r_n_e_r_s ) │ │ │ │ +259 {} │ │ │ │ +260 │ │ │ │ +_2_6_2 bool _a_f_f_i_n_e () const │ │ │ │ +263 { │ │ │ │ +264 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d jt; │ │ │ │ +265 return _a_f_f_i_n_e( jt ); │ │ │ │ 266 } │ │ │ │ 267 │ │ │ │ -_2_6_9 bool _o_p_e_r_a_t_o_r_=_=(const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& r) const │ │ │ │ -270 { │ │ │ │ -271 return _impl == r._impl; │ │ │ │ -272 } │ │ │ │ +_2_6_9 _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e () const { return _G_e_o_m_e_t_r_y_T_y_p_e( toUnsignedInt │ │ │ │ +(_t_o_p_o_l_o_g_y_I_d()), _m_y_d_i_m_e_n_s_i_o_n ); } │ │ │ │ +270 │ │ │ │ +_2_7_2 int _c_o_r_n_e_r_s () const { return _r_e_f_E_l_e_m_e_n_t().size( _m_y_d_i_m_e_n_s_i_o_n ); } │ │ │ │ 273 │ │ │ │ -_2_7_5 bool _o_p_e_r_a_t_o_r_!_=(const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& r) const │ │ │ │ +_2_7_5 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_o_r_n_e_r ( int i ) const │ │ │ │ 276 { │ │ │ │ -277 return not (*this == r); │ │ │ │ -278 } │ │ │ │ -279 │ │ │ │ -_2_8_1 friend std::size_t _h_a_s_h___v_a_l_u_e(const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& r) │ │ │ │ -282 { │ │ │ │ -283 return reinterpret_cast(r._impl); │ │ │ │ -284 } │ │ │ │ -285 │ │ │ │ -286 private: │ │ │ │ -287 │ │ │ │ -288 // The implementation must be a friend to construct a wrapper around │ │ │ │ -itself. │ │ │ │ -289 friend Implementation; │ │ │ │ -290 │ │ │ │ -291 // The reference container is a friend to be able to call │ │ │ │ -setImplementation. │ │ │ │ -292 friend class Impl::ReferenceElementContainer<_c_t_y_p_e,_d_i_m_e_n_s_i_o_n>; │ │ │ │ +277 assert( (i >= 0) && (i < _c_o_r_n_e_r_s()) ); │ │ │ │ +278 return std::cref(corners_).get()[ i ]; │ │ │ │ +279 } │ │ │ │ +280 │ │ │ │ +_2_8_2 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r () const { return _g_l_o_b_a_l( _r_e_f_E_l_e_m_e_n_t().position( 0, │ │ │ │ +0 ) ); } │ │ │ │ +283 │ │ │ │ +_2_9_0 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) const │ │ │ │ +291 { │ │ │ │ +292 using std::begin; │ │ │ │ 293 │ │ │ │ -294 // Constructor for wrapping an implementation reference (required │ │ │ │ -internally by the default implementation) │ │ │ │ -295 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(const Implementation& _i_m_p_l) │ │ │ │ -296 : _impl(&_i_m_p_l) │ │ │ │ -297 {} │ │ │ │ -298 │ │ │ │ -299 void setImplementation(const Implementation& _i_m_p_l) │ │ │ │ -300 { │ │ │ │ -301 _impl = &_i_m_p_l; │ │ │ │ -302 } │ │ │ │ -303 │ │ │ │ -304 const Implementation* _impl; │ │ │ │ -305 │ │ │ │ -306 }; │ │ │ │ -307 │ │ │ │ -308 } │ │ │ │ -309 │ │ │ │ -310} │ │ │ │ -311 │ │ │ │ -312 │ │ │ │ -313#endif // DUNE_GEOMETRY_REFERENCEELEMENT_HH │ │ │ │ +294 auto cit = begin(std::cref(corners_).get()); │ │ │ │ +295 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e y; │ │ │ │ +296 _g_l_o_b_a_l_<_ _f_a_l_s_e_ _>( _t_o_p_o_l_o_g_y_I_d(), std::integral_constant< int, mydimension > │ │ │ │ +(), cit, _c_t_y_p_e( 1 ), _l_o_c_a_l, _c_t_y_p_e( 1 ), y ); │ │ │ │ +297 return y; │ │ │ │ +298 } │ │ │ │ +299 │ │ │ │ +_3_1_2 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l ( const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &globalCoord ) const │ │ │ │ +313 { │ │ │ │ +314 const _c_t_y_p_e tolerance = Traits::tolerance(); │ │ │ │ +315 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e x = _r_e_f_E_l_e_m_e_n_t().position( 0, 0 ); │ │ │ │ +316 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e dx; │ │ │ │ +317 const bool affineMapping = this->_a_f_f_i_n_e(); │ │ │ │ +318 do │ │ │ │ +319 { │ │ │ │ +320 // Newton's method: DF^n dx^n = F^n, x^{n+1} -= dx^n │ │ │ │ +321 const GlobalCoordinate dglobal = (*this).global( x ) - globalCoord; │ │ │ │ +322 const bool invertible = │ │ │ │ +323 MatrixHelper::xTRightInvA( _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( x ), dglobal, dx ); │ │ │ │ +324 if( ! invertible ) │ │ │ │ +325 return _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e( std::numeric_limits< ctype > :: max() ); │ │ │ │ +326 │ │ │ │ +327 // update x with correction │ │ │ │ +328 x -= dx; │ │ │ │ +329 │ │ │ │ +330 // for affine mappings only one iteration is needed │ │ │ │ +331 if ( affineMapping ) break; │ │ │ │ +332 } while( dx.two_norm2() > tolerance ); │ │ │ │ +333 return x; │ │ │ │ +334 } │ │ │ │ +335 │ │ │ │ +_3_5_0 _V_o_l_u_m_e _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) const │ │ │ │ +351 { │ │ │ │ +352 return MatrixHelper::sqrtDetAAT( _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( _l_o_c_a_l ) ); │ │ │ │ +353 } │ │ │ │ +354 │ │ │ │ +_3_6_3 _V_o_l_u_m_e _v_o_l_u_m_e () const │ │ │ │ +364 { │ │ │ │ +365 return _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t( _r_e_f_E_l_e_m_e_n_t().position( 0, 0 ) ) * _r_e_f_E_l_e_m_e_n_t │ │ │ │ +().volume(); │ │ │ │ +366 } │ │ │ │ +367 │ │ │ │ +_3_7_7 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) │ │ │ │ +const │ │ │ │ +378 { │ │ │ │ +379 using std::begin; │ │ │ │ +380 │ │ │ │ +381 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d jt; │ │ │ │ +382 auto cit = begin(std::cref(corners_).get()); │ │ │ │ +383 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d_<_ _f_a_l_s_e_ _>( _t_o_p_o_l_o_g_y_I_d(), std::integral_constant< int, │ │ │ │ +mydimension >(), cit, _c_t_y_p_e( 1 ), _l_o_c_a_l, _c_t_y_p_e( 1 ), jt ); │ │ │ │ +384 return jt; │ │ │ │ +385 } │ │ │ │ +386 │ │ │ │ +_3_9_3 JacobianInverseTransposed _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +&_l_o_c_a_l ) const; │ │ │ │ +394 │ │ │ │ +_3_9_5 friend _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t ( const _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ +&geometry ) │ │ │ │ +396 { │ │ │ │ +397 return geometry._r_e_f_E_l_e_m_e_n_t(); │ │ │ │ +398 } │ │ │ │ +399 │ │ │ │ +400 │ │ │ │ +_4_0_7 _J_a_c_o_b_i_a_n _j_a_c_o_b_i_a_n (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ +408 { │ │ │ │ +409 return _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l).transposed(); │ │ │ │ +410 } │ │ │ │ +411 │ │ │ │ +_4_1_8 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ +419 { │ │ │ │ +420 return _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l).transposed(); │ │ │ │ +421 } │ │ │ │ +422 │ │ │ │ +423 protected: │ │ │ │ +424 │ │ │ │ +_4_2_5 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t _r_e_f_E_l_e_m_e_n_t () const │ │ │ │ +426 { │ │ │ │ +427 return refElement_; │ │ │ │ +428 } │ │ │ │ +429 │ │ │ │ +_4_3_0 _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d () const │ │ │ │ +431 { │ │ │ │ +432 return _t_o_p_o_l_o_g_y_I_d( std::integral_constant< bool, hasSingleGeometryType >() │ │ │ │ +); │ │ │ │ +433 } │ │ │ │ +434 │ │ │ │ +435 template< bool add, int dim, class CornerIterator > │ │ │ │ +_4_3_6 static void _g_l_o_b_a_l ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, │ │ │ │ +dim >, │ │ │ │ +437 CornerIterator &cit, const _c_t_y_p_e &df, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &x, │ │ │ │ +438 const _c_t_y_p_e &rf, _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &y ); │ │ │ │ +439 template< bool add, class CornerIterator > │ │ │ │ +_4_4_0 static void _g_l_o_b_a_l ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, 0 │ │ │ │ +>, │ │ │ │ +441 CornerIterator &cit, const _c_t_y_p_e &df, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &x, │ │ │ │ +442 const _c_t_y_p_e &rf, _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &y ); │ │ │ │ +443 │ │ │ │ +444 template< bool add, int rows, int dim, class CornerIterator > │ │ │ │ +_4_4_5 static void _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std:: │ │ │ │ +integral_constant< int, dim >, │ │ │ │ +446 CornerIterator &cit, const _c_t_y_p_e &df, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &x, │ │ │ │ +447 const _c_t_y_p_e &rf, FieldMatrix< ctype, rows, cdim > &jt ); │ │ │ │ +448 template< bool add, int rows, class CornerIterator > │ │ │ │ +_4_4_9 static void _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std:: │ │ │ │ +integral_constant< int, 0 >, │ │ │ │ +450 CornerIterator &cit, const _c_t_y_p_e &df, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &x, │ │ │ │ +451 const _c_t_y_p_e &rf, FieldMatrix< ctype, rows, cdim > &jt ); │ │ │ │ +452 │ │ │ │ +453 template< int dim, class CornerIterator > │ │ │ │ +_4_5_4 static bool _a_f_f_i_n_e ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, │ │ │ │ +dim >, CornerIterator &cit, _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ); │ │ │ │ +455 template< class CornerIterator > │ │ │ │ +_4_5_6 static bool _a_f_f_i_n_e ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, 0 │ │ │ │ +>, CornerIterator &cit, _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ); │ │ │ │ +457 │ │ │ │ +_4_5_8 bool _a_f_f_i_n_e ( _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jacobianT ) const │ │ │ │ +459 { │ │ │ │ +460 using std::begin; │ │ │ │ +461 │ │ │ │ +462 auto cit = begin(std::cref(corners_).get()); │ │ │ │ +463 return _a_f_f_i_n_e( _t_o_p_o_l_o_g_y_I_d(), std::integral_constant< int, mydimension >(), │ │ │ │ +cit, jacobianT ); │ │ │ │ +464 } │ │ │ │ +465 │ │ │ │ +466 private: │ │ │ │ +467 // The following methods are needed to convert the return type of │ │ │ │ +topologyId to │ │ │ │ +468 // unsigned int with g++-4.4. It has problems casting integral_constant to │ │ │ │ +the │ │ │ │ +469 // integral type. │ │ │ │ +470 static unsigned int toUnsignedInt(unsigned int i) { return i; } │ │ │ │ +471 template │ │ │ │ +472 static unsigned int toUnsignedInt(std::integral_constant ) │ │ │ │ +{ return v; } │ │ │ │ +473 _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d ( std::integral_constant< bool, true > ) const │ │ │ │ +{ return _T_o_p_o_l_o_g_y_I_d(); } │ │ │ │ +474 unsigned int _t_o_p_o_l_o_g_y_I_d ( std::integral_constant< bool, false > ) const │ │ │ │ +{ return _r_e_f_E_l_e_m_e_n_t().type().id(); } │ │ │ │ +475 │ │ │ │ +476 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t refElement_; │ │ │ │ +477 typename Traits::template CornerStorage< mydimension, coorddimension >:: │ │ │ │ +Type corners_; │ │ │ │ +478 }; │ │ │ │ +479 │ │ │ │ +480 │ │ │ │ +481 │ │ │ │ +482 // MultiLinearGeometry::JacobianInverseTransposed │ │ │ │ +483 // ---------------------------------------------- │ │ │ │ +484 │ │ │ │ +485 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ +_4_8_6 class _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y< ct, mydim, cdim, Traits >:: │ │ │ │ +_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +487 : public FieldMatrix< ctype, coorddimension, mydimension > │ │ │ │ +488 { │ │ │ │ +489 typedef FieldMatrix< ctype, coorddimension, mydimension > Base; │ │ │ │ +490 │ │ │ │ +491 public: │ │ │ │ +492 void setup ( const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ +493 { │ │ │ │ +494 detInv_ = MatrixHelper::rightInvA( jt, static_cast< Base & >( *this ) ); │ │ │ │ +495 } │ │ │ │ +496 │ │ │ │ +497 void setupDeterminant ( const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ +498 { │ │ │ │ +499 detInv_ = MatrixHelper::sqrtDetAAT( jt ); │ │ │ │ +500 } │ │ │ │ +501 │ │ │ │ +502 _c_t_y_p_e det () const { return _c_t_y_p_e( 1 ) / detInv_; } │ │ │ │ +503 _c_t_y_p_e detInv () const { return detInv_; } │ │ │ │ +504 │ │ │ │ +505 private: │ │ │ │ +506 _c_t_y_p_e detInv_; │ │ │ │ +507 }; │ │ │ │ +508 │ │ │ │ +509 │ │ │ │ +510 │ │ │ │ +523 template< class ct, int mydim, int cdim, class Traits = │ │ │ │ +MultiLinearGeometryTraits< ct > > │ │ │ │ +_5_2_4 class _C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ +525 : public _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y< ct, mydim, cdim, Traits > │ │ │ │ +526 { │ │ │ │ +527 typedef _C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> This; │ │ │ │ +528 typedef _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> Base; │ │ │ │ +529 │ │ │ │ +530 protected: │ │ │ │ +_5_3_1 typedef typename _B_a_s_e_:_:_M_a_t_r_i_x_H_e_l_p_e_r _M_a_t_r_i_x_H_e_l_p_e_r; │ │ │ │ +532 │ │ │ │ +533 public: │ │ │ │ +_5_3_4 typedef typename _B_a_s_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ +535 │ │ │ │ +_5_3_6 typedef typename _B_a_s_e_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ +537 │ │ │ │ +538 using _B_a_s_e_:_:_m_y_d_i_m_e_n_s_i_o_n; │ │ │ │ +539 using _B_a_s_e_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n; │ │ │ │ +540 │ │ │ │ +_5_4_1 typedef typename _B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ +_5_4_2 typedef typename _B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ +_5_4_3 typedef typename _B_a_s_e_:_:_V_o_l_u_m_e _V_o_l_u_m_e; │ │ │ │ +544 │ │ │ │ +_5_4_5 typedef typename _B_a_s_e_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ +_5_4_6 typedef typename Base::JacobianInverseTransposed _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d; │ │ │ │ +_5_4_7 typedef typename _B_a_s_e_:_:_J_a_c_o_b_i_a_n _J_a_c_o_b_i_a_n; │ │ │ │ +_5_4_8 typedef typename _B_a_s_e_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e; │ │ │ │ +549 │ │ │ │ +550 template< class CornerStorage > │ │ │ │ +_5_5_1 _C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y ( const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t &_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t, const │ │ │ │ +CornerStorage &cornerStorage ) │ │ │ │ +552 : Base( _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t, cornerStorage ), │ │ │ │ +553 affine_( Base::_a_f_f_i_n_e( jacobianTransposed_ ) ), │ │ │ │ +554 jacobianInverseTransposedComputed_( false ), │ │ │ │ +555 integrationElementComputed_( false ) │ │ │ │ +556 {} │ │ │ │ +557 │ │ │ │ +558 template< class CornerStorage > │ │ │ │ +_5_5_9 _C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y ( _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e gt, const CornerStorage │ │ │ │ +&cornerStorage ) │ │ │ │ +560 : Base( gt, cornerStorage ), │ │ │ │ +561 affine_( Base::_a_f_f_i_n_e( jacobianTransposed_ ) ), │ │ │ │ +562 jacobianInverseTransposedComputed_( false ), │ │ │ │ +563 integrationElementComputed_( false ) │ │ │ │ +564 {} │ │ │ │ +565 │ │ │ │ +_5_6_7 bool _a_f_f_i_n_e () const { return affine_; } │ │ │ │ +568 │ │ │ │ +569 using _B_a_s_e_:_:_c_o_r_n_e_r; │ │ │ │ +570 │ │ │ │ +_5_7_2 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r () const { return _g_l_o_b_a_l( _r_e_f_E_l_e_m_e_n_t().position( 0, │ │ │ │ +0 ) ); } │ │ │ │ +573 │ │ │ │ +_5_8_0 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) const │ │ │ │ +581 { │ │ │ │ +582 if( _a_f_f_i_n_e() ) │ │ │ │ +583 { │ │ │ │ +584 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l( _c_o_r_n_e_r( 0 ) ); │ │ │ │ +585 jacobianTransposed_.umtv( _l_o_c_a_l, _g_l_o_b_a_l ); │ │ │ │ +586 return _g_l_o_b_a_l; │ │ │ │ +587 } │ │ │ │ +588 else │ │ │ │ +589 return _B_a_s_e_:_:_g_l_o_b_a_l( _l_o_c_a_l ); │ │ │ │ +590 } │ │ │ │ +591 │ │ │ │ +_6_0_4 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l ( const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &_g_l_o_b_a_l ) const │ │ │ │ +605 { │ │ │ │ +606 if( _a_f_f_i_n_e() ) │ │ │ │ +607 { │ │ │ │ +608 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l; │ │ │ │ +609 if( jacobianInverseTransposedComputed_ ) │ │ │ │ +610 jacobianInverseTransposed_.mtv( _g_l_o_b_a_l - _c_o_r_n_e_r( 0 ), _l_o_c_a_l ); │ │ │ │ +611 else │ │ │ │ +612 MatrixHelper::xTRightInvA( jacobianTransposed_, _g_l_o_b_a_l - _c_o_r_n_e_r( 0 ), _l_o_c_a_l │ │ │ │ +); │ │ │ │ +613 return _l_o_c_a_l; │ │ │ │ +614 } │ │ │ │ +615 else │ │ │ │ +616 return _B_a_s_e_:_:_l_o_c_a_l( _g_l_o_b_a_l ); │ │ │ │ +617 } │ │ │ │ +618 │ │ │ │ +_6_3_3 _c_t_y_p_e _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) const │ │ │ │ +634 { │ │ │ │ +635 if( _a_f_f_i_n_e() ) │ │ │ │ +636 { │ │ │ │ +637 if( !integrationElementComputed_ ) │ │ │ │ +638 { │ │ │ │ +639 jacobianInverseTransposed_.setupDeterminant( jacobianTransposed_ ); │ │ │ │ +640 integrationElementComputed_ = true; │ │ │ │ +641 } │ │ │ │ +642 return jacobianInverseTransposed_.detInv(); │ │ │ │ +643 } │ │ │ │ +644 else │ │ │ │ +645 return _B_a_s_e_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t( _l_o_c_a_l ); │ │ │ │ +646 } │ │ │ │ +647 │ │ │ │ +_6_4_9 _V_o_l_u_m_e _v_o_l_u_m_e () const │ │ │ │ +650 { │ │ │ │ +651 if( _a_f_f_i_n_e() ) │ │ │ │ +652 return _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t( _r_e_f_E_l_e_m_e_n_t().position( 0, 0 ) ) * _r_e_f_E_l_e_m_e_n_t │ │ │ │ +().volume(); │ │ │ │ +653 else │ │ │ │ +654 return _B_a_s_e_:_:_v_o_l_u_m_e(); │ │ │ │ +655 } │ │ │ │ +656 │ │ │ │ +_6_6_6 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) │ │ │ │ +const │ │ │ │ +667 { │ │ │ │ +668 if( _a_f_f_i_n_e() ) │ │ │ │ +669 return jacobianTransposed_; │ │ │ │ +670 else │ │ │ │ +671 return _B_a_s_e_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( _l_o_c_a_l ); │ │ │ │ +672 } │ │ │ │ +673 │ │ │ │ +_6_8_0 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +&_l_o_c_a_l ) const │ │ │ │ +681 { │ │ │ │ +682 if( _a_f_f_i_n_e() ) │ │ │ │ +683 { │ │ │ │ +684 if( !jacobianInverseTransposedComputed_ ) │ │ │ │ +685 { │ │ │ │ +686 jacobianInverseTransposed_.setup( jacobianTransposed_ ); │ │ │ │ +687 jacobianInverseTransposedComputed_ = true; │ │ │ │ +688 integrationElementComputed_ = true; │ │ │ │ +689 } │ │ │ │ +690 return jacobianInverseTransposed_; │ │ │ │ +691 } │ │ │ │ +692 else │ │ │ │ +693 return _B_a_s_e_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d( _l_o_c_a_l ); │ │ │ │ +694 } │ │ │ │ +695 │ │ │ │ +_7_0_2 _J_a_c_o_b_i_a_n _j_a_c_o_b_i_a_n (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ +703 { │ │ │ │ +704 return _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l).transposed(); │ │ │ │ +705 } │ │ │ │ +706 │ │ │ │ +_7_1_3 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ +714 { │ │ │ │ +715 return _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l).transposed(); │ │ │ │ +716 } │ │ │ │ +717 │ │ │ │ +718 protected: │ │ │ │ +719 using _B_a_s_e_:_:_r_e_f_E_l_e_m_e_n_t; │ │ │ │ +720 │ │ │ │ +721 private: │ │ │ │ +722 mutable _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d jacobianTransposed_; │ │ │ │ +723 mutable _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d jacobianInverseTransposed_; │ │ │ │ +724 │ │ │ │ +725 mutable bool affine_ : 1; │ │ │ │ +726 │ │ │ │ +727 mutable bool jacobianInverseTransposedComputed_ : 1; │ │ │ │ +728 mutable bool integrationElementComputed_ : 1; │ │ │ │ +729 }; │ │ │ │ +730 │ │ │ │ +731 │ │ │ │ +732 │ │ │ │ +733 // Implementation of MultiLinearGeometry │ │ │ │ +734 // ------------------------------------- │ │ │ │ +735 │ │ │ │ +736 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ +737 inline typename MultiLinearGeometry< ct, mydim, cdim, Traits >:: │ │ │ │ +JacobianInverseTransposed │ │ │ │ +_7_3_8 _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) const │ │ │ │ +739 { │ │ │ │ +740 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d jit; │ │ │ │ +741 jit.setup( _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( _l_o_c_a_l ) ); │ │ │ │ +742 return jit; │ │ │ │ +743 } │ │ │ │ +744 │ │ │ │ +745 │ │ │ │ +746 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ +747 template< bool add, int dim, class CornerIterator > │ │ │ │ +748 inline void _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ +_7_4_9_ _:_:_g_l_o_b_a_l ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim >, │ │ │ │ +750 CornerIterator &cit, const _c_t_y_p_e &df, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &x, │ │ │ │ +751 const _c_t_y_p_e &rf, _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &y ) │ │ │ │ +752 { │ │ │ │ +753 const _c_t_y_p_e xn = df*x[ dim-1 ]; │ │ │ │ +754 const _c_t_y_p_e cxn = _c_t_y_p_e( 1 ) - xn; │ │ │ │ +755 │ │ │ │ +756 if( Impl::isPrism( toUnsignedInt(_t_o_p_o_l_o_g_y_I_d), _m_y_d_i_m_e_n_s_i_o_n, _m_y_d_i_m_e_n_s_i_o_n-dim │ │ │ │ +) ) │ │ │ │ +757 { │ │ │ │ +758 // apply (1-xn) times mapping for bottom │ │ │ │ +759 _g_l_o_b_a_l_<_ _a_d_d_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, df, │ │ │ │ +x, rf*cxn, y ); │ │ │ │ +760 // apply xn times mapping for top │ │ │ │ +761 _g_l_o_b_a_l_<_ _t_r_u_e_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, │ │ │ │ +df, x, rf*xn, y ); │ │ │ │ +762 } │ │ │ │ +763 else │ │ │ │ +764 { │ │ │ │ +765 assert( Impl::isPyramid( toUnsignedInt(_t_o_p_o_l_o_g_y_I_d), _m_y_d_i_m_e_n_s_i_o_n, │ │ │ │ +_m_y_d_i_m_e_n_s_i_o_n-dim ) ); │ │ │ │ +766 // apply (1-xn) times mapping for bottom (with argument x/(1-xn)) │ │ │ │ +767 if( cxn > Traits::tolerance() || cxn < -Traits::tolerance() ) │ │ │ │ +768 _g_l_o_b_a_l_<_ _a_d_d_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, df/ │ │ │ │ +cxn, x, rf*cxn, y ); │ │ │ │ +769 else │ │ │ │ +770 _g_l_o_b_a_l_<_ _a_d_d_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, df, │ │ │ │ +x, _c_t_y_p_e( 0 ), y ); │ │ │ │ +771 // apply xn times the tip │ │ │ │ +772 y.axpy( rf*xn, *cit ); │ │ │ │ +773 ++cit; │ │ │ │ +774 } │ │ │ │ +775 } │ │ │ │ +776 │ │ │ │ +777 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ +778 template< bool add, class CornerIterator > │ │ │ │ +779 inline void _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ +_7_8_0_ _:_:_g_l_o_b_a_l ( _T_o_p_o_l_o_g_y_I_d, std::integral_constant< int, 0 >, │ │ │ │ +781 CornerIterator &cit, const _c_t_y_p_e &, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &, │ │ │ │ +782 const _c_t_y_p_e &rf, _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &y ) │ │ │ │ +783 { │ │ │ │ +784 const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &origin = *cit; │ │ │ │ +785 ++cit; │ │ │ │ +786 for( int i = 0; i < _c_o_o_r_d_d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ +787 y[ i ] = (add ? y[ i ] + rf*origin[ i ] : rf*origin[ i ]); │ │ │ │ +788 } │ │ │ │ +789 │ │ │ │ +790 │ │ │ │ +791 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ +792 template< bool add, int rows, int dim, class CornerIterator > │ │ │ │ +793 inline void _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ +_7_9_4_ _:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, │ │ │ │ +dim >, │ │ │ │ +795 CornerIterator &cit, const _c_t_y_p_e &df, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &x, │ │ │ │ +796 const _c_t_y_p_e &rf, FieldMatrix< ctype, rows, cdim > &jt ) │ │ │ │ +797 { │ │ │ │ +798 assert( rows >= dim ); │ │ │ │ +799 │ │ │ │ +800 const _c_t_y_p_e xn = df*x[ dim-1 ]; │ │ │ │ +801 const _c_t_y_p_e cxn = _c_t_y_p_e( 1 ) - xn; │ │ │ │ +802 │ │ │ │ +803 auto cit2( cit ); │ │ │ │ +804 if( Impl::isPrism( toUnsignedInt(_t_o_p_o_l_o_g_y_I_d), _m_y_d_i_m_e_n_s_i_o_n, _m_y_d_i_m_e_n_s_i_o_n-dim │ │ │ │ +) ) │ │ │ │ +805 { │ │ │ │ +806 // apply (1-xn) times Jacobian for bottom │ │ │ │ +807 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d_<_ _a_d_d_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 > │ │ │ │ +(), cit2, df, x, rf*cxn, jt ); │ │ │ │ +808 // apply xn times Jacobian for top │ │ │ │ +809 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d_<_ _t_r_u_e_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim- │ │ │ │ +1 >(), cit2, df, x, rf*xn, jt ); │ │ │ │ +810 // compute last row as difference between top value and bottom value │ │ │ │ +811 _g_l_o_b_a_l_<_ _a_d_d_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, df, │ │ │ │ +x, -rf, jt[ dim-1 ] ); │ │ │ │ +812 _g_l_o_b_a_l_<_ _t_r_u_e_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, │ │ │ │ +df, x, rf, jt[ dim-1 ] ); │ │ │ │ +813 } │ │ │ │ +814 else │ │ │ │ +815 { │ │ │ │ +816 assert( Impl::isPyramid( toUnsignedInt(_t_o_p_o_l_o_g_y_I_d), _m_y_d_i_m_e_n_s_i_o_n, │ │ │ │ +_m_y_d_i_m_e_n_s_i_o_n-dim ) ); │ │ │ │ +817 /* │ │ │ │ +818 * In the pyramid case, we need a transformation Tb: B -> R^n for the │ │ │ │ +819 * base B \subset R^{n-1}. The pyramid transformation is then defined as │ │ │ │ +820 * T: P \subset R^n -> R^n │ │ │ │ +821 * (x, xn) |-> (1-xn) Tb(x*) + xn t (x \in R^{n-1}, xn \in R) │ │ │ │ +822 * with the tip of the pyramid mapped to t and x* = x/(1-xn) │ │ │ │ +823 * the projection of (x,xn) onto the base. │ │ │ │ +824 * │ │ │ │ +825 * For the Jacobi matrix DT we get │ │ │ │ +826 * DT = ( A | b ) │ │ │ │ +827 * with A = DTb(x*) (n x n-1 matrix) │ │ │ │ +828 * and b = dT/dxn (n-dim column vector). │ │ │ │ +829 * Furthermore │ │ │ │ +830 * b = -Tb(x*) + t + \sum_i dTb/dx_i(x^*) x_i/(1-xn) │ │ │ │ +831 * │ │ │ │ +832 * Note that both A and b are not defined in the pyramid tip (x=0, xn=1)! │ │ │ │ +833 * Indeed for B the unit square, Tb mapping B to the quadrilateral given │ │ │ │ +834 * by the vertices (0,0,0), (2,0,0), (0,1,0), (1,1,0) and t=(0,0,1), we get │ │ │ │ +835 * │ │ │ │ +836 * T(x,y,xn) = ( x(2-y/(1-xn)), y, xn ) │ │ │ │ +837 * / 2-y/(1-xn) -x 0 \ │ │ │ │ +838 * DT(x,y,xn) = | 0 1 0 | │ │ │ │ +839 * \ 0 0 1 / │ │ │ │ +840 * which is not continuous for xn -> 1, choose for example │ │ │ │ +841 * x=0, y=1-xn, xn -> 1 --> DT -> diag(1,1,1) │ │ │ │ +842 * x=1-xn, y=0, xn -> 1 --> DT -> diag(2,1,1) │ │ │ │ +843 * │ │ │ │ +844 * However, for Tb affine-linear, Tb(y) = My + y0, DTb = M: │ │ │ │ +845 * A = M │ │ │ │ +846 * b = -M x* - y0 + t + \sum_i M_i x_i/(1-xn) │ │ │ │ +847 * = -M x* - y0 + t + M x* │ │ │ │ +848 * = -y0 + t │ │ │ │ +849 * which is continuous for xn -> 1. Note that this b is also given by │ │ │ │ +850 * b = -Tb(0) + t + \sum_i dTb/dx_i(0) x_i/1 │ │ │ │ +851 * that is replacing x* by 1 and 1-xn by 1 in the formular above. │ │ │ │ +852 * │ │ │ │ +853 * For xn -> 1, we can thus set x*=0, "1-xn"=1 (or anything != 0) and get │ │ │ │ +854 * the right result in case Tb is affine-linear. │ │ │ │ +855 */ │ │ │ │ +856 │ │ │ │ +857 /* The second case effectively results in x* = 0 */ │ │ │ │ +858 _c_t_y_p_e dfcxn = (cxn > Traits::tolerance() || cxn < -Traits::tolerance()) ? │ │ │ │ +_c_t_y_p_e(df / cxn) : _c_t_y_p_e(0); │ │ │ │ +859 │ │ │ │ +860 // initialize last row │ │ │ │ +861 // b = -Tb(x*) │ │ │ │ +862 // (b = -Tb(0) = -y0 in case xn -> 1 and Tb affine-linear) │ │ │ │ +863 _g_l_o_b_a_l_<_ _a_d_d_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, │ │ │ │ +dfcxn, x, -rf, jt[ dim-1 ] ); │ │ │ │ +864 // b += t │ │ │ │ +865 jt[ dim-1 ].axpy( rf, *cit ); │ │ │ │ +866 ++cit; │ │ │ │ +867 // apply Jacobian for bottom (with argument x/(1-xn)) and correct last row │ │ │ │ +868 if( add ) │ │ │ │ +869 { │ │ │ │ +870 FieldMatrix< _c_t_y_p_e, dim-1, _c_o_o_r_d_d_i_m_e_n_s_i_o_n > jt2; │ │ │ │ +871 // jt2 = dTb/dx_i(x*) │ │ │ │ +872 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d_<_ _f_a_l_s_e_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim- │ │ │ │ +1 >(), cit2, dfcxn, x, rf, jt2 ); │ │ │ │ +873 // A = dTb/dx_i(x*) (jt[j], j=0..dim-1) │ │ │ │ +874 // b += \sum_i dTb/dx_i(x*) x_i/(1-xn) (jt[dim-1]) │ │ │ │ +875 // (b += 0 in case xn -> 1) │ │ │ │ +876 for( int j = 0; j < dim-1; ++j ) │ │ │ │ +877 { │ │ │ │ +878 jt[ j ] += jt2[ j ]; │ │ │ │ +879 jt[ dim-1 ].axpy( dfcxn*x[ j ], jt2[ j ] ); │ │ │ │ +880 } │ │ │ │ +881 } │ │ │ │ +882 else │ │ │ │ +883 { │ │ │ │ +884 // jt = dTb/dx_i(x*) │ │ │ │ +885 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d_<_ _f_a_l_s_e_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim- │ │ │ │ +1 >(), cit2, dfcxn, x, rf, jt ); │ │ │ │ +886 // b += \sum_i dTb/dx_i(x*) x_i/(1-xn) │ │ │ │ +887 for( int j = 0; j < dim-1; ++j ) │ │ │ │ +888 jt[ dim-1 ].axpy( dfcxn*x[ j ], jt[ j ] ); │ │ │ │ +889 } │ │ │ │ +890 } │ │ │ │ +891 } │ │ │ │ +892 │ │ │ │ +893 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ +894 template< bool add, int rows, class CornerIterator > │ │ │ │ +895 inline void _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ +_8_9_6_ _:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( _T_o_p_o_l_o_g_y_I_d, std::integral_constant< int, 0 >, │ │ │ │ +897 CornerIterator &cit, const _c_t_y_p_e &, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &, │ │ │ │ +898 const _c_t_y_p_e &, FieldMatrix< ctype, rows, cdim > & ) │ │ │ │ +899 { │ │ │ │ +900 ++cit; │ │ │ │ +901 } │ │ │ │ +902 │ │ │ │ +903 │ │ │ │ +904 │ │ │ │ +905 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ +906 template< int dim, class CornerIterator > │ │ │ │ +907 inline bool _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ +_9_0_8_ _:_:_a_f_f_i_n_e ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim >, │ │ │ │ +CornerIterator &cit, _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ +909 { │ │ │ │ +910 const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &orgBottom = *cit; │ │ │ │ +911 if( !_a_f_f_i_n_e( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, jt ) │ │ │ │ +) │ │ │ │ +912 return false; │ │ │ │ +913 const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &orgTop = *cit; │ │ │ │ +914 │ │ │ │ +915 if( Impl::isPrism( toUnsignedInt(_t_o_p_o_l_o_g_y_I_d), _m_y_d_i_m_e_n_s_i_o_n, _m_y_d_i_m_e_n_s_i_o_n-dim │ │ │ │ +) ) │ │ │ │ +916 { │ │ │ │ +917 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d jtTop; │ │ │ │ +918 if( !_a_f_f_i_n_e( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, jtTop │ │ │ │ +) ) │ │ │ │ +919 return false; │ │ │ │ +920 │ │ │ │ +921 // check whether both jacobians are identical │ │ │ │ +922 _c_t_y_p_e norm( 0 ); │ │ │ │ +923 for( int i = 0; i < dim-1; ++i ) │ │ │ │ +924 norm += (jtTop[ i ] - jt[ i ]).two_norm2(); │ │ │ │ +925 if( norm >= Traits::tolerance() ) │ │ │ │ +926 return false; │ │ │ │ +927 } │ │ │ │ +928 else │ │ │ │ +929 ++cit; │ │ │ │ +930 jt[ dim-1 ] = orgTop - orgBottom; │ │ │ │ +931 return true; │ │ │ │ +932 } │ │ │ │ +933 │ │ │ │ +934 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ +935 template< class CornerIterator > │ │ │ │ +936 inline bool _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ +_9_3_7_ _:_:_a_f_f_i_n_e ( _T_o_p_o_l_o_g_y_I_d, std::integral_constant< int, 0 >, CornerIterator │ │ │ │ +&cit, _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d & ) │ │ │ │ +938 { │ │ │ │ +939 ++cit; │ │ │ │ +940 return true; │ │ │ │ +941 } │ │ │ │ +942 │ │ │ │ +943} // namespace Dune │ │ │ │ +944 │ │ │ │ +945#endif // #ifndef DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH │ │ │ │ _t_y_p_e_._h_h │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ +_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_G_e_o │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:28 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_v_o_l_u_m_e │ │ │ │ -CoordinateField volume() const │ │ │ │ -obtain the volume of the reference element │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:228 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ -GeometryType type(int i, int c) const │ │ │ │ -obtain the type of subentity (i,c) │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:167 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -ReferenceElement() │ │ │ │ -Constructs an empty reference element. │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:254 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ -bool operator!=(const ReferenceElement &r) const │ │ │ │ -Compares for inequality with another reference element. │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:275 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_p_o_s_i_t_i_o_n │ │ │ │ -Coordinate position(int i, int c) const │ │ │ │ -position of the barycenter of entity (i,c) │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:190 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_t_y_p_e_, │ │ │ │ -_m_y_d_i_m_e_n_s_i_o_n_ _>_ _>_:_:_C_o_o_r_d_i_n_a_t_e │ │ │ │ -typename Geo::ReferenceElementImplementation< ctype, mydimension >::Coordinate │ │ │ │ -Coordinate │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:81 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_g_e_o_m_e_t_r_y │ │ │ │ -Codim< codim >::Geometry geometry(int i) const │ │ │ │ -obtain the embedding of subentity (i,codim) into the reference element │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:221 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_t_y_p_e_, │ │ │ │ -_m_y_d_i_m_e_n_s_i_o_n_ _>_ _>_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int dimension │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:87 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ -int size(int i, int c, int cc) const │ │ │ │ -number of subentities of codimension cc of subentity (i,c) │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:111 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_s_u_b_E_n_t_i_t_y │ │ │ │ -int subEntity(int i, int c, int ii, int cc) const │ │ │ │ -obtain number of ii-th subentity with codim cc of (i,c) │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:130 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_t_y_p_e_, │ │ │ │ -_m_y_d_i_m_e_n_s_i_o_n_ _>_ _>_:_:_c_t_y_p_e │ │ │ │ -typename Geo::ReferenceElementImplementation< ctype, mydimension >::ctype ctype │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:75 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ -int size(int c) const │ │ │ │ -number of subentities of codimension c │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:94 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ -GeometryType type() const │ │ │ │ -obtain the type of this reference element │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:175 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_i_m_p_l │ │ │ │ -const Implementation & impl() const │ │ │ │ -Returns a reference to the internal implementation object. │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:263 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_c_h_e_c_k_I_n_s_i_d_e │ │ │ │ -bool checkInside(const Coordinate &local) const │ │ │ │ -check if a coordinate is in the reference element │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:203 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ -Coordinate integrationOuterNormal(int face) const │ │ │ │ -obtain the integration outer normal of the reference element │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:241 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_t_y_p_e_, │ │ │ │ -_m_y_d_i_m_e_n_s_i_o_n_ _>_ _>_:_:_C_o_o_r_d_i_n_a_t_e_F_i_e_l_d │ │ │ │ -ctype CoordinateField │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:78 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ -bool operator==(const ReferenceElement &r) const │ │ │ │ -Compares for equality with another reference element. │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:269 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_h_a_s_h___v_a_l_u_e │ │ │ │ -friend std::size_t hash_value(const ReferenceElement &r) │ │ │ │ -Yields a hash value suitable for storing the reference element a in hash table. │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:281 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_s_u_b_E_n_t_i_t_i_e_s │ │ │ │ -auto subEntities(int i, int c, int cc) const │ │ │ │ -Obtain the range of numbers of subentities with codim cc of (i,c). │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:153 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_t_y_p_e_, │ │ │ │ -_m_y_d_i_m_e_n_s_i_o_n_ _>_ _>_:_:_V_o_l_u_m_e │ │ │ │ -ctype Volume │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:84 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:34 │ │ │ │ _D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ Class providing access to the singletons of the reference elements. │ │ │ │ DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_C_o_d_i_m │ │ │ │ -Collection of types depending on the codimension. │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:67 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_:_:_C_o_d_i_m_:_:_G_e_o_m_e_t_r_y │ │ │ │ -implementation-defined Geometry │ │ │ │ -type of geometry embedding a subentity into the reference element │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:69 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +typename Container::ReferenceElement ReferenceElement │ │ │ │ +The reference element type. │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:146 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s │ │ │ │ +default traits class for MultiLinearGeometry │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:39 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_M_a_t_r_i_x_H_e_l_p_e_r │ │ │ │ +Impl::FieldMatrixHelper< ct > MatrixHelper │ │ │ │ +helper structure containing some matrix routines │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:58 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_t_o_l_e_r_a_n_c_e │ │ │ │ +static ct tolerance() │ │ │ │ +tolerance to numerical algorithms │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:61 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e │ │ │ │ +template specifying the storage for the corners │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:129 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_T_y_p_e │ │ │ │ +std::vector< FieldVector< ct, cdim > > Type │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:130 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_h_a_s_S_i_n_g_l_e_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +will there be only one geometry type for a dimension? │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:148 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_h_a_s_S_i_n_g_l_e_G_e_o_m_e_t_r_y_T_y_p_e_:_:_t_o_p_o_l_o_g_y_I_d │ │ │ │ +static const unsigned int topologyId │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:150 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_h_a_s_S_i_n_g_l_e_G_e_o_m_e_t_r_y_T_y_p_e_:_:_v │ │ │ │ +static const bool v │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:149 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ +static void global(TopologyId topologyId, std::integral_constant< int, dim >, │ │ │ │ +CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype │ │ │ │ +&rf, GlobalCoordinate &y) │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:749 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ +static const int mydimension │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:189 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_t_y_p_e │ │ │ │ +Dune::GeometryType type() const │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:269 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_M_a_t_r_i_x_H_e_l_p_e_r │ │ │ │ +Traits::MatrixHelper MatrixHelper │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:225 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +FieldVector< ctype, coorddimension > GlobalCoordinate │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:196 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +static void jacobianTransposed(TopologyId topologyId, std::integral_constant< │ │ │ │ +int, 0 >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const │ │ │ │ +ctype &rf, FieldMatrix< ctype, rows, cdim > &jt) │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:896 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const │ │ │ │ +obtain the transposed of the Jacobian │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:377 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_r_e_f_E_l_e_m_e_n_t │ │ │ │ +ReferenceElement refElement() const │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:425 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ +GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ +evaluate the mapping │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:290 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_c_e_n_t_e_r │ │ │ │ +GlobalCoordinate center() const │ │ │ │ +obtain the centroid of the mapping's image │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:282 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ +GlobalCoordinate corner(int i) const │ │ │ │ +obtain coordinates of the i-th corner │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:275 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ +Dune::ReferenceElements< ctype, mydimension > ReferenceElements │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:214 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_c_t_y_p_e │ │ │ │ +ct ctype │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:186 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +static void jacobianTransposed(TopologyId topologyId, std::integral_constant< │ │ │ │ +int, dim >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, │ │ │ │ +const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt) │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:794 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ +static const int coorddimension │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:191 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_c_o_r_n_e_r_s │ │ │ │ +int corners() const │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:272 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_t_o_p_o_l_o_g_y_I_d │ │ │ │ +TopologyId topologyId() const │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:430 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +friend ReferenceElement referenceElement(const MultiLinearGeometry &geometry) │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:395 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_l_o_c_a_l │ │ │ │ +LocalCoordinate local(const GlobalCoordinate &globalCoord) const │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:312 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ +static void global(TopologyId topologyId, std::integral_constant< int, 0 >, │ │ │ │ +CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype │ │ │ │ +&rf, GlobalCoordinate &y) │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:780 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ +Volume volume() const │ │ │ │ +obtain the volume of the mapping's image │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:363 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +FieldVector< ctype, mydimension > LocalCoordinate │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:194 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ +MultiLinearGeometry(const ReferenceElement &refElement, const Corners &corners) │ │ │ │ +constructor │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:239 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ +static bool affine(TopologyId topologyId, std::integral_constant< int, 0 >, │ │ │ │ +CornerIterator &cit, JacobianTransposed &jt) │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:937 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_T_o_p_o_l_o_g_y_I_d │ │ │ │ +std::conditional< hasSingleGeometryType, std::integral_constant< unsignedint, │ │ │ │ +Traits::templatehasSingleGeometryType< mydimension >::topologyId >, unsignedint │ │ │ │ +>::type TopologyId │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:226 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_V_o_l_u_m_e │ │ │ │ +ctype Volume │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:198 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ +static bool affine(TopologyId topologyId, std::integral_constant< int, dim >, │ │ │ │ +CornerIterator &cit, JacobianTransposed &jt) │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:908 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ +JacobianInverse jacobianInverse(const LocalCoordinate &local) const │ │ │ │ +Obtain the Jacobian's inverse. │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:418 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ +MultiLinearGeometry(Dune::GeometryType gt, const Corners &corners) │ │ │ │ +constructor │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:255 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:201 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +ReferenceElements::ReferenceElement ReferenceElement │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:219 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate │ │ │ │ +&local) const │ │ │ │ +obtain the transposed of the Jacobian's inverse │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:738 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_J_a_c_o_b_i_a_n │ │ │ │ +FieldMatrix< ctype, coorddimension, mydimension > Jacobian │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:207 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ +bool affine() const │ │ │ │ +is this mapping affine? │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:262 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ +FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:210 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ +bool affine(JacobianTransposed &jacobianT) const │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:458 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ +Volume integrationElement(const LocalCoordinate &local) const │ │ │ │ +obtain the integration element │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:350 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n │ │ │ │ +Jacobian jacobian(const LocalCoordinate &local) const │ │ │ │ +Obtain the Jacobian. │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:407 │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:488 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ +GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ +evaluate the mapping │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:580 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +Base::ReferenceElement ReferenceElement │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:534 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_a_f_f_i_n_e │ │ │ │ +bool affine() const │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:567 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ +CachedMultiLinearGeometry(const ReferenceElement &referenceElement, const │ │ │ │ +CornerStorage &cornerStorage) │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:551 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_r_e_f_E_l_e_m_e_n_t │ │ │ │ +ReferenceElement refElement() const │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:425 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_l_o_c_a_l │ │ │ │ +LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:604 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_M_a_t_r_i_x_H_e_l_p_e_r │ │ │ │ +Base::MatrixHelper MatrixHelper │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:531 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +Base::LocalCoordinate LocalCoordinate │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:541 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ +JacobianInverse jacobianInverse(const LocalCoordinate &local) const │ │ │ │ +Obtain the Jacobian's inverse. │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:713 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const │ │ │ │ +obtain the transposed of the Jacobian │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:666 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ +GlobalCoordinate corner(int i) const │ │ │ │ +obtain coordinates of the i-th corner │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:275 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ +Volume volume() const │ │ │ │ +obtain the volume of the mapping's image │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:649 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ +CachedMultiLinearGeometry(Dune::GeometryType gt, const CornerStorage │ │ │ │ +&cornerStorage) │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:559 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ +ctype integrationElement(const LocalCoordinate &local) const │ │ │ │ +obtain the integration element │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:633 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_c_t_y_p_e │ │ │ │ +Base::ctype ctype │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:536 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n │ │ │ │ +Jacobian jacobian(const LocalCoordinate &local) const │ │ │ │ +Obtain the Jacobian. │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:702 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_: │ │ │ │ +_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +Base::JacobianInverseTransposed JacobianInverseTransposed │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:546 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +Base::JacobianTransposed JacobianTransposed │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:545 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ +Base::JacobianInverse JacobianInverse │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:548 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_J_a_c_o_b_i_a_n │ │ │ │ +Base::Jacobian Jacobian │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:547 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_V_o_l_u_m_e │ │ │ │ +Base::Volume Volume │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:543 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +Base::GlobalCoordinate GlobalCoordinate │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:542 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_c_e_n_t_e_r │ │ │ │ +GlobalCoordinate center() const │ │ │ │ +obtain the centroid of the mapping's image │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:572 │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate │ │ │ │ +&local) const │ │ │ │ +obtain the transposed of the Jacobian's inverse │ │ │ │ +DDeeffiinniittiioonn multilineargeometry.hh:680 │ │ │ │ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ DDeeffiinniittiioonn type.hh:114 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00230.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: quadraturerules.hh File Reference │ │ │ +dune-geometry: affinegeometry.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -73,112 +73,43 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Macros | │ │ │ -Enumerations
│ │ │ -
quadraturerules.hh File Reference
│ │ │ +Namespaces
│ │ │ +
affinegeometry.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <algorithm>
│ │ │ -#include <iostream>
│ │ │ -#include <limits>
│ │ │ -#include <mutex>
│ │ │ -#include <utility>
│ │ │ -#include <vector>
│ │ │ + │ │ │ +

An implementation of the Geometry interface for affine geometries. │ │ │ +More...

│ │ │ +
#include <cmath>
│ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ #include <dune/common/fvector.hh>
│ │ │ -#include <dune/common/exceptions.hh>
│ │ │ -#include <dune/common/stdstreams.hh>
│ │ │ -#include <dune/common/stdthread.hh>
│ │ │ -#include <dune/common/visibility.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ -#include <dune/geometry/typeindex.hh>
│ │ │ -#include "quadraturerules/pointquadrature.hh"
│ │ │ -#include "quadraturerules/gausslobattoquadrature.hh"
│ │ │ -#include "quadraturerules/gaussquadrature.hh"
│ │ │ -#include "quadraturerules/gaussradauleftquadrature.hh"
│ │ │ -#include "quadraturerules/gaussradaurightquadrature.hh"
│ │ │ -#include "quadraturerules/jacobi1quadrature.hh"
│ │ │ -#include "quadraturerules/jacobi2quadrature.hh"
│ │ │ -#include "quadraturerules/jacobiNquadrature.hh"
│ │ │ -#include "quadraturerules/prismquadrature.hh"
│ │ │ -#include "quadraturerules/simplexquadrature.hh"
│ │ │ -#include "quadraturerules/tensorproductquadrature.hh"
│ │ │ +#include <dune/geometry/type.hh>
│ │ │ +#include <dune/geometry/utility/defaultmatrixhelper.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

struct  std::tuple_size< Dune::QuadraturePoint< ct, dim > >
struct  std::tuple_element< 0, Dune::QuadraturePoint< ct, dim > >
struct  std::tuple_element< 1, Dune::QuadraturePoint< ct, dim > >
class  Dune::QuadratureOrderOutOfRange
 Exception thrown if a desired QuadratureRule is not available, because the requested order is to high. More...
class  Dune::QuadraturePoint< ct, dim >
 Single evaluation point in a quadrature rule. More...
class  Dune::QuadratureRule< ct, dim >
 Abstract base class for quadrature rules. More...
class  Dune::QuadratureRules< ctype, dim >
 A container for all quadrature rules of dimension dim. More...
class  Dune::QuadratureRuleFactory< ctype, dim >
 Factory class for creation of quadrature rules, depending on GeometryType, order and QuadratureType. More...
class  Dune::QuadratureRuleFactory< ctype, 0 >
class  Dune::QuadratureRuleFactory< ctype, 1 >
class  Dune::QuadratureRuleFactory< ctype, 2 >
class  Dune::QuadratureRuleFactory< ctype, 3 >
class  Dune::AffineGeometry< ct, mydim, cdim >
 Implementation of the Geometry interface for affine geometries. More...
│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ Namespaces

namespace  Dune
namespace  std
 STL namespace.
namespace  Dune::QuadratureType
 Defines an enum for currently available quadrature rules.
│ │ │ - │ │ │ - │ │ │ -

│ │ │ -Macros

#define DUNE_INCLUDING_IMPLEMENTATION
│ │ │ - │ │ │ - │ │ │ + │ │ │

│ │ │ -Enumerations

enum  Dune::QuadratureType::Enum {
│ │ │ -  Dune::QuadratureType::GaussLegendre = 0 │ │ │ -, Dune::QuadratureType::GaussJacobi_1_0 = 1 │ │ │ -, Dune::QuadratureType::GaussJacobi_2_0 = 2 │ │ │ -, Dune::QuadratureType::GaussJacobi_n_0 = 3 │ │ │ -,
│ │ │ -  Dune::QuadratureType::GaussLobatto = 4 │ │ │ -, Dune::QuadratureType::GaussRadauLeft = 5 │ │ │ -, Dune::QuadratureType::GaussRadauRight = 6 │ │ │ -, Dune::QuadratureType::size │ │ │ -
│ │ │ - }
namespace  Dune::Geo
│ │ │

Detailed Description

│ │ │ -

Interface for quadrature points and rules

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ DUNE_INCLUDING_IMPLEMENTATION

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define DUNE_INCLUDING_IMPLEMENTATION
│ │ │ -
│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +

An implementation of the Geometry interface for affine geometries.

│ │ │ +
Author
Martin Nolte
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,77 +1,27 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _E_n_u_m_e_r_a_t_i_o_n_s │ │ │ │ -quadraturerules.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +affinegeometry.hh File Reference │ │ │ │ +An implementation of the Geometry interface for affine geometries. _M_o_r_e_._._. │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_i_n_d_e_x_._h_h> │ │ │ │ -#include "quadraturerules/pointquadrature.hh" │ │ │ │ -#include "quadraturerules/gausslobattoquadrature.hh" │ │ │ │ -#include "quadraturerules/gaussquadrature.hh" │ │ │ │ -#include "quadraturerules/gaussradauleftquadrature.hh" │ │ │ │ -#include "quadraturerules/gaussradaurightquadrature.hh" │ │ │ │ -#include "quadraturerules/jacobi1quadrature.hh" │ │ │ │ -#include "quadraturerules/jacobi2quadrature.hh" │ │ │ │ -#include "quadraturerules/jacobiNquadrature.hh" │ │ │ │ -#include "quadraturerules/prismquadrature.hh" │ │ │ │ -#include "quadraturerules/simplexquadrature.hh" │ │ │ │ -#include "quadraturerules/tensorproductquadrature.hh" │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _s_t_d_:_:_t_u_p_l_e___s_i_z_e_<_ _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_<_ _c_t_,_ _d_i_m_ _>_ _> │ │ │ │ -struct   _s_t_d_:_:_t_u_p_l_e___e_l_e_m_e_n_t_<_ _0_,_ _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_<_ _c_t_,_ _d_i_m_ _>_ _> │ │ │ │ -struct   _s_t_d_:_:_t_u_p_l_e___e_l_e_m_e_n_t_<_ _1_,_ _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_<_ _c_t_,_ _d_i_m_ _>_ _> │ │ │ │ - class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_O_r_d_e_r_O_u_t_O_f_R_a_n_g_e │ │ │ │ -  Exception thrown if a desired _Q_u_a_d_r_a_t_u_r_e_R_u_l_e is not available, because │ │ │ │ - the requested order is to high. _M_o_r_e_._._. │ │ │ │ - class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_<_ _c_t_,_ _d_i_m_ _> │ │ │ │ -  Single evaluation point in a quadrature rule. _M_o_r_e_._._. │ │ │ │ - class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_ _c_t_,_ _d_i_m_ _> │ │ │ │ -  Abstract base class for quadrature rules. _M_o_r_e_._._. │ │ │ │ - class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ -  A container for all quadrature rules of dimension dim. _M_o_r_e_._._. │ │ │ │ - class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ -  Factory class for creation of quadrature rules, depending on │ │ │ │ - _G_e_o_m_e_t_r_y_T_y_p_e, order and _Q_u_a_d_r_a_t_u_r_e_T_y_p_e. _M_o_r_e_._._. │ │ │ │ - class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y_<_ _c_t_y_p_e_,_ _0_ _> │ │ │ │ - class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y_<_ _c_t_y_p_e_,_ _1_ _> │ │ │ │ - class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y_<_ _c_t_y_p_e_,_ _2_ _> │ │ │ │ - class   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y_<_ _c_t_y_p_e_,_ _3_ _> │ │ │ │ +class   _D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_ _> │ │ │ │ +  Implementation of the Geometry interface for affine geometries. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ -namespace   _s_t_d │ │ │ │ -  STL namespace. │ │ │ │ -namespace   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e │ │ │ │ -  Defines an enum for currently available quadrature rules. │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  _D_U_N_E___I_N_C_L_U_D_I_N_G___I_M_P_L_E_M_E_N_T_A_T_I_O_N │ │ │ │ -EEnnuummeerraattiioonnss │ │ │ │ -enum   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m { │ │ │ │ -   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_e_g_e_n_d_r_e = 0 , _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_: │ │ │ │ - _G_a_u_s_s_J_a_c_o_b_i___1___0 = 1 , _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_J_a_c_o_b_i___2___0 = 2 , _D_u_n_e_:_: │ │ │ │ - _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_J_a_c_o_b_i___n___0 = 3 , │ │ │ │ -   _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_o_b_a_t_t_o = 4 , _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_: │ │ │ │ - _G_a_u_s_s_R_a_d_a_u_L_e_f_t = 5 , _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_R_a_d_a_u_R_i_g_h_t = 6 , _D_u_n_e_:_: │ │ │ │ - _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_s_i_z_e │ │ │ │ - } │ │ │ │ +namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Interface for quadrature points and rules │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? DDUUNNEE__IINNCCLLUUDDIINNGG__IIMMPPLLEEMMEENNTTAATTIIOONN ********** │ │ │ │ -#define DUNE_INCLUDING_IMPLEMENTATION │ │ │ │ +An implementation of the Geometry interface for affine geometries. │ │ │ │ + Author │ │ │ │ + Martin Nolte │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00230_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: quadraturerules.hh Source File │ │ │ +dune-geometry: affinegeometry.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,508 +71,261 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
quadraturerules.hh
│ │ │ +
affinegeometry.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © 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_GEOMETRY_QUADRATURERULES_HH
│ │ │ -
7#define DUNE_GEOMETRY_QUADRATURERULES_HH
│ │ │ -
8
│ │ │ -
9#include <algorithm>
│ │ │ -
10#include <iostream>
│ │ │ -
11#include <limits>
│ │ │ -
12#include <mutex>
│ │ │ -
13#include <utility>
│ │ │ -
14#include <vector>
│ │ │ -
15
│ │ │ +
5#ifndef DUNE_GEOMETRY_AFFINEGEOMETRY_HH
│ │ │ +
6#define DUNE_GEOMETRY_AFFINEGEOMETRY_HH
│ │ │ +
7
│ │ │ +
12
│ │ │ +
13#include <cmath>
│ │ │ +
14
│ │ │ +
15#include <dune/common/fmatrix.hh>
│ │ │
16#include <dune/common/fvector.hh>
│ │ │ -
17#include <dune/common/exceptions.hh>
│ │ │ -
18#include <dune/common/stdstreams.hh>
│ │ │ -
19#include <dune/common/stdthread.hh>
│ │ │ -
20#include <dune/common/visibility.hh>
│ │ │ -
21
│ │ │ -
22#include <dune/geometry/type.hh>
│ │ │ - │ │ │ -
24
│ │ │ +
17
│ │ │ +
18#include <dune/geometry/type.hh>
│ │ │ + │ │ │ +
20
│ │ │ +
│ │ │ +
21namespace Dune
│ │ │ +
22{
│ │ │ +
23
│ │ │ +
24 // External Forward Declarations
│ │ │ +
25 // -----------------------------
│ │ │ +
26
│ │ │ +
│ │ │ +
27 namespace Geo
│ │ │ +
28 {
│ │ │
29
│ │ │ -
30
│ │ │ -
31namespace Dune {
│ │ │ -
32 // forward declaration
│ │ │ -
33 template<typename ct, int dim>
│ │ │ -
34 class QuadraturePoint;
│ │ │ -
35}
│ │ │ -
36
│ │ │ -
37// class specialization of standard classes that allow to use structured bindings on QuadraturePoint
│ │ │ -
38namespace std {
│ │ │ -
39 template<typename ct, int dim>
│ │ │ -
40 struct tuple_size<Dune::QuadraturePoint<ct,dim>> : public std::integral_constant<std::size_t,2> {};
│ │ │ -
41
│ │ │ -
42 template<typename ct, int dim>
│ │ │ -
43 struct tuple_element<0, Dune::QuadraturePoint<ct,dim>> { using type = Dune::FieldVector<ct, dim>; };
│ │ │ -
44
│ │ │ -
45 template<typename ct, int dim>
│ │ │ -
46 struct tuple_element<1, Dune::QuadraturePoint<ct,dim>> { using type = ct; };
│ │ │ -
47}
│ │ │ -
48
│ │ │ -
49namespace Dune {
│ │ │ -
50
│ │ │ -
55 class QuadratureOrderOutOfRange : public NotImplemented {};
│ │ │ -
56
│ │ │ -
65 template<typename ct, int dim>
│ │ │ -
│ │ │ - │ │ │ -
67 public:
│ │ │ -
69 constexpr static int dimension = dim;
│ │ │ -
70
│ │ │ -
72 typedef ct Field;
│ │ │ -
73
│ │ │ -
75 typedef Dune::FieldVector<ct,dim> Vector;
│ │ │ -
76
│ │ │ -
│ │ │ -
78 QuadraturePoint (const Vector& x, ct w) : local(x), weight_(w)
│ │ │ -
79 {}
│ │ │ -
│ │ │ -
80
│ │ │ -
│ │ │ -
82 const Vector& position () const
│ │ │ -
83 {
│ │ │ -
84 return local;
│ │ │ -
85 }
│ │ │ -
│ │ │ -
86
│ │ │ -
│ │ │ -
88 const ct &weight () const
│ │ │ -
89 {
│ │ │ -
90 return weight_;
│ │ │ -
91 }
│ │ │ -
│ │ │ -
92
│ │ │ -
111 template<std::size_t index, std::enable_if_t<(index<=1), int> = 0>
│ │ │ -
│ │ │ -
112 std::tuple_element_t<index, QuadraturePoint<ct, dim>> get() const
│ │ │ -
113 {
│ │ │ -
114 if constexpr (index == 0) {
│ │ │ -
115 return local;
│ │ │ -
116 }
│ │ │ -
117 else {
│ │ │ -
118 return weight_;
│ │ │ -
119 }
│ │ │ -
120 }
│ │ │ -
│ │ │ -
121
│ │ │ -
122 protected:
│ │ │ -
123 FieldVector<ct, dim> local;
│ │ │ -
124 ct weight_;
│ │ │ -
125 };
│ │ │ -
│ │ │ -
126
│ │ │ -
│ │ │ -
130 namespace QuadratureType {
│ │ │ -
│ │ │ -
131 enum Enum {
│ │ │ -
141 GaussLegendre = 0,
│ │ │ -
142
│ │ │ -
148 GaussJacobi_1_0 = 1,
│ │ │ -
149
│ │ │ -
155 GaussJacobi_2_0 = 2,
│ │ │ -
156
│ │ │ -
168 GaussJacobi_n_0 = 3,
│ │ │ -
169
│ │ │ -
176 GaussLobatto = 4,
│ │ │ -
177
│ │ │ -
184 GaussRadauLeft = 5,
│ │ │ -
185
│ │ │ -
193 GaussRadauRight = 6,
│ │ │ -
194 size
│ │ │ -
195 };
│ │ │ -
│ │ │ -
196 }
│ │ │ -
│ │ │ -
197
│ │ │ -
212 template<typename ct, int dim>
│ │ │ -
│ │ │ -
213 class QuadratureRule : public std::vector<QuadraturePoint<ct,dim> >
│ │ │ -
214 {
│ │ │ -
215 public:
│ │ │ - │ │ │ -
222
│ │ │ -
223 protected:
│ │ │ - │ │ │ -
226
│ │ │ - │ │ │ -
229 public:
│ │ │ -
231 constexpr static int d = dim;
│ │ │ -
232
│ │ │ -
234 typedef ct CoordType;
│ │ │ -
235
│ │ │ -
237 virtual int order () const { return delivered_order; }
│ │ │ -
238
│ │ │ -
240 virtual GeometryType type () const { return geometry_type; }
│ │ │ -
241 virtual ~QuadratureRule(){}
│ │ │ -
242
│ │ │ -
245 typedef typename std::vector<QuadraturePoint<ct,dim> >::const_iterator iterator;
│ │ │ -
246
│ │ │ -
247 protected:
│ │ │ - │ │ │ - │ │ │ -
250 };
│ │ │ -
│ │ │ -
251
│ │ │ -
252 // Forward declaration of the factory class,
│ │ │ -
253 // needed internally by the QuadratureRules container class.
│ │ │ -
254 template<typename ctype, int dim> class QuadratureRuleFactory;
│ │ │ -
255
│ │ │ -
259 template<typename ctype, int dim>
│ │ │ -
│ │ │ -
260 class QuadratureRules {
│ │ │ -
261
│ │ │ -
263 using QuadratureRule = Dune::QuadratureRule<ctype, dim>;
│ │ │ -
264
│ │ │ -
265 // indexed by quadrature order
│ │ │ -
266 using QuadratureOrderVector = std::vector<std::pair<std::once_flag, QuadratureRule> >;
│ │ │ -
267
│ │ │ -
268 // indexed by geometry type
│ │ │ -
269 using GeometryTypeVector = std::vector<std::pair<std::once_flag, QuadratureOrderVector> >;
│ │ │ -
270
│ │ │ -
271 // indexed by quadrature type enum
│ │ │ -
272 using QuadratureCacheVector = std::vector<std::pair<std::once_flag, GeometryTypeVector> >;
│ │ │ -
273
│ │ │ -
275 DUNE_EXPORT const QuadratureRule& _rule(const GeometryType& t, int p, QuadratureType::Enum qt=QuadratureType::GaussLegendre) const
│ │ │ -
276 {
│ │ │ -
277 assert(t.dim()==dim);
│ │ │ -
278
│ │ │ -
279 DUNE_ASSERT_CALL_ONCE();
│ │ │ -
280
│ │ │ -
281 static QuadratureCacheVector quadratureCache(QuadratureType::size);
│ │ │ -
282
│ │ │ -
283 auto& [ onceFlagQuadratureType, geometryTypes ] = quadratureCache[qt];
│ │ │ -
284 // initialize geometry types for this quadrature type once
│ │ │ -
285 std::call_once(onceFlagQuadratureType, [&types = geometryTypes]{
│ │ │ -
286 types = GeometryTypeVector(LocalGeometryTypeIndex::size(dim));
│ │ │ -
287 });
│ │ │ -
288
│ │ │ -
289 auto& [ onceFlagGeometryType, quadratureOrders ] = geometryTypes[LocalGeometryTypeIndex::index(t)];
│ │ │ -
290 // initialize quadrature orders for this geometry type and quadrature type once
│ │ │ -
291 std::call_once(onceFlagGeometryType, [&, &orders = quadratureOrders]{
│ │ │ -
292 // we only need one quadrature rule for points, not maxint
│ │ │ -
293 const auto numRules = dim == 0 ? 1 : QuadratureRuleFactory<ctype,dim>::maxOrder(t, qt)+1;
│ │ │ -
294 orders = QuadratureOrderVector(numRules);
│ │ │ -
295 });
│ │ │ -
296
│ │ │ -
297 // we only have one quadrature rule for points
│ │ │ -
298 auto& [ onceFlagQuadratureOrder, quadratureRule ] = quadratureOrders[dim == 0 ? 0 : p];
│ │ │ -
299 // initialize quadrature rule once
│ │ │ -
300 std::call_once(onceFlagQuadratureOrder, [&, &rule = quadratureRule]{
│ │ │ -
301 rule = QuadratureRuleFactory<ctype,dim>::rule(t, p, qt);
│ │ │ -
302 });
│ │ │ -
303
│ │ │ -
304 return quadratureRule;
│ │ │ -
305 }
│ │ │ -
306
│ │ │ -
308 DUNE_EXPORT static QuadratureRules& instance()
│ │ │ -
309 {
│ │ │ -
310 static QuadratureRules instance;
│ │ │ -
311 return instance;
│ │ │ -
312 }
│ │ │ -
313
│ │ │ -
315 QuadratureRules () = default;
│ │ │ -
316 public:
│ │ │ -
318 static unsigned
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
321 {
│ │ │ -
322 return QuadratureRuleFactory<ctype,dim>::maxOrder(t,qt);
│ │ │ -
323 }
│ │ │ -
│ │ │ -
324
│ │ │ -
│ │ │ -
326 static const QuadratureRule& rule(const GeometryType& t, int p, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
│ │ │ -
327 {
│ │ │ -
328 return instance()._rule(t,p,qt);
│ │ │ -
329 }
│ │ │ -
│ │ │ -
330
│ │ │ -
│ │ │ - │ │ │ -
333 {
│ │ │ -
334 GeometryType gt(t,dim);
│ │ │ -
335 return instance()._rule(gt,p,qt);
│ │ │ -
336 }
│ │ │ -
│ │ │ -
337 };
│ │ │ -
│ │ │ -
338
│ │ │ -
339} // end namespace Dune
│ │ │ -
340
│ │ │ -
341#define DUNE_INCLUDING_IMPLEMENTATION
│ │ │ -
342
│ │ │ -
343// 0d rules
│ │ │ -
344#include "quadraturerules/pointquadrature.hh"
│ │ │ -
345// 1d rules
│ │ │ -
346#include "quadraturerules/gausslobattoquadrature.hh"
│ │ │ -
347#include "quadraturerules/gaussquadrature.hh"
│ │ │ -
348#include "quadraturerules/gaussradauleftquadrature.hh"
│ │ │ -
349#include "quadraturerules/gaussradaurightquadrature.hh"
│ │ │ -
350#include "quadraturerules/jacobi1quadrature.hh"
│ │ │ -
351#include "quadraturerules/jacobi2quadrature.hh"
│ │ │ -
352#include "quadraturerules/jacobiNquadrature.hh"
│ │ │ -
353// 3d rules
│ │ │ -
354#include "quadraturerules/prismquadrature.hh"
│ │ │ -
355// general rules
│ │ │ -
356#include "quadraturerules/simplexquadrature.hh"
│ │ │ -
357#include "quadraturerules/tensorproductquadrature.hh"
│ │ │ -
358
│ │ │ -
359#undef DUNE_INCLUDING_IMPLEMENTATION
│ │ │ -
360
│ │ │ -
361namespace Dune {
│ │ │ -
362
│ │ │ -
369 template<typename ctype, int dim>
│ │ │ -
│ │ │ - │ │ │ -
371 private:
│ │ │ -
372 friend class QuadratureRules<ctype, dim>;
│ │ │ -
373 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt)
│ │ │ -
374 {
│ │ │ -
375 return TensorProductQuadratureRule<ctype,dim>::maxOrder(t.id(), qt);
│ │ │ -
376 }
│ │ │ -
377 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int p, QuadratureType::Enum qt)
│ │ │ -
378 {
│ │ │ -
379 return TensorProductQuadratureRule<ctype,dim>(t.id(), p, qt);
│ │ │ -
380 }
│ │ │ -
381 };
│ │ │ -
│ │ │ -
382
│ │ │ -
383 template<typename ctype>
│ │ │ -
│ │ │ -
384 class QuadratureRuleFactory<ctype, 0> {
│ │ │ -
385 private:
│ │ │ -
386 constexpr static int dim = 0;
│ │ │ -
387 friend class QuadratureRules<ctype, dim>;
│ │ │ -
388 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum)
│ │ │ -
389 {
│ │ │ -
390 if (t.isVertex())
│ │ │ -
391 {
│ │ │ -
392 return std::numeric_limits<int>::max();
│ │ │ -
393 }
│ │ │ -
394 DUNE_THROW(Exception, "Unknown GeometryType");
│ │ │ -
395 }
│ │ │ -
396 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int , QuadratureType::Enum)
│ │ │ -
397 {
│ │ │ -
398 if (t.isVertex())
│ │ │ -
399 {
│ │ │ -
400 return PointQuadratureRule<ctype>();
│ │ │ -
401 }
│ │ │ -
402 DUNE_THROW(Exception, "Unknown GeometryType");
│ │ │ -
403 }
│ │ │ -
404 };
│ │ │ -
│ │ │ -
405
│ │ │ -
406 template<typename ctype>
│ │ │ -
│ │ │ -
407 class QuadratureRuleFactory<ctype, 1> {
│ │ │ -
408 private:
│ │ │ -
409 constexpr static int dim = 1;
│ │ │ -
410 friend class QuadratureRules<ctype, dim>;
│ │ │ -
411 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt)
│ │ │ -
412 {
│ │ │ -
413 if (t.isLine())
│ │ │ -
414 {
│ │ │ -
415 switch (qt) {
│ │ │ - │ │ │ -
417 return GaussQuadratureRule1D<ctype>::highest_order;
│ │ │ - │ │ │ -
419 return Jacobi1QuadratureRule1D<ctype>::highest_order;
│ │ │ - │ │ │ -
421 return Jacobi2QuadratureRule1D<ctype>::highest_order;
│ │ │ - │ │ │ -
423 return GaussLobattoQuadratureRule1D<ctype>::highest_order;
│ │ │ - │ │ │ -
425 return JacobiNQuadratureRule1D<ctype>::maxOrder();
│ │ │ - │ │ │ -
427 return GaussRadauLeftQuadratureRule1D<ctype>::highest_order;
│ │ │ - │ │ │ -
429 return GaussRadauRightQuadratureRule1D<ctype>::highest_order;
│ │ │ -
430 default :
│ │ │ -
431 DUNE_THROW(Exception, "Unknown QuadratureType");
│ │ │ -
432 }
│ │ │ -
433 }
│ │ │ -
434 DUNE_THROW(Exception, "Unknown GeometryType");
│ │ │ -
435 }
│ │ │ -
436 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int p, QuadratureType::Enum qt)
│ │ │ -
437 {
│ │ │ -
438 if (t.isLine())
│ │ │ -
439 {
│ │ │ -
440 switch (qt) {
│ │ │ - │ │ │ -
442 return GaussQuadratureRule1D<ctype>(p);
│ │ │ - │ │ │ -
444 return Jacobi1QuadratureRule1D<ctype>(p);
│ │ │ - │ │ │ -
446 return Jacobi2QuadratureRule1D<ctype>(p);
│ │ │ - │ │ │ -
448 return GaussLobattoQuadratureRule1D<ctype>(p);
│ │ │ - │ │ │ -
450 return JacobiNQuadratureRule1D<ctype>(p);
│ │ │ - │ │ │ -
452 return GaussRadauLeftQuadratureRule1D<ctype>(p);
│ │ │ - │ │ │ -
454 return GaussRadauRightQuadratureRule1D<ctype>(p);
│ │ │ -
455 default :
│ │ │ -
456 DUNE_THROW(Exception, "Unknown QuadratureType");
│ │ │ -
457 }
│ │ │ -
458 }
│ │ │ -
459 DUNE_THROW(Exception, "Unknown GeometryType");
│ │ │ -
460 }
│ │ │ -
461 };
│ │ │ -
│ │ │ -
462
│ │ │ -
463 template<typename ctype>
│ │ │ -
│ │ │ -
464 class QuadratureRuleFactory<ctype, 2> {
│ │ │ -
465 private:
│ │ │ -
466 constexpr static int dim = 2;
│ │ │ -
467 friend class QuadratureRules<ctype, dim>;
│ │ │ -
468 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt)
│ │ │ -
469 {
│ │ │ -
470 unsigned order =
│ │ │ -
471 TensorProductQuadratureRule<ctype,dim>::maxOrder(t.id(), qt);
│ │ │ -
472 if (t.isSimplex())
│ │ │ -
473 order = std::max
│ │ │ -
474 (order, static_cast<unsigned>(SimplexQuadratureRule<ctype,dim>::highest_order));
│ │ │ -
475 return order;
│ │ │ -
476 }
│ │ │ -
477 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int p, QuadratureType::Enum qt)
│ │ │ -
478 {
│ │ │ -
479 if (t.isSimplex()
│ │ │ - │ │ │ -
481 && p <= SimplexQuadratureRule<ctype,dim>::highest_order)
│ │ │ -
482 {
│ │ │ -
483 return SimplexQuadratureRule<ctype,dim>(p);
│ │ │ -
484 }
│ │ │ -
485 return TensorProductQuadratureRule<ctype,dim>(t.id(), p, qt);
│ │ │ -
486 }
│ │ │ -
487 };
│ │ │ -
│ │ │ -
488
│ │ │ -
489 template<typename ctype>
│ │ │ -
│ │ │ -
490 class QuadratureRuleFactory<ctype, 3> {
│ │ │ -
491 private:
│ │ │ -
492 constexpr static int dim = 3;
│ │ │ -
493 friend class QuadratureRules<ctype, dim>;
│ │ │ -
494 static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt)
│ │ │ -
495 {
│ │ │ -
496 unsigned order =
│ │ │ -
497 TensorProductQuadratureRule<ctype,dim>::maxOrder(t.id(), qt);
│ │ │ -
498 if (t.isSimplex())
│ │ │ -
499 order = std::max
│ │ │ -
500 (order, static_cast<unsigned>(SimplexQuadratureRule<ctype,dim>::highest_order));
│ │ │ -
501 if (t.isPrism())
│ │ │ -
502 order = std::max
│ │ │ -
503 (order, static_cast<unsigned>(PrismQuadratureRule<ctype,dim>::highest_order));
│ │ │ -
504 return order;
│ │ │ -
505 }
│ │ │ -
506 static QuadratureRule<ctype, dim> rule(const GeometryType& t, int p, QuadratureType::Enum qt)
│ │ │ -
507 {
│ │ │ -
508
│ │ │ -
509 if (t.isSimplex()
│ │ │ - │ │ │ -
511 && p <= SimplexQuadratureRule<ctype,dim>::highest_order)
│ │ │ -
512 {
│ │ │ -
513 return SimplexQuadratureRule<ctype,dim>(p);
│ │ │ -
514 }
│ │ │ -
515 if (t.isPrism()
│ │ │ - │ │ │ -
517 && p <= PrismQuadratureRule<ctype,dim>::highest_order)
│ │ │ -
518 {
│ │ │ -
519 return PrismQuadratureRule<ctype,dim>(p);
│ │ │ -
520 }
│ │ │ -
521 return TensorProductQuadratureRule<ctype,dim>(t.id(), p, qt);
│ │ │ -
522 }
│ │ │ -
523 };
│ │ │ -
│ │ │ -
524
│ │ │ -
525#ifndef DUNE_NO_EXTERN_QUADRATURERULES
│ │ │ -
526 extern template class GaussLobattoQuadratureRule<double, 1>;
│ │ │ -
527 extern template class GaussQuadratureRule<double, 1>;
│ │ │ -
528 extern template class GaussRadauLeftQuadratureRule<double, 1>;
│ │ │ -
529 extern template class GaussRadauRightQuadratureRule<double, 1>;
│ │ │ -
530 extern template class Jacobi1QuadratureRule<double, 1>;
│ │ │ -
531 extern template class Jacobi2QuadratureRule<double, 1>;
│ │ │ -
532 extern template class JacobiNQuadratureRule<double, 1>;
│ │ │ -
533 extern template class PrismQuadratureRule<double, 3>;
│ │ │ -
534 extern template class SimplexQuadratureRule<double, 2>;
│ │ │ -
535 extern template class SimplexQuadratureRule<double, 3>;
│ │ │ -
536#endif // !DUNE_NO_EXTERN_QUADRATURERULES
│ │ │ -
537
│ │ │ -
538} // end namespace
│ │ │ -
539
│ │ │ -
540#endif // DUNE_GEOMETRY_QUADRATURERULES_HH
│ │ │ -
Helper classes to provide indices for geometrytypes for use in a vector.
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ -
STL namespace.
│ │ │ +
30 template< typename Implementation >
│ │ │ +
31 class ReferenceElement;
│ │ │ +
32
│ │ │ +
33 template< class ctype, int dim >
│ │ │ + │ │ │ +
35
│ │ │ +
36 template< class ctype, int dim >
│ │ │ +
37 struct ReferenceElements;
│ │ │ +
38
│ │ │ +
39 }
│ │ │ +
│ │ │ +
40
│ │ │ +
41
│ │ │ +
47 template< class ct, int mydim, int cdim>
│ │ │ +
│ │ │ + │ │ │ +
49 {
│ │ │ +
50 public:
│ │ │ +
51
│ │ │ +
53 typedef ct ctype;
│ │ │ +
54
│ │ │ +
56 static const int mydimension= mydim;
│ │ │ +
57
│ │ │ +
59 static const int coorddimension = cdim;
│ │ │ +
60
│ │ │ +
62 typedef FieldVector< ctype, mydimension > LocalCoordinate;
│ │ │ +
63
│ │ │ +
65 typedef FieldVector< ctype, coorddimension > GlobalCoordinate;
│ │ │ +
66
│ │ │ +
68 typedef ctype Volume;
│ │ │ +
69
│ │ │ +
71 typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed;
│ │ │ +
72
│ │ │ +
74 typedef FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed;
│ │ │ +
75
│ │ │ +
77 typedef FieldMatrix< ctype, coorddimension, mydimension > Jacobian;
│ │ │ +
78
│ │ │ +
80 typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse;
│ │ │ +
81
│ │ │ +
82 private:
│ │ │ + │ │ │ +
85
│ │ │ +
86 typedef Geo::ReferenceElements< ctype, mydimension > ReferenceElements;
│ │ │ +
87
│ │ │ +
88 // Helper class to compute a matrix pseudo inverse
│ │ │ +
89 typedef Impl::FieldMatrixHelper< ct > MatrixHelper;
│ │ │ +
90
│ │ │ +
91 public:
│ │ │ +
98 AffineGeometry () = default;
│ │ │ +
99
│ │ │ +
│ │ │ +
101 AffineGeometry ( const ReferenceElement &refElement, const GlobalCoordinate &origin,
│ │ │ +
102 const JacobianTransposed &jt )
│ │ │ +
103 : refElement_(refElement), origin_(origin), jacobianTransposed_(jt)
│ │ │ +
104 {
│ │ │ +
105 integrationElement_ = MatrixHelper::rightInvA( jacobianTransposed_, jacobianInverseTransposed_ );
│ │ │ +
106 }
│ │ │ +
│ │ │ +
107
│ │ │ +
│ │ │ + │ │ │ +
110 const JacobianTransposed &jt )
│ │ │ +
111 : AffineGeometry(ReferenceElements::general( gt ), origin, jt)
│ │ │ +
112 { }
│ │ │ +
│ │ │ +
113
│ │ │ +
115 template< class CoordVector >
│ │ │ +
│ │ │ +
116 AffineGeometry ( const ReferenceElement &refElement, const CoordVector &coordVector )
│ │ │ +
117 : refElement_(refElement), origin_(coordVector[0])
│ │ │ +
118 {
│ │ │ +
119 for( int i = 0; i < mydimension; ++i )
│ │ │ +
120 jacobianTransposed_[ i ] = coordVector[ i+1 ] - origin_;
│ │ │ +
121 integrationElement_ = MatrixHelper::rightInvA( jacobianTransposed_, jacobianInverseTransposed_ );
│ │ │ +
122 }
│ │ │ +
│ │ │ +
123
│ │ │ +
125 template< class CoordVector >
│ │ │ +
│ │ │ +
126 AffineGeometry ( Dune::GeometryType gt, const CoordVector &coordVector )
│ │ │ +
127 : AffineGeometry(ReferenceElements::general( gt ), coordVector)
│ │ │ +
128 { }
│ │ │ +
│ │ │ +
129
│ │ │ +
131 bool affine () const { return true; }
│ │ │ +
132
│ │ │ +
134 Dune::GeometryType type () const { return refElement_.type(); }
│ │ │ +
135
│ │ │ +
137 int corners () const { return refElement_.size( mydimension ); }
│ │ │ +
138
│ │ │ +
│ │ │ +
140 GlobalCoordinate corner ( int i ) const
│ │ │ +
141 {
│ │ │ +
142 return global( refElement_.position( i, mydimension ) );
│ │ │ +
143 }
│ │ │ +
│ │ │ +
144
│ │ │ +
146 GlobalCoordinate center () const { return global( refElement_.position( 0, 0 ) ); }
│ │ │ +
147
│ │ │ +
│ │ │ + │ │ │ +
155 {
│ │ │ +
156 GlobalCoordinate global( origin_ );
│ │ │ +
157 jacobianTransposed_.umtv( local, global );
│ │ │ +
158 return global;
│ │ │ +
159 }
│ │ │ +
│ │ │ +
160
│ │ │ +
│ │ │ + │ │ │ +
175 {
│ │ │ + │ │ │ +
177 jacobianInverseTransposed_.mtv( global - origin_, local );
│ │ │ +
178 return local;
│ │ │ +
179 }
│ │ │ +
│ │ │ +
180
│ │ │ +
│ │ │ +
191 ctype integrationElement ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ +
192 {
│ │ │ +
193 return integrationElement_;
│ │ │ +
194 }
│ │ │ +
│ │ │ +
195
│ │ │ +
│ │ │ +
197 Volume volume () const
│ │ │ +
198 {
│ │ │ +
199 return integrationElement_ * refElement_.volume();
│ │ │ +
200 }
│ │ │ +
│ │ │ +
201
│ │ │ +
│ │ │ +
208 const JacobianTransposed &jacobianTransposed ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ +
209 {
│ │ │ +
210 return jacobianTransposed_;
│ │ │ +
211 }
│ │ │ +
│ │ │ +
212
│ │ │ +
│ │ │ + │ │ │ +
220 {
│ │ │ +
221 return jacobianInverseTransposed_;
│ │ │ +
222 }
│ │ │ +
│ │ │ +
223
│ │ │ +
│ │ │ +
230 Jacobian jacobian ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ +
231 {
│ │ │ +
232 return jacobianTransposed_.transposed();
│ │ │ +
233 }
│ │ │ +
│ │ │ +
234
│ │ │ +
│ │ │ +
241 JacobianInverse jacobianInverse ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ +
242 {
│ │ │ +
243 return jacobianInverseTransposed_.transposed();
│ │ │ +
244 }
│ │ │ +
│ │ │ +
245
│ │ │ +
│ │ │ +
246 friend ReferenceElement referenceElement ( const AffineGeometry &geometry )
│ │ │ +
247 {
│ │ │ +
248 return geometry.refElement_;
│ │ │ +
249 }
│ │ │ +
│ │ │ +
250
│ │ │ +
251 private:
│ │ │ +
252 ReferenceElement refElement_;
│ │ │ +
253 GlobalCoordinate origin_;
│ │ │ +
254 JacobianTransposed jacobianTransposed_;
│ │ │ +
255 JacobianInverseTransposed jacobianInverseTransposed_;
│ │ │ +
256 ctype integrationElement_;
│ │ │ +
257 };
│ │ │ +
│ │ │ +
258
│ │ │ +
259} // namespace Dune
│ │ │ +
│ │ │ +
260
│ │ │ +
261#endif // #ifndef DUNE_GEOMETRY_AFFINEGEOMETRY_HH
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ + │ │ │
Definition affinegeometry.hh:22
│ │ │ -
Enum
Definition quadraturerules.hh:131
│ │ │ -
@ GaussJacobi_n_0
Gauss-Legendre rules with .
Definition quadraturerules.hh:168
│ │ │ -
@ GaussJacobi_2_0
Gauss-Legendre rules with .
Definition quadraturerules.hh:155
│ │ │ -
@ GaussRadauRight
Gauss-Radau rules including the right endpoint.
Definition quadraturerules.hh:193
│ │ │ -
@ GaussJacobi_1_0
Gauss-Jacobi rules with .
Definition quadraturerules.hh:148
│ │ │ -
@ size
Definition quadraturerules.hh:194
│ │ │ -
@ GaussLobatto
Gauss-Lobatto rules.
Definition quadraturerules.hh:176
│ │ │ -
@ GaussRadauLeft
Gauss-Radau rules including the left endpoint.
Definition quadraturerules.hh:184
│ │ │ -
@ GaussLegendre
Gauss-Legendre rules (default).
Definition quadraturerules.hh:141
│ │ │ -
Single evaluation point in a quadrature rule.
Definition quadraturerules.hh:66
│ │ │ -
const Vector & position() const
return local coordinates of integration point i
Definition quadraturerules.hh:82
│ │ │ -
Dune::FieldVector< ct, dim > Vector
Type used for the position of a quadrature point.
Definition quadraturerules.hh:75
│ │ │ -
ct Field
Number type used for coordinates and quadrature weights.
Definition quadraturerules.hh:72
│ │ │ -
const ct & weight() const
return weight associated with integration point i
Definition quadraturerules.hh:88
│ │ │ -
ct weight_
Definition quadraturerules.hh:124
│ │ │ -
static constexpr int dimension
Dimension of the integration domain.
Definition quadraturerules.hh:69
│ │ │ -
QuadraturePoint(const Vector &x, ct w)
set up quadrature of given order in d dimensions
Definition quadraturerules.hh:78
│ │ │ -
FieldVector< ct, dim > local
Definition quadraturerules.hh:123
│ │ │ -
Dune::FieldVector< ct, dim > type
Definition quadraturerules.hh:43
│ │ │ - │ │ │ -
Exception thrown if a desired QuadratureRule is not available, because the requested order is to high...
Definition quadraturerules.hh:55
│ │ │ -
Abstract base class for quadrature rules.
Definition quadraturerules.hh:214
│ │ │ -
virtual ~QuadratureRule()
Definition quadraturerules.hh:241
│ │ │ -
static constexpr int d
Definition quadraturerules.hh:231
│ │ │ -
virtual GeometryType type() const
return type of element
Definition quadraturerules.hh:240
│ │ │ -
int delivered_order
Definition quadraturerules.hh:249
│ │ │ -
QuadratureRule(GeometryType t, int order)
Constructor for a given geometry type and a given quadrature order.
Definition quadraturerules.hh:228
│ │ │ -
GeometryType geometry_type
Definition quadraturerules.hh:248
│ │ │ -
ct CoordType
The type used for coordinates.
Definition quadraturerules.hh:234
│ │ │ -
QuadratureRule()
Default constructor.
Definition quadraturerules.hh:221
│ │ │ -
virtual int order() const
Definition quadraturerules.hh:237
│ │ │ -
QuadratureRule(GeometryType t)
Constructor for a given geometry type. Leaves the quadrature order invalid.
Definition quadraturerules.hh:225
│ │ │ -
std::vector< QuadraturePoint< ct, dim > >::const_iterator iterator
Definition quadraturerules.hh:245
│ │ │ -
Factory class for creation of quadrature rules, depending on GeometryType, order and QuadratureType.
Definition quadraturerules.hh:370
│ │ │ -
A container for all quadrature rules of dimension dim.
Definition quadraturerules.hh:260
│ │ │ -
static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
maximum quadrature order for given geometry type and quadrature type
Definition quadraturerules.hh:319
│ │ │ -
static const QuadratureRule & rule(const GeometryType::BasicType t, int p, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
select the appropriate QuadratureRule for GeometryType t and order p
Definition quadraturerules.hh:332
│ │ │ -
static const QuadratureRule & rule(const GeometryType &t, int p, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
select the appropriate QuadratureRule for GeometryType t and order p
Definition quadraturerules.hh:326
│ │ │ +
decltype(referenceElement(std::declval< T >()...)) ReferenceElement
Definition referenceelements.hh:291
│ │ │ +
Definition affinegeometry.hh:28
│ │ │ +
This class provides access to geometric and topological properties of a reference element.
Definition referenceelement.hh:52
│ │ │ +
Definition affinegeometry.hh:34
│ │ │ +
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │ +
AffineGeometry(const ReferenceElement &refElement, const CoordVector &coordVector)
Create affine geometry from reference element and a vector of vertex coordinates.
Definition affinegeometry.hh:116
│ │ │ +
AffineGeometry()=default
Constructs an empty geometry.
│ │ │ +
AffineGeometry(Dune::GeometryType gt, const GlobalCoordinate &origin, const JacobianTransposed &jt)
Create affine geometry from GeometryType, one vertex, and the Jacobian matrix.
Definition affinegeometry.hh:109
│ │ │ +
FieldVector< ctype, mydimension > LocalCoordinate
Type for local coordinate vector.
Definition affinegeometry.hh:62
│ │ │ +
Dune::GeometryType type() const
Obtain the type of the reference element.
Definition affinegeometry.hh:134
│ │ │ +
static const int mydimension
Dimension of the geometry.
Definition affinegeometry.hh:56
│ │ │ +
AffineGeometry(const ReferenceElement &refElement, const GlobalCoordinate &origin, const JacobianTransposed &jt)
Create affine geometry from reference element, one vertex, and the Jacobian matrix.
Definition affinegeometry.hh:101
│ │ │ +
ctype Volume
Type used for volume.
Definition affinegeometry.hh:68
│ │ │ +
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition affinegeometry.hh:241
│ │ │ +
friend ReferenceElement referenceElement(const AffineGeometry &geometry)
Definition affinegeometry.hh:246
│ │ │ +
AffineGeometry(Dune::GeometryType gt, const CoordVector &coordVector)
Create affine geometry from GeometryType and a vector of vertex coordinates.
Definition affinegeometry.hh:126
│ │ │ +
ctype integrationElement(const LocalCoordinate &local) const
Obtain the integration element.
Definition affinegeometry.hh:191
│ │ │ +
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
Type for the inverse Jacobian matrix.
Definition affinegeometry.hh:80
│ │ │ +
FieldMatrix< ctype, coorddimension, mydimension > Jacobian
Type for the Jacobian matrix.
Definition affinegeometry.hh:77
│ │ │ +
const JacobianInverseTransposed & jacobianInverseTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian's inverse.
Definition affinegeometry.hh:219
│ │ │ +
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
Type for the transposed Jacobian matrix.
Definition affinegeometry.hh:71
│ │ │ +
GlobalCoordinate corner(int i) const
Obtain coordinates of the i-th corner.
Definition affinegeometry.hh:140
│ │ │ +
int corners() const
Obtain number of corners of the corresponding reference element.
Definition affinegeometry.hh:137
│ │ │ +
LocalCoordinate local(const GlobalCoordinate &global) const
Evaluate the inverse mapping.
Definition affinegeometry.hh:174
│ │ │ +
FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed
Type for the transposed inverse Jacobian matrix.
Definition affinegeometry.hh:74
│ │ │ +
static const int coorddimension
Dimension of the world space.
Definition affinegeometry.hh:59
│ │ │ +
GlobalCoordinate global(const LocalCoordinate &local) const
Evaluate the mapping.
Definition affinegeometry.hh:154
│ │ │ +
GlobalCoordinate center() const
Obtain the centroid of the mapping's image.
Definition affinegeometry.hh:146
│ │ │ +
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition affinegeometry.hh:230
│ │ │ +
ct ctype
Type used for coordinates.
Definition affinegeometry.hh:53
│ │ │ +
FieldVector< ctype, coorddimension > GlobalCoordinate
Type for coordinate vector in world space.
Definition affinegeometry.hh:65
│ │ │ +
bool affine() const
Always true: this is an affine geometry.
Definition affinegeometry.hh:131
│ │ │ +
const JacobianTransposed & jacobianTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian.
Definition affinegeometry.hh:208
│ │ │ +
Volume volume() const
Obtain the volume of the element.
Definition affinegeometry.hh:197
│ │ │
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ -
constexpr bool isPrism() const
Return true if entity is a prism.
Definition type.hh:309
│ │ │ -
constexpr bool isVertex() const
Return true if entity is a vertex.
Definition type.hh:279
│ │ │ -
constexpr unsigned int dim() const
Return dimension of the type.
Definition type.hh:360
│ │ │ -
BasicType
Each entity can be tagged by one of these basic types plus its space dimension.
Definition type.hh:120
│ │ │ -
constexpr bool isLine() const
Return true if entity is a line segment.
Definition type.hh:284
│ │ │ -
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:365
│ │ │ -
constexpr bool isSimplex() const
Return true if entity is a simplex of any dimension.
Definition type.hh:319
│ │ │ -
static constexpr std::size_t size(std::size_t dim)
Compute total number of geometry types for the given dimension.
Definition typeindex.hh:61
│ │ │ -
static constexpr std::size_t index(const GeometryType &gt)
Compute the index for the given geometry type within its dimension.
Definition typeindex.hh:73
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,628 +1,338 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -quadraturerules.hh │ │ │ │ +affinegeometry.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © 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_GEOMETRY_QUADRATURERULES_HH │ │ │ │ -7#define DUNE_GEOMETRY_QUADRATURERULES_HH │ │ │ │ -8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ -13#include │ │ │ │ -14#include │ │ │ │ -15 │ │ │ │ +5#ifndef DUNE_GEOMETRY_AFFINEGEOMETRY_HH │ │ │ │ +6#define DUNE_GEOMETRY_AFFINEGEOMETRY_HH │ │ │ │ +7 │ │ │ │ +12 │ │ │ │ +13#include │ │ │ │ +14 │ │ │ │ +15#include │ │ │ │ 16#include │ │ │ │ -17#include │ │ │ │ -18#include │ │ │ │ -19#include │ │ │ │ -20#include │ │ │ │ -21 │ │ │ │ -22#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -23#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_i_n_d_e_x_._h_h> │ │ │ │ -24 │ │ │ │ +17 │ │ │ │ +18#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +19#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ +20 │ │ │ │ +_2_1namespace _D_u_n_e │ │ │ │ +22{ │ │ │ │ +23 │ │ │ │ +24 // External Forward Declarations │ │ │ │ +25 // ----------------------------- │ │ │ │ +26 │ │ │ │ +_2_7 namespace _G_e_o │ │ │ │ +28 { │ │ │ │ 29 │ │ │ │ -30 │ │ │ │ -31namespace _D_u_n_e { │ │ │ │ -32 // forward declaration │ │ │ │ -33 template │ │ │ │ -34 class _Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t; │ │ │ │ -35} │ │ │ │ -36 │ │ │ │ -37// class specialization of standard classes that allow to use structured │ │ │ │ -bindings on QuadraturePoint │ │ │ │ -38namespace _s_t_d { │ │ │ │ -39 template │ │ │ │ -_4_0 struct tuple_size<_D_u_n_e::QuadraturePoint> : public std:: │ │ │ │ -integral_constant {}; │ │ │ │ +30 template< typename Implementation > │ │ │ │ +31 class _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ +32 │ │ │ │ +33 template< class ctype, int dim > │ │ │ │ +_3_4 class _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n; │ │ │ │ +35 │ │ │ │ +36 template< class ctype, int dim > │ │ │ │ +37 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ +38 │ │ │ │ +39 } │ │ │ │ +40 │ │ │ │ 41 │ │ │ │ -42 template │ │ │ │ -_4_3 struct tuple_element<0, _D_u_n_e::QuadraturePoint> { using _t_y_p_e = Dune:: │ │ │ │ -FieldVector; }; │ │ │ │ -44 │ │ │ │ -45 template │ │ │ │ -_4_6 struct tuple_element<1, _D_u_n_e::QuadraturePoint> { using _t_y_p_e = ct; }; │ │ │ │ -47} │ │ │ │ -48 │ │ │ │ -49namespace _D_u_n_e { │ │ │ │ -50 │ │ │ │ -_5_5 class _Q_u_a_d_r_a_t_u_r_e_O_r_d_e_r_O_u_t_O_f_R_a_n_g_e : public NotImplemented {}; │ │ │ │ -56 │ │ │ │ -65 template │ │ │ │ -_6_6 class _Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t { │ │ │ │ -67 public: │ │ │ │ -_6_9 constexpr static int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ -70 │ │ │ │ -_7_2 typedef ct _F_i_e_l_d; │ │ │ │ -73 │ │ │ │ -_7_5 typedef Dune::FieldVector _V_e_c_t_o_r; │ │ │ │ -76 │ │ │ │ -_7_8 _Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t (const _V_e_c_t_o_r& x, ct w) : _l_o_c_a_l(x), _w_e_i_g_h_t__(w) │ │ │ │ -79 {} │ │ │ │ -80 │ │ │ │ -_8_2 const _V_e_c_t_o_r& _p_o_s_i_t_i_o_n () const │ │ │ │ -83 { │ │ │ │ -84 return _l_o_c_a_l; │ │ │ │ -85 } │ │ │ │ -86 │ │ │ │ -_8_8 const ct &_w_e_i_g_h_t () const │ │ │ │ -89 { │ │ │ │ -90 return _w_e_i_g_h_t__; │ │ │ │ -91 } │ │ │ │ -92 │ │ │ │ -111 template = 0> │ │ │ │ -_1_1_2 std::tuple_element_t> get() const │ │ │ │ -113 { │ │ │ │ -114 if constexpr (index == 0) { │ │ │ │ -115 return local; │ │ │ │ -116 } │ │ │ │ -117 else { │ │ │ │ -118 return weight_; │ │ │ │ -119 } │ │ │ │ -120 } │ │ │ │ -121 │ │ │ │ -122 protected: │ │ │ │ -_1_2_3 FieldVector local; │ │ │ │ -_1_2_4 ct weight_; │ │ │ │ -125 }; │ │ │ │ -126 │ │ │ │ -_1_3_0 namespace QuadratureType { │ │ │ │ -_1_3_1 enum Enum { │ │ │ │ -_1_4_1 GaussLegendre = 0, │ │ │ │ -142 │ │ │ │ -_1_4_8 GaussJacobi_1_0 = 1, │ │ │ │ -149 │ │ │ │ -_1_5_5 GaussJacobi_2_0 = 2, │ │ │ │ -156 │ │ │ │ -_1_6_8 GaussJacobi_n_0 = 3, │ │ │ │ -169 │ │ │ │ -_1_7_6 GaussLobatto = 4, │ │ │ │ -177 │ │ │ │ -_1_8_4 GaussRadauLeft = 5, │ │ │ │ -185 │ │ │ │ -_1_9_3 GaussRadauRight = 6, │ │ │ │ -_1_9_4 size │ │ │ │ -195 }; │ │ │ │ -196 } │ │ │ │ -197 │ │ │ │ -212 template │ │ │ │ -_2_1_3 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e : public std::vector > │ │ │ │ -214 { │ │ │ │ -215 public: │ │ │ │ -_2_2_1 _Q_u_a_d_r_a_t_u_r_e_R_u_l_e() : _d_e_l_i_v_e_r_e_d___o_r_d_e_r(-1) {} │ │ │ │ -222 │ │ │ │ -223 protected: │ │ │ │ -_2_2_5 _Q_u_a_d_r_a_t_u_r_e_R_u_l_e(_G_e_o_m_e_t_r_y_T_y_p_e t) : _g_e_o_m_e_t_r_y___t_y_p_e(t), _d_e_l_i_v_e_r_e_d___o_r_d_e_r(-1) {} │ │ │ │ -226 │ │ │ │ -_2_2_8 _Q_u_a_d_r_a_t_u_r_e_R_u_l_e(_G_e_o_m_e_t_r_y_T_y_p_e t, int _o_r_d_e_r) : _g_e_o_m_e_t_r_y___t_y_p_e(t), │ │ │ │ -_d_e_l_i_v_e_r_e_d___o_r_d_e_r(_o_r_d_e_r) {} │ │ │ │ -229 public: │ │ │ │ -_2_3_1 constexpr static int _d = dim; │ │ │ │ -232 │ │ │ │ -_2_3_4 typedef ct _C_o_o_r_d_T_y_p_e; │ │ │ │ -235 │ │ │ │ -_2_3_7 virtual int _o_r_d_e_r () const { return _d_e_l_i_v_e_r_e_d___o_r_d_e_r; } │ │ │ │ -238 │ │ │ │ -_2_4_0 virtual _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e () const { return _g_e_o_m_e_t_r_y___t_y_p_e; } │ │ │ │ -_2_4_1 virtual _~_Q_u_a_d_r_a_t_u_r_e_R_u_l_e(){} │ │ │ │ -242 │ │ │ │ -_2_4_5 typedef typename std::vector >::const_iterator │ │ │ │ -_i_t_e_r_a_t_o_r; │ │ │ │ -246 │ │ │ │ -247 protected: │ │ │ │ -_2_4_8 _G_e_o_m_e_t_r_y_T_y_p_e _g_e_o_m_e_t_r_y___t_y_p_e; │ │ │ │ -_2_4_9 int _d_e_l_i_v_e_r_e_d___o_r_d_e_r; │ │ │ │ -250 }; │ │ │ │ -251 │ │ │ │ -252 // Forward declaration of the factory class, │ │ │ │ -253 // needed internally by the QuadratureRules container class. │ │ │ │ -254 template class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y; │ │ │ │ -255 │ │ │ │ -259 template │ │ │ │ -_2_6_0 class QuadratureRules { │ │ │ │ -261 │ │ │ │ -263 using QuadratureRule = _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_c_t_y_p_e_,_ _d_i_m_>; │ │ │ │ -264 │ │ │ │ -265 // indexed by quadrature order │ │ │ │ -266 using QuadratureOrderVector = std::vector >; │ │ │ │ -267 │ │ │ │ -268 // indexed by geometry type │ │ │ │ -269 using GeometryTypeVector = std::vector >; │ │ │ │ -270 │ │ │ │ -271 // indexed by quadrature type enum │ │ │ │ -272 using QuadratureCacheVector = std::vector >; │ │ │ │ -273 │ │ │ │ -275 DUNE_EXPORT const QuadratureRule& _rule(const _G_e_o_m_e_t_r_y_T_y_p_e& t, int p, │ │ │ │ -_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m qt=_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_e_g_e_n_d_r_e) const │ │ │ │ -276 { │ │ │ │ -277 assert(t._d_i_m()==dim); │ │ │ │ -278 │ │ │ │ -279 DUNE_ASSERT_CALL_ONCE(); │ │ │ │ -280 │ │ │ │ -281 static QuadratureCacheVector quadratureCache(_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_s_i_z_e); │ │ │ │ -282 │ │ │ │ -283 auto& [ onceFlagQuadratureType, geometryTypes ] = quadratureCache[qt]; │ │ │ │ -284 // initialize geometry types for this quadrature type once │ │ │ │ -285 std::call_once(onceFlagQuadratureType, [&types = geometryTypes]{ │ │ │ │ -286 types = GeometryTypeVector(_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_s_i_z_e(dim)); │ │ │ │ -287 }); │ │ │ │ -288 │ │ │ │ -289 auto& [ onceFlagGeometryType, quadratureOrders ] = geometryTypes │ │ │ │ -[_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_i_n_d_e_x(t)]; │ │ │ │ -290 // initialize quadrature orders for this geometry type and quadrature type │ │ │ │ -once │ │ │ │ -291 std::call_once(onceFlagGeometryType, [&, &orders = quadratureOrders]{ │ │ │ │ -292 // we only need one quadrature rule for points, not maxint │ │ │ │ -293 const auto numRules = dim == 0 ? 1 : QuadratureRuleFactory:: │ │ │ │ -maxOrder(t, qt)+1; │ │ │ │ -294 orders = QuadratureOrderVector(numRules); │ │ │ │ -295 }); │ │ │ │ -296 │ │ │ │ -297 // we only have one quadrature rule for points │ │ │ │ -298 auto& [ onceFlagQuadratureOrder, quadratureRule ] = quadratureOrders[dim == │ │ │ │ -0 ? 0 : p]; │ │ │ │ -299 // initialize quadrature rule once │ │ │ │ -300 std::call_once(onceFlagQuadratureOrder, [&, &_r_u_l_e = quadratureRule]{ │ │ │ │ -301 _r_u_l_e = QuadratureRuleFactory::rule(t, p, qt); │ │ │ │ -302 }); │ │ │ │ -303 │ │ │ │ -304 return quadratureRule; │ │ │ │ -305 } │ │ │ │ -306 │ │ │ │ -308 DUNE_EXPORT static QuadratureRules& instance() │ │ │ │ -309 { │ │ │ │ -310 static QuadratureRules instance; │ │ │ │ -311 return instance; │ │ │ │ -312 } │ │ │ │ -313 │ │ │ │ -315 QuadratureRules () = default; │ │ │ │ -316 public: │ │ │ │ -318 static unsigned │ │ │ │ -_3_1_9 _m_a_x_O_r_d_e_r(const _G_e_o_m_e_t_r_y_T_y_p_e& t, │ │ │ │ -320 _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m qt=_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_e_g_e_n_d_r_e) │ │ │ │ -321 { │ │ │ │ -322 return QuadratureRuleFactory::maxOrder(t,qt); │ │ │ │ -323 } │ │ │ │ -324 │ │ │ │ -_3_2_6 static const QuadratureRule& _r_u_l_e(const _G_e_o_m_e_t_r_y_T_y_p_e& t, int p, │ │ │ │ -_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m qt=_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_e_g_e_n_d_r_e) │ │ │ │ -327 { │ │ │ │ -328 return instance()._rule(t,p,qt); │ │ │ │ -329 } │ │ │ │ -330 │ │ │ │ -_3_3_2 static const QuadratureRule& _r_u_l_e(const _G_e_o_m_e_t_r_y_T_y_p_e_:_:_B_a_s_i_c_T_y_p_e t, int p, │ │ │ │ -_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m qt=_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_e_g_e_n_d_r_e) │ │ │ │ -333 { │ │ │ │ -334 _G_e_o_m_e_t_r_y_T_y_p_e gt(t,dim); │ │ │ │ -335 return instance()._rule(gt,p,qt); │ │ │ │ -336 } │ │ │ │ -337 }; │ │ │ │ -338 │ │ │ │ -339} // end namespace Dune │ │ │ │ -340 │ │ │ │ -_3_4_1#define DUNE_INCLUDING_IMPLEMENTATION │ │ │ │ -342 │ │ │ │ -343// 0d rules │ │ │ │ -344#include "quadraturerules/pointquadrature.hh" │ │ │ │ -345// 1d rules │ │ │ │ -346#include "quadraturerules/gausslobattoquadrature.hh" │ │ │ │ -347#include "quadraturerules/gaussquadrature.hh" │ │ │ │ -348#include "quadraturerules/gaussradauleftquadrature.hh" │ │ │ │ -349#include "quadraturerules/gaussradaurightquadrature.hh" │ │ │ │ -350#include "quadraturerules/jacobi1quadrature.hh" │ │ │ │ -351#include "quadraturerules/jacobi2quadrature.hh" │ │ │ │ -352#include "quadraturerules/jacobiNquadrature.hh" │ │ │ │ -353// 3d rules │ │ │ │ -354#include "quadraturerules/prismquadrature.hh" │ │ │ │ -355// general rules │ │ │ │ -356#include "quadraturerules/simplexquadrature.hh" │ │ │ │ -357#include "quadraturerules/tensorproductquadrature.hh" │ │ │ │ -358 │ │ │ │ -359#undef DUNE_INCLUDING_IMPLEMENTATION │ │ │ │ -360 │ │ │ │ -361namespace _D_u_n_e { │ │ │ │ -362 │ │ │ │ -369 template │ │ │ │ -_3_7_0 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ -371 private: │ │ │ │ -372 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ -373 static unsigned maxOrder(const _G_e_o_m_e_t_r_y_T_y_p_e &t, _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m qt) │ │ │ │ -374 { │ │ │ │ -375 return TensorProductQuadratureRule::maxOrder(t._i_d(), qt); │ │ │ │ -376 } │ │ │ │ -377 static _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_c_t_y_p_e_,_ _d_i_m_> rule(const _G_e_o_m_e_t_r_y_T_y_p_e& t, int p, │ │ │ │ -_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m qt) │ │ │ │ -378 { │ │ │ │ -379 return TensorProductQuadratureRule(t._i_d(), p, qt); │ │ │ │ -380 } │ │ │ │ -381 }; │ │ │ │ -382 │ │ │ │ -383 template │ │ │ │ -_3_8_4 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ -385 private: │ │ │ │ -_3_8_6 constexpr static int dim = 0; │ │ │ │ -387 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ -388 static unsigned maxOrder(const _G_e_o_m_e_t_r_y_T_y_p_e &t, _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m) │ │ │ │ -389 { │ │ │ │ -390 if (t._i_s_V_e_r_t_e_x()) │ │ │ │ -391 { │ │ │ │ -392 return std::numeric_limits::max(); │ │ │ │ -393 } │ │ │ │ -394 DUNE_THROW(Exception, "Unknown GeometryType"); │ │ │ │ -395 } │ │ │ │ -396 static QuadratureRule rule(const GeometryType& t, int , │ │ │ │ -_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m) │ │ │ │ -397 { │ │ │ │ -398 if (t.isVertex()) │ │ │ │ -399 { │ │ │ │ -400 return PointQuadratureRule(); │ │ │ │ -401 } │ │ │ │ -402 DUNE_THROW(Exception, "Unknown GeometryType"); │ │ │ │ -403 } │ │ │ │ -404 }; │ │ │ │ -405 │ │ │ │ -406 template │ │ │ │ -_4_0_7 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ -408 private: │ │ │ │ -_4_0_9 constexpr static int dim = 1; │ │ │ │ -410 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ -411 static unsigned maxOrder(const _G_e_o_m_e_t_r_y_T_y_p_e &t, _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m qt) │ │ │ │ -412 { │ │ │ │ -413 if (t._i_s_L_i_n_e()) │ │ │ │ -414 { │ │ │ │ -415 switch (qt) { │ │ │ │ -416 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_e_g_e_n_d_r_e : │ │ │ │ -417 return GaussQuadratureRule1D::highest_order; │ │ │ │ -418 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_J_a_c_o_b_i___1___0 : │ │ │ │ -419 return Jacobi1QuadratureRule1D::highest_order; │ │ │ │ -420 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_J_a_c_o_b_i___2___0 : │ │ │ │ -421 return Jacobi2QuadratureRule1D::highest_order; │ │ │ │ -422 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_o_b_a_t_t_o : │ │ │ │ -423 return GaussLobattoQuadratureRule1D::highest_order; │ │ │ │ -424 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_J_a_c_o_b_i___n___0 : │ │ │ │ -425 return JacobiNQuadratureRule1D::maxOrder(); │ │ │ │ -426 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_R_a_d_a_u_L_e_f_t : │ │ │ │ -427 return GaussRadauLeftQuadratureRule1D::highest_order; │ │ │ │ -428 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_R_a_d_a_u_R_i_g_h_t : │ │ │ │ -429 return GaussRadauRightQuadratureRule1D::highest_order; │ │ │ │ -430 default : │ │ │ │ -431 DUNE_THROW(Exception, "Unknown QuadratureType"); │ │ │ │ -432 } │ │ │ │ -433 } │ │ │ │ -434 DUNE_THROW(Exception, "Unknown GeometryType"); │ │ │ │ -435 } │ │ │ │ -436 static QuadratureRule rule(const GeometryType& t, int p, │ │ │ │ -_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m qt) │ │ │ │ -437 { │ │ │ │ -438 if (t.isLine()) │ │ │ │ -439 { │ │ │ │ -440 switch (qt) { │ │ │ │ -441 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_e_g_e_n_d_r_e : │ │ │ │ -442 return GaussQuadratureRule1D(p); │ │ │ │ -443 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_J_a_c_o_b_i___1___0 : │ │ │ │ -444 return Jacobi1QuadratureRule1D(p); │ │ │ │ -445 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_J_a_c_o_b_i___2___0 : │ │ │ │ -446 return Jacobi2QuadratureRule1D(p); │ │ │ │ -447 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_o_b_a_t_t_o : │ │ │ │ -448 return GaussLobattoQuadratureRule1D(p); │ │ │ │ -449 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_J_a_c_o_b_i___n___0 : │ │ │ │ -450 return JacobiNQuadratureRule1D(p); │ │ │ │ -451 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_R_a_d_a_u_L_e_f_t : │ │ │ │ -452 return GaussRadauLeftQuadratureRule1D(p); │ │ │ │ -453 case _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_R_a_d_a_u_R_i_g_h_t : │ │ │ │ -454 return GaussRadauRightQuadratureRule1D(p); │ │ │ │ -455 default : │ │ │ │ -456 DUNE_THROW(Exception, "Unknown QuadratureType"); │ │ │ │ -457 } │ │ │ │ -458 } │ │ │ │ -459 DUNE_THROW(Exception, "Unknown GeometryType"); │ │ │ │ -460 } │ │ │ │ -461 }; │ │ │ │ -462 │ │ │ │ -463 template │ │ │ │ -_4_6_4 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ -465 private: │ │ │ │ -_4_6_6 constexpr static int dim = 2; │ │ │ │ -467 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ -468 static unsigned maxOrder(const _G_e_o_m_e_t_r_y_T_y_p_e &t, _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m qt) │ │ │ │ -469 { │ │ │ │ -470 unsigned order = │ │ │ │ -471 TensorProductQuadratureRule::maxOrder(t._i_d(), qt); │ │ │ │ -472 if (t._i_s_S_i_m_p_l_e_x()) │ │ │ │ -473 order = std::max │ │ │ │ -474 (order, static_cast(SimplexQuadratureRule:: │ │ │ │ -highest_order)); │ │ │ │ -475 return order; │ │ │ │ -476 } │ │ │ │ -477 static _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_c_t_y_p_e_,_ _d_i_m_> rule(const _G_e_o_m_e_t_r_y_T_y_p_e& t, int p, │ │ │ │ -_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m qt) │ │ │ │ -478 { │ │ │ │ -479 if (t._i_s_S_i_m_p_l_e_x() │ │ │ │ -480 && ( qt == _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_e_g_e_n_d_r_e || qt == _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_: │ │ │ │ -_G_a_u_s_s_J_a_c_o_b_i___n___0 ) │ │ │ │ -481 && p <= SimplexQuadratureRule::highest_order) │ │ │ │ -482 { │ │ │ │ -483 return SimplexQuadratureRule(p); │ │ │ │ -484 } │ │ │ │ -485 return TensorProductQuadratureRule(t._i_d(), p, qt); │ │ │ │ -486 } │ │ │ │ -487 }; │ │ │ │ -488 │ │ │ │ -489 template │ │ │ │ -_4_9_0 class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y { │ │ │ │ -491 private: │ │ │ │ -_4_9_2 constexpr static int dim = 3; │ │ │ │ -493 friend class _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s; │ │ │ │ -494 static unsigned maxOrder(const _G_e_o_m_e_t_r_y_T_y_p_e &t, _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m qt) │ │ │ │ -495 { │ │ │ │ -496 unsigned order = │ │ │ │ -497 TensorProductQuadratureRule::maxOrder(t._i_d(), qt); │ │ │ │ -498 if (t._i_s_S_i_m_p_l_e_x()) │ │ │ │ -499 order = std::max │ │ │ │ -500 (order, static_cast(SimplexQuadratureRule:: │ │ │ │ -highest_order)); │ │ │ │ -501 if (t._i_s_P_r_i_s_m()) │ │ │ │ -502 order = std::max │ │ │ │ -503 (order, static_cast(PrismQuadratureRule:: │ │ │ │ -highest_order)); │ │ │ │ -504 return order; │ │ │ │ -505 } │ │ │ │ -506 static _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_c_t_y_p_e_,_ _d_i_m_> rule(const _G_e_o_m_e_t_r_y_T_y_p_e& t, int p, │ │ │ │ -_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m qt) │ │ │ │ -507 { │ │ │ │ -508 │ │ │ │ -509 if (t._i_s_S_i_m_p_l_e_x() │ │ │ │ -510 && ( qt == _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_e_g_e_n_d_r_e || qt == _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_: │ │ │ │ -_G_a_u_s_s_J_a_c_o_b_i___n___0 ) │ │ │ │ -511 && p <= SimplexQuadratureRule::highest_order) │ │ │ │ -512 { │ │ │ │ -513 return SimplexQuadratureRule(p); │ │ │ │ -514 } │ │ │ │ -515 if (t._i_s_P_r_i_s_m() │ │ │ │ -516 && qt == _Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_e_g_e_n_d_r_e │ │ │ │ -517 && p <= PrismQuadratureRule::highest_order) │ │ │ │ -518 { │ │ │ │ -519 return PrismQuadratureRule(p); │ │ │ │ -520 } │ │ │ │ -521 return TensorProductQuadratureRule(t._i_d(), p, qt); │ │ │ │ -522 } │ │ │ │ -523 }; │ │ │ │ -524 │ │ │ │ -525#ifndef DUNE_NO_EXTERN_QUADRATURERULES │ │ │ │ -526 extern template class GaussLobattoQuadratureRule; │ │ │ │ -527 extern template class GaussQuadratureRule; │ │ │ │ -528 extern template class GaussRadauLeftQuadratureRule; │ │ │ │ -529 extern template class GaussRadauRightQuadratureRule; │ │ │ │ -530 extern template class Jacobi1QuadratureRule; │ │ │ │ -531 extern template class Jacobi2QuadratureRule; │ │ │ │ -532 extern template class JacobiNQuadratureRule; │ │ │ │ -533 extern template class PrismQuadratureRule; │ │ │ │ -534 extern template class SimplexQuadratureRule; │ │ │ │ -_5_3_5 extern template class SimplexQuadratureRule; │ │ │ │ -536#endif // !DUNE_NO_EXTERN_QUADRATURERULES │ │ │ │ -537 │ │ │ │ -538} // end namespace │ │ │ │ -539 │ │ │ │ -540#endif // DUNE_GEOMETRY_QUADRATURERULES_HH │ │ │ │ -_t_y_p_e_i_n_d_e_x_._h_h │ │ │ │ -Helper classes to provide indices for geometrytypes for use in a vector. │ │ │ │ +47 template< class ct, int mydim, int cdim> │ │ │ │ +_4_8 class _A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ +49 { │ │ │ │ +50 public: │ │ │ │ +51 │ │ │ │ +_5_3 typedef ct _c_t_y_p_e; │ │ │ │ +54 │ │ │ │ +_5_6 static const int _m_y_d_i_m_e_n_s_i_o_n= mydim; │ │ │ │ +57 │ │ │ │ +_5_9 static const int _c_o_o_r_d_d_i_m_e_n_s_i_o_n = cdim; │ │ │ │ +60 │ │ │ │ +_6_2 typedef FieldVector< ctype, mydimension > _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ +63 │ │ │ │ +_6_5 typedef FieldVector< ctype, coorddimension > _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ +66 │ │ │ │ +_6_8 typedef _c_t_y_p_e _V_o_l_u_m_e; │ │ │ │ +69 │ │ │ │ +_7_1 typedef FieldMatrix< ctype, mydimension, coorddimension > │ │ │ │ +_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ +72 │ │ │ │ +_7_4 typedef FieldMatrix< ctype, coorddimension, mydimension > │ │ │ │ +_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d; │ │ │ │ +75 │ │ │ │ +_7_7 typedef FieldMatrix< ctype, coorddimension, mydimension > _J_a_c_o_b_i_a_n; │ │ │ │ +78 │ │ │ │ +_8_0 typedef FieldMatrix< ctype, mydimension, coorddimension > _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e; │ │ │ │ +81 │ │ │ │ +82 private: │ │ │ │ +84 typedef _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_t_y_p_e_, │ │ │ │ +_m_y_d_i_m_e_n_s_i_o_n_ _> > ReferenceElement; │ │ │ │ +85 │ │ │ │ +86 typedef _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _> ReferenceElements; │ │ │ │ +87 │ │ │ │ +88 // Helper class to compute a matrix pseudo inverse │ │ │ │ +89 typedef Impl::FieldMatrixHelper< ct > MatrixHelper; │ │ │ │ +90 │ │ │ │ +91 public: │ │ │ │ +_9_8 _A_f_f_i_n_e_G_e_o_m_e_t_r_y () = default; │ │ │ │ +99 │ │ │ │ +_1_0_1 _A_f_f_i_n_e_G_e_o_m_e_t_r_y ( const ReferenceElement &refElement, const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +&origin, │ │ │ │ +102 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ +103 : refElement_(refElement), origin_(origin), jacobianTransposed_(jt) │ │ │ │ +104 { │ │ │ │ +105 integrationElement_ = MatrixHelper::rightInvA( jacobianTransposed_, │ │ │ │ +jacobianInverseTransposed_ ); │ │ │ │ +106 } │ │ │ │ +107 │ │ │ │ +_1_0_9 _A_f_f_i_n_e_G_e_o_m_e_t_r_y ( _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e gt, const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &origin, │ │ │ │ +110 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ +111 : _A_f_f_i_n_e_G_e_o_m_e_t_r_y(ReferenceElements::general( gt ), origin, jt) │ │ │ │ +112 { } │ │ │ │ +113 │ │ │ │ +115 template< class CoordVector > │ │ │ │ +_1_1_6 _A_f_f_i_n_e_G_e_o_m_e_t_r_y ( const ReferenceElement &refElement, const CoordVector │ │ │ │ +&coordVector ) │ │ │ │ +117 : refElement_(refElement), origin_(coordVector[0]) │ │ │ │ +118 { │ │ │ │ +119 for( int i = 0; i < _m_y_d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ +120 jacobianTransposed_[ i ] = coordVector[ i+1 ] - origin_; │ │ │ │ +121 integrationElement_ = MatrixHelper::rightInvA( jacobianTransposed_, │ │ │ │ +jacobianInverseTransposed_ ); │ │ │ │ +122 } │ │ │ │ +123 │ │ │ │ +125 template< class CoordVector > │ │ │ │ +_1_2_6 _A_f_f_i_n_e_G_e_o_m_e_t_r_y ( _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e gt, const CoordVector &coordVector ) │ │ │ │ +127 : _A_f_f_i_n_e_G_e_o_m_e_t_r_y(ReferenceElements::general( gt ), coordVector) │ │ │ │ +128 { } │ │ │ │ +129 │ │ │ │ +_1_3_1 bool _a_f_f_i_n_e () const { return true; } │ │ │ │ +132 │ │ │ │ +_1_3_4 _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e () const { return refElement_.type(); } │ │ │ │ +135 │ │ │ │ +_1_3_7 int _c_o_r_n_e_r_s () const { return refElement_.size( _m_y_d_i_m_e_n_s_i_o_n ); } │ │ │ │ +138 │ │ │ │ +_1_4_0 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_o_r_n_e_r ( int i ) const │ │ │ │ +141 { │ │ │ │ +142 return _g_l_o_b_a_l( refElement_.position( i, _m_y_d_i_m_e_n_s_i_o_n ) ); │ │ │ │ +143 } │ │ │ │ +144 │ │ │ │ +_1_4_6 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r () const { return _g_l_o_b_a_l( refElement_.position( 0, │ │ │ │ +0 ) ); } │ │ │ │ +147 │ │ │ │ +_1_5_4 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) const │ │ │ │ +155 { │ │ │ │ +156 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l( origin_ ); │ │ │ │ +157 jacobianTransposed_.umtv( _l_o_c_a_l, _g_l_o_b_a_l ); │ │ │ │ +158 return _g_l_o_b_a_l; │ │ │ │ +159 } │ │ │ │ +160 │ │ │ │ +_1_7_4 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l ( const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &_g_l_o_b_a_l ) const │ │ │ │ +175 { │ │ │ │ +176 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l; │ │ │ │ +177 jacobianInverseTransposed_.mtv( _g_l_o_b_a_l - origin_, _l_o_c_a_l ); │ │ │ │ +178 return _l_o_c_a_l; │ │ │ │ +179 } │ │ │ │ +180 │ │ │ │ +_1_9_1 _c_t_y_p_e _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t ([[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) │ │ │ │ +const │ │ │ │ +192 { │ │ │ │ +193 return integrationElement_; │ │ │ │ +194 } │ │ │ │ +195 │ │ │ │ +_1_9_7 _V_o_l_u_m_e _v_o_l_u_m_e () const │ │ │ │ +198 { │ │ │ │ +199 return integrationElement_ * refElement_.volume(); │ │ │ │ +200 } │ │ │ │ +201 │ │ │ │ +_2_0_8 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ([[maybe_unused]] const │ │ │ │ +_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ +209 { │ │ │ │ +210 return jacobianTransposed_; │ │ │ │ +211 } │ │ │ │ +212 │ │ │ │ +_2_1_9 const _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d &_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ([ │ │ │ │ +[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ +220 { │ │ │ │ +221 return jacobianInverseTransposed_; │ │ │ │ +222 } │ │ │ │ +223 │ │ │ │ +_2_3_0 _J_a_c_o_b_i_a_n _j_a_c_o_b_i_a_n ([[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ +231 { │ │ │ │ +232 return jacobianTransposed_.transposed(); │ │ │ │ +233 } │ │ │ │ +234 │ │ │ │ +_2_4_1 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e ([[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +&_l_o_c_a_l) const │ │ │ │ +242 { │ │ │ │ +243 return jacobianInverseTransposed_.transposed(); │ │ │ │ +244 } │ │ │ │ +245 │ │ │ │ +_2_4_6 friend ReferenceElement _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t ( const _A_f_f_i_n_e_G_e_o_m_e_t_r_y &geometry ) │ │ │ │ +247 { │ │ │ │ +248 return geometry.refElement_; │ │ │ │ +249 } │ │ │ │ +250 │ │ │ │ +251 private: │ │ │ │ +252 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t refElement_; │ │ │ │ +253 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e origin_; │ │ │ │ +254 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d jacobianTransposed_; │ │ │ │ +255 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d jacobianInverseTransposed_; │ │ │ │ +256 _c_t_y_p_e integrationElement_; │ │ │ │ +257 }; │ │ │ │ +258 │ │ │ │ +259} // namespace Dune │ │ │ │ +260 │ │ │ │ +261#endif // #ifndef DUNE_GEOMETRY_AFFINEGEOMETRY_HH │ │ │ │ _t_y_p_e_._h_h │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ -_s_t_d │ │ │ │ -STL namespace. │ │ │ │ +_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_E_n_u_m │ │ │ │ -Enum │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:131 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_J_a_c_o_b_i___n___0 │ │ │ │ -@ GaussJacobi_n_0 │ │ │ │ -Gauss-Legendre rules with . │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:168 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_J_a_c_o_b_i___2___0 │ │ │ │ -@ GaussJacobi_2_0 │ │ │ │ -Gauss-Legendre rules with . │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:155 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_R_a_d_a_u_R_i_g_h_t │ │ │ │ -@ GaussRadauRight │ │ │ │ -Gauss-Radau rules including the right endpoint. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:193 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_J_a_c_o_b_i___1___0 │ │ │ │ -@ GaussJacobi_1_0 │ │ │ │ -Gauss-Jacobi rules with . │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:148 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_s_i_z_e │ │ │ │ -@ size │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:194 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_o_b_a_t_t_o │ │ │ │ -@ GaussLobatto │ │ │ │ -Gauss-Lobatto rules. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:176 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_R_a_d_a_u_L_e_f_t │ │ │ │ -@ GaussRadauLeft │ │ │ │ -Gauss-Radau rules including the left endpoint. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:184 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_G_a_u_s_s_L_e_g_e_n_d_r_e │ │ │ │ -@ GaussLegendre │ │ │ │ -Gauss-Legendre rules (default). │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:141 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t │ │ │ │ -Single evaluation point in a quadrature rule. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:66 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_:_:_p_o_s_i_t_i_o_n │ │ │ │ -const Vector & position() const │ │ │ │ -return local coordinates of integration point i │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:82 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_:_:_V_e_c_t_o_r │ │ │ │ -Dune::FieldVector< ct, dim > Vector │ │ │ │ -Type used for the position of a quadrature point. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:75 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_:_:_F_i_e_l_d │ │ │ │ -ct Field │ │ │ │ -Number type used for coordinates and quadrature weights. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:72 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_:_:_w_e_i_g_h_t │ │ │ │ -const ct & weight() const │ │ │ │ -return weight associated with integration point i │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:88 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_:_:_w_e_i_g_h_t__ │ │ │ │ -ct weight_ │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:124 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int dimension │ │ │ │ -Dimension of the integration domain. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:69 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t │ │ │ │ -QuadraturePoint(const Vector &x, ct w) │ │ │ │ -set up quadrature of given order in d dimensions │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:78 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_:_:_l_o_c_a_l │ │ │ │ -FieldVector< ct, dim > local │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:123 │ │ │ │ -_s_t_d_:_:_t_u_p_l_e___e_l_e_m_e_n_t_<_ _0_,_ _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_<_ _c_t_,_ _d_i_m_ _>_ _>_:_:_t_y_p_e │ │ │ │ -Dune::FieldVector< ct, dim > type │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:43 │ │ │ │ -_s_t_d_:_:_t_u_p_l_e___e_l_e_m_e_n_t_<_ _1_,_ _D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_P_o_i_n_t_<_ _c_t_,_ _d_i_m_ _>_ _>_:_:_t_y_p_e │ │ │ │ -ct type │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:46 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_O_r_d_e_r_O_u_t_O_f_R_a_n_g_e │ │ │ │ -Exception thrown if a desired QuadratureRule is not available, because the │ │ │ │ -requested order is to high... │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:55 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e │ │ │ │ -Abstract base class for quadrature rules. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:214 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_:_:_~_Q_u_a_d_r_a_t_u_r_e_R_u_l_e │ │ │ │ -virtual ~QuadratureRule() │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:241 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_ _c_t_y_p_e_,_ _d_i_m_ _>_:_:_d │ │ │ │ -static constexpr int d │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:231 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_:_:_t_y_p_e │ │ │ │ -virtual GeometryType type() const │ │ │ │ -return type of element │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:240 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_ _c_t_y_p_e_,_ _d_i_m_ _>_:_:_d_e_l_i_v_e_r_e_d___o_r_d_e_r │ │ │ │ -int delivered_order │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:249 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e │ │ │ │ -QuadratureRule(GeometryType t, int order) │ │ │ │ -Constructor for a given geometry type and a given quadrature order. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:228 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_ _c_t_y_p_e_,_ _d_i_m_ _>_:_:_g_e_o_m_e_t_r_y___t_y_p_e │ │ │ │ -GeometryType geometry_type │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:248 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_:_:_C_o_o_r_d_T_y_p_e │ │ │ │ -ct CoordType │ │ │ │ -The type used for coordinates. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:234 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e │ │ │ │ -QuadratureRule() │ │ │ │ -Default constructor. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:221 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_ _c_t_y_p_e_,_ _d_i_m_ _>_:_:_o_r_d_e_r │ │ │ │ -virtual int order() const │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:237 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e │ │ │ │ -QuadratureRule(GeometryType t) │ │ │ │ -Constructor for a given geometry type. Leaves the quadrature order invalid. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:225 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_:_:_i_t_e_r_a_t_o_r │ │ │ │ -std::vector< QuadraturePoint< ct, dim > >::const_iterator iterator │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:245 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_F_a_c_t_o_r_y │ │ │ │ -Factory class for creation of quadrature rules, depending on GeometryType, │ │ │ │ -order and QuadratureType. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:370 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s │ │ │ │ -A container for all quadrature rules of dimension dim. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:260 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_:_:_m_a_x_O_r_d_e_r │ │ │ │ -static unsigned maxOrder(const GeometryType &t, QuadratureType::Enum │ │ │ │ -qt=QuadratureType::GaussLegendre) │ │ │ │ -maximum quadrature order for given geometry type and quadrature type │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:319 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_:_:_r_u_l_e │ │ │ │ -static const QuadratureRule & rule(const GeometryType::BasicType t, int p, │ │ │ │ -QuadratureType::Enum qt=QuadratureType::GaussLegendre) │ │ │ │ -select the appropriate QuadratureRule for GeometryType t and order p │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:332 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_:_:_r_u_l_e │ │ │ │ -static const QuadratureRule & rule(const GeometryType &t, int p, │ │ │ │ -QuadratureType::Enum qt=QuadratureType::GaussLegendre) │ │ │ │ -select the appropriate QuadratureRule for GeometryType t and order p │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:326 │ │ │ │ +_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +decltype(referenceElement(std::declval< T >()...)) ReferenceElement │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:291 │ │ │ │ +_D_u_n_e_:_:_G_e_o │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:28 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +This class provides access to geometric and topological properties of a │ │ │ │ +reference element. │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:52 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:34 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ +Class providing access to the singletons of the reference elements. │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ +AffineGeometry(const ReferenceElement &refElement, const CoordVector │ │ │ │ +&coordVector) │ │ │ │ +Create affine geometry from reference element and a vector of vertex │ │ │ │ +coordinates. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:116 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ +AffineGeometry()=default │ │ │ │ +Constructs an empty geometry. │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ +AffineGeometry(Dune::GeometryType gt, const GlobalCoordinate &origin, const │ │ │ │ +JacobianTransposed &jt) │ │ │ │ +Create affine geometry from GeometryType, one vertex, and the Jacobian matrix. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:109 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +FieldVector< ctype, mydimension > LocalCoordinate │ │ │ │ +Type for local coordinate vector. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:62 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_t_y_p_e │ │ │ │ +Dune::GeometryType type() const │ │ │ │ +Obtain the type of the reference element. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:134 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ +static const int mydimension │ │ │ │ +Dimension of the geometry. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:56 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ +AffineGeometry(const ReferenceElement &refElement, const GlobalCoordinate │ │ │ │ +&origin, const JacobianTransposed &jt) │ │ │ │ +Create affine geometry from reference element, one vertex, and the Jacobian │ │ │ │ +matrix. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:101 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_V_o_l_u_m_e │ │ │ │ +ctype Volume │ │ │ │ +Type used for volume. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:68 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ +JacobianInverse jacobianInverse(const LocalCoordinate &local) const │ │ │ │ +Obtain the Jacobian's inverse. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:241 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +friend ReferenceElement referenceElement(const AffineGeometry &geometry) │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:246 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ +AffineGeometry(Dune::GeometryType gt, const CoordVector &coordVector) │ │ │ │ +Create affine geometry from GeometryType and a vector of vertex coordinates. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:126 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ +ctype integrationElement(const LocalCoordinate &local) const │ │ │ │ +Obtain the integration element. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:191 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ +FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse │ │ │ │ +Type for the inverse Jacobian matrix. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:80 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n │ │ │ │ +FieldMatrix< ctype, coorddimension, mydimension > Jacobian │ │ │ │ +Type for the Jacobian matrix. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:77 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +const JacobianInverseTransposed & jacobianInverseTransposed(const │ │ │ │ +LocalCoordinate &local) const │ │ │ │ +Obtain the transposed of the Jacobian's inverse. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:219 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed │ │ │ │ +Type for the transposed Jacobian matrix. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:71 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ +GlobalCoordinate corner(int i) const │ │ │ │ +Obtain coordinates of the i-th corner. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:140 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r_s │ │ │ │ +int corners() const │ │ │ │ +Obtain number of corners of the corresponding reference element. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:137 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l │ │ │ │ +LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ +Evaluate the inverse mapping. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:174 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed │ │ │ │ +Type for the transposed inverse Jacobian matrix. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:74 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ +static const int coorddimension │ │ │ │ +Dimension of the world space. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:59 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ +GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ +Evaluate the mapping. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:154 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_c_e_n_t_e_r │ │ │ │ +GlobalCoordinate center() const │ │ │ │ +Obtain the centroid of the mapping's image. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:146 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n │ │ │ │ +Jacobian jacobian(const LocalCoordinate &local) const │ │ │ │ +Obtain the Jacobian. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:230 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_c_t_y_p_e │ │ │ │ +ct ctype │ │ │ │ +Type used for coordinates. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:53 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +FieldVector< ctype, coorddimension > GlobalCoordinate │ │ │ │ +Type for coordinate vector in world space. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:65 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ +bool affine() const │ │ │ │ +Always true: this is an affine geometry. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:131 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +const JacobianTransposed & jacobianTransposed(const LocalCoordinate &local) │ │ │ │ +const │ │ │ │ +Obtain the transposed of the Jacobian. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:208 │ │ │ │ +_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ +Volume volume() const │ │ │ │ +Obtain the volume of the element. │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:197 │ │ │ │ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ DDeeffiinniittiioonn type.hh:114 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_P_r_i_s_m │ │ │ │ -constexpr bool isPrism() const │ │ │ │ -Return true if entity is a prism. │ │ │ │ -DDeeffiinniittiioonn type.hh:309 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_V_e_r_t_e_x │ │ │ │ -constexpr bool isVertex() const │ │ │ │ -Return true if entity is a vertex. │ │ │ │ -DDeeffiinniittiioonn type.hh:279 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_d_i_m │ │ │ │ -constexpr unsigned int dim() const │ │ │ │ -Return dimension of the type. │ │ │ │ -DDeeffiinniittiioonn type.hh:360 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_B_a_s_i_c_T_y_p_e │ │ │ │ -BasicType │ │ │ │ -Each entity can be tagged by one of these basic types plus its space dimension. │ │ │ │ -DDeeffiinniittiioonn type.hh:120 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_L_i_n_e │ │ │ │ -constexpr bool isLine() const │ │ │ │ -Return true if entity is a line segment. │ │ │ │ -DDeeffiinniittiioonn type.hh:284 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_d │ │ │ │ -constexpr unsigned int id() const │ │ │ │ -Return the topology id of the type. │ │ │ │ -DDeeffiinniittiioonn type.hh:365 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_S_i_m_p_l_e_x │ │ │ │ -constexpr bool isSimplex() const │ │ │ │ -Return true if entity is a simplex of any dimension. │ │ │ │ -DDeeffiinniittiioonn type.hh:319 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_s_i_z_e │ │ │ │ -static constexpr std::size_t size(std::size_t dim) │ │ │ │ -Compute total number of geometry types for the given dimension. │ │ │ │ -DDeeffiinniittiioonn typeindex.hh:61 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_i_n_d_e_x │ │ │ │ -static constexpr std::size_t index(const GeometryType >) │ │ │ │ -Compute the index for the given geometry type within its dimension. │ │ │ │ -DDeeffiinniittiioonn typeindex.hh:73 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00233.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: multilineargeometry.hh File Reference │ │ │ +dune-geometry: axisalignedcubegeometry.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,50 +74,41 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
multilineargeometry.hh File Reference
│ │ │ +
axisalignedcubegeometry.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <cassert>
│ │ │ -#include <functional>
│ │ │ -#include <iterator>
│ │ │ -#include <limits>
│ │ │ -#include <vector>
│ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ + │ │ │ +

A geometry implementation for axis-aligned hypercubes. │ │ │ +More...

│ │ │ +
#include <bitset>
│ │ │ #include <dune/common/fvector.hh>
│ │ │ -#include <dune/common/typetraits.hh>
│ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ -#include <dune/geometry/utility/defaultmatrixhelper.hh>
│ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ +#include <dune/common/diagonalmatrix.hh>
│ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ +#include <dune/geometry/type.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

struct  Dune::MultiLinearGeometryTraits< ct >
 default traits class for MultiLinearGeometry More...
struct  Dune::MultiLinearGeometryTraits< ct >::CornerStorage< mydim, cdim >
 template specifying the storage for the corners More...
struct  Dune::MultiLinearGeometryTraits< ct >::hasSingleGeometryType< dim >
 will there be only one geometry type for a dimension? More...
class  Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >
 generic geometry implementation based on corner coordinates More...
class  Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed
class  Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >
 Implement a MultiLinearGeometry with additional caching. More...
class  Dune::AxisAlignedCubeGeometry< CoordType, dim, coorddim >
 A geometry implementation for axis-aligned hypercubes. More...
│ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
│ │ │ -
│ │ │ +

Detailed Description

│ │ │ +

A geometry implementation for axis-aligned hypercubes.

│ │ │ +
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,37 +1,25 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -multilineargeometry.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +axisalignedcubegeometry.hh File Reference │ │ │ │ +A geometry implementation for axis-aligned hypercubes. _M_o_r_e_._._. │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_<_ _c_t_ _> │ │ │ │ -  default traits class for _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_<_ _c_t_ _>_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_<_ _m_y_d_i_m_,_ _c_d_i_m_ _> │ │ │ │ -  template specifying the storage for the corners _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_<_ _c_t_ _>_:_:_h_a_s_S_i_n_g_l_e_G_e_o_m_e_t_r_y_T_y_p_e_<_ _d_i_m_ _> │ │ │ │ -  will there be only one geometry type for a dimension? _M_o_r_e_._._. │ │ │ │ - class   _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ -  generic geometry implementation based on corner coordinates _M_o_r_e_._._. │ │ │ │ - class   _D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_: │ │ │ │ - _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ - class   _D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ -  Implement a _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y with additional caching. _M_o_r_e_._._. │ │ │ │ +class   _D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_<_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_,_ _c_o_o_r_d_d_i_m_ _> │ │ │ │ +  A geometry implementation for axis-aligned hypercubes. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +A geometry implementation for axis-aligned hypercubes. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00233_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: multilineargeometry.hh Source File │ │ │ +dune-geometry: axisalignedcubegeometry.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,818 +71,361 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
multilineargeometry.hh
│ │ │ +
axisalignedcubegeometry.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH
│ │ │ -
6#define DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH
│ │ │ -
7
│ │ │ -
8#include <cassert>
│ │ │ -
9#include <functional>
│ │ │ -
10#include <iterator>
│ │ │ -
11#include <limits>
│ │ │ -
12#include <vector>
│ │ │ -
13
│ │ │ -
14#include <dune/common/fmatrix.hh>
│ │ │ +
5
│ │ │ +
6#ifndef DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH
│ │ │ +
7#define DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH
│ │ │ +
8
│ │ │ +
12
│ │ │ +
13#include <bitset>
│ │ │ +
14
│ │ │
15#include <dune/common/fvector.hh>
│ │ │ -
16#include <dune/common/typetraits.hh>
│ │ │ -
17
│ │ │ - │ │ │ -
19#include <dune/geometry/type.hh>
│ │ │ - │ │ │ +
16#include <dune/common/fmatrix.hh>
│ │ │ +
17#include <dune/common/diagonalmatrix.hh>
│ │ │ +
18
│ │ │ + │ │ │ +
20#include <dune/geometry/type.hh>
│ │ │
21
│ │ │ -
22namespace Dune
│ │ │ -
23{
│ │ │ -
24
│ │ │ -
25 // MultiLinearGeometryTraits
│ │ │ -
26 // -------------------------
│ │ │ -
27
│ │ │ -
37 template< class ct >
│ │ │ -
│ │ │ - │ │ │ -
39 {
│ │ │ -
58 typedef Impl::FieldMatrixHelper< ct > MatrixHelper;
│ │ │ -
59
│ │ │ -
61 static ct tolerance () { return ct( 16 ) * std::numeric_limits< ct >::epsilon(); }
│ │ │ -
62
│ │ │ -
127 template< int mydim, int cdim >
│ │ │ -
│ │ │ - │ │ │ +
22
│ │ │ +
23namespace Dune {
│ │ │ +
24
│ │ │ +
48 template <class CoordType, unsigned int dim, unsigned int coorddim>
│ │ │ +
│ │ │ + │ │ │ +
50 {
│ │ │ +
51
│ │ │ +
52
│ │ │ +
53 public:
│ │ │ +
54
│ │ │ +
56 constexpr static int mydimension = dim;
│ │ │ +
57
│ │ │ +
59 constexpr static int coorddimension = coorddim;
│ │ │ +
60
│ │ │ +
62 typedef CoordType ctype;
│ │ │ +
63
│ │ │ +
65 typedef FieldVector<ctype,dim> LocalCoordinate;
│ │ │ +
66
│ │ │ +
68 typedef FieldVector<ctype,coorddim> GlobalCoordinate;
│ │ │ +
69
│ │ │ +
71 typedef ctype Volume;
│ │ │ +
72
│ │ │ +
79 typedef typename std::conditional<dim==coorddim,
│ │ │ +
80 DiagonalMatrix<ctype,dim>,
│ │ │ +
81 FieldMatrix<ctype,dim,coorddim> >::type JacobianTransposed;
│ │ │ +
82
│ │ │ +
89 typedef typename std::conditional<dim==coorddim,
│ │ │ +
90 DiagonalMatrix<ctype,dim>,
│ │ │ +
91 FieldMatrix<ctype,coorddim,dim> >::type JacobianInverseTransposed;
│ │ │ +
92
│ │ │ +
100 using Jacobian = std::conditional_t<dim==coorddim, DiagonalMatrix<ctype,dim>, FieldMatrix<ctype,coorddim,dim> >;
│ │ │ +
101
│ │ │ +
109 using JacobianInverse = std::conditional_t<dim==coorddim, DiagonalMatrix<ctype,dim>, FieldMatrix<ctype,dim,coorddim> >;
│ │ │ +
110
│ │ │ + │ │ │ +
119
│ │ │ +
│ │ │ +
124 AxisAlignedCubeGeometry(const Dune::FieldVector<ctype,coorddim> lower,
│ │ │ +
125 const Dune::FieldVector<ctype,coorddim> upper)
│ │ │ +
126 : lower_(lower),
│ │ │ +
127 upper_(upper),
│ │ │ +
128 axes_()
│ │ │
129 {
│ │ │ -
130 typedef std::vector< FieldVector< ct, cdim > > Type;
│ │ │ -
131 };
│ │ │ -
│ │ │ -
132
│ │ │ -
146 template< int dim >
│ │ │ -
│ │ │ - │ │ │ +
130 static_assert(dim==coorddim, "Use this constructor only if dim==coorddim!");
│ │ │ +
131 // all 'true', but is never actually used
│ │ │ +
132 axes_ = (1<<coorddim)-1;
│ │ │ +
133 }
│ │ │ +
│ │ │ +
134
│ │ │ +
│ │ │ +
142 AxisAlignedCubeGeometry(const Dune::FieldVector<ctype,coorddim> lower,
│ │ │ +
143 const Dune::FieldVector<ctype,coorddim> upper,
│ │ │ +
144 const std::bitset<coorddim>& axes)
│ │ │ +
145 : lower_(lower),
│ │ │ +
146 upper_(upper),
│ │ │ +
147 axes_(axes)
│ │ │
148 {
│ │ │ -
149 static const bool v = false;
│ │ │ -
150 static const unsigned int topologyId = ~0u;
│ │ │ -
151 };
│ │ │ -
│ │ │ -
152 };
│ │ │ -
│ │ │ -
153
│ │ │ -
154
│ │ │ -
155
│ │ │ -
156 // MultiLinearGeometry
│ │ │ -
157 // -------------------
│ │ │ -
158
│ │ │ -
179 template< class ct, int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct > >
│ │ │ -
│ │ │ - │ │ │ -
181 {
│ │ │ - │ │ │ -
183
│ │ │ -
184 public:
│ │ │ -
186 typedef ct ctype;
│ │ │ +
149 assert(axes.count()==dim);
│ │ │ +
150 for (size_t i=0; i<coorddim; i++)
│ │ │ +
151 if (not axes_[i])
│ │ │ +
152 upper_[i] = lower_[i];
│ │ │ +
153 }
│ │ │ +
│ │ │ +
154
│ │ │ +
│ │ │ +
159 AxisAlignedCubeGeometry(const Dune::FieldVector<ctype,coorddim> lower)
│ │ │ +
160 : lower_(lower)
│ │ │ +
161 {}
│ │ │ +
│ │ │ +
162
│ │ │ +
│ │ │ + │ │ │ +
165 {
│ │ │ +
166 return GeometryTypes::cube(dim);
│ │ │ +
167 }
│ │ │ +
│ │ │ +
168
│ │ │ +
│ │ │ + │ │ │ +
171 {
│ │ │ +
172 GlobalCoordinate result;
│ │ │ +
173 if (dim == coorddim) { // fast case
│ │ │ +
174 for (size_t i=0; i<coorddim; i++)
│ │ │ +
175 result[i] = lower_[i] + local[i]*(upper_[i] - lower_[i]);
│ │ │ +
176 } else if (dim == 0) { // a vertex -- the other fast case
│ │ │ +
177 result = lower_; // hope for named-return-type-optimization
│ │ │ +
178 } else { // slow case
│ │ │ +
179 size_t lc=0;
│ │ │ +
180 for (size_t i=0; i<coorddim; i++)
│ │ │ +
181 result[i] = (axes_[i])
│ │ │ +
182 ? lower_[i] + local[lc++]*(upper_[i] - lower_[i])
│ │ │ +
183 : lower_[i];
│ │ │ +
184 }
│ │ │ +
185 return result;
│ │ │ +
186 }
│ │ │ +
│ │ │
187
│ │ │ -
189 static const int mydimension= mydim;
│ │ │ -
191 static const int coorddimension = cdim;
│ │ │ -
192
│ │ │ -
194 typedef FieldVector< ctype, mydimension > LocalCoordinate;
│ │ │ -
196 typedef FieldVector< ctype, coorddimension > GlobalCoordinate;
│ │ │ -
198 typedef ctype Volume;
│ │ │ -
199
│ │ │ -
201 typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed;
│ │ │ -
202
│ │ │ -
204 class JacobianInverseTransposed;
│ │ │ -
205
│ │ │ -
207 typedef FieldMatrix< ctype, coorddimension, mydimension > Jacobian;
│ │ │ -
208
│ │ │ -
210 typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse;
│ │ │ -
211
│ │ │ -
212 protected:
│ │ │ -
213
│ │ │ - │ │ │ -
215
│ │ │ -
216 public:
│ │ │ -
217
│ │ │ - │ │ │ +
│ │ │ + │ │ │ +
190 {
│ │ │ +
191 LocalCoordinate result;
│ │ │ +
192 if (dim == coorddim) { // fast case
│ │ │ +
193 for (size_t i=0; i<dim; i++)
│ │ │ +
194 result[i] = (global[i] - lower_[i]) / (upper_[i] - lower_[i]);
│ │ │ +
195 } else if (dim != 0) { // slow case
│ │ │ +
196 size_t lc=0;
│ │ │ +
197 for (size_t i=0; i<coorddim; i++)
│ │ │ +
198 if (axes_[i])
│ │ │ +
199 result[lc++] = (global[i] - lower_[i]) / (upper_[i] - lower_[i]);
│ │ │ +
200 }
│ │ │ +
201 return result;
│ │ │ +
202 }
│ │ │ +
│ │ │ +
203
│ │ │ +
│ │ │ + │ │ │ +
206 {
│ │ │ +
207 JacobianTransposed result;
│ │ │ +
208
│ │ │ +
209 // Actually compute the result. Uses different methods depending
│ │ │ +
210 // on what kind of matrix JacobianTransposed is.
│ │ │ +
211 jacobianTransposed(result);
│ │ │ +
212
│ │ │ +
213 return result;
│ │ │ +
214 }
│ │ │ +
│ │ │ +
215
│ │ │ +
│ │ │ + │ │ │ +
218 {
│ │ │ + │ │ │
220
│ │ │ -
221 private:
│ │ │ -
222 static const bool hasSingleGeometryType = Traits::template hasSingleGeometryType< mydimension >::v;
│ │ │ -
223
│ │ │ -
224 protected:
│ │ │ -
225 typedef typename Traits::MatrixHelper MatrixHelper;
│ │ │ -
226 typedef typename std::conditional< hasSingleGeometryType, std::integral_constant< unsigned int, Traits::template hasSingleGeometryType< mydimension >::topologyId >, unsigned int >::type TopologyId;
│ │ │ -
227
│ │ │ -
228 public:
│ │ │ -
238 template< class Corners >
│ │ │ -
│ │ │ - │ │ │ -
240 const Corners &corners )
│ │ │ -
241 : refElement_( refElement ),
│ │ │ -
242 corners_( corners )
│ │ │ -
243 {}
│ │ │ -
│ │ │ -
244
│ │ │ -
254 template< class Corners >
│ │ │ -
│ │ │ - │ │ │ -
256 const Corners &corners )
│ │ │ -
257 : refElement_( ReferenceElements::general( gt ) ),
│ │ │ -
258 corners_( corners )
│ │ │ -
259 {}
│ │ │ -
│ │ │ -
260
│ │ │ -
│ │ │ -
262 bool affine () const
│ │ │ -
263 {
│ │ │ - │ │ │ -
265 return affine( jt );
│ │ │ +
221 // Actually compute the result. Uses different methods depending
│ │ │ +
222 // on what kind of matrix JacobianTransposed is.
│ │ │ + │ │ │ +
224
│ │ │ +
225 return result;
│ │ │ +
226 }
│ │ │ +
│ │ │ +
227
│ │ │ +
│ │ │ +
229 Jacobian jacobian([[maybe_unused]] const LocalCoordinate& local) const
│ │ │ +
230 {
│ │ │ +
231 return jacobianTransposed(local).transposed();
│ │ │ +
232 }
│ │ │ +
│ │ │ +
233
│ │ │ +
│ │ │ + │ │ │ +
236 {
│ │ │ +
237 return jacobianInverseTransposed(local).transposed();
│ │ │ +
238 }
│ │ │ +
│ │ │ +
239
│ │ │ +
│ │ │ +
243 Volume integrationElement([[maybe_unused]] const LocalCoordinate& local) const
│ │ │ +
244 {
│ │ │ +
245 return volume();
│ │ │ +
246 }
│ │ │ +
│ │ │ +
247
│ │ │ +
│ │ │ + │ │ │ +
250 {
│ │ │ +
251 GlobalCoordinate result;
│ │ │ +
252 if (dim==0)
│ │ │ +
253 result = lower_;
│ │ │ +
254 else {
│ │ │ +
255 // Since lower_==upper_ for unused coordinates, this always does the right thing
│ │ │ +
256 for (size_t i=0; i<coorddim; i++)
│ │ │ +
257 result[i] = CoordType(0.5) * (lower_[i] + upper_[i]);
│ │ │ +
258 }
│ │ │ +
259 return result;
│ │ │ +
260 }
│ │ │ +
│ │ │ +
261
│ │ │ +
│ │ │ +
263 int corners() const
│ │ │ +
264 {
│ │ │ +
265 return 1<<dim;
│ │ │
266 }
│ │ │
│ │ │
267
│ │ │ -
269 Dune::GeometryType type () const { return GeometryType( toUnsignedInt(topologyId()), mydimension ); }
│ │ │ -
270
│ │ │ -
272 int corners () const { return refElement().size( mydimension ); }
│ │ │ -
273
│ │ │ -
│ │ │ -
275 GlobalCoordinate corner ( int i ) const
│ │ │ -
276 {
│ │ │ -
277 assert( (i >= 0) && (i < corners()) );
│ │ │ -
278 return std::cref(corners_).get()[ i ];
│ │ │ -
279 }
│ │ │ -
│ │ │ -
280
│ │ │ -
282 GlobalCoordinate center () const { return global( refElement().position( 0, 0 ) ); }
│ │ │ -
283
│ │ │ -
│ │ │ - │ │ │ -
291 {
│ │ │ -
292 using std::begin;
│ │ │ -
293
│ │ │ -
294 auto cit = begin(std::cref(corners_).get());
│ │ │ - │ │ │ -
296 global< false >( topologyId(), std::integral_constant< int, mydimension >(), cit, ctype( 1 ), local, ctype( 1 ), y );
│ │ │ -
297 return y;
│ │ │ -
298 }
│ │ │ -
│ │ │ -
299
│ │ │ -
│ │ │ -
312 LocalCoordinate local ( const GlobalCoordinate &globalCoord ) const
│ │ │ -
313 {
│ │ │ -
314 const ctype tolerance = Traits::tolerance();
│ │ │ -
315 LocalCoordinate x = refElement().position( 0, 0 );
│ │ │ - │ │ │ -
317 const bool affineMapping = this->affine();
│ │ │ -
318 do
│ │ │ -
319 {
│ │ │ -
320 // Newton's method: DF^n dx^n = F^n, x^{n+1} -= dx^n
│ │ │ -
321 const GlobalCoordinate dglobal = (*this).global( x ) - globalCoord;
│ │ │ -
322 const bool invertible =
│ │ │ -
323 MatrixHelper::xTRightInvA( jacobianTransposed( x ), dglobal, dx );
│ │ │ -
324 if( ! invertible )
│ │ │ -
325 return LocalCoordinate( std::numeric_limits< ctype > :: max() );
│ │ │ -
326
│ │ │ -
327 // update x with correction
│ │ │ -
328 x -= dx;
│ │ │ -
329
│ │ │ -
330 // for affine mappings only one iteration is needed
│ │ │ -
331 if ( affineMapping ) break;
│ │ │ -
332 } while( dx.two_norm2() > tolerance );
│ │ │ -
333 return x;
│ │ │ -
334 }
│ │ │ -
│ │ │ -
335
│ │ │ -
│ │ │ - │ │ │ -
351 {
│ │ │ -
352 return MatrixHelper::sqrtDetAAT( jacobianTransposed( local ) );
│ │ │ -
353 }
│ │ │ -
│ │ │ -
354
│ │ │ -
│ │ │ -
363 Volume volume () const
│ │ │ -
364 {
│ │ │ -
365 return integrationElement( refElement().position( 0, 0 ) ) * refElement().volume();
│ │ │ -
366 }
│ │ │ -
│ │ │ -
367
│ │ │ -
│ │ │ - │ │ │ -
378 {
│ │ │ -
379 using std::begin;
│ │ │ -
380
│ │ │ - │ │ │ -
382 auto cit = begin(std::cref(corners_).get());
│ │ │ -
383 jacobianTransposed< false >( topologyId(), std::integral_constant< int, mydimension >(), cit, ctype( 1 ), local, ctype( 1 ), jt );
│ │ │ -
384 return jt;
│ │ │ -
385 }
│ │ │ -
│ │ │ -
386
│ │ │ -
393 JacobianInverseTransposed jacobianInverseTransposed ( const LocalCoordinate &local ) const;
│ │ │ -
394
│ │ │ -
│ │ │ - │ │ │ -
396 {
│ │ │ -
397 return geometry.refElement();
│ │ │ -
398 }
│ │ │ -
│ │ │ -
399
│ │ │ -
400
│ │ │ -
│ │ │ - │ │ │ -
408 {
│ │ │ -
409 return jacobianTransposed(local).transposed();
│ │ │ -
410 }
│ │ │ -
│ │ │ -
411
│ │ │ -
│ │ │ - │ │ │ -
419 {
│ │ │ -
420 return jacobianInverseTransposed(local).transposed();
│ │ │ -
421 }
│ │ │ -
│ │ │ -
422
│ │ │ -
423 protected:
│ │ │ -
424
│ │ │ -
│ │ │ - │ │ │ -
426 {
│ │ │ -
427 return refElement_;
│ │ │ -
428 }
│ │ │ -
│ │ │ -
429
│ │ │ -
│ │ │ - │ │ │ -
431 {
│ │ │ -
432 return topologyId( std::integral_constant< bool, hasSingleGeometryType >() );
│ │ │ -
433 }
│ │ │ -
│ │ │ -
434
│ │ │ -
435 template< bool add, int dim, class CornerIterator >
│ │ │ -
436 static void global ( TopologyId topologyId, std::integral_constant< int, dim >,
│ │ │ -
437 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
│ │ │ -
438 const ctype &rf, GlobalCoordinate &y );
│ │ │ -
439 template< bool add, class CornerIterator >
│ │ │ -
440 static void global ( TopologyId topologyId, std::integral_constant< int, 0 >,
│ │ │ -
441 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
│ │ │ -
442 const ctype &rf, GlobalCoordinate &y );
│ │ │ -
443
│ │ │ -
444 template< bool add, int rows, int dim, class CornerIterator >
│ │ │ -
445 static void jacobianTransposed ( TopologyId topologyId, std::integral_constant< int, dim >,
│ │ │ -
446 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
│ │ │ -
447 const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt );
│ │ │ -
448 template< bool add, int rows, class CornerIterator >
│ │ │ -
449 static void jacobianTransposed ( TopologyId topologyId, std::integral_constant< int, 0 >,
│ │ │ -
450 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
│ │ │ -
451 const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt );
│ │ │ -
452
│ │ │ -
453 template< int dim, class CornerIterator >
│ │ │ -
454 static bool affine ( TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, JacobianTransposed &jt );
│ │ │ -
455 template< class CornerIterator >
│ │ │ -
456 static bool affine ( TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, JacobianTransposed &jt );
│ │ │ -
457
│ │ │ -
│ │ │ -
458 bool affine ( JacobianTransposed &jacobianT ) const
│ │ │ -
459 {
│ │ │ -
460 using std::begin;
│ │ │ -
461
│ │ │ -
462 auto cit = begin(std::cref(corners_).get());
│ │ │ -
463 return affine( topologyId(), std::integral_constant< int, mydimension >(), cit, jacobianT );
│ │ │ -
464 }
│ │ │ -
│ │ │ -
465
│ │ │ -
466 private:
│ │ │ -
467 // The following methods are needed to convert the return type of topologyId to
│ │ │ -
468 // unsigned int with g++-4.4. It has problems casting integral_constant to the
│ │ │ -
469 // integral type.
│ │ │ -
470 static unsigned int toUnsignedInt(unsigned int i) { return i; }
│ │ │ -
471 template<unsigned int v>
│ │ │ -
472 static unsigned int toUnsignedInt(std::integral_constant<unsigned int,v> ) { return v; }
│ │ │ -
473 TopologyId topologyId ( std::integral_constant< bool, true > ) const { return TopologyId(); }
│ │ │ -
474 unsigned int topologyId ( std::integral_constant< bool, false > ) const { return refElement().type().id(); }
│ │ │ -
475
│ │ │ -
476 ReferenceElement refElement_;
│ │ │ -
477 typename Traits::template CornerStorage< mydimension, coorddimension >::Type corners_;
│ │ │ -
478 };
│ │ │ -
│ │ │ -
479
│ │ │ -
480
│ │ │ -
481
│ │ │ -
482 // MultiLinearGeometry::JacobianInverseTransposed
│ │ │ -
483 // ----------------------------------------------
│ │ │ -
484
│ │ │ -
485 template< class ct, int mydim, int cdim, class Traits >
│ │ │ -
│ │ │ -
486 class MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed
│ │ │ -
487 : public FieldMatrix< ctype, coorddimension, mydimension >
│ │ │ -
488 {
│ │ │ -
489 typedef FieldMatrix< ctype, coorddimension, mydimension > Base;
│ │ │ -
490
│ │ │ -
491 public:
│ │ │ -
492 void setup ( const JacobianTransposed &jt )
│ │ │ -
493 {
│ │ │ -
494 detInv_ = MatrixHelper::rightInvA( jt, static_cast< Base & >( *this ) );
│ │ │ -
495 }
│ │ │ -
496
│ │ │ -
497 void setupDeterminant ( const JacobianTransposed &jt )
│ │ │ -
498 {
│ │ │ -
499 detInv_ = MatrixHelper::sqrtDetAAT( jt );
│ │ │ -
500 }
│ │ │ -
501
│ │ │ -
502 ctype det () const { return ctype( 1 ) / detInv_; }
│ │ │ -
503 ctype detInv () const { return detInv_; }
│ │ │ -
504
│ │ │ -
505 private:
│ │ │ -
506 ctype detInv_;
│ │ │ -
507 };
│ │ │ -
│ │ │ -
508
│ │ │ -
509
│ │ │ -
510
│ │ │ -
523 template< class ct, int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct > >
│ │ │ -
│ │ │ - │ │ │ -
525 : public MultiLinearGeometry< ct, mydim, cdim, Traits >
│ │ │ -
526 {
│ │ │ - │ │ │ - │ │ │ -
529
│ │ │ -
530 protected:
│ │ │ - │ │ │ -
532
│ │ │ -
533 public:
│ │ │ - │ │ │ -
535
│ │ │ -
536 typedef typename Base::ctype ctype;
│ │ │ -
537
│ │ │ -
538 using Base::mydimension;
│ │ │ - │ │ │ -
540
│ │ │ - │ │ │ - │ │ │ -
543 typedef typename Base::Volume Volume;
│ │ │ -
544
│ │ │ - │ │ │ -
546 typedef typename Base::JacobianInverseTransposed JacobianInverseTransposed;
│ │ │ -
547 typedef typename Base::Jacobian Jacobian;
│ │ │ - │ │ │ -
549
│ │ │ -
550 template< class CornerStorage >
│ │ │ -
│ │ │ -
551 CachedMultiLinearGeometry ( const ReferenceElement &referenceElement, const CornerStorage &cornerStorage )
│ │ │ -
552 : Base( referenceElement, cornerStorage ),
│ │ │ -
553 affine_( Base::affine( jacobianTransposed_ ) ),
│ │ │ -
554 jacobianInverseTransposedComputed_( false ),
│ │ │ -
555 integrationElementComputed_( false )
│ │ │ -
556 {}
│ │ │ -
│ │ │ -
557
│ │ │ -
558 template< class CornerStorage >
│ │ │ -
│ │ │ -
559 CachedMultiLinearGeometry ( Dune::GeometryType gt, const CornerStorage &cornerStorage )
│ │ │ -
560 : Base( gt, cornerStorage ),
│ │ │ -
561 affine_( Base::affine( jacobianTransposed_ ) ),
│ │ │ -
562 jacobianInverseTransposedComputed_( false ),
│ │ │ -
563 integrationElementComputed_( false )
│ │ │ -
564 {}
│ │ │ -
│ │ │ -
565
│ │ │ -
567 bool affine () const { return affine_; }
│ │ │ -
568
│ │ │ -
569 using Base::corner;
│ │ │ -
570
│ │ │ -
572 GlobalCoordinate center () const { return global( refElement().position( 0, 0 ) ); }
│ │ │ -
573
│ │ │ -
│ │ │ - │ │ │ -
581 {
│ │ │ -
582 if( affine() )
│ │ │ -
583 {
│ │ │ - │ │ │ -
585 jacobianTransposed_.umtv( local, global );
│ │ │ -
586 return global;
│ │ │ -
587 }
│ │ │ -
588 else
│ │ │ -
589 return Base::global( local );
│ │ │ -
590 }
│ │ │ -
│ │ │ -
591
│ │ │ -
│ │ │ - │ │ │ -
605 {
│ │ │ -
606 if( affine() )
│ │ │ -
607 {
│ │ │ - │ │ │ -
609 if( jacobianInverseTransposedComputed_ )
│ │ │ -
610 jacobianInverseTransposed_.mtv( global - corner( 0 ), local );
│ │ │ -
611 else
│ │ │ -
612 MatrixHelper::xTRightInvA( jacobianTransposed_, global - corner( 0 ), local );
│ │ │ -
613 return local;
│ │ │ -
614 }
│ │ │ -
615 else
│ │ │ -
616 return Base::local( global );
│ │ │ -
617 }
│ │ │ -
│ │ │ -
618
│ │ │ -
│ │ │ - │ │ │ -
634 {
│ │ │ -
635 if( affine() )
│ │ │ -
636 {
│ │ │ -
637 if( !integrationElementComputed_ )
│ │ │ -
638 {
│ │ │ -
639 jacobianInverseTransposed_.setupDeterminant( jacobianTransposed_ );
│ │ │ -
640 integrationElementComputed_ = true;
│ │ │ -
641 }
│ │ │ -
642 return jacobianInverseTransposed_.detInv();
│ │ │ -
643 }
│ │ │ -
644 else
│ │ │ - │ │ │ -
646 }
│ │ │ -
│ │ │ -
647
│ │ │ -
│ │ │ -
649 Volume volume () const
│ │ │ -
650 {
│ │ │ -
651 if( affine() )
│ │ │ -
652 return integrationElement( refElement().position( 0, 0 ) ) * refElement().volume();
│ │ │ -
653 else
│ │ │ -
654 return Base::volume();
│ │ │ -
655 }
│ │ │ -
│ │ │ -
656
│ │ │ -
│ │ │ - │ │ │ -
667 {
│ │ │ -
668 if( affine() )
│ │ │ -
669 return jacobianTransposed_;
│ │ │ -
670 else
│ │ │ - │ │ │ -
672 }
│ │ │ -
│ │ │ -
673
│ │ │ -
│ │ │ - │ │ │ -
681 {
│ │ │ -
682 if( affine() )
│ │ │ -
683 {
│ │ │ -
684 if( !jacobianInverseTransposedComputed_ )
│ │ │ -
685 {
│ │ │ -
686 jacobianInverseTransposed_.setup( jacobianTransposed_ );
│ │ │ -
687 jacobianInverseTransposedComputed_ = true;
│ │ │ -
688 integrationElementComputed_ = true;
│ │ │ -
689 }
│ │ │ -
690 return jacobianInverseTransposed_;
│ │ │ -
691 }
│ │ │ -
692 else
│ │ │ - │ │ │ -
694 }
│ │ │ -
│ │ │ -
695
│ │ │ -
│ │ │ - │ │ │ -
703 {
│ │ │ -
704 return jacobianTransposed(local).transposed();
│ │ │ -
705 }
│ │ │ -
│ │ │ -
706
│ │ │ -
│ │ │ - │ │ │ -
714 {
│ │ │ -
715 return jacobianInverseTransposed(local).transposed();
│ │ │ -
716 }
│ │ │ -
│ │ │ -
717
│ │ │ -
718 protected:
│ │ │ -
719 using Base::refElement;
│ │ │ -
720
│ │ │ -
721 private:
│ │ │ -
722 mutable JacobianTransposed jacobianTransposed_;
│ │ │ -
723 mutable JacobianInverseTransposed jacobianInverseTransposed_;
│ │ │ -
724
│ │ │ -
725 mutable bool affine_ : 1;
│ │ │ -
726
│ │ │ -
727 mutable bool jacobianInverseTransposedComputed_ : 1;
│ │ │ -
728 mutable bool integrationElementComputed_ : 1;
│ │ │ -
729 };
│ │ │ -
│ │ │ -
730
│ │ │ -
731
│ │ │ -
732
│ │ │ -
733 // Implementation of MultiLinearGeometry
│ │ │ -
734 // -------------------------------------
│ │ │ -
735
│ │ │ -
736 template< class ct, int mydim, int cdim, class Traits >
│ │ │ -
737 inline typename MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed
│ │ │ -
│ │ │ - │ │ │ -
739 {
│ │ │ - │ │ │ -
741 jit.setup( jacobianTransposed( local ) );
│ │ │ -
742 return jit;
│ │ │ -
743 }
│ │ │ -
│ │ │ -
744
│ │ │ -
745
│ │ │ -
746 template< class ct, int mydim, int cdim, class Traits >
│ │ │ -
747 template< bool add, int dim, class CornerIterator >
│ │ │ - │ │ │ -
│ │ │ -
749 ::global ( TopologyId topologyId, std::integral_constant< int, dim >,
│ │ │ -
750 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
│ │ │ -
751 const ctype &rf, GlobalCoordinate &y )
│ │ │ -
752 {
│ │ │ -
753 const ctype xn = df*x[ dim-1 ];
│ │ │ -
754 const ctype cxn = ctype( 1 ) - xn;
│ │ │ -
755
│ │ │ -
756 if( Impl::isPrism( toUnsignedInt(topologyId), mydimension, mydimension-dim ) )
│ │ │ -
757 {
│ │ │ -
758 // apply (1-xn) times mapping for bottom
│ │ │ -
759 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, rf*cxn, y );
│ │ │ -
760 // apply xn times mapping for top
│ │ │ -
761 global< true >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, rf*xn, y );
│ │ │ -
762 }
│ │ │ -
763 else
│ │ │ -
764 {
│ │ │ -
765 assert( Impl::isPyramid( toUnsignedInt(topologyId), mydimension, mydimension-dim ) );
│ │ │ -
766 // apply (1-xn) times mapping for bottom (with argument x/(1-xn))
│ │ │ -
767 if( cxn > Traits::tolerance() || cxn < -Traits::tolerance() )
│ │ │ -
768 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, df/cxn, x, rf*cxn, y );
│ │ │ -
769 else
│ │ │ -
770 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, ctype( 0 ), y );
│ │ │ -
771 // apply xn times the tip
│ │ │ -
772 y.axpy( rf*xn, *cit );
│ │ │ -
773 ++cit;
│ │ │ -
774 }
│ │ │ -
775 }
│ │ │ -
│ │ │ -
776
│ │ │ -
777 template< class ct, int mydim, int cdim, class Traits >
│ │ │ -
778 template< bool add, class CornerIterator >
│ │ │ - │ │ │ -
│ │ │ -
780 ::global ( TopologyId, std::integral_constant< int, 0 >,
│ │ │ -
781 CornerIterator &cit, const ctype &, const LocalCoordinate &,
│ │ │ -
782 const ctype &rf, GlobalCoordinate &y )
│ │ │ -
783 {
│ │ │ -
784 const GlobalCoordinate &origin = *cit;
│ │ │ -
785 ++cit;
│ │ │ -
786 for( int i = 0; i < coorddimension; ++i )
│ │ │ -
787 y[ i ] = (add ? y[ i ] + rf*origin[ i ] : rf*origin[ i ]);
│ │ │ -
788 }
│ │ │ -
│ │ │ -
789
│ │ │ -
790
│ │ │ -
791 template< class ct, int mydim, int cdim, class Traits >
│ │ │ -
792 template< bool add, int rows, int dim, class CornerIterator >
│ │ │ - │ │ │ -
│ │ │ -
794 ::jacobianTransposed ( TopologyId topologyId, std::integral_constant< int, dim >,
│ │ │ -
795 CornerIterator &cit, const ctype &df, const LocalCoordinate &x,
│ │ │ -
796 const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt )
│ │ │ -
797 {
│ │ │ -
798 assert( rows >= dim );
│ │ │ -
799
│ │ │ -
800 const ctype xn = df*x[ dim-1 ];
│ │ │ -
801 const ctype cxn = ctype( 1 ) - xn;
│ │ │ -
802
│ │ │ -
803 auto cit2( cit );
│ │ │ -
804 if( Impl::isPrism( toUnsignedInt(topologyId), mydimension, mydimension-dim ) )
│ │ │ -
805 {
│ │ │ -
806 // apply (1-xn) times Jacobian for bottom
│ │ │ -
807 jacobianTransposed< add >( topologyId, std::integral_constant< int, dim-1 >(), cit2, df, x, rf*cxn, jt );
│ │ │ -
808 // apply xn times Jacobian for top
│ │ │ -
809 jacobianTransposed< true >( topologyId, std::integral_constant< int, dim-1 >(), cit2, df, x, rf*xn, jt );
│ │ │ -
810 // compute last row as difference between top value and bottom value
│ │ │ -
811 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, -rf, jt[ dim-1 ] );
│ │ │ -
812 global< true >( topologyId, std::integral_constant< int, dim-1 >(), cit, df, x, rf, jt[ dim-1 ] );
│ │ │ -
813 }
│ │ │ -
814 else
│ │ │ -
815 {
│ │ │ -
816 assert( Impl::isPyramid( toUnsignedInt(topologyId), mydimension, mydimension-dim ) );
│ │ │ -
817 /*
│ │ │ -
818 * In the pyramid case, we need a transformation Tb: B -> R^n for the
│ │ │ -
819 * base B \subset R^{n-1}. The pyramid transformation is then defined as
│ │ │ -
820 * T: P \subset R^n -> R^n
│ │ │ -
821 * (x, xn) |-> (1-xn) Tb(x*) + xn t (x \in R^{n-1}, xn \in R)
│ │ │ -
822 * with the tip of the pyramid mapped to t and x* = x/(1-xn)
│ │ │ -
823 * the projection of (x,xn) onto the base.
│ │ │ -
824 *
│ │ │ -
825 * For the Jacobi matrix DT we get
│ │ │ -
826 * DT = ( A | b )
│ │ │ -
827 * with A = DTb(x*) (n x n-1 matrix)
│ │ │ -
828 * and b = dT/dxn (n-dim column vector).
│ │ │ -
829 * Furthermore
│ │ │ -
830 * b = -Tb(x*) + t + \sum_i dTb/dx_i(x^*) x_i/(1-xn)
│ │ │ -
831 *
│ │ │ -
832 * Note that both A and b are not defined in the pyramid tip (x=0, xn=1)!
│ │ │ -
833 * Indeed for B the unit square, Tb mapping B to the quadrilateral given
│ │ │ -
834 * by the vertices (0,0,0), (2,0,0), (0,1,0), (1,1,0) and t=(0,0,1), we get
│ │ │ -
835 *
│ │ │ -
836 * T(x,y,xn) = ( x(2-y/(1-xn)), y, xn )
│ │ │ -
837 * / 2-y/(1-xn) -x 0 \
│ │ │ -
838 * DT(x,y,xn) = | 0 1 0 |
│ │ │ -
839 * \ 0 0 1 /
│ │ │ -
840 * which is not continuous for xn -> 1, choose for example
│ │ │ -
841 * x=0, y=1-xn, xn -> 1 --> DT -> diag(1,1,1)
│ │ │ -
842 * x=1-xn, y=0, xn -> 1 --> DT -> diag(2,1,1)
│ │ │ -
843 *
│ │ │ -
844 * However, for Tb affine-linear, Tb(y) = My + y0, DTb = M:
│ │ │ -
845 * A = M
│ │ │ -
846 * b = -M x* - y0 + t + \sum_i M_i x_i/(1-xn)
│ │ │ -
847 * = -M x* - y0 + t + M x*
│ │ │ -
848 * = -y0 + t
│ │ │ -
849 * which is continuous for xn -> 1. Note that this b is also given by
│ │ │ -
850 * b = -Tb(0) + t + \sum_i dTb/dx_i(0) x_i/1
│ │ │ -
851 * that is replacing x* by 1 and 1-xn by 1 in the formular above.
│ │ │ -
852 *
│ │ │ -
853 * For xn -> 1, we can thus set x*=0, "1-xn"=1 (or anything != 0) and get
│ │ │ -
854 * the right result in case Tb is affine-linear.
│ │ │ -
855 */
│ │ │ -
856
│ │ │ -
857 /* The second case effectively results in x* = 0 */
│ │ │ -
858 ctype dfcxn = (cxn > Traits::tolerance() || cxn < -Traits::tolerance()) ? ctype(df / cxn) : ctype(0);
│ │ │ -
859
│ │ │ -
860 // initialize last row
│ │ │ -
861 // b = -Tb(x*)
│ │ │ -
862 // (b = -Tb(0) = -y0 in case xn -> 1 and Tb affine-linear)
│ │ │ -
863 global< add >( topologyId, std::integral_constant< int, dim-1 >(), cit, dfcxn, x, -rf, jt[ dim-1 ] );
│ │ │ -
864 // b += t
│ │ │ -
865 jt[ dim-1 ].axpy( rf, *cit );
│ │ │ -
866 ++cit;
│ │ │ -
867 // apply Jacobian for bottom (with argument x/(1-xn)) and correct last row
│ │ │ -
868 if( add )
│ │ │ -
869 {
│ │ │ -
870 FieldMatrix< ctype, dim-1, coorddimension > jt2;
│ │ │ -
871 // jt2 = dTb/dx_i(x*)
│ │ │ -
872 jacobianTransposed< false >( topologyId, std::integral_constant< int, dim-1 >(), cit2, dfcxn, x, rf, jt2 );
│ │ │ -
873 // A = dTb/dx_i(x*) (jt[j], j=0..dim-1)
│ │ │ -
874 // b += \sum_i dTb/dx_i(x*) x_i/(1-xn) (jt[dim-1])
│ │ │ -
875 // (b += 0 in case xn -> 1)
│ │ │ -
876 for( int j = 0; j < dim-1; ++j )
│ │ │ -
877 {
│ │ │ -
878 jt[ j ] += jt2[ j ];
│ │ │ -
879 jt[ dim-1 ].axpy( dfcxn*x[ j ], jt2[ j ] );
│ │ │ -
880 }
│ │ │ -
881 }
│ │ │ -
882 else
│ │ │ -
883 {
│ │ │ -
884 // jt = dTb/dx_i(x*)
│ │ │ -
885 jacobianTransposed< false >( topologyId, std::integral_constant< int, dim-1 >(), cit2, dfcxn, x, rf, jt );
│ │ │ -
886 // b += \sum_i dTb/dx_i(x*) x_i/(1-xn)
│ │ │ -
887 for( int j = 0; j < dim-1; ++j )
│ │ │ -
888 jt[ dim-1 ].axpy( dfcxn*x[ j ], jt[ j ] );
│ │ │ -
889 }
│ │ │ -
890 }
│ │ │ -
891 }
│ │ │ -
│ │ │ -
892
│ │ │ -
893 template< class ct, int mydim, int cdim, class Traits >
│ │ │ -
894 template< bool add, int rows, class CornerIterator >
│ │ │ - │ │ │ -
│ │ │ -
896 ::jacobianTransposed ( TopologyId, std::integral_constant< int, 0 >,
│ │ │ -
897 CornerIterator &cit, const ctype &, const LocalCoordinate &,
│ │ │ -
898 const ctype &, FieldMatrix< ctype, rows, cdim > & )
│ │ │ -
899 {
│ │ │ -
900 ++cit;
│ │ │ -
901 }
│ │ │ -
│ │ │ -
902
│ │ │ -
903
│ │ │ -
904
│ │ │ -
905 template< class ct, int mydim, int cdim, class Traits >
│ │ │ -
906 template< int dim, class CornerIterator >
│ │ │ - │ │ │ -
│ │ │ -
908 ::affine ( TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, JacobianTransposed &jt )
│ │ │ -
909 {
│ │ │ -
910 const GlobalCoordinate &orgBottom = *cit;
│ │ │ -
911 if( !affine( topologyId, std::integral_constant< int, dim-1 >(), cit, jt ) )
│ │ │ -
912 return false;
│ │ │ -
913 const GlobalCoordinate &orgTop = *cit;
│ │ │ -
914
│ │ │ -
915 if( Impl::isPrism( toUnsignedInt(topologyId), mydimension, mydimension-dim ) )
│ │ │ -
916 {
│ │ │ -
917 JacobianTransposed jtTop;
│ │ │ -
918 if( !affine( topologyId, std::integral_constant< int, dim-1 >(), cit, jtTop ) )
│ │ │ -
919 return false;
│ │ │ -
920
│ │ │ -
921 // check whether both jacobians are identical
│ │ │ -
922 ctype norm( 0 );
│ │ │ -
923 for( int i = 0; i < dim-1; ++i )
│ │ │ -
924 norm += (jtTop[ i ] - jt[ i ]).two_norm2();
│ │ │ -
925 if( norm >= Traits::tolerance() )
│ │ │ -
926 return false;
│ │ │ -
927 }
│ │ │ -
928 else
│ │ │ -
929 ++cit;
│ │ │ -
930 jt[ dim-1 ] = orgTop - orgBottom;
│ │ │ -
931 return true;
│ │ │ -
932 }
│ │ │ -
│ │ │ -
933
│ │ │ -
934 template< class ct, int mydim, int cdim, class Traits >
│ │ │ -
935 template< class CornerIterator >
│ │ │ - │ │ │ -
│ │ │ -
937 ::affine ( TopologyId, std::integral_constant< int, 0 >, CornerIterator &cit, JacobianTransposed & )
│ │ │ -
938 {
│ │ │ -
939 ++cit;
│ │ │ -
940 return true;
│ │ │ -
941 }
│ │ │ -
│ │ │ -
942
│ │ │ -
943} // namespace Dune
│ │ │ -
944
│ │ │ -
945#endif // #ifndef DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH
│ │ │ - │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ - │ │ │ +
│ │ │ + │ │ │ +
270 {
│ │ │ +
271 GlobalCoordinate result;
│ │ │ +
272 if (dim == coorddim) { // fast case
│ │ │ +
273 for (size_t i=0; i<coorddim; i++)
│ │ │ +
274 result[i] = (k & (1<<i)) ? upper_[i] : lower_[i];
│ │ │ +
275 } else if (dim == 0) { // vertex
│ │ │ +
276 result = lower_; // rely on named return-type optimization
│ │ │ +
277 } else { // slow case
│ │ │ +
278 unsigned int mask = 1;
│ │ │ +
279
│ │ │ +
280 for (size_t i=0; i<coorddim; i++) {
│ │ │ +
281 if (not axes_[i])
│ │ │ +
282 result[i] = lower_[i];
│ │ │ +
283 else {
│ │ │ +
284 result[i] = (k & mask) ? upper_[i] : lower_[i];
│ │ │ +
285 mask = (mask<<1);
│ │ │ +
286 }
│ │ │ +
287 }
│ │ │ +
288 }
│ │ │ +
289
│ │ │ +
290
│ │ │ +
291 return result;
│ │ │ +
292 }
│ │ │ +
│ │ │ +
293
│ │ │ +
│ │ │ + │ │ │ +
296 {
│ │ │ +
297 ctype vol = 1;
│ │ │ +
298 if (dim == coorddim) { // fast case
│ │ │ +
299 for (size_t i=0; i<dim; i++)
│ │ │ +
300 vol *= upper_[i] - lower_[i];
│ │ │ +
301 // do nothing if dim == 0
│ │ │ +
302 } else if (dim != 0) { // slow case
│ │ │ +
303 for (size_t i=0; i<coorddim; i++)
│ │ │ +
304 if (axes_[i])
│ │ │ +
305 vol *= upper_[i] - lower_[i];
│ │ │ +
306 }
│ │ │ +
307 return vol;
│ │ │ +
308 }
│ │ │ +
│ │ │ +
309
│ │ │ +
│ │ │ +
311 bool affine() const
│ │ │ +
312 {
│ │ │ +
313 return true;
│ │ │ +
314 }
│ │ │ +
│ │ │ +
315
│ │ │ +
│ │ │ + │ │ │ +
317 {
│ │ │ + │ │ │ +
319 }
│ │ │ +
│ │ │ +
320
│ │ │ +
321 private:
│ │ │ +
322 // jacobianTransposed: fast case --> diagonal matrix
│ │ │ +
323 void jacobianTransposed ( DiagonalMatrix<ctype,dim> &jacobianTransposed ) const
│ │ │ +
324 {
│ │ │ +
325 for (size_t i=0; i<dim; i++)
│ │ │ +
326 jacobianTransposed.diagonal()[i] = upper_[i] - lower_[i];
│ │ │ +
327 }
│ │ │ +
328
│ │ │ +
329 // jacobianTransposed: slow case --> dense matrix
│ │ │ +
330 void jacobianTransposed ( FieldMatrix<ctype,dim,coorddim> &jacobianTransposed ) const
│ │ │ +
331 {
│ │ │ +
332 if (dim==0)
│ │ │ +
333 return;
│ │ │ +
334
│ │ │ +
335 size_t lc = 0;
│ │ │ +
336 for (size_t i=0; i<coorddim; i++)
│ │ │ +
337 if (axes_[i])
│ │ │ +
338 jacobianTransposed[lc++][i] = upper_[i] - lower_[i];
│ │ │ +
339 }
│ │ │ +
340
│ │ │ +
341 // jacobianInverseTransposed: fast case --> diagonal matrix
│ │ │ +
342 void jacobianInverseTransposed ( DiagonalMatrix<ctype,dim> &jacobianInverseTransposed ) const
│ │ │ +
343 {
│ │ │ +
344 for (size_t i=0; i<dim; i++)
│ │ │ +
345 jacobianInverseTransposed.diagonal()[i] = CoordType(1.0) / (upper_[i] - lower_[i]);
│ │ │ +
346 }
│ │ │ +
347
│ │ │ +
348 // jacobianInverseTransposed: slow case --> dense matrix
│ │ │ +
349 void jacobianInverseTransposed ( FieldMatrix<ctype,coorddim,dim> &jacobianInverseTransposed ) const
│ │ │ +
350 {
│ │ │ +
351 if (dim==0)
│ │ │ +
352 return;
│ │ │ +
353
│ │ │ +
354 size_t lc = 0;
│ │ │ +
355 for (size_t i=0; i<coorddim; i++)
│ │ │ +
356 if (axes_[i])
│ │ │ +
357 jacobianInverseTransposed[i][lc++] = CoordType(1.0) / (upper_[i] - lower_[i]);
│ │ │ +
358 }
│ │ │ +
359
│ │ │ +
360 Dune::FieldVector<ctype,coorddim> lower_;
│ │ │ +
361
│ │ │ +
362 Dune::FieldVector<ctype,coorddim> upper_;
│ │ │ +
363
│ │ │ +
364 std::bitset<coorddim> axes_;
│ │ │ +
365 };
│ │ │ +
│ │ │ +
366
│ │ │ +
367} // namespace Dune
│ │ │ +
368#endif
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ + │ │ │ +
constexpr GeometryType cube(unsigned int dim)
Returns a GeometryType representing a hypercube of dimension dim.
Definition type.hh:462
│ │ │
Definition affinegeometry.hh:22
│ │ │ -
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │ -
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:146
│ │ │ -
default traits class for MultiLinearGeometry
Definition multilineargeometry.hh:39
│ │ │ -
Impl::FieldMatrixHelper< ct > MatrixHelper
helper structure containing some matrix routines
Definition multilineargeometry.hh:58
│ │ │ -
static ct tolerance()
tolerance to numerical algorithms
Definition multilineargeometry.hh:61
│ │ │ -
template specifying the storage for the corners
Definition multilineargeometry.hh:129
│ │ │ -
std::vector< FieldVector< ct, cdim > > Type
Definition multilineargeometry.hh:130
│ │ │ -
will there be only one geometry type for a dimension?
Definition multilineargeometry.hh:148
│ │ │ -
static const unsigned int topologyId
Definition multilineargeometry.hh:150
│ │ │ -
static const bool v
Definition multilineargeometry.hh:149
│ │ │ - │ │ │ -
static void global(TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, GlobalCoordinate &y)
Definition multilineargeometry.hh:749
│ │ │ -
static const int mydimension
Definition multilineargeometry.hh:189
│ │ │ -
Dune::GeometryType type() const
Definition multilineargeometry.hh:269
│ │ │ -
Traits::MatrixHelper MatrixHelper
Definition multilineargeometry.hh:225
│ │ │ -
FieldVector< ctype, coorddimension > GlobalCoordinate
Definition multilineargeometry.hh:196
│ │ │ -
static void jacobianTransposed(TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt)
Definition multilineargeometry.hh:896
│ │ │ -
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
obtain the transposed of the Jacobian
Definition multilineargeometry.hh:377
│ │ │ -
ReferenceElement refElement() const
Definition multilineargeometry.hh:425
│ │ │ -
GlobalCoordinate global(const LocalCoordinate &local) const
evaluate the mapping
Definition multilineargeometry.hh:290
│ │ │ -
GlobalCoordinate center() const
obtain the centroid of the mapping's image
Definition multilineargeometry.hh:282
│ │ │ -
GlobalCoordinate corner(int i) const
obtain coordinates of the i-th corner
Definition multilineargeometry.hh:275
│ │ │ -
Dune::ReferenceElements< ctype, mydimension > ReferenceElements
Definition multilineargeometry.hh:214
│ │ │ -
ct ctype
Definition multilineargeometry.hh:186
│ │ │ -
static void jacobianTransposed(TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt)
Definition multilineargeometry.hh:794
│ │ │ -
static const int coorddimension
Definition multilineargeometry.hh:191
│ │ │ -
int corners() const
Definition multilineargeometry.hh:272
│ │ │ -
TopologyId topologyId() const
Definition multilineargeometry.hh:430
│ │ │ -
friend ReferenceElement referenceElement(const MultiLinearGeometry &geometry)
Definition multilineargeometry.hh:395
│ │ │ -
LocalCoordinate local(const GlobalCoordinate &globalCoord) const
Definition multilineargeometry.hh:312
│ │ │ -
static void global(TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, GlobalCoordinate &y)
Definition multilineargeometry.hh:780
│ │ │ -
Volume volume() const
obtain the volume of the mapping's image
Definition multilineargeometry.hh:363
│ │ │ -
FieldVector< ctype, mydimension > LocalCoordinate
Definition multilineargeometry.hh:194
│ │ │ -
MultiLinearGeometry(const ReferenceElement &refElement, const Corners &corners)
constructor
Definition multilineargeometry.hh:239
│ │ │ -
static bool affine(TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, JacobianTransposed &jt)
Definition multilineargeometry.hh:937
│ │ │ -
std::conditional< hasSingleGeometryType, std::integral_constant< unsignedint, Traits::templatehasSingleGeometryType< mydimension >::topologyId >, unsignedint >::type TopologyId
Definition multilineargeometry.hh:226
│ │ │ -
ctype Volume
Definition multilineargeometry.hh:198
│ │ │ -
static bool affine(TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, JacobianTransposed &jt)
Definition multilineargeometry.hh:908
│ │ │ -
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition multilineargeometry.hh:418
│ │ │ -
MultiLinearGeometry(Dune::GeometryType gt, const Corners &corners)
constructor
Definition multilineargeometry.hh:255
│ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
Definition multilineargeometry.hh:201
│ │ │ -
ReferenceElements::ReferenceElement ReferenceElement
Definition multilineargeometry.hh:219
│ │ │ -
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
obtain the transposed of the Jacobian's inverse
Definition multilineargeometry.hh:738
│ │ │ -
FieldMatrix< ctype, coorddimension, mydimension > Jacobian
Definition multilineargeometry.hh:207
│ │ │ -
bool affine() const
is this mapping affine?
Definition multilineargeometry.hh:262
│ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
Definition multilineargeometry.hh:210
│ │ │ -
bool affine(JacobianTransposed &jacobianT) const
Definition multilineargeometry.hh:458
│ │ │ -
Volume integrationElement(const LocalCoordinate &local) const
obtain the integration element
Definition multilineargeometry.hh:350
│ │ │ -
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition multilineargeometry.hh:407
│ │ │ -
Definition multilineargeometry.hh:488
│ │ │ - │ │ │ -
GlobalCoordinate global(const LocalCoordinate &local) const
evaluate the mapping
Definition multilineargeometry.hh:580
│ │ │ -
Base::ReferenceElement ReferenceElement
Definition multilineargeometry.hh:534
│ │ │ -
bool affine() const
Definition multilineargeometry.hh:567
│ │ │ -
CachedMultiLinearGeometry(const ReferenceElement &referenceElement, const CornerStorage &cornerStorage)
Definition multilineargeometry.hh:551
│ │ │ -
ReferenceElement refElement() const
Definition multilineargeometry.hh:425
│ │ │ -
LocalCoordinate local(const GlobalCoordinate &global) const
Definition multilineargeometry.hh:604
│ │ │ -
Base::MatrixHelper MatrixHelper
Definition multilineargeometry.hh:531
│ │ │ -
Base::LocalCoordinate LocalCoordinate
Definition multilineargeometry.hh:541
│ │ │ -
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition multilineargeometry.hh:713
│ │ │ -
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
obtain the transposed of the Jacobian
Definition multilineargeometry.hh:666
│ │ │ -
GlobalCoordinate corner(int i) const
obtain coordinates of the i-th corner
Definition multilineargeometry.hh:275
│ │ │ -
Volume volume() const
obtain the volume of the mapping's image
Definition multilineargeometry.hh:649
│ │ │ -
CachedMultiLinearGeometry(Dune::GeometryType gt, const CornerStorage &cornerStorage)
Definition multilineargeometry.hh:559
│ │ │ -
ctype integrationElement(const LocalCoordinate &local) const
obtain the integration element
Definition multilineargeometry.hh:633
│ │ │ -
Base::ctype ctype
Definition multilineargeometry.hh:536
│ │ │ -
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition multilineargeometry.hh:702
│ │ │ -
Base::JacobianInverseTransposed JacobianInverseTransposed
Definition multilineargeometry.hh:546
│ │ │ -
Base::JacobianTransposed JacobianTransposed
Definition multilineargeometry.hh:545
│ │ │ -
Base::JacobianInverse JacobianInverse
Definition multilineargeometry.hh:548
│ │ │ -
Base::Jacobian Jacobian
Definition multilineargeometry.hh:547
│ │ │ -
Base::Volume Volume
Definition multilineargeometry.hh:543
│ │ │ -
Base::GlobalCoordinate GlobalCoordinate
Definition multilineargeometry.hh:542
│ │ │ -
GlobalCoordinate center() const
obtain the centroid of the mapping's image
Definition multilineargeometry.hh:572
│ │ │ -
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
obtain the transposed of the Jacobian's inverse
Definition multilineargeometry.hh:680
│ │ │ +
Volume volume() const
Return the element volume.
Definition axisalignedcubegeometry.hh:295
│ │ │ +
AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower, const Dune::FieldVector< ctype, coorddim > upper, const std::bitset< coorddim > &axes)
Constructor from a lower left and an upper right corner.
Definition axisalignedcubegeometry.hh:142
│ │ │ +
AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower, const Dune::FieldVector< ctype, coorddim > upper)
Constructor from a lower left and an upper right corner.
Definition axisalignedcubegeometry.hh:124
│ │ │ +
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Inverse Jacobian of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:235
│ │ │ +
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Inverse Jacobian transposed of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:217
│ │ │ +
std::conditional< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, dim, coorddim > >::type JacobianTransposed
Return type of jacobianTransposed.
Definition axisalignedcubegeometry.hh:81
│ │ │ +
AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower)
Constructor from a single point only.
Definition axisalignedcubegeometry.hh:159
│ │ │ +
static constexpr int mydimension
Definition axisalignedcubegeometry.hh:56
│ │ │ +
friend Dune::ReferenceElements< ctype, dim >::ReferenceElement referenceElement(const AxisAlignedCubeGeometry &)
Definition axisalignedcubegeometry.hh:316
│ │ │ +
static constexpr int coorddimension
Definition axisalignedcubegeometry.hh:59
│ │ │ +
GlobalCoordinate corner(int k) const
Return world coordinates of the k-th corner of the element.
Definition axisalignedcubegeometry.hh:269
│ │ │ +
ctype Volume
Type used for volume.
Definition axisalignedcubegeometry.hh:71
│ │ │ +
FieldVector< ctype, dim > LocalCoordinate
Type used for a vector of element coordinates.
Definition axisalignedcubegeometry.hh:65
│ │ │ +
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Jacobian transposed of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:205
│ │ │ +
FieldVector< ctype, coorddim > GlobalCoordinate
Type used for a vector of world coordinates.
Definition axisalignedcubegeometry.hh:68
│ │ │ +
LocalCoordinate local(const GlobalCoordinate &global) const
Definition axisalignedcubegeometry.hh:189
│ │ │ +
CoordType ctype
Type used for single coordinate coefficients.
Definition axisalignedcubegeometry.hh:62
│ │ │ +
std::conditional_t< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, coorddim, dim > > Jacobian
Return type of jacobian.
Definition axisalignedcubegeometry.hh:100
│ │ │ +
GeometryType type() const
Type of the cube. Here: a hypercube of the correct dimension.
Definition axisalignedcubegeometry.hh:164
│ │ │ +
int corners() const
Return the number of corners of the element.
Definition axisalignedcubegeometry.hh:263
│ │ │ +
Jacobian jacobian(const LocalCoordinate &local) const
Jacobian of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:229
│ │ │ +
std::conditional< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, coorddim, dim > >::type JacobianInverseTransposed
Return type of jacobianInverseTransposed.
Definition axisalignedcubegeometry.hh:91
│ │ │ +
Volume integrationElement(const LocalCoordinate &local) const
Return the integration element, i.e., the determinant term in the integral transformation formula.
Definition axisalignedcubegeometry.hh:243
│ │ │ +
GlobalCoordinate center() const
Return center of mass of the element.
Definition axisalignedcubegeometry.hh:249
│ │ │ +
AxisAlignedCubeGeometry()=default
Constructs an empty geometry.
│ │ │ +
bool affine() const
Return if the element is affine. Here: yes.
Definition axisalignedcubegeometry.hh:311
│ │ │ +
std::conditional_t< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, dim, coorddim > > JacobianInverse
Return type of jacobianInverse.
Definition axisalignedcubegeometry.hh:109
│ │ │ +
GlobalCoordinate global(const LocalCoordinate &local) const
Map a point in local (element) coordinates to world coordinates.
Definition axisalignedcubegeometry.hh:170
│ │ │
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ +
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:146
│ │ │ +
static const ReferenceElement & cube()
get hypercube reference elements
Definition referenceelements.hh:168
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,987 +1,440 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -multilineargeometry.hh │ │ │ │ +axisalignedcubegeometry.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH │ │ │ │ -6#define DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH │ │ │ │ -7 │ │ │ │ -8#include │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ -13 │ │ │ │ -14#include │ │ │ │ +5 │ │ │ │ +6#ifndef DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH │ │ │ │ +7#define DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH │ │ │ │ +8 │ │ │ │ +12 │ │ │ │ +13#include │ │ │ │ +14 │ │ │ │ 15#include │ │ │ │ -16#include │ │ │ │ -17 │ │ │ │ -18#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ -19#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -20#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ +16#include │ │ │ │ +17#include │ │ │ │ +18 │ │ │ │ +19#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +20#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ 21 │ │ │ │ -22namespace _D_u_n_e │ │ │ │ -23{ │ │ │ │ +22 │ │ │ │ +23namespace _D_u_n_e { │ │ │ │ 24 │ │ │ │ -25 // MultiLinearGeometryTraits │ │ │ │ -26 // ------------------------- │ │ │ │ -27 │ │ │ │ -37 template< class ct > │ │ │ │ -_3_8 struct _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s │ │ │ │ -39 { │ │ │ │ -_5_8 typedef Impl::FieldMatrixHelper< ct > _M_a_t_r_i_x_H_e_l_p_e_r; │ │ │ │ -59 │ │ │ │ -_6_1 static ct _t_o_l_e_r_a_n_c_e () { return ct( 16 ) * std::numeric_limits< ct >:: │ │ │ │ -epsilon(); } │ │ │ │ -62 │ │ │ │ -127 template< int mydim, int cdim > │ │ │ │ -_1_2_8 struct _C_o_r_n_e_r_S_t_o_r_a_g_e │ │ │ │ +48 template │ │ │ │ +_4_9 class _A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y │ │ │ │ +50 { │ │ │ │ +51 │ │ │ │ +52 │ │ │ │ +53 public: │ │ │ │ +54 │ │ │ │ +_5_6 constexpr static int _m_y_d_i_m_e_n_s_i_o_n = dim; │ │ │ │ +57 │ │ │ │ +_5_9 constexpr static int _c_o_o_r_d_d_i_m_e_n_s_i_o_n = coorddim; │ │ │ │ +60 │ │ │ │ +_6_2 typedef CoordType _c_t_y_p_e; │ │ │ │ +63 │ │ │ │ +_6_5 typedef FieldVector _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ +66 │ │ │ │ +_6_8 typedef FieldVector _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ +69 │ │ │ │ +_7_1 typedef _c_t_y_p_e _V_o_l_u_m_e; │ │ │ │ +72 │ │ │ │ +79 typedef typename std::conditional, │ │ │ │ +_8_1 FieldMatrix >_:_:_t_y_p_e _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ +82 │ │ │ │ +89 typedef typename std::conditional, │ │ │ │ +_9_1 FieldMatrix >_:_:_t_y_p_e _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d; │ │ │ │ +92 │ │ │ │ +_1_0_0 using _J_a_c_o_b_i_a_n = std::conditional_t, FieldMatrix >; │ │ │ │ +101 │ │ │ │ +_1_0_9 using _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e = std::conditional_t, FieldMatrix >; │ │ │ │ +110 │ │ │ │ +_1_1_8 _A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y () = default; │ │ │ │ +119 │ │ │ │ +_1_2_4 _A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y(const Dune::FieldVector lower, │ │ │ │ +125 const Dune::FieldVector upper) │ │ │ │ +126 : lower_(lower), │ │ │ │ +127 upper_(upper), │ │ │ │ +128 axes_() │ │ │ │ 129 { │ │ │ │ -_1_3_0 typedef std::vector< FieldVector< ct, cdim > > _T_y_p_e; │ │ │ │ -131 }; │ │ │ │ -132 │ │ │ │ -146 template< int dim > │ │ │ │ -_1_4_7 struct _h_a_s_S_i_n_g_l_e_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +130 static_assert(dim==coorddim, "Use this constructor only if │ │ │ │ +dim==coorddim!"); │ │ │ │ +131 // all 'true', but is never actually used │ │ │ │ +132 axes_ = (1< lower, │ │ │ │ +143 const Dune::FieldVector upper, │ │ │ │ +144 const std::bitset& axes) │ │ │ │ +145 : lower_(lower), │ │ │ │ +146 upper_(upper), │ │ │ │ +147 axes_(axes) │ │ │ │ 148 { │ │ │ │ -_1_4_9 static const bool _v = false; │ │ │ │ -_1_5_0 static const unsigned int _t_o_p_o_l_o_g_y_I_d = ~0u; │ │ │ │ -151 }; │ │ │ │ -152 }; │ │ │ │ -153 │ │ │ │ +149 assert(axes.count()==dim); │ │ │ │ +150 for (size_t i=0; i > │ │ │ │ -_1_8_0 class _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ -181 { │ │ │ │ -182 typedef _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> This; │ │ │ │ -183 │ │ │ │ -184 public: │ │ │ │ -_1_8_6 typedef ct _c_t_y_p_e; │ │ │ │ +_1_5_9 _A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y(const Dune::FieldVector lower) │ │ │ │ +160 : lower_(lower) │ │ │ │ +161 {} │ │ │ │ +162 │ │ │ │ +_1_6_4 _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e() const │ │ │ │ +165 { │ │ │ │ +166 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_u_b_e(dim); │ │ │ │ +167 } │ │ │ │ +168 │ │ │ │ +_1_7_0 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l(const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +171 { │ │ │ │ +172 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e result; │ │ │ │ +173 if (dim == coorddim) { // fast case │ │ │ │ +174 for (size_t i=0; i _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ -_1_9_6 typedef FieldVector< ctype, coorddimension > _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ -_1_9_8 typedef _c_t_y_p_e _V_o_l_u_m_e; │ │ │ │ -199 │ │ │ │ -_2_0_1 typedef FieldMatrix< ctype, mydimension, coorddimension > │ │ │ │ -_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ -202 │ │ │ │ -204 class JacobianInverseTransposed; │ │ │ │ -205 │ │ │ │ -_2_0_7 typedef FieldMatrix< ctype, coorddimension, mydimension > _J_a_c_o_b_i_a_n; │ │ │ │ +_1_8_9 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l(const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e& _g_l_o_b_a_l) const │ │ │ │ +190 { │ │ │ │ +191 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e result; │ │ │ │ +192 if (dim == coorddim) { // fast case │ │ │ │ +193 for (size_t i=0; i _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e; │ │ │ │ -211 │ │ │ │ -212 protected: │ │ │ │ -213 │ │ │ │ -_2_1_4 typedef _D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _> _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ +209 // Actually compute the result. Uses different methods depending │ │ │ │ +210 // on what kind of matrix JacobianTransposed is. │ │ │ │ +211 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(result); │ │ │ │ +212 │ │ │ │ +213 return result; │ │ │ │ +214 } │ │ │ │ 215 │ │ │ │ -216 public: │ │ │ │ -217 │ │ │ │ -_2_1_9 typedef typename _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ +_2_1_7 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d([[maybe_unused]] const │ │ │ │ +_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +218 { │ │ │ │ +219 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d result; │ │ │ │ 220 │ │ │ │ -221 private: │ │ │ │ -222 static const bool hasSingleGeometryType = Traits::template │ │ │ │ -hasSingleGeometryType< mydimension >::v; │ │ │ │ -223 │ │ │ │ -224 protected: │ │ │ │ -_2_2_5 typedef typename Traits::MatrixHelper _M_a_t_r_i_x_H_e_l_p_e_r; │ │ │ │ -_2_2_6 typedef typename std::conditional< hasSingleGeometryType, std:: │ │ │ │ -integral_constant< unsigned int, Traits::template hasSingleGeometryType< │ │ │ │ -mydimension >::topologyId >, unsigned int >_:_:_t_y_p_e _T_o_p_o_l_o_g_y_I_d; │ │ │ │ +221 // Actually compute the result. Uses different methods depending │ │ │ │ +222 // on what kind of matrix JacobianTransposed is. │ │ │ │ +223 _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d(result); │ │ │ │ +224 │ │ │ │ +225 return result; │ │ │ │ +226 } │ │ │ │ 227 │ │ │ │ -228 public: │ │ │ │ -238 template< class Corners > │ │ │ │ -_2_3_9 _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y ( const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t &_r_e_f_E_l_e_m_e_n_t, │ │ │ │ -240 const Corners &_c_o_r_n_e_r_s ) │ │ │ │ -241 : refElement_( _r_e_f_E_l_e_m_e_n_t ), │ │ │ │ -242 corners_( _c_o_r_n_e_r_s ) │ │ │ │ -243 {} │ │ │ │ -244 │ │ │ │ -254 template< class Corners > │ │ │ │ -_2_5_5 _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y ( _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e gt, │ │ │ │ -256 const Corners &_c_o_r_n_e_r_s ) │ │ │ │ -257 : refElement_( _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s::general( gt ) ), │ │ │ │ -258 corners_( _c_o_r_n_e_r_s ) │ │ │ │ -259 {} │ │ │ │ -260 │ │ │ │ -_2_6_2 bool _a_f_f_i_n_e () const │ │ │ │ -263 { │ │ │ │ -264 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d jt; │ │ │ │ -265 return _a_f_f_i_n_e( jt ); │ │ │ │ +_2_2_9 _J_a_c_o_b_i_a_n _j_a_c_o_b_i_a_n([[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +230 { │ │ │ │ +231 return _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l).transposed(); │ │ │ │ +232 } │ │ │ │ +233 │ │ │ │ +_2_3_5 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e([[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& │ │ │ │ +_l_o_c_a_l) const │ │ │ │ +236 { │ │ │ │ +237 return _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l).transposed(); │ │ │ │ +238 } │ │ │ │ +239 │ │ │ │ +_2_4_3 _V_o_l_u_m_e _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t([[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) │ │ │ │ +const │ │ │ │ +244 { │ │ │ │ +245 return _v_o_l_u_m_e(); │ │ │ │ +246 } │ │ │ │ +247 │ │ │ │ +_2_4_9 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r() const │ │ │ │ +250 { │ │ │ │ +251 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e result; │ │ │ │ +252 if (dim==0) │ │ │ │ +253 result = lower_; │ │ │ │ +254 else { │ │ │ │ +255 // Since lower_==upper_ for unused coordinates, this always does the right │ │ │ │ +thing │ │ │ │ +256 for (size_t i=0; i= 0) && (i < _c_o_r_n_e_r_s()) ); │ │ │ │ -278 return std::cref(corners_).get()[ i ]; │ │ │ │ -279 } │ │ │ │ -280 │ │ │ │ -_2_8_2 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r () const { return _g_l_o_b_a_l( _r_e_f_E_l_e_m_e_n_t().position( 0, │ │ │ │ -0 ) ); } │ │ │ │ -283 │ │ │ │ -_2_9_0 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) const │ │ │ │ -291 { │ │ │ │ -292 using std::begin; │ │ │ │ +_2_6_9 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_o_r_n_e_r(int k) const │ │ │ │ +270 { │ │ │ │ +271 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e result; │ │ │ │ +272 if (dim == coorddim) { // fast case │ │ │ │ +273 for (size_t i=0; i( _t_o_p_o_l_o_g_y_I_d(), std::integral_constant< int, mydimension > │ │ │ │ -(), cit, _c_t_y_p_e( 1 ), _l_o_c_a_l, _c_t_y_p_e( 1 ), y ); │ │ │ │ -297 return y; │ │ │ │ -298 } │ │ │ │ -299 │ │ │ │ -_3_1_2 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l ( const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &globalCoord ) const │ │ │ │ -313 { │ │ │ │ -314 const _c_t_y_p_e tolerance = Traits::tolerance(); │ │ │ │ -315 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e x = _r_e_f_E_l_e_m_e_n_t().position( 0, 0 ); │ │ │ │ -316 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e dx; │ │ │ │ -317 const bool affineMapping = this->_a_f_f_i_n_e(); │ │ │ │ -318 do │ │ │ │ -319 { │ │ │ │ -320 // Newton's method: DF^n dx^n = F^n, x^{n+1} -= dx^n │ │ │ │ -321 const GlobalCoordinate dglobal = (*this).global( x ) - globalCoord; │ │ │ │ -322 const bool invertible = │ │ │ │ -323 MatrixHelper::xTRightInvA( _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( x ), dglobal, dx ); │ │ │ │ -324 if( ! invertible ) │ │ │ │ -325 return _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e( std::numeric_limits< ctype > :: max() ); │ │ │ │ -326 │ │ │ │ -327 // update x with correction │ │ │ │ -328 x -= dx; │ │ │ │ -329 │ │ │ │ -330 // for affine mappings only one iteration is needed │ │ │ │ -331 if ( affineMapping ) break; │ │ │ │ -332 } while( dx.two_norm2() > tolerance ); │ │ │ │ -333 return x; │ │ │ │ -334 } │ │ │ │ -335 │ │ │ │ -_3_5_0 _V_o_l_u_m_e _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) const │ │ │ │ -351 { │ │ │ │ -352 return MatrixHelper::sqrtDetAAT( _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( _l_o_c_a_l ) ); │ │ │ │ -353 } │ │ │ │ -354 │ │ │ │ -_3_6_3 _V_o_l_u_m_e _v_o_l_u_m_e () const │ │ │ │ -364 { │ │ │ │ -365 return _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t( _r_e_f_E_l_e_m_e_n_t().position( 0, 0 ) ) * _r_e_f_E_l_e_m_e_n_t │ │ │ │ -().volume(); │ │ │ │ -366 } │ │ │ │ -367 │ │ │ │ -_3_7_7 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) │ │ │ │ -const │ │ │ │ -378 { │ │ │ │ -379 using std::begin; │ │ │ │ -380 │ │ │ │ -381 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d jt; │ │ │ │ -382 auto cit = begin(std::cref(corners_).get()); │ │ │ │ -383 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d_<_ _f_a_l_s_e_ _>( _t_o_p_o_l_o_g_y_I_d(), std::integral_constant< int, │ │ │ │ -mydimension >(), cit, _c_t_y_p_e( 1 ), _l_o_c_a_l, _c_t_y_p_e( 1 ), jt ); │ │ │ │ -384 return jt; │ │ │ │ -385 } │ │ │ │ -386 │ │ │ │ -_3_9_3 JacobianInverseTransposed _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -&_l_o_c_a_l ) const; │ │ │ │ -394 │ │ │ │ -_3_9_5 friend _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t ( const _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ -&geometry ) │ │ │ │ -396 { │ │ │ │ -397 return geometry._r_e_f_E_l_e_m_e_n_t(); │ │ │ │ -398 } │ │ │ │ -399 │ │ │ │ -400 │ │ │ │ -_4_0_7 _J_a_c_o_b_i_a_n _j_a_c_o_b_i_a_n (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ -408 { │ │ │ │ -409 return _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l).transposed(); │ │ │ │ -410 } │ │ │ │ -411 │ │ │ │ -_4_1_8 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ -419 { │ │ │ │ -420 return _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l).transposed(); │ │ │ │ -421 } │ │ │ │ -422 │ │ │ │ -423 protected: │ │ │ │ -424 │ │ │ │ -_4_2_5 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t _r_e_f_E_l_e_m_e_n_t () const │ │ │ │ -426 { │ │ │ │ -427 return refElement_; │ │ │ │ -428 } │ │ │ │ -429 │ │ │ │ -_4_3_0 _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d () const │ │ │ │ -431 { │ │ │ │ -432 return _t_o_p_o_l_o_g_y_I_d( std::integral_constant< bool, hasSingleGeometryType >() │ │ │ │ -); │ │ │ │ -433 } │ │ │ │ -434 │ │ │ │ -435 template< bool add, int dim, class CornerIterator > │ │ │ │ -_4_3_6 static void _g_l_o_b_a_l ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, │ │ │ │ -dim >, │ │ │ │ -437 CornerIterator &cit, const _c_t_y_p_e &df, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &x, │ │ │ │ -438 const _c_t_y_p_e &rf, _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &y ); │ │ │ │ -439 template< bool add, class CornerIterator > │ │ │ │ -_4_4_0 static void _g_l_o_b_a_l ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, 0 │ │ │ │ ->, │ │ │ │ -441 CornerIterator &cit, const _c_t_y_p_e &df, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &x, │ │ │ │ -442 const _c_t_y_p_e &rf, _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &y ); │ │ │ │ -443 │ │ │ │ -444 template< bool add, int rows, int dim, class CornerIterator > │ │ │ │ -_4_4_5 static void _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std:: │ │ │ │ -integral_constant< int, dim >, │ │ │ │ -446 CornerIterator &cit, const _c_t_y_p_e &df, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &x, │ │ │ │ -447 const _c_t_y_p_e &rf, FieldMatrix< ctype, rows, cdim > &jt ); │ │ │ │ -448 template< bool add, int rows, class CornerIterator > │ │ │ │ -_4_4_9 static void _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std:: │ │ │ │ -integral_constant< int, 0 >, │ │ │ │ -450 CornerIterator &cit, const _c_t_y_p_e &df, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &x, │ │ │ │ -451 const _c_t_y_p_e &rf, FieldMatrix< ctype, rows, cdim > &jt ); │ │ │ │ -452 │ │ │ │ -453 template< int dim, class CornerIterator > │ │ │ │ -_4_5_4 static bool _a_f_f_i_n_e ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, │ │ │ │ -dim >, CornerIterator &cit, _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ); │ │ │ │ -455 template< class CornerIterator > │ │ │ │ -_4_5_6 static bool _a_f_f_i_n_e ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, 0 │ │ │ │ ->, CornerIterator &cit, _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ); │ │ │ │ -457 │ │ │ │ -_4_5_8 bool _a_f_f_i_n_e ( _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jacobianT ) const │ │ │ │ -459 { │ │ │ │ -460 using std::begin; │ │ │ │ -461 │ │ │ │ -462 auto cit = begin(std::cref(corners_).get()); │ │ │ │ -463 return _a_f_f_i_n_e( _t_o_p_o_l_o_g_y_I_d(), std::integral_constant< int, mydimension >(), │ │ │ │ -cit, jacobianT ); │ │ │ │ -464 } │ │ │ │ -465 │ │ │ │ -466 private: │ │ │ │ -467 // The following methods are needed to convert the return type of │ │ │ │ -topologyId to │ │ │ │ -468 // unsigned int with g++-4.4. It has problems casting integral_constant to │ │ │ │ -the │ │ │ │ -469 // integral type. │ │ │ │ -470 static unsigned int toUnsignedInt(unsigned int i) { return i; } │ │ │ │ -471 template │ │ │ │ -472 static unsigned int toUnsignedInt(std::integral_constant ) │ │ │ │ -{ return v; } │ │ │ │ -473 _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d ( std::integral_constant< bool, true > ) const │ │ │ │ -{ return _T_o_p_o_l_o_g_y_I_d(); } │ │ │ │ -474 unsigned int _t_o_p_o_l_o_g_y_I_d ( std::integral_constant< bool, false > ) const │ │ │ │ -{ return _r_e_f_E_l_e_m_e_n_t().type().id(); } │ │ │ │ -475 │ │ │ │ -476 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t refElement_; │ │ │ │ -477 typename Traits::template CornerStorage< mydimension, coorddimension >:: │ │ │ │ -Type corners_; │ │ │ │ -478 }; │ │ │ │ -479 │ │ │ │ -480 │ │ │ │ -481 │ │ │ │ -482 // MultiLinearGeometry::JacobianInverseTransposed │ │ │ │ -483 // ---------------------------------------------- │ │ │ │ -484 │ │ │ │ -485 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ -_4_8_6 class _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y< ct, mydim, cdim, Traits >:: │ │ │ │ -_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -487 : public FieldMatrix< ctype, coorddimension, mydimension > │ │ │ │ -488 { │ │ │ │ -489 typedef FieldMatrix< ctype, coorddimension, mydimension > Base; │ │ │ │ -490 │ │ │ │ -491 public: │ │ │ │ -492 void setup ( const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ -493 { │ │ │ │ -494 detInv_ = MatrixHelper::rightInvA( jt, static_cast< Base & >( *this ) ); │ │ │ │ -495 } │ │ │ │ -496 │ │ │ │ -497 void setupDeterminant ( const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ -498 { │ │ │ │ -499 detInv_ = MatrixHelper::sqrtDetAAT( jt ); │ │ │ │ -500 } │ │ │ │ -501 │ │ │ │ -502 _c_t_y_p_e det () const { return _c_t_y_p_e( 1 ) / detInv_; } │ │ │ │ -503 _c_t_y_p_e detInv () const { return detInv_; } │ │ │ │ -504 │ │ │ │ -505 private: │ │ │ │ -506 _c_t_y_p_e detInv_; │ │ │ │ -507 }; │ │ │ │ -508 │ │ │ │ -509 │ │ │ │ -510 │ │ │ │ -523 template< class ct, int mydim, int cdim, class Traits = │ │ │ │ -MultiLinearGeometryTraits< ct > > │ │ │ │ -_5_2_4 class _C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ -525 : public _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y< ct, mydim, cdim, Traits > │ │ │ │ -526 { │ │ │ │ -527 typedef _C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> This; │ │ │ │ -528 typedef _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> Base; │ │ │ │ -529 │ │ │ │ -530 protected: │ │ │ │ -_5_3_1 typedef typename _B_a_s_e_:_:_M_a_t_r_i_x_H_e_l_p_e_r _M_a_t_r_i_x_H_e_l_p_e_r; │ │ │ │ -532 │ │ │ │ -533 public: │ │ │ │ -_5_3_4 typedef typename _B_a_s_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ -535 │ │ │ │ -_5_3_6 typedef typename _B_a_s_e_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ -537 │ │ │ │ -538 using _B_a_s_e_:_:_m_y_d_i_m_e_n_s_i_o_n; │ │ │ │ -539 using _B_a_s_e_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n; │ │ │ │ -540 │ │ │ │ -_5_4_1 typedef typename _B_a_s_e_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ -_5_4_2 typedef typename _B_a_s_e_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ -_5_4_3 typedef typename _B_a_s_e_:_:_V_o_l_u_m_e _V_o_l_u_m_e; │ │ │ │ -544 │ │ │ │ -_5_4_5 typedef typename _B_a_s_e_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ -_5_4_6 typedef typename Base::JacobianInverseTransposed _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d; │ │ │ │ -_5_4_7 typedef typename _B_a_s_e_:_:_J_a_c_o_b_i_a_n _J_a_c_o_b_i_a_n; │ │ │ │ -_5_4_8 typedef typename _B_a_s_e_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e; │ │ │ │ -549 │ │ │ │ -550 template< class CornerStorage > │ │ │ │ -_5_5_1 _C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y ( const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t &_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t, const │ │ │ │ -CornerStorage &cornerStorage ) │ │ │ │ -552 : Base( _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t, cornerStorage ), │ │ │ │ -553 affine_( Base::_a_f_f_i_n_e( jacobianTransposed_ ) ), │ │ │ │ -554 jacobianInverseTransposedComputed_( false ), │ │ │ │ -555 integrationElementComputed_( false ) │ │ │ │ -556 {} │ │ │ │ -557 │ │ │ │ -558 template< class CornerStorage > │ │ │ │ -_5_5_9 _C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y ( _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e gt, const CornerStorage │ │ │ │ -&cornerStorage ) │ │ │ │ -560 : Base( gt, cornerStorage ), │ │ │ │ -561 affine_( Base::_a_f_f_i_n_e( jacobianTransposed_ ) ), │ │ │ │ -562 jacobianInverseTransposedComputed_( false ), │ │ │ │ -563 integrationElementComputed_( false ) │ │ │ │ -564 {} │ │ │ │ -565 │ │ │ │ -_5_6_7 bool _a_f_f_i_n_e () const { return affine_; } │ │ │ │ -568 │ │ │ │ -569 using _B_a_s_e_:_:_c_o_r_n_e_r; │ │ │ │ -570 │ │ │ │ -_5_7_2 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r () const { return _g_l_o_b_a_l( _r_e_f_E_l_e_m_e_n_t().position( 0, │ │ │ │ -0 ) ); } │ │ │ │ -573 │ │ │ │ -_5_8_0 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) const │ │ │ │ -581 { │ │ │ │ -582 if( _a_f_f_i_n_e() ) │ │ │ │ -583 { │ │ │ │ -584 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l( _c_o_r_n_e_r( 0 ) ); │ │ │ │ -585 jacobianTransposed_.umtv( _l_o_c_a_l, _g_l_o_b_a_l ); │ │ │ │ -586 return _g_l_o_b_a_l; │ │ │ │ -587 } │ │ │ │ -588 else │ │ │ │ -589 return _B_a_s_e_:_:_g_l_o_b_a_l( _l_o_c_a_l ); │ │ │ │ -590 } │ │ │ │ -591 │ │ │ │ -_6_0_4 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l ( const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &_g_l_o_b_a_l ) const │ │ │ │ -605 { │ │ │ │ -606 if( _a_f_f_i_n_e() ) │ │ │ │ -607 { │ │ │ │ -608 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l; │ │ │ │ -609 if( jacobianInverseTransposedComputed_ ) │ │ │ │ -610 jacobianInverseTransposed_.mtv( _g_l_o_b_a_l - _c_o_r_n_e_r( 0 ), _l_o_c_a_l ); │ │ │ │ -611 else │ │ │ │ -612 MatrixHelper::xTRightInvA( jacobianTransposed_, _g_l_o_b_a_l - _c_o_r_n_e_r( 0 ), _l_o_c_a_l │ │ │ │ -); │ │ │ │ -613 return _l_o_c_a_l; │ │ │ │ -614 } │ │ │ │ -615 else │ │ │ │ -616 return _B_a_s_e_:_:_l_o_c_a_l( _g_l_o_b_a_l ); │ │ │ │ -617 } │ │ │ │ -618 │ │ │ │ -_6_3_3 _c_t_y_p_e _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) const │ │ │ │ -634 { │ │ │ │ -635 if( _a_f_f_i_n_e() ) │ │ │ │ -636 { │ │ │ │ -637 if( !integrationElementComputed_ ) │ │ │ │ -638 { │ │ │ │ -639 jacobianInverseTransposed_.setupDeterminant( jacobianTransposed_ ); │ │ │ │ -640 integrationElementComputed_ = true; │ │ │ │ -641 } │ │ │ │ -642 return jacobianInverseTransposed_.detInv(); │ │ │ │ -643 } │ │ │ │ -644 else │ │ │ │ -645 return _B_a_s_e_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t( _l_o_c_a_l ); │ │ │ │ -646 } │ │ │ │ -647 │ │ │ │ -_6_4_9 _V_o_l_u_m_e _v_o_l_u_m_e () const │ │ │ │ -650 { │ │ │ │ -651 if( _a_f_f_i_n_e() ) │ │ │ │ -652 return _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t( _r_e_f_E_l_e_m_e_n_t().position( 0, 0 ) ) * _r_e_f_E_l_e_m_e_n_t │ │ │ │ -().volume(); │ │ │ │ -653 else │ │ │ │ -654 return _B_a_s_e_:_:_v_o_l_u_m_e(); │ │ │ │ -655 } │ │ │ │ -656 │ │ │ │ -_6_6_6 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) │ │ │ │ +_2_9_5 _V_o_l_u_m_e _v_o_l_u_m_e() const │ │ │ │ +296 { │ │ │ │ +297 _c_t_y_p_e vol = 1; │ │ │ │ +298 if (dim == coorddim) { // fast case │ │ │ │ +299 for (size_t i=0; i_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t ( const _A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y & /* geometry */ ) │ │ │ │ +317 { │ │ │ │ +318 return _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_:_:_c_u_b_e(); │ │ │ │ +319 } │ │ │ │ +320 │ │ │ │ +321 private: │ │ │ │ +322 // jacobianTransposed: fast case --> diagonal matrix │ │ │ │ +323 void _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( DiagonalMatrix &_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ) │ │ │ │ const │ │ │ │ -667 { │ │ │ │ -668 if( _a_f_f_i_n_e() ) │ │ │ │ -669 return jacobianTransposed_; │ │ │ │ -670 else │ │ │ │ -671 return _B_a_s_e_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( _l_o_c_a_l ); │ │ │ │ -672 } │ │ │ │ -673 │ │ │ │ -_6_8_0 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -&_l_o_c_a_l ) const │ │ │ │ -681 { │ │ │ │ -682 if( _a_f_f_i_n_e() ) │ │ │ │ -683 { │ │ │ │ -684 if( !jacobianInverseTransposedComputed_ ) │ │ │ │ -685 { │ │ │ │ -686 jacobianInverseTransposed_.setup( jacobianTransposed_ ); │ │ │ │ -687 jacobianInverseTransposedComputed_ = true; │ │ │ │ -688 integrationElementComputed_ = true; │ │ │ │ -689 } │ │ │ │ -690 return jacobianInverseTransposed_; │ │ │ │ -691 } │ │ │ │ -692 else │ │ │ │ -693 return _B_a_s_e_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d( _l_o_c_a_l ); │ │ │ │ -694 } │ │ │ │ -695 │ │ │ │ -_7_0_2 _J_a_c_o_b_i_a_n _j_a_c_o_b_i_a_n (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ -703 { │ │ │ │ -704 return _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l).transposed(); │ │ │ │ -705 } │ │ │ │ -706 │ │ │ │ -_7_1_3 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ -714 { │ │ │ │ -715 return _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l).transposed(); │ │ │ │ -716 } │ │ │ │ -717 │ │ │ │ -718 protected: │ │ │ │ -719 using _B_a_s_e_:_:_r_e_f_E_l_e_m_e_n_t; │ │ │ │ -720 │ │ │ │ -721 private: │ │ │ │ -722 mutable _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d jacobianTransposed_; │ │ │ │ -723 mutable _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d jacobianInverseTransposed_; │ │ │ │ -724 │ │ │ │ -725 mutable bool affine_ : 1; │ │ │ │ -726 │ │ │ │ -727 mutable bool jacobianInverseTransposedComputed_ : 1; │ │ │ │ -728 mutable bool integrationElementComputed_ : 1; │ │ │ │ -729 }; │ │ │ │ -730 │ │ │ │ -731 │ │ │ │ -732 │ │ │ │ -733 // Implementation of MultiLinearGeometry │ │ │ │ -734 // ------------------------------------- │ │ │ │ -735 │ │ │ │ -736 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ -737 inline typename MultiLinearGeometry< ct, mydim, cdim, Traits >:: │ │ │ │ -JacobianInverseTransposed │ │ │ │ -_7_3_8 _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) const │ │ │ │ -739 { │ │ │ │ -740 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d jit; │ │ │ │ -741 jit.setup( _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( _l_o_c_a_l ) ); │ │ │ │ -742 return jit; │ │ │ │ -743 } │ │ │ │ -744 │ │ │ │ -745 │ │ │ │ -746 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ -747 template< bool add, int dim, class CornerIterator > │ │ │ │ -748 inline void _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ -_7_4_9_ _:_:_g_l_o_b_a_l ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim >, │ │ │ │ -750 CornerIterator &cit, const _c_t_y_p_e &df, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &x, │ │ │ │ -751 const _c_t_y_p_e &rf, _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &y ) │ │ │ │ -752 { │ │ │ │ -753 const _c_t_y_p_e xn = df*x[ dim-1 ]; │ │ │ │ -754 const _c_t_y_p_e cxn = _c_t_y_p_e( 1 ) - xn; │ │ │ │ -755 │ │ │ │ -756 if( Impl::isPrism( toUnsignedInt(_t_o_p_o_l_o_g_y_I_d), _m_y_d_i_m_e_n_s_i_o_n, _m_y_d_i_m_e_n_s_i_o_n-dim │ │ │ │ -) ) │ │ │ │ -757 { │ │ │ │ -758 // apply (1-xn) times mapping for bottom │ │ │ │ -759 _g_l_o_b_a_l_<_ _a_d_d_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, df, │ │ │ │ -x, rf*cxn, y ); │ │ │ │ -760 // apply xn times mapping for top │ │ │ │ -761 _g_l_o_b_a_l_<_ _t_r_u_e_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, │ │ │ │ -df, x, rf*xn, y ); │ │ │ │ -762 } │ │ │ │ -763 else │ │ │ │ -764 { │ │ │ │ -765 assert( Impl::isPyramid( toUnsignedInt(_t_o_p_o_l_o_g_y_I_d), _m_y_d_i_m_e_n_s_i_o_n, │ │ │ │ -_m_y_d_i_m_e_n_s_i_o_n-dim ) ); │ │ │ │ -766 // apply (1-xn) times mapping for bottom (with argument x/(1-xn)) │ │ │ │ -767 if( cxn > Traits::tolerance() || cxn < -Traits::tolerance() ) │ │ │ │ -768 _g_l_o_b_a_l_<_ _a_d_d_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, df/ │ │ │ │ -cxn, x, rf*cxn, y ); │ │ │ │ -769 else │ │ │ │ -770 _g_l_o_b_a_l_<_ _a_d_d_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, df, │ │ │ │ -x, _c_t_y_p_e( 0 ), y ); │ │ │ │ -771 // apply xn times the tip │ │ │ │ -772 y.axpy( rf*xn, *cit ); │ │ │ │ -773 ++cit; │ │ │ │ -774 } │ │ │ │ -775 } │ │ │ │ -776 │ │ │ │ -777 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ -778 template< bool add, class CornerIterator > │ │ │ │ -779 inline void _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ -_7_8_0_ _:_:_g_l_o_b_a_l ( _T_o_p_o_l_o_g_y_I_d, std::integral_constant< int, 0 >, │ │ │ │ -781 CornerIterator &cit, const _c_t_y_p_e &, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &, │ │ │ │ -782 const _c_t_y_p_e &rf, _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &y ) │ │ │ │ -783 { │ │ │ │ -784 const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &origin = *cit; │ │ │ │ -785 ++cit; │ │ │ │ -786 for( int i = 0; i < _c_o_o_r_d_d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ -787 y[ i ] = (add ? y[ i ] + rf*origin[ i ] : rf*origin[ i ]); │ │ │ │ -788 } │ │ │ │ -789 │ │ │ │ -790 │ │ │ │ -791 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ -792 template< bool add, int rows, int dim, class CornerIterator > │ │ │ │ -793 inline void _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ -_7_9_4_ _:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, │ │ │ │ -dim >, │ │ │ │ -795 CornerIterator &cit, const _c_t_y_p_e &df, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &x, │ │ │ │ -796 const _c_t_y_p_e &rf, FieldMatrix< ctype, rows, cdim > &jt ) │ │ │ │ -797 { │ │ │ │ -798 assert( rows >= dim ); │ │ │ │ -799 │ │ │ │ -800 const _c_t_y_p_e xn = df*x[ dim-1 ]; │ │ │ │ -801 const _c_t_y_p_e cxn = _c_t_y_p_e( 1 ) - xn; │ │ │ │ -802 │ │ │ │ -803 auto cit2( cit ); │ │ │ │ -804 if( Impl::isPrism( toUnsignedInt(_t_o_p_o_l_o_g_y_I_d), _m_y_d_i_m_e_n_s_i_o_n, _m_y_d_i_m_e_n_s_i_o_n-dim │ │ │ │ -) ) │ │ │ │ -805 { │ │ │ │ -806 // apply (1-xn) times Jacobian for bottom │ │ │ │ -807 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d_<_ _a_d_d_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 > │ │ │ │ -(), cit2, df, x, rf*cxn, jt ); │ │ │ │ -808 // apply xn times Jacobian for top │ │ │ │ -809 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d_<_ _t_r_u_e_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim- │ │ │ │ -1 >(), cit2, df, x, rf*xn, jt ); │ │ │ │ -810 // compute last row as difference between top value and bottom value │ │ │ │ -811 _g_l_o_b_a_l_<_ _a_d_d_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, df, │ │ │ │ -x, -rf, jt[ dim-1 ] ); │ │ │ │ -812 _g_l_o_b_a_l_<_ _t_r_u_e_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, │ │ │ │ -df, x, rf, jt[ dim-1 ] ); │ │ │ │ -813 } │ │ │ │ -814 else │ │ │ │ -815 { │ │ │ │ -816 assert( Impl::isPyramid( toUnsignedInt(_t_o_p_o_l_o_g_y_I_d), _m_y_d_i_m_e_n_s_i_o_n, │ │ │ │ -_m_y_d_i_m_e_n_s_i_o_n-dim ) ); │ │ │ │ -817 /* │ │ │ │ -818 * In the pyramid case, we need a transformation Tb: B -> R^n for the │ │ │ │ -819 * base B \subset R^{n-1}. The pyramid transformation is then defined as │ │ │ │ -820 * T: P \subset R^n -> R^n │ │ │ │ -821 * (x, xn) |-> (1-xn) Tb(x*) + xn t (x \in R^{n-1}, xn \in R) │ │ │ │ -822 * with the tip of the pyramid mapped to t and x* = x/(1-xn) │ │ │ │ -823 * the projection of (x,xn) onto the base. │ │ │ │ -824 * │ │ │ │ -825 * For the Jacobi matrix DT we get │ │ │ │ -826 * DT = ( A | b ) │ │ │ │ -827 * with A = DTb(x*) (n x n-1 matrix) │ │ │ │ -828 * and b = dT/dxn (n-dim column vector). │ │ │ │ -829 * Furthermore │ │ │ │ -830 * b = -Tb(x*) + t + \sum_i dTb/dx_i(x^*) x_i/(1-xn) │ │ │ │ -831 * │ │ │ │ -832 * Note that both A and b are not defined in the pyramid tip (x=0, xn=1)! │ │ │ │ -833 * Indeed for B the unit square, Tb mapping B to the quadrilateral given │ │ │ │ -834 * by the vertices (0,0,0), (2,0,0), (0,1,0), (1,1,0) and t=(0,0,1), we get │ │ │ │ -835 * │ │ │ │ -836 * T(x,y,xn) = ( x(2-y/(1-xn)), y, xn ) │ │ │ │ -837 * / 2-y/(1-xn) -x 0 \ │ │ │ │ -838 * DT(x,y,xn) = | 0 1 0 | │ │ │ │ -839 * \ 0 0 1 / │ │ │ │ -840 * which is not continuous for xn -> 1, choose for example │ │ │ │ -841 * x=0, y=1-xn, xn -> 1 --> DT -> diag(1,1,1) │ │ │ │ -842 * x=1-xn, y=0, xn -> 1 --> DT -> diag(2,1,1) │ │ │ │ -843 * │ │ │ │ -844 * However, for Tb affine-linear, Tb(y) = My + y0, DTb = M: │ │ │ │ -845 * A = M │ │ │ │ -846 * b = -M x* - y0 + t + \sum_i M_i x_i/(1-xn) │ │ │ │ -847 * = -M x* - y0 + t + M x* │ │ │ │ -848 * = -y0 + t │ │ │ │ -849 * which is continuous for xn -> 1. Note that this b is also given by │ │ │ │ -850 * b = -Tb(0) + t + \sum_i dTb/dx_i(0) x_i/1 │ │ │ │ -851 * that is replacing x* by 1 and 1-xn by 1 in the formular above. │ │ │ │ -852 * │ │ │ │ -853 * For xn -> 1, we can thus set x*=0, "1-xn"=1 (or anything != 0) and get │ │ │ │ -854 * the right result in case Tb is affine-linear. │ │ │ │ -855 */ │ │ │ │ -856 │ │ │ │ -857 /* The second case effectively results in x* = 0 */ │ │ │ │ -858 _c_t_y_p_e dfcxn = (cxn > Traits::tolerance() || cxn < -Traits::tolerance()) ? │ │ │ │ -_c_t_y_p_e(df / cxn) : _c_t_y_p_e(0); │ │ │ │ -859 │ │ │ │ -860 // initialize last row │ │ │ │ -861 // b = -Tb(x*) │ │ │ │ -862 // (b = -Tb(0) = -y0 in case xn -> 1 and Tb affine-linear) │ │ │ │ -863 _g_l_o_b_a_l_<_ _a_d_d_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, │ │ │ │ -dfcxn, x, -rf, jt[ dim-1 ] ); │ │ │ │ -864 // b += t │ │ │ │ -865 jt[ dim-1 ].axpy( rf, *cit ); │ │ │ │ -866 ++cit; │ │ │ │ -867 // apply Jacobian for bottom (with argument x/(1-xn)) and correct last row │ │ │ │ -868 if( add ) │ │ │ │ -869 { │ │ │ │ -870 FieldMatrix< _c_t_y_p_e, dim-1, _c_o_o_r_d_d_i_m_e_n_s_i_o_n > jt2; │ │ │ │ -871 // jt2 = dTb/dx_i(x*) │ │ │ │ -872 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d_<_ _f_a_l_s_e_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim- │ │ │ │ -1 >(), cit2, dfcxn, x, rf, jt2 ); │ │ │ │ -873 // A = dTb/dx_i(x*) (jt[j], j=0..dim-1) │ │ │ │ -874 // b += \sum_i dTb/dx_i(x*) x_i/(1-xn) (jt[dim-1]) │ │ │ │ -875 // (b += 0 in case xn -> 1) │ │ │ │ -876 for( int j = 0; j < dim-1; ++j ) │ │ │ │ -877 { │ │ │ │ -878 jt[ j ] += jt2[ j ]; │ │ │ │ -879 jt[ dim-1 ].axpy( dfcxn*x[ j ], jt2[ j ] ); │ │ │ │ -880 } │ │ │ │ -881 } │ │ │ │ -882 else │ │ │ │ -883 { │ │ │ │ -884 // jt = dTb/dx_i(x*) │ │ │ │ -885 _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d_<_ _f_a_l_s_e_ _>( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim- │ │ │ │ -1 >(), cit2, dfcxn, x, rf, jt ); │ │ │ │ -886 // b += \sum_i dTb/dx_i(x*) x_i/(1-xn) │ │ │ │ -887 for( int j = 0; j < dim-1; ++j ) │ │ │ │ -888 jt[ dim-1 ].axpy( dfcxn*x[ j ], jt[ j ] ); │ │ │ │ -889 } │ │ │ │ -890 } │ │ │ │ -891 } │ │ │ │ -892 │ │ │ │ -893 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ -894 template< bool add, int rows, class CornerIterator > │ │ │ │ -895 inline void _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ -_8_9_6_ _:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( _T_o_p_o_l_o_g_y_I_d, std::integral_constant< int, 0 >, │ │ │ │ -897 CornerIterator &cit, const _c_t_y_p_e &, const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &, │ │ │ │ -898 const _c_t_y_p_e &, FieldMatrix< ctype, rows, cdim > & ) │ │ │ │ -899 { │ │ │ │ -900 ++cit; │ │ │ │ -901 } │ │ │ │ -902 │ │ │ │ -903 │ │ │ │ -904 │ │ │ │ -905 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ -906 template< int dim, class CornerIterator > │ │ │ │ -907 inline bool _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ -_9_0_8_ _:_:_a_f_f_i_n_e ( _T_o_p_o_l_o_g_y_I_d _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim >, │ │ │ │ -CornerIterator &cit, _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ -909 { │ │ │ │ -910 const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &orgBottom = *cit; │ │ │ │ -911 if( !_a_f_f_i_n_e( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, jt ) │ │ │ │ -) │ │ │ │ -912 return false; │ │ │ │ -913 const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &orgTop = *cit; │ │ │ │ -914 │ │ │ │ -915 if( Impl::isPrism( toUnsignedInt(_t_o_p_o_l_o_g_y_I_d), _m_y_d_i_m_e_n_s_i_o_n, _m_y_d_i_m_e_n_s_i_o_n-dim │ │ │ │ -) ) │ │ │ │ -916 { │ │ │ │ -917 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d jtTop; │ │ │ │ -918 if( !_a_f_f_i_n_e( _t_o_p_o_l_o_g_y_I_d, std::integral_constant< int, dim-1 >(), cit, jtTop │ │ │ │ -) ) │ │ │ │ -919 return false; │ │ │ │ -920 │ │ │ │ -921 // check whether both jacobians are identical │ │ │ │ -922 _c_t_y_p_e norm( 0 ); │ │ │ │ -923 for( int i = 0; i < dim-1; ++i ) │ │ │ │ -924 norm += (jtTop[ i ] - jt[ i ]).two_norm2(); │ │ │ │ -925 if( norm >= Traits::tolerance() ) │ │ │ │ -926 return false; │ │ │ │ -927 } │ │ │ │ -928 else │ │ │ │ -929 ++cit; │ │ │ │ -930 jt[ dim-1 ] = orgTop - orgBottom; │ │ │ │ -931 return true; │ │ │ │ -932 } │ │ │ │ -933 │ │ │ │ -934 template< class ct, int mydim, int cdim, class Traits > │ │ │ │ -935 template< class CornerIterator > │ │ │ │ -936 inline bool _M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ -_9_3_7_ _:_:_a_f_f_i_n_e ( _T_o_p_o_l_o_g_y_I_d, std::integral_constant< int, 0 >, CornerIterator │ │ │ │ -&cit, _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d & ) │ │ │ │ -938 { │ │ │ │ -939 ++cit; │ │ │ │ -940 return true; │ │ │ │ -941 } │ │ │ │ -942 │ │ │ │ -943} // namespace Dune │ │ │ │ -944 │ │ │ │ -945#endif // #ifndef DUNE_GEOMETRY_MULTILINEARGEOMETRY_HH │ │ │ │ -_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h │ │ │ │ +324 { │ │ │ │ +325 for (size_t i=0; i dense matrix │ │ │ │ +330 void _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( FieldMatrix │ │ │ │ +&_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ) const │ │ │ │ +331 { │ │ │ │ +332 if (dim==0) │ │ │ │ +333 return; │ │ │ │ +334 │ │ │ │ +335 size_t lc = 0; │ │ │ │ +336 for (size_t i=0; i diagonal matrix │ │ │ │ +342 void _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ( DiagonalMatrix │ │ │ │ +&_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ) const │ │ │ │ +343 { │ │ │ │ +344 for (size_t i=0; i dense matrix │ │ │ │ +349 void _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ( FieldMatrix │ │ │ │ +&_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ) const │ │ │ │ +350 { │ │ │ │ +351 if (dim==0) │ │ │ │ +352 return; │ │ │ │ +353 │ │ │ │ +354 size_t lc = 0; │ │ │ │ +355 for (size_t i=0; i lower_; │ │ │ │ +361 │ │ │ │ +362 Dune::FieldVector upper_; │ │ │ │ +363 │ │ │ │ +364 std::bitset axes_; │ │ │ │ +365 }; │ │ │ │ +366 │ │ │ │ +367} // namespace Dune │ │ │ │ +368#endif │ │ │ │ _t_y_p_e_._h_h │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ _r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_u_b_e │ │ │ │ +constexpr GeometryType cube(unsigned int dim) │ │ │ │ +Returns a GeometryType representing a hypercube of dimension dim. │ │ │ │ +DDeeffiinniittiioonn type.hh:462 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ -Class providing access to the singletons of the reference elements. │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -typename Container::ReferenceElement ReferenceElement │ │ │ │ -The reference element type. │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:146 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s │ │ │ │ -default traits class for MultiLinearGeometry │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:39 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_M_a_t_r_i_x_H_e_l_p_e_r │ │ │ │ -Impl::FieldMatrixHelper< ct > MatrixHelper │ │ │ │ -helper structure containing some matrix routines │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:58 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_t_o_l_e_r_a_n_c_e │ │ │ │ -static ct tolerance() │ │ │ │ -tolerance to numerical algorithms │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:61 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e │ │ │ │ -template specifying the storage for the corners │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:129 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_T_y_p_e │ │ │ │ -std::vector< FieldVector< ct, cdim > > Type │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:130 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_h_a_s_S_i_n_g_l_e_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ -will there be only one geometry type for a dimension? │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:148 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_h_a_s_S_i_n_g_l_e_G_e_o_m_e_t_r_y_T_y_p_e_:_:_t_o_p_o_l_o_g_y_I_d │ │ │ │ -static const unsigned int topologyId │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:150 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_T_r_a_i_t_s_:_:_h_a_s_S_i_n_g_l_e_G_e_o_m_e_t_r_y_T_y_p_e_:_:_v │ │ │ │ -static const bool v │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:149 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ -static void global(TopologyId topologyId, std::integral_constant< int, dim >, │ │ │ │ -CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype │ │ │ │ -&rf, GlobalCoordinate &y) │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:749 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ -static const int mydimension │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:189 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_t_y_p_e │ │ │ │ -Dune::GeometryType type() const │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:269 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_M_a_t_r_i_x_H_e_l_p_e_r │ │ │ │ -Traits::MatrixHelper MatrixHelper │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:225 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< ctype, coorddimension > GlobalCoordinate │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:196 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -static void jacobianTransposed(TopologyId topologyId, std::integral_constant< │ │ │ │ -int, 0 >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const │ │ │ │ -ctype &rf, FieldMatrix< ctype, rows, cdim > &jt) │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:896 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const │ │ │ │ -obtain the transposed of the Jacobian │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:377 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_r_e_f_E_l_e_m_e_n_t │ │ │ │ -ReferenceElement refElement() const │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:425 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ -GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ -evaluate the mapping │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:290 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_c_e_n_t_e_r │ │ │ │ -GlobalCoordinate center() const │ │ │ │ -obtain the centroid of the mapping's image │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:282 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ -GlobalCoordinate corner(int i) const │ │ │ │ -obtain coordinates of the i-th corner │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:275 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ -Dune::ReferenceElements< ctype, mydimension > ReferenceElements │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:214 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_c_t_y_p_e │ │ │ │ -ct ctype │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:186 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -static void jacobianTransposed(TopologyId topologyId, std::integral_constant< │ │ │ │ -int, dim >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, │ │ │ │ -const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt) │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:794 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ -static const int coorddimension │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:191 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_c_o_r_n_e_r_s │ │ │ │ -int corners() const │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:272 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_t_o_p_o_l_o_g_y_I_d │ │ │ │ -TopologyId topologyId() const │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:430 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -friend ReferenceElement referenceElement(const MultiLinearGeometry &geometry) │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:395 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_l_o_c_a_l │ │ │ │ -LocalCoordinate local(const GlobalCoordinate &globalCoord) const │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:312 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ -static void global(TopologyId topologyId, std::integral_constant< int, 0 >, │ │ │ │ -CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype │ │ │ │ -&rf, GlobalCoordinate &y) │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:780 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ Volume volume() const │ │ │ │ -obtain the volume of the mapping's image │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:363 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< ctype, mydimension > LocalCoordinate │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:194 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ -MultiLinearGeometry(const ReferenceElement &refElement, const Corners &corners) │ │ │ │ -constructor │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:239 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ -static bool affine(TopologyId topologyId, std::integral_constant< int, 0 >, │ │ │ │ -CornerIterator &cit, JacobianTransposed &jt) │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:937 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_T_o_p_o_l_o_g_y_I_d │ │ │ │ -std::conditional< hasSingleGeometryType, std::integral_constant< unsignedint, │ │ │ │ -Traits::templatehasSingleGeometryType< mydimension >::topologyId >, unsignedint │ │ │ │ ->::type TopologyId │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:226 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_V_o_l_u_m_e │ │ │ │ -ctype Volume │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:198 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ -static bool affine(TopologyId topologyId, std::integral_constant< int, dim >, │ │ │ │ -CornerIterator &cit, JacobianTransposed &jt) │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:908 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ +Return the element volume. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:295 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y │ │ │ │ +AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower, const │ │ │ │ +Dune::FieldVector< ctype, coorddim > upper, const std::bitset< coorddim > │ │ │ │ +&axes) │ │ │ │ +Constructor from a lower left and an upper right corner. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:142 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y │ │ │ │ +AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower, const │ │ │ │ +Dune::FieldVector< ctype, coorddim > upper) │ │ │ │ +Constructor from a lower left and an upper right corner. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:124 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ JacobianInverse jacobianInverse(const LocalCoordinate &local) const │ │ │ │ -Obtain the Jacobian's inverse. │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:418 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ -MultiLinearGeometry(Dune::GeometryType gt, const Corners &corners) │ │ │ │ -constructor │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:255 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:201 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -ReferenceElements::ReferenceElement ReferenceElement │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:219 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +Inverse Jacobian of the transformation from local to global coordinates. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:235 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate │ │ │ │ &local) const │ │ │ │ -obtain the transposed of the Jacobian's inverse │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:738 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_J_a_c_o_b_i_a_n │ │ │ │ -FieldMatrix< ctype, coorddimension, mydimension > Jacobian │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:207 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ -bool affine() const │ │ │ │ -is this mapping affine? │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:262 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ -FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:210 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ -bool affine(JacobianTransposed &jacobianT) const │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:458 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ -Volume integrationElement(const LocalCoordinate &local) const │ │ │ │ -obtain the integration element │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:350 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n │ │ │ │ -Jacobian jacobian(const LocalCoordinate &local) const │ │ │ │ -Obtain the Jacobian. │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:407 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:488 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _> │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ -GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ -evaluate the mapping │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:580 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -Base::ReferenceElement ReferenceElement │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:534 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_a_f_f_i_n_e │ │ │ │ -bool affine() const │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:567 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ -CachedMultiLinearGeometry(const ReferenceElement &referenceElement, const │ │ │ │ -CornerStorage &cornerStorage) │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:551 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_r_e_f_E_l_e_m_e_n_t │ │ │ │ -ReferenceElement refElement() const │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:425 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_l_o_c_a_l │ │ │ │ -LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:604 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_M_a_t_r_i_x_H_e_l_p_e_r │ │ │ │ -Base::MatrixHelper MatrixHelper │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:531 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -Base::LocalCoordinate LocalCoordinate │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:541 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ -JacobianInverse jacobianInverse(const LocalCoordinate &local) const │ │ │ │ -Obtain the Jacobian's inverse. │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:713 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +Inverse Jacobian transposed of the transformation from local to global │ │ │ │ +coordinates. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:217 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +std::conditional< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< │ │ │ │ +ctype, dim, coorddim > >::type JacobianTransposed │ │ │ │ +Return type of jacobianTransposed. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:81 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y │ │ │ │ +AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower) │ │ │ │ +Constructor from a single point only. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:159 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_<_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_-_c_o_d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ +_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ +static constexpr int mydimension │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:56 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +friend Dune::ReferenceElements< ctype, dim >::ReferenceElement referenceElement │ │ │ │ +(const AxisAlignedCubeGeometry &) │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:316 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_<_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_-_c_o_d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ +_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ +static constexpr int coorddimension │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:59 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ +GlobalCoordinate corner(int k) const │ │ │ │ +Return world coordinates of the k-th corner of the element. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:269 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_V_o_l_u_m_e │ │ │ │ +ctype Volume │ │ │ │ +Type used for volume. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:71 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +FieldVector< ctype, dim > LocalCoordinate │ │ │ │ +Type used for a vector of element coordinates. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:65 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const │ │ │ │ -obtain the transposed of the Jacobian │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:666 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ -GlobalCoordinate corner(int i) const │ │ │ │ -obtain coordinates of the i-th corner │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:275 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ -Volume volume() const │ │ │ │ -obtain the volume of the mapping's image │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:649 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y │ │ │ │ -CachedMultiLinearGeometry(Dune::GeometryType gt, const CornerStorage │ │ │ │ -&cornerStorage) │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:559 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ -ctype integrationElement(const LocalCoordinate &local) const │ │ │ │ -obtain the integration element │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:633 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_c_t_y_p_e │ │ │ │ -Base::ctype ctype │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:536 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n │ │ │ │ +Jacobian transposed of the transformation from local to global coordinates. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:205 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +FieldVector< ctype, coorddim > GlobalCoordinate │ │ │ │ +Type used for a vector of world coordinates. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:68 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_<_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_-_c_o_d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ +_l_o_c_a_l │ │ │ │ +LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:189 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_c_t_y_p_e │ │ │ │ +CoordType ctype │ │ │ │ +Type used for single coordinate coefficients. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:62 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n │ │ │ │ +std::conditional_t< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< │ │ │ │ +ctype, coorddim, dim > > Jacobian │ │ │ │ +Return type of jacobian. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:100 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_t_y_p_e │ │ │ │ +GeometryType type() const │ │ │ │ +Type of the cube. Here: a hypercube of the correct dimension. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:164 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r_s │ │ │ │ +int corners() const │ │ │ │ +Return the number of corners of the element. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:263 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n │ │ │ │ Jacobian jacobian(const LocalCoordinate &local) const │ │ │ │ -Obtain the Jacobian. │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:702 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_: │ │ │ │ -_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -Base::JacobianInverseTransposed JacobianInverseTransposed │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:546 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -Base::JacobianTransposed JacobianTransposed │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:545 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ -Base::JacobianInverse JacobianInverse │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:548 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_J_a_c_o_b_i_a_n │ │ │ │ -Base::Jacobian Jacobian │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:547 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_V_o_l_u_m_e │ │ │ │ -Base::Volume Volume │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:543 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_,_ _T_r_a_i_t_s_ _>_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -Base::GlobalCoordinate GlobalCoordinate │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:542 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_c_e_n_t_e_r │ │ │ │ +Jacobian of the transformation from local to global coordinates. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:229 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +std::conditional< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< │ │ │ │ +ctype, coorddim, dim > >::type JacobianInverseTransposed │ │ │ │ +Return type of jacobianInverseTransposed. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:91 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ +Volume integrationElement(const LocalCoordinate &local) const │ │ │ │ +Return the integration element, i.e., the determinant term in the integral │ │ │ │ +transformation formula. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:243 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_c_e_n_t_e_r │ │ │ │ GlobalCoordinate center() const │ │ │ │ -obtain the centroid of the mapping's image │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:572 │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_M_u_l_t_i_L_i_n_e_a_r_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate │ │ │ │ -&local) const │ │ │ │ -obtain the transposed of the Jacobian's inverse │ │ │ │ -DDeeffiinniittiioonn multilineargeometry.hh:680 │ │ │ │ +Return center of mass of the element. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:249 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y │ │ │ │ +AxisAlignedCubeGeometry()=default │ │ │ │ +Constructs an empty geometry. │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ +bool affine() const │ │ │ │ +Return if the element is affine. Here: yes. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:311 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ +std::conditional_t< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< │ │ │ │ +ctype, dim, coorddim > > JacobianInverse │ │ │ │ +Return type of jacobianInverse. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:109 │ │ │ │ +_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ +GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ +Map a point in local (element) coordinates to world coordinates. │ │ │ │ +DDeeffiinniittiioonn axisalignedcubegeometry.hh:170 │ │ │ │ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ DDeeffiinniittiioonn type.hh:114 │ │ │ │ +_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +typename Container::ReferenceElement ReferenceElement │ │ │ │ +The reference element type. │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:146 │ │ │ │ +_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_c_u_b_e │ │ │ │ +static const ReferenceElement & cube() │ │ │ │ +get hypercube reference elements │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:168 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00236.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: mappedgeometry.hh File Reference │ │ │ +dune-geometry: referenceelementimplementation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,55 +72,42 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
mappedgeometry.hh File Reference
│ │ │ +Namespaces
│ │ │ +
referenceelementimplementation.hh File Reference
│ │ │
│ │ │
│ │ │
#include <cassert>
│ │ │ +#include <algorithm>
│ │ │ #include <limits>
│ │ │ -#include <optional>
│ │ │ -#include <stdexcept>
│ │ │ -#include <type_traits>
│ │ │ -#include <dune/common/copyableoptional.hh>
│ │ │ -#include <dune/common/exceptions.hh>
│ │ │ +#include <tuple>
│ │ │ +#include <utility>
│ │ │ +#include <vector>
│ │ │ +#include <array>
│ │ │ +#include <bitset>
│ │ │ #include <dune/common/fmatrix.hh>
│ │ │ #include <dune/common/fvector.hh>
│ │ │ +#include <dune/common/hybridutilities.hh>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ +#include <dune/common/iteratorrange.hh>
│ │ │ #include <dune/common/math.hh>
│ │ │ -#include <dune/common/transpose.hh>
│ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ -#include <dune/geometry/utility/algorithms.hh>
│ │ │ -#include <dune/geometry/utility/convergence.hh>
│ │ │ -#include <dune/geometry/utility/defaultmatrixhelper.hh>
│ │ │ +#include <dune/geometry/referenceelement.hh>
│ │ │ +#include <dune/geometry/affinegeometry.hh>
│ │ │ +#include <dune/geometry/type.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ -Classes

class  Dune::MappedGeometry< Map, Geo >
 Geometry parametrized by a LocalFunction and a LocalGeometry. More...
│ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Functions

template<class Map, class Geo>
 Dune::MappedGeometry (const Map &, const Geo &) -> MappedGeometry< Map, Geo >
template<class Map, class Geo>
 Dune::MappedGeometry (const Map &, const Geo &, bool) -> MappedGeometry< Map, Geo >
namespace  Dune::Geo
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,39 +1,31 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -mappedgeometry.hh File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +referenceelementimplementation.hh File Reference │ │ │ │ #include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ #include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_q_u_a_d_r_a_t_u_r_e_r_u_l_e_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_a_f_f_i_n_e_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_a_l_g_o_r_i_t_h_m_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_c_o_n_v_e_r_g_e_n_c_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_<_ _M_a_p_,_ _G_e_o_ _> │ │ │ │ -  _G_e_o_m_e_t_r_y parametrized by a LocalFunction and a LocalGeometry. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -  _D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y (const Map &, const _G_e_o &) -> MappedGeometry< Map, _G_e_o > │ │ │ │ -template │ │ │ │ -  _D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y (const Map &, const _G_e_o &, bool) -> MappedGeometry< Map, │ │ │ │ - _G_e_o > │ │ │ │ +namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00236_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: mappedgeometry.hh Source File │ │ │ +dune-geometry: referenceelementimplementation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,329 +71,728 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
mappedgeometry.hh
│ │ │ +
referenceelementimplementation.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_MAPPEDGEOMETRY_HH
│ │ │ -
6#define DUNE_GEOMETRY_MAPPEDGEOMETRY_HH
│ │ │ +
5#ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH
│ │ │ +
6#define DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH
│ │ │
7
│ │ │
8#include <cassert>
│ │ │ -
9#include <limits>
│ │ │ -
10#include <optional>
│ │ │ -
11#include <stdexcept>
│ │ │ -
12#include <type_traits>
│ │ │ -
13
│ │ │ -
14#include <dune/common/copyableoptional.hh>
│ │ │ -
15#include <dune/common/exceptions.hh>
│ │ │ -
16#include <dune/common/fmatrix.hh>
│ │ │ -
17#include <dune/common/fvector.hh>
│ │ │ -
18#include <dune/common/math.hh>
│ │ │ -
19#include <dune/common/transpose.hh>
│ │ │ - │ │ │ - │ │ │ -
22#include <dune/geometry/type.hh>
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
26
│ │ │ -
27namespace Dune {
│ │ │ -
28
│ │ │ -
63template <class Map, class Geo>
│ │ │ -
│ │ │ - │ │ │ -
65{
│ │ │ -
66public:
│ │ │ -
68 using LocalCoordinate = typename Geo::LocalCoordinate;
│ │ │ -
69
│ │ │ -
71 using GlobalCoordinate = std::remove_reference_t<decltype(std::declval<Map>()(std::declval<typename Geo::GlobalCoordinate>()))>;
│ │ │ -
72
│ │ │ -
74 using ctype = typename Geo::ctype;
│ │ │ -
75
│ │ │ -
77 static constexpr int mydimension = LocalCoordinate::size();
│ │ │ -
78
│ │ │ -
80 static constexpr int coorddimension = GlobalCoordinate::size();
│ │ │ -
81
│ │ │ -
83 using Volume = std::remove_reference_t<decltype(Dune::power(std::declval<ctype>(),mydimension))>;
│ │ │ -
84
│ │ │ -
86 using Jacobian = FieldMatrix<ctype, coorddimension, mydimension>;
│ │ │ -
87
│ │ │ -
89 using JacobianTransposed = FieldMatrix<ctype, mydimension, coorddimension>;
│ │ │ -
90
│ │ │ -
92 using JacobianInverse = FieldMatrix<ctype, mydimension, coorddimension>;
│ │ │ -
93
│ │ │ -
95 using JacobianInverseTransposed = FieldMatrix<ctype, coorddimension, mydimension>;
│ │ │ -
96
│ │ │ -
97private:
│ │ │ -
98 using ReferenceElements = Dune::ReferenceElements<ctype, mydimension>;
│ │ │ -
99 using ReferenceElement = typename ReferenceElements::ReferenceElement;
│ │ │ -
100
│ │ │ -
101protected:
│ │ │ -
102 using MatrixHelper = Impl::FieldMatrixHelper<ctype>;
│ │ │ -
103
│ │ │ -
104 // type of the mapping representation the geometry parametrization
│ │ │ -
105 using Mapping = Map;
│ │ │ -
106
│ │ │ -
107 // type of the geometry that is wrapped
│ │ │ -
108 using Geometry = Geo;
│ │ │ +
9
│ │ │ +
10#include <algorithm>
│ │ │ +
11#include <limits>
│ │ │ +
12#include <tuple>
│ │ │ +
13#include <utility>
│ │ │ +
14#include <vector>
│ │ │ +
15#include <array>
│ │ │ +
16#include <bitset>
│ │ │ +
17
│ │ │ +
18#include <dune/common/fmatrix.hh>
│ │ │ +
19#include <dune/common/fvector.hh>
│ │ │ +
20#include <dune/common/hybridutilities.hh>
│ │ │ +
21#include <dune/common/typetraits.hh>
│ │ │ +
22#include <dune/common/iteratorrange.hh>
│ │ │ +
23#include <dune/common/math.hh>
│ │ │ +
24
│ │ │ + │ │ │ + │ │ │ +
27#include <dune/geometry/type.hh>
│ │ │ +
28
│ │ │ +
29namespace Dune
│ │ │ +
30{
│ │ │ +
31
│ │ │ +
32 namespace Geo
│ │ │ +
33 {
│ │ │ +
34
│ │ │ +
35#ifndef DOXYGEN
│ │ │ +
36
│ │ │ +
37 // Internal Forward Declarations
│ │ │ +
38 // -----------------------------
│ │ │ +
39
│ │ │ +
40 namespace Impl
│ │ │ +
41 {
│ │ │ +
42 template< class ctype, int dim >
│ │ │ +
43 class ReferenceElementContainer;
│ │ │ +
44 }
│ │ │ +
45
│ │ │ +
46 template< class ctype, int dim >
│ │ │ +
47 struct ReferenceElements;
│ │ │ +
48
│ │ │ +
49
│ │ │ +
50
│ │ │ +
51 namespace Impl
│ │ │ +
52 {
│ │ │ +
53
│ │ │ +
54 using Dune::Impl::isPrism;
│ │ │ +
55 using Dune::Impl::isPyramid;
│ │ │ +
56 using Dune::Impl::baseTopologyId;
│ │ │ +
57 using Dune::Impl::prismConstruction;
│ │ │ +
58 using Dune::Impl::pyramidConstruction;
│ │ │ +
59 using Dune::Impl::numTopologies;
│ │ │ +
60
│ │ │ +
62 unsigned int size ( unsigned int topologyId, int dim, int codim );
│ │ │ +
63
│ │ │ +
64
│ │ │ +
65
│ │ │ +
73 unsigned int subTopologyId ( unsigned int topologyId, int dim, int codim, unsigned int i );
│ │ │ +
74
│ │ │ +
75
│ │ │ +
76
│ │ │ +
77 // subTopologyNumbering
│ │ │ +
78 // --------------------
│ │ │ +
79
│ │ │ +
80 void subTopologyNumbering ( unsigned int topologyId, int dim, int codim, unsigned int i, int subcodim,
│ │ │ +
81 unsigned int *beginOut, unsigned int *endOut );
│ │ │ +
82
│ │ │ +
83
│ │ │ +
84
│ │ │ +
85
│ │ │ +
86 // checkInside
│ │ │ +
87 // -----------
│ │ │ +
88
│ │ │ +
89 template< class ct, int cdim >
│ │ │ +
90 inline bool
│ │ │ +
91 checkInside ( unsigned int topologyId, int dim, const FieldVector< ct, cdim > &x, ct tolerance, ct factor = ct( 1 ) )
│ │ │ +
92 {
│ │ │ +
93 assert( (dim >= 0) && (dim <= cdim) );
│ │ │ +
94 assert( topologyId < numTopologies( dim ) );
│ │ │ +
95
│ │ │ +
96 if( dim > 0 )
│ │ │ +
97 {
│ │ │ +
98 const ct baseFactor = (isPrism( topologyId, dim ) ? factor : factor - x[ dim-1 ]);
│ │ │ +
99 if( (x[ dim-1 ] > -tolerance) && (factor - x[ dim-1 ] > -tolerance) )
│ │ │ +
100 return checkInside< ct, cdim >( baseTopologyId( topologyId, dim ), dim-1, x, tolerance, baseFactor );
│ │ │ +
101 else
│ │ │ +
102 return false;
│ │ │ +
103 }
│ │ │ +
104 else
│ │ │ +
105 return true;
│ │ │ +
106 }
│ │ │ +
107
│ │ │ +
108
│ │ │
109
│ │ │ -
110 // type of a mapping representing the derivative of `Map` w.r.t. `GlobalCoordinate`
│ │ │ -
111 using DerivativeMapping = std::remove_reference_t<decltype(derivative(std::declval<Map>()))>;
│ │ │ +
110 // referenceCorners
│ │ │ +
111 // ----------------
│ │ │
112
│ │ │ -
113public:
│ │ │ -
122 template <class Geo_, class Map_,
│ │ │ -
123 std::enable_if_t<Dune::IsInteroperable<Map, Map_>::value, int> = 0,
│ │ │ -
124 std::enable_if_t<Dune::IsInteroperable<Geo, Geo_>::value, int> = 0>
│ │ │ -
│ │ │ -
125 MappedGeometry (Map_&& mapping, Geo_&& geometry, bool affine = false)
│ │ │ -
126 : mapping_(std::forward<Map_>(mapping))
│ │ │ -
127 , dMapping_(derivative(*mapping_))
│ │ │ -
128 , geometry_(std::forward<Geo_>(geometry))
│ │ │ -
129 , affine_(affine)
│ │ │ -
130 {}
│ │ │ -
│ │ │ -
131
│ │ │ -
│ │ │ -
137 bool affine () const
│ │ │ -
138 {
│ │ │ -
139 return affine_;
│ │ │ -
140 }
│ │ │ -
│ │ │ -
141
│ │ │ -
│ │ │ - │ │ │ -
144 {
│ │ │ -
145 return geometry_.type();
│ │ │ -
146 }
│ │ │ -
│ │ │ -
147
│ │ │ -
│ │ │ -
149 int corners () const
│ │ │ -
150 {
│ │ │ -
151 return geometry_.corners();
│ │ │ -
152 }
│ │ │ -
│ │ │ -
153
│ │ │ -
│ │ │ - │ │ │ -
156 {
│ │ │ -
157 assert( (i >= 0) && (i < corners()) );
│ │ │ -
158 return mapping()(geometry_.corner(i));
│ │ │ -
159 }
│ │ │ -
│ │ │ -
160
│ │ │ -
│ │ │ - │ │ │ -
163 {
│ │ │ -
164 return mapping()(geometry_.center());
│ │ │ -
165 }
│ │ │ -
│ │ │ -
166
│ │ │ -
│ │ │ - │ │ │ -
177 {
│ │ │ -
178 return mapping()(geometry_.global(local));
│ │ │ -
179 }
│ │ │ -
│ │ │ -
180
│ │ │ -
│ │ │ -
197 LocalCoordinate local (const GlobalCoordinate& y, Impl::GaussNewtonOptions<ctype> opts = {}) const
│ │ │ -
198 {
│ │ │ -
199 LocalCoordinate x = refElement().position(0,0);
│ │ │ -
200 Impl::GaussNewtonErrorCode err = Impl::gaussNewton(
│ │ │ -
201 [&](const LocalCoordinate& local) { return this->global(local); },
│ │ │ -
202 [&](const LocalCoordinate& local) { return this->jacobianTransposed(local); },
│ │ │ -
203 y, x, opts
│ │ │ -
204 );
│ │ │ +
113 template< class ct, int cdim >
│ │ │ +
114 inline unsigned int
│ │ │ +
115 referenceCorners ( unsigned int topologyId, int dim, FieldVector< ct, cdim > *corners )
│ │ │ +
116 {
│ │ │ +
117 assert( (dim >= 0) && (dim <= cdim) );
│ │ │ +
118 assert( topologyId < numTopologies( dim ) );
│ │ │ +
119
│ │ │ +
120 if( dim > 0 )
│ │ │ +
121 {
│ │ │ +
122 const unsigned int nBaseCorners
│ │ │ +
123 = referenceCorners( baseTopologyId( topologyId, dim ), dim-1, corners );
│ │ │ +
124 assert( nBaseCorners == size( baseTopologyId( topologyId, dim ), dim-1, dim-1 ) );
│ │ │ +
125 if( isPrism( topologyId, dim ) )
│ │ │ +
126 {
│ │ │ +
127 std::copy( corners, corners + nBaseCorners, corners + nBaseCorners );
│ │ │ +
128 for( unsigned int i = 0; i < nBaseCorners; ++i )
│ │ │ +
129 corners[ i+nBaseCorners ][ dim-1 ] = ct( 1 );
│ │ │ +
130 return 2*nBaseCorners;
│ │ │ +
131 }
│ │ │ +
132 else
│ │ │ +
133 {
│ │ │ +
134 corners[ nBaseCorners ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ +
135 corners[ nBaseCorners ][ dim-1 ] = ct( 1 );
│ │ │ +
136 return nBaseCorners+1;
│ │ │ +
137 }
│ │ │ +
138 }
│ │ │ +
139 else
│ │ │ +
140 {
│ │ │ +
141 *corners = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ +
142 return 1;
│ │ │ +
143 }
│ │ │ +
144 }
│ │ │ +
145
│ │ │ +
146
│ │ │ +
147
│ │ │ +
148 // referenceVolume
│ │ │ +
149 // ---------------
│ │ │ +
150
│ │ │ +
151 unsigned long referenceVolumeInverse ( unsigned int topologyId, int dim );
│ │ │ +
152
│ │ │ +
153 template< class ct >
│ │ │ +
154 inline ct referenceVolume ( unsigned int topologyId, int dim )
│ │ │ +
155 {
│ │ │ +
156 return ct( 1 ) / ct( referenceVolumeInverse( topologyId, dim ) );
│ │ │ +
157 }
│ │ │ +
158
│ │ │ +
159
│ │ │ +
160
│ │ │ +
161 // referenceOrigins
│ │ │ +
162 // ----------------
│ │ │ +
163
│ │ │ +
164 template< class ct, int cdim >
│ │ │ +
165 inline unsigned int
│ │ │ +
166 referenceOrigins ( unsigned int topologyId, int dim, int codim, FieldVector< ct, cdim > *origins )
│ │ │ +
167 {
│ │ │ +
168 assert( (dim >= 0) && (dim <= cdim) );
│ │ │ +
169 assert( topologyId < numTopologies( dim ) );
│ │ │ +
170 assert( (codim >= 0) && (codim <= dim) );
│ │ │ +
171
│ │ │ +
172 if( codim > 0 )
│ │ │ +
173 {
│ │ │ +
174 const unsigned int baseId = baseTopologyId( topologyId, dim );
│ │ │ +
175 if( isPrism( topologyId, dim ) )
│ │ │ +
176 {
│ │ │ +
177 const unsigned int n = (codim < dim ? referenceOrigins( baseId, dim-1, codim, origins ) : 0);
│ │ │ +
178 const unsigned int m = referenceOrigins( baseId, dim-1, codim-1, origins+n );
│ │ │ +
179 for( unsigned int i = 0; i < m; ++i )
│ │ │ +
180 {
│ │ │ +
181 origins[ n+m+i ] = origins[ n+i ];
│ │ │ +
182 origins[ n+m+i ][ dim-1 ] = ct( 1 );
│ │ │ +
183 }
│ │ │ +
184 return n+2*m;
│ │ │ +
185 }
│ │ │ +
186 else
│ │ │ +
187 {
│ │ │ +
188 const unsigned int m = referenceOrigins( baseId, dim-1, codim-1, origins );
│ │ │ +
189 if( codim == dim )
│ │ │ +
190 {
│ │ │ +
191 origins[ m ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ +
192 origins[ m ][ dim-1 ] = ct( 1 );
│ │ │ +
193 return m+1;
│ │ │ +
194 }
│ │ │ +
195 else
│ │ │ +
196 return m+referenceOrigins( baseId, dim-1, codim, origins+m );
│ │ │ +
197 }
│ │ │ +
198 }
│ │ │ +
199 else
│ │ │ +
200 {
│ │ │ +
201 origins[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ +
202 return 1;
│ │ │ +
203 }
│ │ │ +
204 }
│ │ │
205
│ │ │ -
206 if (err != Impl::GaussNewtonErrorCode::OK)
│ │ │ -
207 DUNE_THROW(Dune::Exception,
│ │ │ -
208 "Local coordinate can not be recovered from global coordinate, error code = " << int(err) << "\n"
│ │ │ -
209 << " (global(x) - y).two_norm() = " << (global(x) - y).two_norm()
│ │ │ -
210 << " > tol = " << opts.absTol);
│ │ │ -
211
│ │ │ -
212 return x;
│ │ │ -
213 }
│ │ │ -
│ │ │ -
214
│ │ │ -
│ │ │ - │ │ │ -
226 {
│ │ │ -
227 return MatrixHelper::sqrtDetAAT(jacobianTransposed(local));
│ │ │ -
228 }
│ │ │ -
│ │ │ -
229
│ │ │ -
│ │ │ -
241 Volume volume (Impl::ConvergenceOptions<ctype> opts = {}) const
│ │ │ -
242 {
│ │ │ - │ │ │ -
244 if (affine())
│ │ │ -
245 return vol0;
│ │ │ -
246
│ │ │ -
247 using std::abs;
│ │ │ -
248 for (int p = 2; p < opts.maxIt; ++p) {
│ │ │ - │ │ │ -
250 if (abs(vol1 - vol0) < opts.absTol)
│ │ │ -
251 return vol1;
│ │ │ -
252
│ │ │ -
253 vol0 = vol1;
│ │ │ -
254 }
│ │ │ -
255 return vol0;
│ │ │ -
256 }
│ │ │ -
│ │ │ -
257
│ │ │ -
│ │ │ - │ │ │ -
260 {
│ │ │ -
261 Volume vol(0);
│ │ │ -
262 for (const auto& qp : quadRule)
│ │ │ -
263 vol += integrationElement(qp.position()) * qp.weight();
│ │ │ -
264 return vol;
│ │ │ -
265 }
│ │ │ -
│ │ │ -
266
│ │ │ -
│ │ │ - │ │ │ -
273 {
│ │ │ -
274 auto&& jLocal = geometry_.jacobian(local);
│ │ │ -
275 auto&& jMapping = (*dMapping_)(geometry_.global(local));
│ │ │ -
276 return jMapping * jLocal;
│ │ │ -
277 }
│ │ │ -
│ │ │ -
278
│ │ │ -
│ │ │ - │ │ │ -
285 {
│ │ │ -
286 return transpose(jacobian(local));
│ │ │ -
287 }
│ │ │ -
│ │ │ -
288
│ │ │ -
│ │ │ - │ │ │ -
297 {
│ │ │ -
298 JacobianInverse out;
│ │ │ -
299 MatrixHelper::leftInvA(jacobian(local), out);
│ │ │ -
300 return out;
│ │ │ -
301 }
│ │ │ -
│ │ │ -
302
│ │ │ -
│ │ │ - │ │ │ -
311 {
│ │ │ -
312 return transpose(jacobianInverse(local));
│ │ │ -
313 }
│ │ │ -
│ │ │ -
314
│ │ │ -
│ │ │ -
316 friend ReferenceElement referenceElement (const MappedGeometry& geometry)
│ │ │ -
317 {
│ │ │ -
318 return geometry.refElement();
│ │ │ -
319 }
│ │ │ -
│ │ │ -
320
│ │ │ -
321protected:
│ │ │ -
322 // the internal stored reference element
│ │ │ -
│ │ │ -
323 ReferenceElement refElement () const
│ │ │ -
324 {
│ │ │ -
325 return referenceElement(geometry_);
│ │ │ -
326 }
│ │ │ -
│ │ │ -
327
│ │ │ -
328private:
│ │ │ -
329 // internal reference to the stored mapping
│ │ │ -
330 const Mapping& mapping () const
│ │ │ -
331 {
│ │ │ -
332 return *mapping_;
│ │ │ -
333 }
│ │ │ -
334
│ │ │ -
335 // internal reference to the wrapped geometry
│ │ │ -
336 const Geometry& geometry () const
│ │ │ -
337 {
│ │ │ -
338 return geometry_;
│ │ │ -
339 }
│ │ │ +
206
│ │ │ +
207
│ │ │ +
208 // referenceEmbeddings
│ │ │ +
209 // -------------------
│ │ │ +
210
│ │ │ +
211 template< class ct, int cdim, int mydim >
│ │ │ +
212 inline unsigned int
│ │ │ +
213 referenceEmbeddings ( unsigned int topologyId, int dim, int codim,
│ │ │ +
214 FieldVector< ct, cdim > *origins,
│ │ │ +
215 FieldMatrix< ct, mydim, cdim > *jacobianTransposeds )
│ │ │ +
216 {
│ │ │ +
217 assert( (0 <= codim) && (codim <= dim) && (dim <= cdim) );
│ │ │ +
218 assert( (dim - codim <= mydim) && (mydim <= cdim) );
│ │ │ +
219 assert( topologyId < numTopologies( dim ) );
│ │ │ +
220
│ │ │ +
221 if( (0 < codim) && (codim <= dim) )
│ │ │ +
222 {
│ │ │ +
223 const unsigned int baseId = baseTopologyId( topologyId, dim );
│ │ │ +
224 if( isPrism( topologyId, dim ) )
│ │ │ +
225 {
│ │ │ +
226 const unsigned int n = (codim < dim ? referenceEmbeddings( baseId, dim-1, codim, origins, jacobianTransposeds ) : 0);
│ │ │ +
227 for( unsigned int i = 0; i < n; ++i )
│ │ │ +
228 jacobianTransposeds[ i ][ dim-codim-1 ][ dim-1 ] = ct( 1 );
│ │ │ +
229
│ │ │ +
230 const unsigned int m = referenceEmbeddings( baseId, dim-1, codim-1, origins+n, jacobianTransposeds+n );
│ │ │ +
231 std::copy( origins+n, origins+n+m, origins+n+m );
│ │ │ +
232 std::copy( jacobianTransposeds+n, jacobianTransposeds+n+m, jacobianTransposeds+n+m );
│ │ │ +
233 for( unsigned int i = 0; i < m; ++i )
│ │ │ +
234 origins[ n+m+i ][ dim-1 ] = ct( 1 );
│ │ │ +
235
│ │ │ +
236 return n+2*m;
│ │ │ +
237 }
│ │ │ +
238 else // !isPrism
│ │ │ +
239 {
│ │ │ +
240 const unsigned int m = referenceEmbeddings( baseId, dim-1, codim-1, origins, jacobianTransposeds );
│ │ │ +
241 if( codim == dim )
│ │ │ +
242 {
│ │ │ +
243 origins[ m ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ +
244 origins[ m ][ dim-1 ] = ct( 1 );
│ │ │ +
245 jacobianTransposeds[ m ] = FieldMatrix< ct, mydim, cdim >( ct( 0 ) );
│ │ │ +
246 return m+1;
│ │ │ +
247 }
│ │ │ +
248 else if( codim < dim )
│ │ │ +
249 {
│ │ │ +
250 const unsigned int n = referenceEmbeddings( baseId, dim-1, codim, origins+m, jacobianTransposeds+m );
│ │ │ +
251 for( unsigned int i = 0; i < n; ++i )
│ │ │ +
252 {
│ │ │ +
253 for( int k = 0; k < dim-1; ++k )
│ │ │ +
254 jacobianTransposeds[ m+i ][ dim-codim-1 ][ k ] = -origins[ m+i ][ k ];
│ │ │ +
255 jacobianTransposeds[ m+i ][ dim-codim-1 ][ dim-1 ] = ct( 1 );
│ │ │ +
256 }
│ │ │ +
257 return m+n;
│ │ │ +
258 }
│ │ │ +
259 }
│ │ │ +
260 }
│ │ │ +
261 else if( codim == 0 )
│ │ │ +
262 {
│ │ │ +
263 origins[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ +
264 jacobianTransposeds[ 0 ] = FieldMatrix< ct, mydim, cdim >( ct( 0 ) );
│ │ │ +
265 for( int k = 0; k < dim; ++k )
│ │ │ +
266 jacobianTransposeds[ 0 ][ k ][ k ] = ct( 1 );
│ │ │ +
267 return 1;
│ │ │ +
268 }
│ │ │ +
269
│ │ │ +
270 // this point should not be reached since all cases are handled before.
│ │ │ +
271 std::abort();
│ │ │ +
272 return 0;
│ │ │ +
273 }
│ │ │ +
274
│ │ │ +
275
│ │ │ +
276
│ │ │ +
277 // referenceIntegrationOuterNormals
│ │ │ +
278 // --------------------------------
│ │ │ +
279
│ │ │ +
280 template< class ct, int cdim >
│ │ │ +
281 inline unsigned int
│ │ │ +
282 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim,
│ │ │ +
283 const FieldVector< ct, cdim > *origins,
│ │ │ +
284 FieldVector< ct, cdim > *normals )
│ │ │ +
285 {
│ │ │ +
286 assert( (dim > 0) && (dim <= cdim) );
│ │ │ +
287 assert( topologyId < numTopologies( dim ) );
│ │ │ +
288
│ │ │ +
289 if( dim > 1 )
│ │ │ +
290 {
│ │ │ +
291 const unsigned int baseId = baseTopologyId( topologyId, dim );
│ │ │ +
292 if( isPrism( topologyId, dim ) )
│ │ │ +
293 {
│ │ │ +
294 const unsigned int numBaseFaces
│ │ │ +
295 = referenceIntegrationOuterNormals( baseId, dim-1, origins, normals );
│ │ │ +
296
│ │ │ +
297 for( unsigned int i = 0; i < 2; ++i )
│ │ │ +
298 {
│ │ │ +
299 normals[ numBaseFaces+i ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ +
300 normals[ numBaseFaces+i ][ dim-1 ] = ct( 2*int( i )-1 );
│ │ │ +
301 }
│ │ │ +
302
│ │ │ +
303 return numBaseFaces+2;
│ │ │ +
304 }
│ │ │ +
305 else
│ │ │ +
306 {
│ │ │ +
307 normals[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ +
308 normals[ 0 ][ dim-1 ] = ct( -1 );
│ │ │ +
309
│ │ │ +
310 const unsigned int numBaseFaces
│ │ │ +
311 = referenceIntegrationOuterNormals( baseId, dim-1, origins+1, normals+1 );
│ │ │ +
312 for( unsigned int i = 1; i <= numBaseFaces; ++i )
│ │ │ +
313 normals[ i ][ dim-1 ] = normals[ i ]*origins[ i ];
│ │ │ +
314
│ │ │ +
315 return numBaseFaces+1;
│ │ │ +
316 }
│ │ │ +
317 }
│ │ │ +
318 else
│ │ │ +
319 {
│ │ │ +
320 for( unsigned int i = 0; i < 2; ++i )
│ │ │ +
321 {
│ │ │ +
322 normals[ i ] = FieldVector< ct, cdim >( ct( 0 ) );
│ │ │ +
323 normals[ i ][ 0 ] = ct( 2*int( i )-1 );
│ │ │ +
324 }
│ │ │ +
325
│ │ │ +
326 return 2;
│ │ │ +
327 }
│ │ │ +
328 }
│ │ │ +
329
│ │ │ +
330 template< class ct, int cdim >
│ │ │ +
331 inline unsigned int
│ │ │ +
332 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim,
│ │ │ +
333 FieldVector< ct, cdim > *normals )
│ │ │ +
334 {
│ │ │ +
335 assert( (dim > 0) && (dim <= cdim) );
│ │ │ +
336
│ │ │ +
337 FieldVector< ct, cdim > *origins
│ │ │ +
338 = new FieldVector< ct, cdim >[ size( topologyId, dim, 1 ) ];
│ │ │ +
339 referenceOrigins( topologyId, dim, 1, origins );
│ │ │
340
│ │ │ -
341private:
│ │ │ -
343 CopyableOptional<Mapping> mapping_;
│ │ │ -
344
│ │ │ -
346 CopyableOptional<DerivativeMapping> dMapping_;
│ │ │ -
347
│ │ │ -
349 Geometry geometry_;
│ │ │ -
350
│ │ │ -
352 bool affine_;
│ │ │ -
353};
│ │ │ -
│ │ │ -
354
│ │ │ -
355// deduction guides
│ │ │ -
356template <class Map, class Geo>
│ │ │ -
357MappedGeometry (const Map&, const Geo&)
│ │ │ - │ │ │ -
359
│ │ │ -
360template <class Map, class Geo>
│ │ │ -
361MappedGeometry (const Map&, const Geo&, bool)
│ │ │ - │ │ │ -
363
│ │ │ -
364} // end namespace Dune
│ │ │ -
365
│ │ │ -
366#endif // DUNE_GEOMETRY_MAPPEDGEOMETRY_HH
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ - │ │ │ - │ │ │ -
STL namespace.
│ │ │ +
341 const unsigned int numFaces
│ │ │ +
342 = referenceIntegrationOuterNormals( topologyId, dim, origins, normals );
│ │ │ +
343 assert( numFaces == size( topologyId, dim, 1 ) );
│ │ │ +
344
│ │ │ +
345 delete[] origins;
│ │ │ +
346
│ │ │ +
347 return numFaces;
│ │ │ +
348 }
│ │ │ +
349
│ │ │ +
350 } // namespace Impl
│ │ │ +
351
│ │ │ +
352
│ │ │ +
353
│ │ │ +
354 // ReferenceElement
│ │ │ +
355 // ----------------
│ │ │ +
356
│ │ │ +
375 template< class ctype_, int dim >
│ │ │ + │ │ │ +
377 {
│ │ │ +
378
│ │ │ +
379 public:
│ │ │ +
380
│ │ │ +
382 using ctype = ctype_;
│ │ │ +
383
│ │ │ +
385 using CoordinateField = ctype;
│ │ │ +
386
│ │ │ +
388 using Coordinate = Dune::FieldVector<ctype,dim>;
│ │ │ +
389
│ │ │ +
391 static constexpr int dimension = dim;
│ │ │ +
392
│ │ │ +
394 typedef ctype Volume;
│ │ │ +
395
│ │ │ +
396 private:
│ │ │ +
397
│ │ │ +
398 friend class Impl::ReferenceElementContainer< ctype, dim >;
│ │ │ +
399
│ │ │ +
400 struct SubEntityInfo;
│ │ │ +
401
│ │ │ +
402 template< int codim > struct CreateGeometries;
│ │ │ +
403
│ │ │ +
404 public:
│ │ │ +
406 template< int codim >
│ │ │ +
407 struct Codim
│ │ │ +
408 {
│ │ │ +
410 typedef AffineGeometry< ctype, dim-codim, dim > Geometry;
│ │ │ +
411 };
│ │ │ +
412
│ │ │ +
413 // ReferenceElement cannot be copied.
│ │ │ +
414 ReferenceElementImplementation ( const ReferenceElementImplementation& ) = delete;
│ │ │ +
415
│ │ │ +
416 // ReferenceElementImplementation cannot be copied.
│ │ │ +
417 ReferenceElementImplementation& operator= ( const ReferenceElementImplementation& ) = delete;
│ │ │ +
418
│ │ │ +
419 // ReferenceElementImplementation is default-constructible (required for storage in std::array)
│ │ │ +
420 ReferenceElementImplementation () = default;
│ │ │ +
421
│ │ │ +
426 int size ( int c ) const
│ │ │ +
427 {
│ │ │ +
428 assert( (c >= 0) && (c <= dim) );
│ │ │ +
429 return info_[ c ].size();
│ │ │ +
430 }
│ │ │ +
431
│ │ │ +
443 int size ( int i, int c, int cc ) const
│ │ │ +
444 {
│ │ │ +
445 assert( (i >= 0) && (i < size( c )) );
│ │ │ +
446 return info_[ c ][ i ].size( cc );
│ │ │ +
447 }
│ │ │ +
448
│ │ │ +
462 int subEntity ( int i, int c, int ii, int cc ) const
│ │ │ +
463 {
│ │ │ +
464 assert( (i >= 0) && (i < size( c )) );
│ │ │ +
465 return info_[ c ][ i ].number( ii, cc );
│ │ │ +
466 }
│ │ │ +
467
│ │ │ +
483 auto subEntities ( int i, int c, int cc ) const
│ │ │ +
484 {
│ │ │ +
485 assert( (i >= 0) && (i < size( c )) );
│ │ │ +
486 return info_[ c ][ i ].numbers( cc );
│ │ │ +
487 }
│ │ │ +
488
│ │ │ +
497 const GeometryType &type ( int i, int c ) const
│ │ │ +
498 {
│ │ │ +
499 assert( (i >= 0) && (i < size( c )) );
│ │ │ +
500 return info_[ c ][ i ].type();
│ │ │ +
501 }
│ │ │ +
502
│ │ │ +
504 const GeometryType &type () const { return type( 0, 0 ); }
│ │ │ +
505
│ │ │ +
515 const Coordinate &position( int i, int c ) const
│ │ │ +
516 {
│ │ │ +
517 assert( (c >= 0) && (c <= dim) );
│ │ │ +
518 return baryCenters_[ c ][ i ];
│ │ │ +
519 }
│ │ │ +
520
│ │ │ +
528 bool checkInside ( const Coordinate &local ) const
│ │ │ +
529 {
│ │ │ +
530 const ctype tolerance = ctype( 64 ) * std::numeric_limits< ctype >::epsilon();
│ │ │ +
531 return Impl::template checkInside< ctype, dim >( type().id(), dim, local, tolerance );
│ │ │ +
532 }
│ │ │ +
533
│ │ │ +
545 template< int codim >
│ │ │ +
546 typename Codim< codim >::Geometry geometry ( int i ) const
│ │ │ +
547 {
│ │ │ +
548 return std::get< codim >( geometries_ )[ i ];
│ │ │ +
549 }
│ │ │ +
550
│ │ │ +
552 Volume volume () const
│ │ │ +
553 {
│ │ │ +
554 return volume_;
│ │ │ +
555 }
│ │ │ +
556
│ │ │ +
564 const Coordinate &integrationOuterNormal ( int face ) const
│ │ │ +
565 {
│ │ │ +
566 assert( (face >= 0) && (face < int( integrationNormals_.size() )) );
│ │ │ +
567 return integrationNormals_[ face ];
│ │ │ +
568 }
│ │ │ +
569
│ │ │ +
570 private:
│ │ │ +
571 void initialize ( unsigned int topologyId )
│ │ │ +
572 {
│ │ │ +
573 assert( topologyId < Impl::numTopologies( dim ) );
│ │ │ +
574
│ │ │ +
575 // set up subentities
│ │ │ +
576 for( int codim = 0; codim <= dim; ++codim )
│ │ │ +
577 {
│ │ │ +
578 const unsigned int size = Impl::size( topologyId, dim, codim );
│ │ │ +
579 info_[ codim ].resize( size );
│ │ │ +
580 for( unsigned int i = 0; i < size; ++i )
│ │ │ +
581 info_[ codim ][ i ].initialize( topologyId, codim, i );
│ │ │ +
582 }
│ │ │ +
583
│ │ │ +
584 // compute corners
│ │ │ +
585 const unsigned int numVertices = size( dim );
│ │ │ +
586 baryCenters_[ dim ].resize( numVertices );
│ │ │ +
587 Impl::referenceCorners( topologyId, dim, &(baryCenters_[ dim ][ 0 ]) );
│ │ │ +
588
│ │ │ +
589 // compute barycenters
│ │ │ +
590 for( int codim = 0; codim < dim; ++codim )
│ │ │ +
591 {
│ │ │ +
592 baryCenters_[ codim ].resize( size(codim) );
│ │ │ +
593 for( int i = 0; i < size( codim ); ++i )
│ │ │ +
594 {
│ │ │ +
595 baryCenters_[ codim ][ i ] = Coordinate( ctype( 0 ) );
│ │ │ +
596 const unsigned int numCorners = size( i, codim, dim );
│ │ │ +
597 for( unsigned int j = 0; j < numCorners; ++j )
│ │ │ +
598 baryCenters_[ codim ][ i ] += baryCenters_[ dim ][ subEntity( i, codim, j, dim ) ];
│ │ │ +
599 baryCenters_[ codim ][ i ] *= ctype( 1 ) / ctype( numCorners );
│ │ │ +
600 }
│ │ │ +
601 }
│ │ │ +
602
│ │ │ +
603 // compute reference element volume
│ │ │ +
604 volume_ = Impl::template referenceVolume< ctype >( topologyId, dim );
│ │ │ +
605
│ │ │ +
606 // compute integration outer normals
│ │ │ +
607 if( dim > 0 )
│ │ │ +
608 {
│ │ │ +
609 integrationNormals_.resize( size( 1 ) );
│ │ │ +
610 Impl::referenceIntegrationOuterNormals( topologyId, dim, &(integrationNormals_[ 0 ]) );
│ │ │ +
611 }
│ │ │ +
612
│ │ │ +
613 // set up geometries
│ │ │ +
614 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ CreateGeometries< i >::apply( *this, geometries_ ); } );
│ │ │ +
615 }
│ │ │ +
616
│ │ │ +
617 template< int... codim >
│ │ │ +
618 static std::tuple< std::vector< typename Codim< codim >::Geometry >... >
│ │ │ +
619 makeGeometryTable ( std::integer_sequence< int, codim... > );
│ │ │ +
620
│ │ │ +
622 typedef decltype( makeGeometryTable( std::make_integer_sequence< int, dim+1 >() ) ) GeometryTable;
│ │ │ +
623
│ │ │ +
625 ctype volume_;
│ │ │ +
626
│ │ │ +
627 std::vector< Coordinate > baryCenters_[ dim+1 ];
│ │ │ +
628 std::vector< Coordinate > integrationNormals_;
│ │ │ +
629
│ │ │ +
631 GeometryTable geometries_;
│ │ │ +
632
│ │ │ +
633 std::vector< SubEntityInfo > info_[ dim+1 ];
│ │ │ +
634 };
│ │ │ +
635
│ │ │ +
637 template< class ctype, int dim >
│ │ │ +
638 struct ReferenceElementImplementation< ctype, dim >::SubEntityInfo
│ │ │ +
639 {
│ │ │ +
640 // Compute upper bound for the number of subsentities.
│ │ │ +
641 // If someone knows an explicit formal feel free to
│ │ │ +
642 // implement it here.
│ │ │ +
643 static constexpr std::size_t maxSubEntityCount()
│ │ │ +
644 {
│ │ │ +
645 std::size_t maxCount=0;
│ │ │ +
646 for(std::size_t codim=0; codim<=dim; ++codim)
│ │ │ +
647 maxCount = std::max(maxCount, binomial(std::size_t(dim),codim)*(1 << codim));
│ │ │ +
648 return maxCount;
│ │ │ +
649 }
│ │ │ +
650
│ │ │ +
651 using SubEntityFlags = std::bitset<maxSubEntityCount()>;
│ │ │ +
652
│ │ │ +
653 class SubEntityRange
│ │ │ +
654 : public Dune::IteratorRange<const unsigned int*>
│ │ │ +
655 {
│ │ │ +
656 using Base = typename Dune::IteratorRange<const unsigned int*>;
│ │ │ +
657
│ │ │ +
658 public:
│ │ │ +
659
│ │ │ +
660 using iterator = Base::iterator;
│ │ │ +
661 using const_iterator = Base::const_iterator;
│ │ │ +
662
│ │ │ +
663 SubEntityRange(const iterator& begin, const iterator& end, const SubEntityFlags& contains) :
│ │ │ +
664 Base(begin, end),
│ │ │ +
665 containsPtr_(&contains),
│ │ │ +
666 size_(end-begin)
│ │ │ +
667 {}
│ │ │ +
668
│ │ │ +
669 SubEntityRange() :
│ │ │ +
670 Base(),
│ │ │ +
671 containsPtr_(nullptr),
│ │ │ +
672 size_(0)
│ │ │ +
673 {}
│ │ │ +
674
│ │ │ +
675 std::size_t size() const
│ │ │ +
676 {
│ │ │ +
677 return size_;
│ │ │ +
678 }
│ │ │ +
679
│ │ │ +
680 bool contains(std::size_t i) const
│ │ │ +
681 {
│ │ │ +
682 return (*containsPtr_)[i];
│ │ │ +
683 }
│ │ │ +
684
│ │ │ +
685 private:
│ │ │ +
686 const SubEntityFlags* containsPtr_;
│ │ │ +
687 std::size_t size_;
│ │ │ +
688 std::size_t offset_;
│ │ │ +
689 };
│ │ │ +
690
│ │ │ +
691 using NumberRange = typename Dune::IteratorRange<const unsigned int*>;
│ │ │ +
692
│ │ │ +
693 SubEntityInfo ()
│ │ │ +
694 : numbering_( nullptr )
│ │ │ +
695 {
│ │ │ +
696 std::fill( offset_.begin(), offset_.end(), 0 );
│ │ │ +
697 }
│ │ │ +
698
│ │ │ +
699 SubEntityInfo ( const SubEntityInfo &other )
│ │ │ +
700 : offset_( other.offset_ ),
│ │ │ +
701 type_( other.type_ ),
│ │ │ +
702 containsSubentity_( other.containsSubentity_ )
│ │ │ +
703 {
│ │ │ +
704 numbering_ = allocate();
│ │ │ +
705 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ );
│ │ │ +
706 }
│ │ │ +
707
│ │ │ +
708 ~SubEntityInfo () { deallocate( numbering_ ); }
│ │ │ +
709
│ │ │ +
710 const SubEntityInfo &operator= ( const SubEntityInfo &other )
│ │ │ +
711 {
│ │ │ +
712 type_ = other.type_;
│ │ │ +
713 offset_ = other.offset_;
│ │ │ +
714
│ │ │ +
715 deallocate( numbering_ );
│ │ │ +
716 numbering_ = allocate();
│ │ │ +
717 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ );
│ │ │ +
718
│ │ │ +
719 containsSubentity_ = other.containsSubentity_;
│ │ │ +
720
│ │ │ +
721 return *this;
│ │ │ +
722 }
│ │ │ +
723
│ │ │ +
724 int size ( int cc ) const
│ │ │ +
725 {
│ │ │ +
726 assert( (cc >= 0) && (cc <= dim) );
│ │ │ +
727 return (offset_[ cc+1 ] - offset_[ cc ]);
│ │ │ +
728 }
│ │ │ +
729
│ │ │ +
730 int number ( int ii, int cc ) const
│ │ │ +
731 {
│ │ │ +
732 assert( (ii >= 0) && (ii < size( cc )) );
│ │ │ +
733 return numbering_[ offset_[ cc ] + ii ];
│ │ │ +
734 }
│ │ │ +
735
│ │ │ +
736 auto numbers ( int cc ) const
│ │ │ +
737 {
│ │ │ +
738 return SubEntityRange( numbering_ + offset_[ cc ], numbering_ + offset_[ cc+1 ], containsSubentity_[cc]);
│ │ │ +
739 }
│ │ │ +
740
│ │ │ +
741 const GeometryType &type () const { return type_; }
│ │ │ +
742
│ │ │ +
743 void initialize ( unsigned int topologyId, int codim, unsigned int i )
│ │ │ +
744 {
│ │ │ +
745 const unsigned int subId = Impl::subTopologyId( topologyId, dim, codim, i );
│ │ │ +
746 type_ = GeometryType( subId, dim-codim );
│ │ │ +
747
│ │ │ +
748 // compute offsets
│ │ │ +
749 for( int cc = 0; cc <= codim; ++cc )
│ │ │ +
750 offset_[ cc ] = 0;
│ │ │ +
751 for( int cc = codim; cc <= dim; ++cc )
│ │ │ +
752 offset_[ cc+1 ] = offset_[ cc ] + Impl::size( subId, dim-codim, cc-codim );
│ │ │ +
753
│ │ │ +
754 // compute subnumbering
│ │ │ +
755 deallocate( numbering_ );
│ │ │ +
756 numbering_ = allocate();
│ │ │ +
757 for( int cc = codim; cc <= dim; ++cc )
│ │ │ +
758 Impl::subTopologyNumbering( topologyId, dim, codim, i, cc-codim, numbering_+offset_[ cc ], numbering_+offset_[ cc+1 ] );
│ │ │ +
759
│ │ │ +
760 // initialize containsSubentity lookup-table
│ │ │ +
761 for(std::size_t cc=0; cc<= dim; ++cc)
│ │ │ +
762 {
│ │ │ +
763 containsSubentity_[cc].reset();
│ │ │ +
764 for(std::size_t idx=0; idx<std::size_t(size(cc)); ++idx)
│ │ │ +
765 containsSubentity_[cc][number(idx,cc)] = true;
│ │ │ +
766 }
│ │ │ +
767 }
│ │ │ +
768
│ │ │ +
769 protected:
│ │ │ +
770 int codim () const { return dim - type().dim(); }
│ │ │ +
771
│ │ │ +
772 unsigned int *allocate () { return (capacity() != 0 ? new unsigned int[ capacity() ] : nullptr); }
│ │ │ +
773 void deallocate ( unsigned int *ptr ) { delete[] ptr; }
│ │ │ +
774 unsigned int capacity () const { return offset_[ dim+1 ]; }
│ │ │ +
775
│ │ │ +
776 private:
│ │ │ +
777 unsigned int *numbering_;
│ │ │ +
778 std::array< unsigned int, dim+2 > offset_;
│ │ │ +
779 GeometryType type_;
│ │ │ +
780 std::array< SubEntityFlags, dim+1> containsSubentity_;
│ │ │ +
781 };
│ │ │ +
782
│ │ │ +
783
│ │ │ +
784 template< class ctype, int dim >
│ │ │ +
785 template< int codim >
│ │ │ +
786 struct ReferenceElementImplementation< ctype, dim >::CreateGeometries
│ │ │ +
787 {
│ │ │ +
788 template< int cc >
│ │ │ +
789 static typename ReferenceElements< ctype, dim-cc >::ReferenceElement
│ │ │ +
790 subRefElement( const ReferenceElementImplementation< ctype, dim > &refElement, int i, std::integral_constant< int, cc > )
│ │ │ +
791 {
│ │ │ +
792 return ReferenceElements< ctype, dim-cc >::general( refElement.type( i, cc ) );
│ │ │ +
793 }
│ │ │ +
794
│ │ │ + │ │ │ +
796 subRefElement(const ReferenceElementImplementation< ctype, dim > &refElement,
│ │ │ +
797 [[maybe_unused]] int i, std::integral_constant<int, 0>)
│ │ │ +
798 {
│ │ │ +
799 return refElement;
│ │ │ +
800 }
│ │ │ +
801
│ │ │ +
802 static void apply ( const ReferenceElementImplementation< ctype, dim > &refElement, GeometryTable &geometries )
│ │ │ +
803 {
│ │ │ +
804 const int size = refElement.size( codim );
│ │ │ +
805 std::vector< FieldVector< ctype, dim > > origins( size );
│ │ │ +
806 std::vector< FieldMatrix< ctype, dim - codim, dim > > jacobianTransposeds( size );
│ │ │ +
807 Impl::referenceEmbeddings( refElement.type().id(), dim, codim, &(origins[ 0 ]), &(jacobianTransposeds[ 0 ]) );
│ │ │ +
808
│ │ │ +
809 std::get< codim >( geometries ).reserve( size );
│ │ │ +
810 for( int i = 0; i < size; ++i )
│ │ │ +
811 {
│ │ │ +
812 typename Codim< codim >::Geometry geometry( subRefElement( refElement, i, std::integral_constant< int, codim >() ), origins[ i ], jacobianTransposeds[ i ] );
│ │ │ +
813 std::get< codim >( geometries ).push_back( geometry );
│ │ │ +
814 }
│ │ │ +
815 }
│ │ │ +
816 };
│ │ │ +
817
│ │ │ +
818#endif // DOXYGEN
│ │ │ +
819
│ │ │ +
820 } // namespace Geo
│ │ │ +
821
│ │ │ +
822} // namespace Dune
│ │ │ +
823
│ │ │ +
824#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH
│ │ │ + │ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ +
An implementation of the Geometry interface for affine geometries.
│ │ │
Definition affinegeometry.hh:22
│ │ │ -
MappedGeometry(const Map &, const Geo &) -> MappedGeometry< Map, Geo >
│ │ │ +
decltype(referenceElement(std::declval< T >()...)) ReferenceElement
Definition referenceelements.hh:291
│ │ │
Definition affinegeometry.hh:28
│ │ │ +
@ size
Definition quadraturerules.hh:194
│ │ │ +
Definition affinegeometry.hh:34
│ │ │
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:146
│ │ │ -
Geometry parametrized by a LocalFunction and a LocalGeometry.
Definition mappedgeometry.hh:65
│ │ │ -
std::remove_reference_t< decltype(std::declval< Map >()(std::declval< typename Geo::GlobalCoordinate >()))> GlobalCoordinate
type of global coordinates
Definition mappedgeometry.hh:71
│ │ │ -
GlobalCoordinate center() const
Map the center of the wrapped geometry.
Definition mappedgeometry.hh:162
│ │ │ -
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian's inverse.
Definition mappedgeometry.hh:310
│ │ │ -
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition mappedgeometry.hh:296
│ │ │ -
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian.
Definition mappedgeometry.hh:284
│ │ │ -
MappedGeometry(Map_ &&mapping, Geo_ &&geometry, bool affine=false)
Constructor from mapping to parametrize the geometry.
Definition mappedgeometry.hh:125
│ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
type of jacobian transposed
Definition mappedgeometry.hh:89
│ │ │ -
static constexpr int mydimension
geometry dimension
Definition mappedgeometry.hh:77
│ │ │ -
GeometryType type() const
Obtain the geometry type from the reference element.
Definition mappedgeometry.hh:143
│ │ │ -
typename Geo::LocalCoordinate LocalCoordinate
type of local coordinates
Definition mappedgeometry.hh:68
│ │ │ -
typename Geo::ctype ctype
coordinate type
Definition mappedgeometry.hh:74
│ │ │ -
LocalCoordinate local(const GlobalCoordinate &y, Impl::GaussNewtonOptions< ctype > opts={}) const
Evaluate the inverse coordinate mapping.
Definition mappedgeometry.hh:197
│ │ │ -
Geo Geometry
Definition mappedgeometry.hh:108
│ │ │ -
GlobalCoordinate corner(int i) const
Obtain coordinates of the i-th corner.
Definition mappedgeometry.hh:155
│ │ │ -
static constexpr int coorddimension
coordinate dimension
Definition mappedgeometry.hh:80
│ │ │ -
FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed
type of jacobian inverse transposed
Definition mappedgeometry.hh:95
│ │ │ -
Map Mapping
Definition mappedgeometry.hh:105
│ │ │ -
GlobalCoordinate global(const LocalCoordinate &local) const
Evaluate the coordinate mapping.
Definition mappedgeometry.hh:176
│ │ │ -
ReferenceElement refElement() const
Definition mappedgeometry.hh:323
│ │ │ -
Volume volume(const QuadratureRule< ctype, mydimension > &quadRule) const
Obtain the volume of the mapping's image by given quadrature rules.
Definition mappedgeometry.hh:259
│ │ │ -
int corners() const
Obtain number of corners of the corresponding reference element.
Definition mappedgeometry.hh:149
│ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
type of jacobian inverse
Definition mappedgeometry.hh:92
│ │ │ -
friend ReferenceElement referenceElement(const MappedGeometry &geometry)
Obtain the reference-element related to this geometry.
Definition mappedgeometry.hh:316
│ │ │ -
Volume volume(Impl::ConvergenceOptions< ctype > opts={}) const
Obtain the volume of the mapping's image.
Definition mappedgeometry.hh:241
│ │ │ -
std::remove_reference_t< decltype(Dune::power(std::declval< ctype >(), mydimension))> Volume
type of volume
Definition mappedgeometry.hh:83
│ │ │ -
bool affine() const
Is this mapping affine? Not in general, since we don't know anything about the mapping....
Definition mappedgeometry.hh:137
│ │ │ -
std::remove_reference_t< decltype(derivative(std::declval< Map >()))> DerivativeMapping
Definition mappedgeometry.hh:111
│ │ │ -
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition mappedgeometry.hh:272
│ │ │ -
Impl::FieldMatrixHelper< ctype > MatrixHelper
Definition mappedgeometry.hh:102
│ │ │ -
FieldMatrix< ctype, coorddimension, mydimension > Jacobian
type of jacobian
Definition mappedgeometry.hh:86
│ │ │ -
ctype integrationElement(const LocalCoordinate &local) const
Obtain the integration element.
Definition mappedgeometry.hh:225
│ │ │ -
Abstract base class for quadrature rules.
Definition quadraturerules.hh:214
│ │ │ -
static const QuadratureRule & rule(const GeometryType &t, int p, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
select the appropriate QuadratureRule for GeometryType t and order p
Definition quadraturerules.hh:326
│ │ │ -
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ +
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition referenceelements.hh:156
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,410 +1,777 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -mappedgeometry.hh │ │ │ │ +referenceelementimplementation.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_MAPPEDGEOMETRY_HH │ │ │ │ -6#define DUNE_GEOMETRY_MAPPEDGEOMETRY_HH │ │ │ │ +5#ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH │ │ │ │ +6#define DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH │ │ │ │ 7 │ │ │ │ 8#include │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ -13 │ │ │ │ -14#include │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ -17#include │ │ │ │ -18#include │ │ │ │ -19#include │ │ │ │ -20#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_q_u_a_d_r_a_t_u_r_e_r_u_l_e_s_._h_h> │ │ │ │ -21#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ -22#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -23#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_a_l_g_o_r_i_t_h_m_s_._h_h> │ │ │ │ -24#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_c_o_n_v_e_r_g_e_n_c_e_._h_h> │ │ │ │ -25#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ -26 │ │ │ │ -27namespace _D_u_n_e { │ │ │ │ +9 │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13#include │ │ │ │ +14#include │ │ │ │ +15#include │ │ │ │ +16#include │ │ │ │ +17 │ │ │ │ +18#include │ │ │ │ +19#include │ │ │ │ +20#include │ │ │ │ +21#include │ │ │ │ +22#include │ │ │ │ +23#include │ │ │ │ +24 │ │ │ │ +25#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h> │ │ │ │ +26#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_a_f_f_i_n_e_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ +27#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ 28 │ │ │ │ -63template │ │ │ │ -_6_4class _M_a_p_p_e_d_G_e_o_m_e_t_r_y │ │ │ │ -65{ │ │ │ │ -66public: │ │ │ │ -_6_8 using _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e = typename Geo::LocalCoordinate; │ │ │ │ -69 │ │ │ │ -_7_1 using _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e = std::remove_reference_t │ │ │ │ -()(std::declval()))>; │ │ │ │ -72 │ │ │ │ -_7_4 using _c_t_y_p_e = typename Geo::ctype; │ │ │ │ +29namespace _D_u_n_e │ │ │ │ +30{ │ │ │ │ +31 │ │ │ │ +32 namespace _G_e_o │ │ │ │ +33 { │ │ │ │ +34 │ │ │ │ +35#ifndef DOXYGEN │ │ │ │ +36 │ │ │ │ +37 // Internal Forward Declarations │ │ │ │ +38 // ----------------------------- │ │ │ │ +39 │ │ │ │ +40 namespace Impl │ │ │ │ +41 { │ │ │ │ +42 template< class ctype, int dim > │ │ │ │ +43 class ReferenceElementContainer; │ │ │ │ +44 } │ │ │ │ +45 │ │ │ │ +46 template< class ctype, int dim > │ │ │ │ +47 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ +48 │ │ │ │ +49 │ │ │ │ +50 │ │ │ │ +51 namespace Impl │ │ │ │ +52 { │ │ │ │ +53 │ │ │ │ +54 using Dune::Impl::isPrism; │ │ │ │ +55 using Dune::Impl::isPyramid; │ │ │ │ +56 using Dune::Impl::baseTopologyId; │ │ │ │ +57 using Dune::Impl::prismConstruction; │ │ │ │ +58 using Dune::Impl::pyramidConstruction; │ │ │ │ +59 using Dune::Impl::numTopologies; │ │ │ │ +60 │ │ │ │ +62 unsigned int size ( unsigned int topologyId, int dim, int codim ); │ │ │ │ +63 │ │ │ │ +64 │ │ │ │ +65 │ │ │ │ +73 unsigned int subTopologyId ( unsigned int topologyId, int dim, int codim, │ │ │ │ +unsigned int i ); │ │ │ │ +74 │ │ │ │ 75 │ │ │ │ -_7_7 static constexpr int _m_y_d_i_m_e_n_s_i_o_n = LocalCoordinate::size(); │ │ │ │ -78 │ │ │ │ -_8_0 static constexpr int _c_o_o_r_d_d_i_m_e_n_s_i_o_n = GlobalCoordinate::size(); │ │ │ │ -81 │ │ │ │ -_8_3 using _V_o_l_u_m_e = std::remove_reference_t(),_m_y_d_i_m_e_n_s_i_o_n))>; │ │ │ │ +76 │ │ │ │ +77 // subTopologyNumbering │ │ │ │ +78 // -------------------- │ │ │ │ +79 │ │ │ │ +80 void subTopologyNumbering ( unsigned int topologyId, int dim, int codim, │ │ │ │ +unsigned int i, int subcodim, │ │ │ │ +81 unsigned int *beginOut, unsigned int *endOut ); │ │ │ │ +82 │ │ │ │ +83 │ │ │ │ 84 │ │ │ │ -_8_6 using _J_a_c_o_b_i_a_n = FieldMatrix; │ │ │ │ -87 │ │ │ │ -_8_9 using _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d = FieldMatrix; │ │ │ │ -90 │ │ │ │ -_9_2 using _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e = FieldMatrix; │ │ │ │ -93 │ │ │ │ -_9_5 using _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d = FieldMatrix; │ │ │ │ -96 │ │ │ │ -97private: │ │ │ │ -98 using ReferenceElements = _D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>; │ │ │ │ -99 using ReferenceElement = typename _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ -100 │ │ │ │ -101protected: │ │ │ │ -_1_0_2 using _M_a_t_r_i_x_H_e_l_p_e_r = Impl::FieldMatrixHelper; │ │ │ │ -103 │ │ │ │ -104 // type of the mapping representation the geometry parametrization │ │ │ │ -_1_0_5 using _M_a_p_p_i_n_g = Map; │ │ │ │ -106 │ │ │ │ -107 // type of the geometry that is wrapped │ │ │ │ -_1_0_8 using _G_e_o_m_e_t_r_y = _G_e_o; │ │ │ │ +85 │ │ │ │ +86 // checkInside │ │ │ │ +87 // ----------- │ │ │ │ +88 │ │ │ │ +89 template< class ct, int cdim > │ │ │ │ +90 inline bool │ │ │ │ +91 checkInside ( unsigned int topologyId, int dim, const FieldVector< ct, cdim │ │ │ │ +> &x, ct tolerance, ct factor = ct( 1 ) ) │ │ │ │ +92 { │ │ │ │ +93 assert( (dim >= 0) && (dim <= cdim) ); │ │ │ │ +94 assert( topologyId < numTopologies( dim ) ); │ │ │ │ +95 │ │ │ │ +96 if( dim > 0 ) │ │ │ │ +97 { │ │ │ │ +98 const ct baseFactor = (isPrism( topologyId, dim ) ? factor : factor - x │ │ │ │ +[ dim-1 ]); │ │ │ │ +99 if( (x[ dim-1 ] > -tolerance) && (factor - x[ dim-1 ] > -tolerance) ) │ │ │ │ +100 return checkInside< ct, cdim >( baseTopologyId( topologyId, dim ), dim-1, │ │ │ │ +x, tolerance, baseFactor ); │ │ │ │ +101 else │ │ │ │ +102 return false; │ │ │ │ +103 } │ │ │ │ +104 else │ │ │ │ +105 return true; │ │ │ │ +106 } │ │ │ │ +107 │ │ │ │ +108 │ │ │ │ 109 │ │ │ │ -110 // type of a mapping representing the derivative of `Map` w.r.t. │ │ │ │ -`GlobalCoordinate` │ │ │ │ -_1_1_1 using _D_e_r_i_v_a_t_i_v_e_M_a_p_p_i_n_g = std::remove_reference_t()))>; │ │ │ │ +110 // referenceCorners │ │ │ │ +111 // ---------------- │ │ │ │ 112 │ │ │ │ -113public: │ │ │ │ -122 template ::value, int> = 0, │ │ │ │ -124 std::enable_if_t::value, int> = 0> │ │ │ │ -_1_2_5 _M_a_p_p_e_d_G_e_o_m_e_t_r_y (Map_&& mapping, Geo_&& geometry, bool _a_f_f_i_n_e = false) │ │ │ │ -126 : mapping_(_s_t_d::forward(mapping)) │ │ │ │ -127 , dMapping_(derivative(*mapping_)) │ │ │ │ -128 , geometry_(_s_t_d::forward(geometry)) │ │ │ │ -129 , affine_(_a_f_f_i_n_e) │ │ │ │ -130 {} │ │ │ │ -131 │ │ │ │ -_1_3_7 bool _a_f_f_i_n_e () const │ │ │ │ -138 { │ │ │ │ -139 return affine_; │ │ │ │ -140 } │ │ │ │ -141 │ │ │ │ -_1_4_3 _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e () const │ │ │ │ -144 { │ │ │ │ -145 return geometry_.type(); │ │ │ │ -146 } │ │ │ │ +113 template< class ct, int cdim > │ │ │ │ +114 inline unsigned int │ │ │ │ +115 referenceCorners ( unsigned int topologyId, int dim, FieldVector< ct, cdim │ │ │ │ +> *corners ) │ │ │ │ +116 { │ │ │ │ +117 assert( (dim >= 0) && (dim <= cdim) ); │ │ │ │ +118 assert( topologyId < numTopologies( dim ) ); │ │ │ │ +119 │ │ │ │ +120 if( dim > 0 ) │ │ │ │ +121 { │ │ │ │ +122 const unsigned int nBaseCorners │ │ │ │ +123 = referenceCorners( baseTopologyId( topologyId, dim ), dim-1, corners ); │ │ │ │ +124 assert( nBaseCorners == size( baseTopologyId( topologyId, dim ), dim-1, │ │ │ │ +dim-1 ) ); │ │ │ │ +125 if( isPrism( topologyId, dim ) ) │ │ │ │ +126 { │ │ │ │ +127 std::copy( corners, corners + nBaseCorners, corners + nBaseCorners ); │ │ │ │ +128 for( unsigned int i = 0; i < nBaseCorners; ++i ) │ │ │ │ +129 corners[ i+nBaseCorners ][ dim-1 ] = ct( 1 ); │ │ │ │ +130 return 2*nBaseCorners; │ │ │ │ +131 } │ │ │ │ +132 else │ │ │ │ +133 { │ │ │ │ +134 corners[ nBaseCorners ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ +135 corners[ nBaseCorners ][ dim-1 ] = ct( 1 ); │ │ │ │ +136 return nBaseCorners+1; │ │ │ │ +137 } │ │ │ │ +138 } │ │ │ │ +139 else │ │ │ │ +140 { │ │ │ │ +141 *corners = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ +142 return 1; │ │ │ │ +143 } │ │ │ │ +144 } │ │ │ │ +145 │ │ │ │ +146 │ │ │ │ 147 │ │ │ │ -_1_4_9 int _c_o_r_n_e_r_s () const │ │ │ │ -150 { │ │ │ │ -151 return geometry_.corners(); │ │ │ │ -152 } │ │ │ │ -153 │ │ │ │ -_1_5_5 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_o_r_n_e_r (int i) const │ │ │ │ -156 { │ │ │ │ -157 assert( (i >= 0) && (i < _c_o_r_n_e_r_s()) ); │ │ │ │ -158 return mapping()(geometry_.corner(i)); │ │ │ │ -159 } │ │ │ │ +148 // referenceVolume │ │ │ │ +149 // --------------- │ │ │ │ +150 │ │ │ │ +151 unsigned long referenceVolumeInverse ( unsigned int topologyId, int dim ); │ │ │ │ +152 │ │ │ │ +153 template< class ct > │ │ │ │ +154 inline ct referenceVolume ( unsigned int topologyId, int dim ) │ │ │ │ +155 { │ │ │ │ +156 return ct( 1 ) / ct( referenceVolumeInverse( topologyId, dim ) ); │ │ │ │ +157 } │ │ │ │ +158 │ │ │ │ +159 │ │ │ │ 160 │ │ │ │ -_1_6_2 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r () const │ │ │ │ -163 { │ │ │ │ -164 return mapping()(geometry_.center()); │ │ │ │ -165 } │ │ │ │ -166 │ │ │ │ -_1_7_6 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ -177 { │ │ │ │ -178 return mapping()(geometry_.global(_l_o_c_a_l)); │ │ │ │ -179 } │ │ │ │ -180 │ │ │ │ -_1_9_7 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l (const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e& y, Impl:: │ │ │ │ -GaussNewtonOptions opts = {}) const │ │ │ │ -198 { │ │ │ │ -199 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e x = _r_e_f_E_l_e_m_e_n_t().position(0,0); │ │ │ │ -200 Impl::GaussNewtonErrorCode err = Impl::gaussNewton( │ │ │ │ -201 [&](const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) { return this->_g_l_o_b_a_l(local); }, │ │ │ │ -202 [&](const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) { return this->_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(local); │ │ │ │ -}, │ │ │ │ -203 y, x, opts │ │ │ │ -204 ); │ │ │ │ +161 // referenceOrigins │ │ │ │ +162 // ---------------- │ │ │ │ +163 │ │ │ │ +164 template< class ct, int cdim > │ │ │ │ +165 inline unsigned int │ │ │ │ +166 referenceOrigins ( unsigned int topologyId, int dim, int codim, │ │ │ │ +FieldVector< ct, cdim > *origins ) │ │ │ │ +167 { │ │ │ │ +168 assert( (dim >= 0) && (dim <= cdim) ); │ │ │ │ +169 assert( topologyId < numTopologies( dim ) ); │ │ │ │ +170 assert( (codim >= 0) && (codim <= dim) ); │ │ │ │ +171 │ │ │ │ +172 if( codim > 0 ) │ │ │ │ +173 { │ │ │ │ +174 const unsigned int baseId = baseTopologyId( topologyId, dim ); │ │ │ │ +175 if( isPrism( topologyId, dim ) ) │ │ │ │ +176 { │ │ │ │ +177 const unsigned int n = (codim < dim ? referenceOrigins( baseId, dim-1, │ │ │ │ +codim, origins ) : 0); │ │ │ │ +178 const unsigned int m = referenceOrigins( baseId, dim-1, codim-1, origins+n │ │ │ │ +); │ │ │ │ +179 for( unsigned int i = 0; i < m; ++i ) │ │ │ │ +180 { │ │ │ │ +181 origins[ n+m+i ] = origins[ n+i ]; │ │ │ │ +182 origins[ n+m+i ][ dim-1 ] = ct( 1 ); │ │ │ │ +183 } │ │ │ │ +184 return n+2*m; │ │ │ │ +185 } │ │ │ │ +186 else │ │ │ │ +187 { │ │ │ │ +188 const unsigned int m = referenceOrigins( baseId, dim-1, codim-1, origins ); │ │ │ │ +189 if( codim == dim ) │ │ │ │ +190 { │ │ │ │ +191 origins[ m ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ +192 origins[ m ][ dim-1 ] = ct( 1 ); │ │ │ │ +193 return m+1; │ │ │ │ +194 } │ │ │ │ +195 else │ │ │ │ +196 return m+referenceOrigins( baseId, dim-1, codim, origins+m ); │ │ │ │ +197 } │ │ │ │ +198 } │ │ │ │ +199 else │ │ │ │ +200 { │ │ │ │ +201 origins[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ +202 return 1; │ │ │ │ +203 } │ │ │ │ +204 } │ │ │ │ 205 │ │ │ │ -206 if (err != Impl::GaussNewtonErrorCode::OK) │ │ │ │ -207 DUNE_THROW(Dune::Exception, │ │ │ │ -208 "Local coordinate can not be recovered from global coordinate, error code = │ │ │ │ -" << int(err) << "\n" │ │ │ │ -209 << " (global(x) - y).two_norm() = " << (_g_l_o_b_a_l(x) - y).two_norm() │ │ │ │ -210 << " > tol = " << opts.absTol); │ │ │ │ -211 │ │ │ │ -212 return x; │ │ │ │ -213 } │ │ │ │ -214 │ │ │ │ -_2_2_5 _c_t_y_p_e _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ -226 { │ │ │ │ -227 return MatrixHelper::sqrtDetAAT(_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l)); │ │ │ │ -228 } │ │ │ │ +206 │ │ │ │ +207 │ │ │ │ +208 // referenceEmbeddings │ │ │ │ +209 // ------------------- │ │ │ │ +210 │ │ │ │ +211 template< class ct, int cdim, int mydim > │ │ │ │ +212 inline unsigned int │ │ │ │ +213 referenceEmbeddings ( unsigned int topologyId, int dim, int codim, │ │ │ │ +214 FieldVector< ct, cdim > *origins, │ │ │ │ +215 FieldMatrix< ct, mydim, cdim > *jacobianTransposeds ) │ │ │ │ +216 { │ │ │ │ +217 assert( (0 <= codim) && (codim <= dim) && (dim <= cdim) ); │ │ │ │ +218 assert( (dim - codim <= mydim) && (mydim <= cdim) ); │ │ │ │ +219 assert( topologyId < numTopologies( dim ) ); │ │ │ │ +220 │ │ │ │ +221 if( (0 < codim) && (codim <= dim) ) │ │ │ │ +222 { │ │ │ │ +223 const unsigned int baseId = baseTopologyId( topologyId, dim ); │ │ │ │ +224 if( isPrism( topologyId, dim ) ) │ │ │ │ +225 { │ │ │ │ +226 const unsigned int n = (codim < dim ? referenceEmbeddings( baseId, dim-1, │ │ │ │ +codim, origins, jacobianTransposeds ) : 0); │ │ │ │ +227 for( unsigned int i = 0; i < n; ++i ) │ │ │ │ +228 jacobianTransposeds[ i ][ dim-codim-1 ][ dim-1 ] = ct( 1 ); │ │ │ │ 229 │ │ │ │ -_2_4_1 _V_o_l_u_m_e _v_o_l_u_m_e (Impl::ConvergenceOptions opts = {}) const │ │ │ │ +230 const unsigned int m = referenceEmbeddings( baseId, dim-1, codim-1, │ │ │ │ +origins+n, jacobianTransposeds+n ); │ │ │ │ +231 std::copy( origins+n, origins+n+m, origins+n+m ); │ │ │ │ +232 std::copy( jacobianTransposeds+n, jacobianTransposeds+n+m, │ │ │ │ +jacobianTransposeds+n+m ); │ │ │ │ +233 for( unsigned int i = 0; i < m; ++i ) │ │ │ │ +234 origins[ n+m+i ][ dim-1 ] = ct( 1 ); │ │ │ │ +235 │ │ │ │ +236 return n+2*m; │ │ │ │ +237 } │ │ │ │ +238 else // !isPrism │ │ │ │ +239 { │ │ │ │ +240 const unsigned int m = referenceEmbeddings( baseId, dim-1, codim-1, │ │ │ │ +origins, jacobianTransposeds ); │ │ │ │ +241 if( codim == dim ) │ │ │ │ 242 { │ │ │ │ -243 _V_o_l_u_m_e vol0 = _v_o_l_u_m_e(_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>_:_:_r_u_l_e(_t_y_p_e(), 1)); │ │ │ │ -244 if (_a_f_f_i_n_e()) │ │ │ │ -245 return vol0; │ │ │ │ -246 │ │ │ │ -247 using std::abs; │ │ │ │ -248 for (int p = 2; p < opts.maxIt; ++p) { │ │ │ │ -249 _V_o_l_u_m_e vol1 = _v_o_l_u_m_e(_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>_:_:_r_u_l_e(_t_y_p_e(), p)); │ │ │ │ -250 if (abs(vol1 - vol0) < opts.absTol) │ │ │ │ -251 return vol1; │ │ │ │ -252 │ │ │ │ -253 vol0 = vol1; │ │ │ │ -254 } │ │ │ │ -255 return vol0; │ │ │ │ +243 origins[ m ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ +244 origins[ m ][ dim-1 ] = ct( 1 ); │ │ │ │ +245 jacobianTransposeds[ m ] = FieldMatrix< ct, mydim, cdim >( ct( 0 ) ); │ │ │ │ +246 return m+1; │ │ │ │ +247 } │ │ │ │ +248 else if( codim < dim ) │ │ │ │ +249 { │ │ │ │ +250 const unsigned int n = referenceEmbeddings( baseId, dim-1, codim, │ │ │ │ +origins+m, jacobianTransposeds+m ); │ │ │ │ +251 for( unsigned int i = 0; i < n; ++i ) │ │ │ │ +252 { │ │ │ │ +253 for( int k = 0; k < dim-1; ++k ) │ │ │ │ +254 jacobianTransposeds[ m+i ][ dim-codim-1 ][ k ] = -origins[ m+i ][ k ]; │ │ │ │ +255 jacobianTransposeds[ m+i ][ dim-codim-1 ][ dim-1 ] = ct( 1 ); │ │ │ │ 256 } │ │ │ │ -257 │ │ │ │ -_2_5_9 _V_o_l_u_m_e _v_o_l_u_m_e (const _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>& quadRule) const │ │ │ │ -260 { │ │ │ │ -261 _V_o_l_u_m_e vol(0); │ │ │ │ -262 for (const auto& qp : quadRule) │ │ │ │ -263 vol += _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t(qp.position()) * qp.weight(); │ │ │ │ -264 return vol; │ │ │ │ -265 } │ │ │ │ -266 │ │ │ │ -_2_7_2 _J_a_c_o_b_i_a_n _j_a_c_o_b_i_a_n (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ -273 { │ │ │ │ -274 auto&& jLocal = geometry_.jacobian(_l_o_c_a_l); │ │ │ │ -275 auto&& jMapping = (*dMapping_)(geometry_.global(_l_o_c_a_l)); │ │ │ │ -276 return jMapping * jLocal; │ │ │ │ -277 } │ │ │ │ -278 │ │ │ │ -_2_8_4 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +257 return m+n; │ │ │ │ +258 } │ │ │ │ +259 } │ │ │ │ +260 } │ │ │ │ +261 else if( codim == 0 ) │ │ │ │ +262 { │ │ │ │ +263 origins[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ +264 jacobianTransposeds[ 0 ] = FieldMatrix< ct, mydim, cdim >( ct( 0 ) ); │ │ │ │ +265 for( int k = 0; k < dim; ++k ) │ │ │ │ +266 jacobianTransposeds[ 0 ][ k ][ k ] = ct( 1 ); │ │ │ │ +267 return 1; │ │ │ │ +268 } │ │ │ │ +269 │ │ │ │ +270 // this point should not be reached since all cases are handled before. │ │ │ │ +271 std::abort(); │ │ │ │ +272 return 0; │ │ │ │ +273 } │ │ │ │ +274 │ │ │ │ +275 │ │ │ │ +276 │ │ │ │ +277 // referenceIntegrationOuterNormals │ │ │ │ +278 // -------------------------------- │ │ │ │ +279 │ │ │ │ +280 template< class ct, int cdim > │ │ │ │ +281 inline unsigned int │ │ │ │ +282 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim, │ │ │ │ +283 const FieldVector< ct, cdim > *origins, │ │ │ │ +284 FieldVector< ct, cdim > *normals ) │ │ │ │ 285 { │ │ │ │ -286 return transpose(_j_a_c_o_b_i_a_n(_l_o_c_a_l)); │ │ │ │ -287 } │ │ │ │ +286 assert( (dim > 0) && (dim <= cdim) ); │ │ │ │ +287 assert( topologyId < numTopologies( dim ) ); │ │ │ │ 288 │ │ │ │ -_2_9_6 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ -297 { │ │ │ │ -298 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e out; │ │ │ │ -299 MatrixHelper::leftInvA(_j_a_c_o_b_i_a_n(_l_o_c_a_l), out); │ │ │ │ -300 return out; │ │ │ │ +289 if( dim > 1 ) │ │ │ │ +290 { │ │ │ │ +291 const unsigned int baseId = baseTopologyId( topologyId, dim ); │ │ │ │ +292 if( isPrism( topologyId, dim ) ) │ │ │ │ +293 { │ │ │ │ +294 const unsigned int numBaseFaces │ │ │ │ +295 = referenceIntegrationOuterNormals( baseId, dim-1, origins, normals ); │ │ │ │ +296 │ │ │ │ +297 for( unsigned int i = 0; i < 2; ++i ) │ │ │ │ +298 { │ │ │ │ +299 normals[ numBaseFaces+i ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ +300 normals[ numBaseFaces+i ][ dim-1 ] = ct( 2*int( i )-1 ); │ │ │ │ 301 } │ │ │ │ 302 │ │ │ │ -_3_1_0 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& │ │ │ │ -_l_o_c_a_l) const │ │ │ │ -311 { │ │ │ │ -312 return transpose(_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e(_l_o_c_a_l)); │ │ │ │ -313 } │ │ │ │ +303 return numBaseFaces+2; │ │ │ │ +304 } │ │ │ │ +305 else │ │ │ │ +306 { │ │ │ │ +307 normals[ 0 ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ +308 normals[ 0 ][ dim-1 ] = ct( -1 ); │ │ │ │ +309 │ │ │ │ +310 const unsigned int numBaseFaces │ │ │ │ +311 = referenceIntegrationOuterNormals( baseId, dim-1, origins+1, normals+1 ); │ │ │ │ +312 for( unsigned int i = 1; i <= numBaseFaces; ++i ) │ │ │ │ +313 normals[ i ][ dim-1 ] = normals[ i ]*origins[ i ]; │ │ │ │ 314 │ │ │ │ -_3_1_6 friend ReferenceElement _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t (const _M_a_p_p_e_d_G_e_o_m_e_t_r_y& geometry) │ │ │ │ -317 { │ │ │ │ -318 return geometry.refElement(); │ │ │ │ -319 } │ │ │ │ -320 │ │ │ │ -321protected: │ │ │ │ -322 // the internal stored reference element │ │ │ │ -_3_2_3 ReferenceElement _r_e_f_E_l_e_m_e_n_t () const │ │ │ │ -324 { │ │ │ │ -325 return _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(geometry_); │ │ │ │ -326 } │ │ │ │ -327 │ │ │ │ -328private: │ │ │ │ -329 // internal reference to the stored mapping │ │ │ │ -330 const _M_a_p_p_i_n_g& mapping () const │ │ │ │ -331 { │ │ │ │ -332 return *mapping_; │ │ │ │ -333 } │ │ │ │ -334 │ │ │ │ -335 // internal reference to the wrapped geometry │ │ │ │ -336 const _G_e_o_m_e_t_r_y& geometry () const │ │ │ │ -337 { │ │ │ │ -338 return geometry_; │ │ │ │ -339 } │ │ │ │ +315 return numBaseFaces+1; │ │ │ │ +316 } │ │ │ │ +317 } │ │ │ │ +318 else │ │ │ │ +319 { │ │ │ │ +320 for( unsigned int i = 0; i < 2; ++i ) │ │ │ │ +321 { │ │ │ │ +322 normals[ i ] = FieldVector< ct, cdim >( ct( 0 ) ); │ │ │ │ +323 normals[ i ][ 0 ] = ct( 2*int( i )-1 ); │ │ │ │ +324 } │ │ │ │ +325 │ │ │ │ +326 return 2; │ │ │ │ +327 } │ │ │ │ +328 } │ │ │ │ +329 │ │ │ │ +330 template< class ct, int cdim > │ │ │ │ +331 inline unsigned int │ │ │ │ +332 referenceIntegrationOuterNormals ( unsigned int topologyId, int dim, │ │ │ │ +333 FieldVector< ct, cdim > *normals ) │ │ │ │ +334 { │ │ │ │ +335 assert( (dim > 0) && (dim <= cdim) ); │ │ │ │ +336 │ │ │ │ +337 FieldVector< ct, cdim > *origins │ │ │ │ +338 = new FieldVector< ct, cdim >[ size( topologyId, dim, 1 ) ]; │ │ │ │ +339 referenceOrigins( topologyId, dim, 1, origins ); │ │ │ │ 340 │ │ │ │ -341private: │ │ │ │ -343 CopyableOptional mapping_; │ │ │ │ +341 const unsigned int numFaces │ │ │ │ +342 = referenceIntegrationOuterNormals( topologyId, dim, origins, normals ); │ │ │ │ +343 assert( numFaces == size( topologyId, dim, 1 ) ); │ │ │ │ 344 │ │ │ │ -346 CopyableOptional dMapping_; │ │ │ │ -347 │ │ │ │ -349 _G_e_o_m_e_t_r_y geometry_; │ │ │ │ -350 │ │ │ │ -352 bool affine_; │ │ │ │ -353}; │ │ │ │ -354 │ │ │ │ -355// deduction guides │ │ │ │ -356template │ │ │ │ -_3_5_7_M_a_p_p_e_d_G_e_o_m_e_t_r_y (const Map&, const _G_e_o&) │ │ │ │ -358 -> _M_a_p_p_e_d_G_e_o_m_e_t_r_y_<_M_a_p_,_G_e_o_>; │ │ │ │ -359 │ │ │ │ -360template │ │ │ │ -_3_6_1_M_a_p_p_e_d_G_e_o_m_e_t_r_y (const Map&, const _G_e_o&, bool) │ │ │ │ -362 -> _M_a_p_p_e_d_G_e_o_m_e_t_r_y_<_M_a_p_,_G_e_o_>; │ │ │ │ -363 │ │ │ │ -364} // end namespace Dune │ │ │ │ -365 │ │ │ │ -366#endif // DUNE_GEOMETRY_MAPPEDGEOMETRY_HH │ │ │ │ -_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h │ │ │ │ -_c_o_n_v_e_r_g_e_n_c_e_._h_h │ │ │ │ -_a_l_g_o_r_i_t_h_m_s_._h_h │ │ │ │ +345 delete[] origins; │ │ │ │ +346 │ │ │ │ +347 return numFaces; │ │ │ │ +348 } │ │ │ │ +349 │ │ │ │ +350 } // namespace Impl │ │ │ │ +351 │ │ │ │ +352 │ │ │ │ +353 │ │ │ │ +354 // ReferenceElement │ │ │ │ +355 // ---------------- │ │ │ │ +356 │ │ │ │ +375 template< class ctype_, int dim > │ │ │ │ +376 class _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ +377 { │ │ │ │ +378 │ │ │ │ +379 public: │ │ │ │ +380 │ │ │ │ +382 using ctype = ctype_; │ │ │ │ +383 │ │ │ │ +385 using CoordinateField = ctype; │ │ │ │ +386 │ │ │ │ +388 using Coordinate = Dune::FieldVector; │ │ │ │ +389 │ │ │ │ +391 static constexpr int dimension = dim; │ │ │ │ +392 │ │ │ │ +394 typedef ctype Volume; │ │ │ │ +395 │ │ │ │ +396 private: │ │ │ │ +397 │ │ │ │ +398 friend class Impl::ReferenceElementContainer< ctype, dim >; │ │ │ │ +399 │ │ │ │ +400 struct SubEntityInfo; │ │ │ │ +401 │ │ │ │ +402 template< int codim > struct CreateGeometries; │ │ │ │ +403 │ │ │ │ +404 public: │ │ │ │ +406 template< int codim > │ │ │ │ +407 struct Codim │ │ │ │ +408 { │ │ │ │ +410 typedef AffineGeometry< ctype, dim-codim, dim > Geometry; │ │ │ │ +411 }; │ │ │ │ +412 │ │ │ │ +413 // ReferenceElement cannot be copied. │ │ │ │ +414 ReferenceElementImplementation ( const ReferenceElementImplementation& ) = │ │ │ │ +delete; │ │ │ │ +415 │ │ │ │ +416 // ReferenceElementImplementation cannot be copied. │ │ │ │ +417 ReferenceElementImplementation& operator= ( const │ │ │ │ +ReferenceElementImplementation& ) = delete; │ │ │ │ +418 │ │ │ │ +419 // ReferenceElementImplementation is default-constructible (required for │ │ │ │ +storage in std::array) │ │ │ │ +420 ReferenceElementImplementation () = default; │ │ │ │ +421 │ │ │ │ +426 int _s_i_z_e ( int c ) const │ │ │ │ +427 { │ │ │ │ +428 assert( (c >= 0) && (c <= dim) ); │ │ │ │ +429 return info_[ c ].size(); │ │ │ │ +430 } │ │ │ │ +431 │ │ │ │ +443 int _s_i_z_e ( int i, int c, int cc ) const │ │ │ │ +444 { │ │ │ │ +445 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ +446 return info_[ c ][ i ].size( cc ); │ │ │ │ +447 } │ │ │ │ +448 │ │ │ │ +462 int subEntity ( int i, int c, int ii, int cc ) const │ │ │ │ +463 { │ │ │ │ +464 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ +465 return info_[ c ][ i ].number( ii, cc ); │ │ │ │ +466 } │ │ │ │ +467 │ │ │ │ +483 auto subEntities ( int i, int c, int cc ) const │ │ │ │ +484 { │ │ │ │ +485 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ +486 return info_[ c ][ i ].numbers( cc ); │ │ │ │ +487 } │ │ │ │ +488 │ │ │ │ +497 const GeometryType &type ( int i, int c ) const │ │ │ │ +498 { │ │ │ │ +499 assert( (i >= 0) && (i < _s_i_z_e( c )) ); │ │ │ │ +500 return info_[ c ][ i ].type(); │ │ │ │ +501 } │ │ │ │ +502 │ │ │ │ +504 const GeometryType &type () const { return type( 0, 0 ); } │ │ │ │ +505 │ │ │ │ +515 const Coordinate &position( int i, int c ) const │ │ │ │ +516 { │ │ │ │ +517 assert( (c >= 0) && (c <= dim) ); │ │ │ │ +518 return baryCenters_[ c ][ i ]; │ │ │ │ +519 } │ │ │ │ +520 │ │ │ │ +528 bool checkInside ( const Coordinate &local ) const │ │ │ │ +529 { │ │ │ │ +530 const ctype tolerance = ctype( 64 ) * std::numeric_limits< ctype >::epsilon │ │ │ │ +(); │ │ │ │ +531 return Impl::template checkInside< ctype, dim >( type().id(), dim, local, │ │ │ │ +tolerance ); │ │ │ │ +532 } │ │ │ │ +533 │ │ │ │ +545 template< int codim > │ │ │ │ +546 typename Codim< codim >::Geometry geometry ( int i ) const │ │ │ │ +547 { │ │ │ │ +548 return std::get< codim >( geometries_ )[ i ]; │ │ │ │ +549 } │ │ │ │ +550 │ │ │ │ +552 Volume volume () const │ │ │ │ +553 { │ │ │ │ +554 return volume_; │ │ │ │ +555 } │ │ │ │ +556 │ │ │ │ +564 const Coordinate &integrationOuterNormal ( int face ) const │ │ │ │ +565 { │ │ │ │ +566 assert( (face >= 0) && (face < int( integrationNormals_.size() )) ); │ │ │ │ +567 return integrationNormals_[ face ]; │ │ │ │ +568 } │ │ │ │ +569 │ │ │ │ +570 private: │ │ │ │ +571 void initialize ( unsigned int topologyId ) │ │ │ │ +572 { │ │ │ │ +573 assert( topologyId < Impl::numTopologies( dim ) ); │ │ │ │ +574 │ │ │ │ +575 // set up subentities │ │ │ │ +576 for( int codim = 0; codim <= dim; ++codim ) │ │ │ │ +577 { │ │ │ │ +578 const unsigned int _s_i_z_e = Impl::size( topologyId, dim, codim ); │ │ │ │ +579 info_[ codim ].resize( size ); │ │ │ │ +580 for( unsigned int i = 0; i < _s_i_z_e; ++i ) │ │ │ │ +581 info_[ codim ][ i ].initialize( topologyId, codim, i ); │ │ │ │ +582 } │ │ │ │ +583 │ │ │ │ +584 // compute corners │ │ │ │ +585 const unsigned int numVertices = _s_i_z_e( dim ); │ │ │ │ +586 baryCenters_[ dim ].resize( numVertices ); │ │ │ │ +587 Impl::referenceCorners( topologyId, dim, &(baryCenters_[ dim ][ 0 ]) ); │ │ │ │ +588 │ │ │ │ +589 // compute barycenters │ │ │ │ +590 for( int codim = 0; codim < dim; ++codim ) │ │ │ │ +591 { │ │ │ │ +592 baryCenters_[ codim ].resize( _s_i_z_e(codim) ); │ │ │ │ +593 for( int i = 0; i < _s_i_z_e( codim ); ++i ) │ │ │ │ +594 { │ │ │ │ +595 baryCenters_[ codim ][ i ] = Coordinate( ctype( 0 ) ); │ │ │ │ +596 const unsigned int numCorners = _s_i_z_e( i, codim, dim ); │ │ │ │ +597 for( unsigned int j = 0; j < numCorners; ++j ) │ │ │ │ +598 baryCenters_[ codim ][ i ] += baryCenters_[ dim ][ subEntity( i, codim, j, │ │ │ │ +dim ) ]; │ │ │ │ +599 baryCenters_[ codim ][ i ] *= ctype( 1 ) / ctype( numCorners ); │ │ │ │ +600 } │ │ │ │ +601 } │ │ │ │ +602 │ │ │ │ +603 // compute reference element volume │ │ │ │ +604 volume_ = Impl::template referenceVolume< ctype >( topologyId, dim ); │ │ │ │ +605 │ │ │ │ +606 // compute integration outer normals │ │ │ │ +607 if( dim > 0 ) │ │ │ │ +608 { │ │ │ │ +609 integrationNormals_.resize( _s_i_z_e( 1 ) ); │ │ │ │ +610 Impl::referenceIntegrationOuterNormals( topologyId, dim, & │ │ │ │ +(integrationNormals_[ 0 ]) ); │ │ │ │ +611 } │ │ │ │ +612 │ │ │ │ +613 // set up geometries │ │ │ │ +614 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ +{ CreateGeometries< i >::apply( *this, geometries_ ); } ); │ │ │ │ +615 } │ │ │ │ +616 │ │ │ │ +617 template< int... codim > │ │ │ │ +618 static std::tuple< std::vector< typename Codim< codim >::Geometry >... > │ │ │ │ +619 makeGeometryTable ( std::integer_sequence< int, codim... > ); │ │ │ │ +620 │ │ │ │ +622 typedef decltype( makeGeometryTable( std::make_integer_sequence< int, dim+1 │ │ │ │ +>() ) ) GeometryTable; │ │ │ │ +623 │ │ │ │ +625 ctype volume_; │ │ │ │ +626 │ │ │ │ +627 std::vector< Coordinate > baryCenters_[ dim+1 ]; │ │ │ │ +628 std::vector< Coordinate > integrationNormals_; │ │ │ │ +629 │ │ │ │ +631 GeometryTable geometries_; │ │ │ │ +632 │ │ │ │ +633 std::vector< SubEntityInfo > info_[ dim+1 ]; │ │ │ │ +634 }; │ │ │ │ +635 │ │ │ │ +637 template< class ctype, int dim > │ │ │ │ +638 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n< ctype, dim >::SubEntityInfo │ │ │ │ +639 { │ │ │ │ +640 // Compute upper bound for the number of subsentities. │ │ │ │ +641 // If someone knows an explicit formal feel free to │ │ │ │ +642 // implement it here. │ │ │ │ +643 static constexpr std::size_t maxSubEntityCount() │ │ │ │ +644 { │ │ │ │ +645 std::size_t maxCount=0; │ │ │ │ +646 for(std::size_t codim=0; codim<=dim; ++codim) │ │ │ │ +647 maxCount = std::max(maxCount, binomial(std::size_t(dim),codim)*(1 << │ │ │ │ +codim)); │ │ │ │ +648 return maxCount; │ │ │ │ +649 } │ │ │ │ +650 │ │ │ │ +651 using SubEntityFlags = std::bitset; │ │ │ │ +652 │ │ │ │ +653 class SubEntityRange │ │ │ │ +654 : public Dune::IteratorRange │ │ │ │ +655 { │ │ │ │ +656 using Base = typename Dune::IteratorRange; │ │ │ │ +657 │ │ │ │ +658 public: │ │ │ │ +659 │ │ │ │ +660 using iterator = Base::iterator; │ │ │ │ +661 using const_iterator = Base::const_iterator; │ │ │ │ +662 │ │ │ │ +663 SubEntityRange(const iterator& begin, const iterator& end, const │ │ │ │ +SubEntityFlags& contains) : │ │ │ │ +664 Base(begin, end), │ │ │ │ +665 containsPtr_(&contains), │ │ │ │ +666 size_(end-begin) │ │ │ │ +667 {} │ │ │ │ +668 │ │ │ │ +669 SubEntityRange() : │ │ │ │ +670 Base(), │ │ │ │ +671 containsPtr_(nullptr), │ │ │ │ +672 size_(0) │ │ │ │ +673 {} │ │ │ │ +674 │ │ │ │ +675 std::size_t _s_i_z_e() const │ │ │ │ +676 { │ │ │ │ +677 return size_; │ │ │ │ +678 } │ │ │ │ +679 │ │ │ │ +680 bool contains(std::size_t i) const │ │ │ │ +681 { │ │ │ │ +682 return (*containsPtr_)[i]; │ │ │ │ +683 } │ │ │ │ +684 │ │ │ │ +685 private: │ │ │ │ +686 const SubEntityFlags* containsPtr_; │ │ │ │ +687 std::size_t size_; │ │ │ │ +688 std::size_t offset_; │ │ │ │ +689 }; │ │ │ │ +690 │ │ │ │ +691 using NumberRange = typename Dune::IteratorRange; │ │ │ │ +692 │ │ │ │ +693 SubEntityInfo () │ │ │ │ +694 : numbering_( nullptr ) │ │ │ │ +695 { │ │ │ │ +696 std::fill( offset_.begin(), offset_.end(), 0 ); │ │ │ │ +697 } │ │ │ │ +698 │ │ │ │ +699 SubEntityInfo ( const SubEntityInfo &other ) │ │ │ │ +700 : offset_( other.offset_ ), │ │ │ │ +701 type_( other.type_ ), │ │ │ │ +702 containsSubentity_( other.containsSubentity_ ) │ │ │ │ +703 { │ │ │ │ +704 numbering_ = allocate(); │ │ │ │ +705 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ ); │ │ │ │ +706 } │ │ │ │ +707 │ │ │ │ +708 ~SubEntityInfo () { deallocate( numbering_ ); } │ │ │ │ +709 │ │ │ │ +710 const SubEntityInfo &operator= ( const SubEntityInfo &other ) │ │ │ │ +711 { │ │ │ │ +712 type_ = other.type_; │ │ │ │ +713 offset_ = other.offset_; │ │ │ │ +714 │ │ │ │ +715 deallocate( numbering_ ); │ │ │ │ +716 numbering_ = allocate(); │ │ │ │ +717 std::copy( other.numbering_, other.numbering_ + capacity(), numbering_ ); │ │ │ │ +718 │ │ │ │ +719 containsSubentity_ = other.containsSubentity_; │ │ │ │ +720 │ │ │ │ +721 return *this; │ │ │ │ +722 } │ │ │ │ +723 │ │ │ │ +724 int _s_i_z_e ( int cc ) const │ │ │ │ +725 { │ │ │ │ +726 assert( (cc >= 0) && (cc <= dim) ); │ │ │ │ +727 return (offset_[ cc+1 ] - offset_[ cc ]); │ │ │ │ +728 } │ │ │ │ +729 │ │ │ │ +730 int number ( int ii, int cc ) const │ │ │ │ +731 { │ │ │ │ +732 assert( (ii >= 0) && (ii < _s_i_z_e( cc )) ); │ │ │ │ +733 return numbering_[ offset_[ cc ] + ii ]; │ │ │ │ +734 } │ │ │ │ +735 │ │ │ │ +736 auto numbers ( int cc ) const │ │ │ │ +737 { │ │ │ │ +738 return SubEntityRange( numbering_ + offset_[ cc ], numbering_ + offset_ │ │ │ │ +[ cc+1 ], containsSubentity_[cc]); │ │ │ │ +739 } │ │ │ │ +740 │ │ │ │ +741 const GeometryType &type () const { return type_; } │ │ │ │ +742 │ │ │ │ +743 void initialize ( unsigned int topologyId, int codim, unsigned int i ) │ │ │ │ +744 { │ │ │ │ +745 const unsigned int subId = Impl::subTopologyId( topologyId, dim, codim, i │ │ │ │ +); │ │ │ │ +746 type_ = GeometryType( subId, dim-codim ); │ │ │ │ +747 │ │ │ │ +748 // compute offsets │ │ │ │ +749 for( int cc = 0; cc <= codim; ++cc ) │ │ │ │ +750 offset_[ cc ] = 0; │ │ │ │ +751 for( int cc = codim; cc <= dim; ++cc ) │ │ │ │ +752 offset_[ cc+1 ] = offset_[ cc ] + Impl::size( subId, dim-codim, cc-codim ); │ │ │ │ +753 │ │ │ │ +754 // compute subnumbering │ │ │ │ +755 deallocate( numbering_ ); │ │ │ │ +756 numbering_ = allocate(); │ │ │ │ +757 for( int cc = codim; cc <= dim; ++cc ) │ │ │ │ +758 Impl::subTopologyNumbering( topologyId, dim, codim, i, cc-codim, │ │ │ │ +numbering_+offset_[ cc ], numbering_+offset_[ cc+1 ] ); │ │ │ │ +759 │ │ │ │ +760 // initialize containsSubentity lookup-table │ │ │ │ +761 for(std::size_t cc=0; cc<= dim; ++cc) │ │ │ │ +762 { │ │ │ │ +763 containsSubentity_[cc].reset(); │ │ │ │ +764 for(std::size_t idx=0; idx offset_; │ │ │ │ +779 GeometryType type_; │ │ │ │ +780 std::array< SubEntityFlags, dim+1> containsSubentity_; │ │ │ │ +781 }; │ │ │ │ +782 │ │ │ │ +783 │ │ │ │ +784 template< class ctype, int dim > │ │ │ │ +785 template< int codim > │ │ │ │ +786 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n< ctype, dim >::CreateGeometries │ │ │ │ +787 { │ │ │ │ +788 template< int cc > │ │ │ │ +789 static typename ReferenceElements< ctype, dim-cc >_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +790 subRefElement( const ReferenceElementImplementation< ctype, dim > │ │ │ │ +&refElement, int i, std::integral_constant< int, cc > ) │ │ │ │ +791 { │ │ │ │ +792 return _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _d_i_m_-_c_c_ _>_:_:_g_e_n_e_r_a_l( refElement.type( i, cc │ │ │ │ +) ); │ │ │ │ +793 } │ │ │ │ +794 │ │ │ │ +795 static typename _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +796 subRefElement(const ReferenceElementImplementation< ctype, dim > │ │ │ │ +&refElement, │ │ │ │ +797 [[maybe_unused]] int i, std::integral_constant) │ │ │ │ +798 { │ │ │ │ +799 return refElement; │ │ │ │ +800 } │ │ │ │ +801 │ │ │ │ +802 static void apply ( const ReferenceElementImplementation< ctype, dim > │ │ │ │ +&refElement, GeometryTable &geometries ) │ │ │ │ +803 { │ │ │ │ +804 const int _s_i_z_e = refElement.size( codim ); │ │ │ │ +805 std::vector< FieldVector< ctype, dim > > origins( size ); │ │ │ │ +806 std::vector< FieldMatrix< ctype, dim - codim, dim > > jacobianTransposeds │ │ │ │ +( size ); │ │ │ │ +807 Impl::referenceEmbeddings( refElement.type().id(), dim, codim, &(origins[ 0 │ │ │ │ +]), &(jacobianTransposeds[ 0 ]) ); │ │ │ │ +808 │ │ │ │ +809 std::get< codim >( geometries ).reserve( size ); │ │ │ │ +810 for( int i = 0; i < _s_i_z_e; ++i ) │ │ │ │ +811 { │ │ │ │ +812 typename Codim< codim >::Geometry geometry( subRefElement( refElement, i, │ │ │ │ +std::integral_constant< int, codim >() ), origins[ i ], jacobianTransposeds[ i │ │ │ │ +] ); │ │ │ │ +813 std::get< codim >( geometries ).push_back( geometry ); │ │ │ │ +814 } │ │ │ │ +815 } │ │ │ │ +816 }; │ │ │ │ +817 │ │ │ │ +818#endif // DOXYGEN │ │ │ │ +819 │ │ │ │ +820 } // namespace Geo │ │ │ │ +821 │ │ │ │ +822} // namespace Dune │ │ │ │ +823 │ │ │ │ +824#endif // #ifndef DUNE_GEOMETRY_REFERENCEELEMENTIMPLEMENTATION_HH │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_._h_h │ │ │ │ _t_y_p_e_._h_h │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ -_q_u_a_d_r_a_t_u_r_e_r_u_l_e_s_._h_h │ │ │ │ -_s_t_d │ │ │ │ -STL namespace. │ │ │ │ +_a_f_f_i_n_e_g_e_o_m_e_t_r_y_._h_h │ │ │ │ +An implementation of the Geometry interface for affine geometries. │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y │ │ │ │ -MappedGeometry(const Map &, const Geo &) -> MappedGeometry< Map, Geo > │ │ │ │ +_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +decltype(referenceElement(std::declval< T >()...)) ReferenceElement │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:291 │ │ │ │ _D_u_n_e_:_:_G_e_o │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:28 │ │ │ │ +_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_T_y_p_e_:_:_s_i_z_e │ │ │ │ +@ size │ │ │ │ +DDeeffiinniittiioonn quadraturerules.hh:194 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:34 │ │ │ │ _D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ Class providing access to the singletons of the reference elements. │ │ │ │ DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ _D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ typename Container::ReferenceElement ReferenceElement │ │ │ │ The reference element type. │ │ │ │ DDeeffiinniittiioonn referenceelements.hh:146 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y │ │ │ │ -Geometry parametrized by a LocalFunction and a LocalGeometry. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:65 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -std::remove_reference_t< decltype(std::declval< Map >()(std::declval< typename │ │ │ │ -Geo::GlobalCoordinate >()))> GlobalCoordinate │ │ │ │ -type of global coordinates │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:71 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_c_e_n_t_e_r │ │ │ │ -GlobalCoordinate center() const │ │ │ │ -Map the center of the wrapped geometry. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:162 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate │ │ │ │ -&local) const │ │ │ │ -Obtain the transposed of the Jacobian's inverse. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:310 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ -JacobianInverse jacobianInverse(const LocalCoordinate &local) const │ │ │ │ -Obtain the Jacobian's inverse. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:296 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const │ │ │ │ -Obtain the transposed of the Jacobian. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:284 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y │ │ │ │ -MappedGeometry(Map_ &&mapping, Geo_ &&geometry, bool affine=false) │ │ │ │ -Constructor from mapping to parametrize the geometry. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:125 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed │ │ │ │ -type of jacobian transposed │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:89 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int mydimension │ │ │ │ -geometry dimension │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:77 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_t_y_p_e │ │ │ │ -GeometryType type() const │ │ │ │ -Obtain the geometry type from the reference element. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:143 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -typename Geo::LocalCoordinate LocalCoordinate │ │ │ │ -type of local coordinates │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:68 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_c_t_y_p_e │ │ │ │ -typename Geo::ctype ctype │ │ │ │ -coordinate type │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:74 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l │ │ │ │ -LocalCoordinate local(const GlobalCoordinate &y, Impl::GaussNewtonOptions< │ │ │ │ -ctype > opts={}) const │ │ │ │ -Evaluate the inverse coordinate mapping. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:197 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_G_e_o_m_e_t_r_y │ │ │ │ -Geo Geometry │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:108 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ -GlobalCoordinate corner(int i) const │ │ │ │ -Obtain coordinates of the i-th corner. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:155 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int coorddimension │ │ │ │ -coordinate dimension │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:80 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed │ │ │ │ -type of jacobian inverse transposed │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:95 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_M_a_p_p_i_n_g │ │ │ │ -Map Mapping │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:105 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ -GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ -Evaluate the coordinate mapping. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:176 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_r_e_f_E_l_e_m_e_n_t │ │ │ │ -ReferenceElement refElement() const │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:323 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ -Volume volume(const QuadratureRule< ctype, mydimension > &quadRule) const │ │ │ │ -Obtain the volume of the mapping's image by given quadrature rules. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:259 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r_s │ │ │ │ -int corners() const │ │ │ │ -Obtain number of corners of the corresponding reference element. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:149 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ -FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse │ │ │ │ -type of jacobian inverse │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:92 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -friend ReferenceElement referenceElement(const MappedGeometry &geometry) │ │ │ │ -Obtain the reference-element related to this geometry. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:316 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ -Volume volume(Impl::ConvergenceOptions< ctype > opts={}) const │ │ │ │ -Obtain the volume of the mapping's image. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:241 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_V_o_l_u_m_e │ │ │ │ -std::remove_reference_t< decltype(Dune::power(std::declval< ctype >(), │ │ │ │ -mydimension))> Volume │ │ │ │ -type of volume │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:83 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ -bool affine() const │ │ │ │ -Is this mapping affine? Not in general, since we don't know anything about the │ │ │ │ -mapping.... │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:137 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_D_e_r_i_v_a_t_i_v_e_M_a_p_p_i_n_g │ │ │ │ -std::remove_reference_t< decltype(derivative(std::declval< Map >()))> │ │ │ │ -DerivativeMapping │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:111 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n │ │ │ │ -Jacobian jacobian(const LocalCoordinate &local) const │ │ │ │ -Obtain the Jacobian. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:272 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_M_a_t_r_i_x_H_e_l_p_e_r │ │ │ │ -Impl::FieldMatrixHelper< ctype > MatrixHelper │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:102 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n │ │ │ │ -FieldMatrix< ctype, coorddimension, mydimension > Jacobian │ │ │ │ -type of jacobian │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:86 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ -ctype integrationElement(const LocalCoordinate &local) const │ │ │ │ -Obtain the integration element. │ │ │ │ -DDeeffiinniittiioonn mappedgeometry.hh:225 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e │ │ │ │ -Abstract base class for quadrature rules. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:214 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_:_:_r_u_l_e │ │ │ │ -static const QuadratureRule & rule(const GeometryType &t, int p, │ │ │ │ -QuadratureType::Enum qt=QuadratureType::GaussLegendre) │ │ │ │ -select the appropriate QuadratureRule for GeometryType t and order p │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:326 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ -Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ -DDeeffiinniittiioonn type.hh:114 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_g_e_n_e_r_a_l │ │ │ │ +static const ReferenceElement & general(const GeometryType &type) │ │ │ │ +get general reference elements │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:156 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00239.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: localfiniteelementgeometry.hh File Reference │ │ │ +dune-geometry: refinement.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,61 +71,31 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
localfiniteelementgeometry.hh File Reference
│ │ │ +
refinement.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <cassert>
│ │ │ -#include <functional>
│ │ │ -#include <limits>
│ │ │ -#include <type_traits>
│ │ │ -#include <vector>
│ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ -#include <dune/common/fvector.hh>
│ │ │ -#include <dune/common/math.hh>
│ │ │ -#include <dune/common/typetraits.hh>
│ │ │ -#include <dune/common/std/type_traits.hh>
│ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ -#include <dune/geometry/utility/algorithms.hh>
│ │ │ -#include <dune/geometry/utility/convergence.hh>
│ │ │ -#include <dune/geometry/utility/defaultmatrixhelper.hh>
│ │ │ + │ │ │ +

This file simply includes all Refinement implementations so you don't have to do them separately. │ │ │ +More...

│ │ │ +
#include "refinement/base.cc"
│ │ │ +#include "refinement/hcube.cc"
│ │ │ +#include "refinement/simplex.cc"
│ │ │ +#include "refinement/hcubetriangulation.cc"
│ │ │ +#include "refinement/prismtriangulation.cc"
│ │ │ +#include "refinement/pyramidtriangulation.cc"
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ -Classes

class  Dune::LocalFiniteElementGeometry< LFE, cdim >
 Geometry implementation based on local-basis function parametrization. More...
│ │ │ - │ │ │ - │ │ │ -

│ │ │ -Namespaces

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

│ │ │ -Functions

template<class I, class LFE, class GlobalCoordinate>
 Dune::LocalFiniteElementGeometry (Geo::ReferenceElement< I >, const LFE &, std::vector< GlobalCoordinate >) -> LocalFiniteElementGeometry< LFE, GlobalCoordinate::dimension >
template<class I, class LFE, class F, class Range = std::invoke_result_t<F,Impl::LocalCoordinate_t<LFE>>>
 Dune::LocalFiniteElementGeometry (Geo::ReferenceElement< I >, const LFE &, const F &) -> LocalFiniteElementGeometry< LFE, Range::dimension >
template<class LFE, class GlobalCoordinate>
 Dune::LocalFiniteElementGeometry (GeometryType, const LFE &localFE, std::vector< GlobalCoordinate >) -> LocalFiniteElementGeometry< LFE, GlobalCoordinate::dimension >
template<class LFE, class F, class Range = std::invoke_result_t<F,Impl::LocalCoordinate_t<LFE>>>
 Dune::LocalFiniteElementGeometry (GeometryType, const LFE &, const F &) -> LocalFiniteElementGeometry< LFE, Range::dimension >
│ │ │ -
│ │ │ +

Detailed Description

│ │ │ +

This file simply includes all Refinement implementations so you don't have to do them separately.

│ │ │ +
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,50 +1,21 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -localfiniteelementgeometry.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_q_u_a_d_r_a_t_u_r_e_r_u_l_e_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_a_l_g_o_r_i_t_h_m_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_c_o_n_v_e_r_g_e_n_c_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ +refinement.hh File Reference │ │ │ │ +This file simply includes all _R_e_f_i_n_e_m_e_n_t implementations so you don't have to │ │ │ │ +do them separately. _M_o_r_e_._._. │ │ │ │ +#include "_r_e_f_i_n_e_m_e_n_t_/_b_a_s_e_._c_c" │ │ │ │ +#include "_r_e_f_i_n_e_m_e_n_t_/_h_c_u_b_e_._c_c" │ │ │ │ +#include "_r_e_f_i_n_e_m_e_n_t_/_s_i_m_p_l_e_x_._c_c" │ │ │ │ +#include "_r_e_f_i_n_e_m_e_n_t_/_h_c_u_b_e_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c" │ │ │ │ +#include "_r_e_f_i_n_e_m_e_n_t_/_p_r_i_s_m_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c" │ │ │ │ +#include "_r_e_f_i_n_e_m_e_n_t_/_p_y_r_a_m_i_d_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c" │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_<_ _L_F_E_,_ _c_d_i_m_ _> │ │ │ │ -  Geometry implementation based on local-basis function parametrization. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _D_u_n_e │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -  _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t< I >, const LFE &, │ │ │ │ - std::vector< GlobalCoordinate >) -> LocalFiniteElementGeometry< LFE, │ │ │ │ - GlobalCoordinate::dimension > │ │ │ │ -template>> │ │ │ │ -  _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t< I >, const LFE &, │ │ │ │ - const F &) -> LocalFiniteElementGeometry< LFE, Range::dimension > │ │ │ │ -template │ │ │ │ -  _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_m_e_t_r_y_T_y_p_e, const LFE &localFE, std:: │ │ │ │ - vector< GlobalCoordinate >) -> LocalFiniteElementGeometry< LFE, │ │ │ │ - GlobalCoordinate::dimension > │ │ │ │ -template>> │ │ │ │ -  _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_m_e_t_r_y_T_y_p_e, const LFE &, const F &) - │ │ │ │ - > LocalFiniteElementGeometry< LFE, Range::dimension > │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +This file simply includes all _R_e_f_i_n_e_m_e_n_t implementations so you don't have to │ │ │ │ +do them separately. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00239_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: localfiniteelementgeometry.hh Source File │ │ │ +dune-geometry: refinement.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,437 +71,43 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
localfiniteelementgeometry.hh
│ │ │ +
refinement.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_LOCALFINITEELEMENTGEOMETRY_HH
│ │ │ -
6#define DUNE_GEOMETRY_LOCALFINITEELEMENTGEOMETRY_HH
│ │ │ -
7
│ │ │ -
8#include <cassert>
│ │ │ -
9#include <functional>
│ │ │ -
10#include <limits>
│ │ │ -
11#include <type_traits>
│ │ │ -
12#include <vector>
│ │ │ -
13
│ │ │ -
14#include <dune/common/fmatrix.hh>
│ │ │ -
15#include <dune/common/fvector.hh>
│ │ │ -
16#include <dune/common/math.hh>
│ │ │ -
17#include <dune/common/typetraits.hh>
│ │ │ -
18#include <dune/common/std/type_traits.hh>
│ │ │ -
19
│ │ │ - │ │ │ - │ │ │ -
22#include <dune/geometry/type.hh>
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
26
│ │ │ -
27namespace Dune {
│ │ │ -
28
│ │ │ -
38template <class LFE, int cdim>
│ │ │ -
│ │ │ - │ │ │ -
40{
│ │ │ -
41 using LocalFiniteElement = LFE;
│ │ │ -
42 using LocalBasis = typename LFE::Traits::LocalBasisType;
│ │ │ -
43 using LocalBasisTraits = typename LocalBasis::Traits;
│ │ │ -
44
│ │ │ -
45public:
│ │ │ -
47 using ctype = typename LocalBasisTraits::DomainFieldType;
│ │ │ -
48
│ │ │ -
50 static const int mydimension = LocalBasisTraits::dimDomain;
│ │ │ -
51
│ │ │ -
53 static const int coorddimension = cdim;
│ │ │ -
54
│ │ │ -
56 using LocalCoordinate = FieldVector<ctype, mydimension>;
│ │ │ -
57
│ │ │ -
59 using GlobalCoordinate = FieldVector<ctype, coorddimension>;
│ │ │ -
60
│ │ │ -
62 using Volume = decltype(power(std::declval<ctype>(),mydimension));
│ │ │ -
63
│ │ │ -
65 using Jacobian = FieldMatrix<ctype, coorddimension, mydimension>;
│ │ │ -
66
│ │ │ -
68 using JacobianTransposed = FieldMatrix<ctype, mydimension, coorddimension>;
│ │ │ -
69
│ │ │ -
71 using JacobianInverse = FieldMatrix<ctype, mydimension, coorddimension>;
│ │ │ -
72
│ │ │ -
74 using JacobianInverseTransposed = FieldMatrix<ctype, coorddimension, mydimension>;
│ │ │ -
75
│ │ │ -
76public:
│ │ │ - │ │ │ - │ │ │ -
80
│ │ │ -
81protected:
│ │ │ -
82 using MatrixHelper = Impl::FieldMatrixHelper<ctype>;
│ │ │ -
83
│ │ │ -
84public:
│ │ │ - │ │ │ -
87
│ │ │ -
│ │ │ - │ │ │ -
104 const LocalFiniteElement& localFE,
│ │ │ -
105 std::vector<GlobalCoordinate> vertices)
│ │ │ -
106 : refElement_(refElement)
│ │ │ -
107 , localFE_(localFE)
│ │ │ -
108 , vertices_(std::move(vertices))
│ │ │ -
109 {
│ │ │ -
110 assert(localFE_.size() == vertices_.size());
│ │ │ -
111 }
│ │ │ -
│ │ │ -
112
│ │ │ -
126 template <class Param,
│ │ │ -
127 std::enable_if_t<std::is_invocable_r_v<GlobalCoordinate,Param,LocalCoordinate>, int> = 0>
│ │ │ -
│ │ │ - │ │ │ -
129 const LocalFiniteElement& localFE,
│ │ │ -
130 Param&& parametrization)
│ │ │ -
131 : refElement_(refElement)
│ │ │ -
132 , localFE_(localFE)
│ │ │ -
133 {
│ │ │ -
134 localFE_.localInterpolation().interpolate(parametrization, vertices_);
│ │ │ -
135 }
│ │ │ -
│ │ │ -
136
│ │ │ -
143 template <class... Args>
│ │ │ -
│ │ │ -
144 explicit LocalFiniteElementGeometry (GeometryType gt, Args&&... args)
│ │ │ -
145 : LocalFiniteElementGeometry(ReferenceElements::general(gt), std::forward<Args>(args)...)
│ │ │ -
146 {}
│ │ │ -
│ │ │ -
147
│ │ │ -
│ │ │ -
149 int order () const
│ │ │ -
150 {
│ │ │ -
151 return localBasis().order();
│ │ │ -
152 }
│ │ │ -
│ │ │ -
153
│ │ │ -
│ │ │ -
159 bool affine () const
│ │ │ -
160 {
│ │ │ -
161 if (!affine_)
│ │ │ -
162 affine_.emplace(affineImpl());
│ │ │ -
163 return *affine_;
│ │ │ -
164 }
│ │ │ -
│ │ │ -
165
│ │ │ -
│ │ │ - │ │ │ -
168 {
│ │ │ -
169 return refElement_.type();
│ │ │ -
170 }
│ │ │ -
│ │ │ -
171
│ │ │ -
│ │ │ -
173 int corners () const
│ │ │ -
174 {
│ │ │ -
175 return refElement_.size(mydimension);
│ │ │ -
176 }
│ │ │ -
│ │ │ -
177
│ │ │ -
│ │ │ - │ │ │ -
180 {
│ │ │ -
181 assert( (i >= 0) && (i < corners()) );
│ │ │ -
182 return global(refElement_.position(i, mydimension));
│ │ │ -
183 }
│ │ │ -
│ │ │ -
184
│ │ │ -
│ │ │ - │ │ │ -
187 {
│ │ │ -
188 return global(refElement_.position(0, 0));
│ │ │ -
189 }
│ │ │ -
│ │ │ -
190
│ │ │ -
│ │ │ - │ │ │ -
203 {
│ │ │ -
204 thread_local std::vector<typename LocalBasisTraits::RangeType> shapeValues;
│ │ │ -
205 localBasis().evaluateFunction(local, shapeValues);
│ │ │ -
206 assert(shapeValues.size() == vertices_.size());
│ │ │ -
207
│ │ │ -
208 GlobalCoordinate out(0);
│ │ │ -
209 for (std::size_t i = 0; i < shapeValues.size(); ++i)
│ │ │ -
210 out.axpy(shapeValues[i], vertices_[i]);
│ │ │ -
211
│ │ │ -
212 return out;
│ │ │ -
213 }
│ │ │ -
│ │ │ -
214
│ │ │ -
│ │ │ -
232 LocalCoordinate local (const GlobalCoordinate& y, Impl::GaussNewtonOptions<ctype> opts = {}) const
│ │ │ -
233 {
│ │ │ -
234 LocalCoordinate x = refElement_.position(0,0);
│ │ │ -
235 Impl::GaussNewtonErrorCode err = Impl::gaussNewton(
│ │ │ -
236 [&](const LocalCoordinate& local) { return this->global(local); },
│ │ │ -
237 [&](const LocalCoordinate& local) { return this->jacobianTransposed(local); },
│ │ │ -
238 y, x, opts
│ │ │ -
239 );
│ │ │ -
240
│ │ │ -
241 if (err != Impl::GaussNewtonErrorCode::OK)
│ │ │ -
242 DUNE_THROW(Dune::Exception,
│ │ │ -
243 "Local coordinate can not be recovered from global coordinate, error code = " << int(err) << "\n"
│ │ │ -
244 << " (global(x) - y).two_norm() = " << (global(x) - y).two_norm()
│ │ │ -
245 << " > tol = " << opts.absTol);
│ │ │ -
246
│ │ │ -
247 return x;
│ │ │ -
248 }
│ │ │ -
│ │ │ -
249
│ │ │ -
│ │ │ - │ │ │ -
261 {
│ │ │ -
262 return MatrixHelper::sqrtDetAAT(jacobianTransposed(local));
│ │ │ -
263 }
│ │ │ -
│ │ │ -
264
│ │ │ -
│ │ │ -
276 Volume volume (Impl::ConvergenceOptions<ctype> opts = {}) const
│ │ │ -
277 {
│ │ │ - │ │ │ -
279 if (affine())
│ │ │ -
280 return vol0;
│ │ │ -
281
│ │ │ -
282 using std::abs;
│ │ │ -
283 for (int p = 2; p < opts.maxIt; ++p) {
│ │ │ - │ │ │ -
285 if (abs(vol1 - vol0) < opts.absTol)
│ │ │ -
286 return vol1;
│ │ │ -
287
│ │ │ -
288 vol0 = vol1;
│ │ │ -
289 }
│ │ │ -
290 return vol0;
│ │ │ -
291 }
│ │ │ -
│ │ │ -
292
│ │ │ -
│ │ │ - │ │ │ -
295 {
│ │ │ -
296 Volume vol(0);
│ │ │ -
297 for (const auto& qp : quadRule)
│ │ │ -
298 vol += integrationElement(qp.position()) * qp.weight();
│ │ │ -
299 return vol;
│ │ │ -
300 }
│ │ │ -
│ │ │ -
301
│ │ │ -
│ │ │ - │ │ │ -
308 {
│ │ │ -
309 thread_local std::vector<typename LocalBasisTraits::JacobianType> shapeJacobians;
│ │ │ -
310 localBasis().evaluateJacobian(local, shapeJacobians);
│ │ │ -
311 assert(shapeJacobians.size() == vertices_.size());
│ │ │ -
312
│ │ │ -
313 Jacobian out(0);
│ │ │ -
314 for (std::size_t i = 0; i < shapeJacobians.size(); ++i) {
│ │ │ -
315 for (int j = 0; j < Jacobian::rows; ++j) {
│ │ │ -
316 shapeJacobians[i].umtv(vertices_[i][j], out[j]);
│ │ │ -
317 }
│ │ │ -
318 }
│ │ │ -
319 return out;
│ │ │ -
320 }
│ │ │ -
│ │ │ -
321
│ │ │ -
│ │ │ - │ │ │ -
328 {
│ │ │ -
329 return jacobian(local).transposed();
│ │ │ -
330 }
│ │ │ -
│ │ │ -
331
│ │ │ -
│ │ │ - │ │ │ -
340 {
│ │ │ -
341 JacobianInverse out;
│ │ │ -
342 MatrixHelper::leftInvA(jacobian(local), out);
│ │ │ -
343 return out;
│ │ │ -
344 }
│ │ │ -
│ │ │ -
345
│ │ │ -
│ │ │ - │ │ │ -
354 {
│ │ │ -
355 return jacobianInverse(local).transposed();
│ │ │ -
356 }
│ │ │ -
│ │ │ -
357
│ │ │ -
│ │ │ - │ │ │ -
360 {
│ │ │ -
361 return geometry.refElement_;
│ │ │ -
362 }
│ │ │ -
│ │ │ -
363
│ │ │ -
│ │ │ -
365 const LocalFiniteElement& finiteElement () const
│ │ │ -
366 {
│ │ │ -
367 return localFE_;
│ │ │ -
368 }
│ │ │ -
│ │ │ -
369
│ │ │ -
│ │ │ -
371 const std::vector<GlobalCoordinate>& coefficients () const
│ │ │ -
372 {
│ │ │ -
373 return vertices_;
│ │ │ -
374 }
│ │ │ -
│ │ │ -
375
│ │ │ -
│ │ │ -
377 const LocalBasis& localBasis () const
│ │ │ -
378 {
│ │ │ -
379 return localFE_.localBasis();
│ │ │ -
380 }
│ │ │ -
│ │ │ -
381
│ │ │ -
382private:
│ │ │ -
383
│ │ │ -
384 bool affineImpl () const
│ │ │ -
385 {
│ │ │ -
386 if constexpr(mydimension == 0)
│ │ │ -
387 // point geometries are always affine mappings
│ │ │ -
388 return true;
│ │ │ -
389 else {
│ │ │ -
390 if (order() > 1)
│ │ │ -
391 // higher-order parametrizations are by definition not affine
│ │ │ -
392 return false;
│ │ │ -
393 if constexpr(mydimension == 1)
│ │ │ -
394 // linear line geometries are affine mappings
│ │ │ -
395 return true;
│ │ │ -
396 else {
│ │ │ -
397 if (type().isSimplex())
│ │ │ -
398 // linear simplex geometries are affine mappings
│ │ │ -
399 return true;
│ │ │ -
400
│ │ │ -
401 // multi-linear mappings on non-simplex geometries might be affine
│ │ │ -
402 // as well. This is tested explicitly for all vertices by constructing
│ │ │ -
403 // an affine mapping from dim+1 affine-independent corners and evaluating
│ │ │ -
404 // at the other corners.
│ │ │ - │ │ │ -
406 auto simplexIndices = Dune::range(refSimplex.size(mydimension));
│ │ │ -
407 auto simplexCorners = Dune::transformedRangeView(simplexIndices,
│ │ │ -
408 [&](int i) { return this->global(refSimplex.position(i,mydimension)); });
│ │ │ -
409 AffineGeometry<ctype,mydimension,coorddimension> affineGeo(refSimplex,simplexCorners);
│ │ │ -
410 using std::sqrt;
│ │ │ -
411 const ctype tol = sqrt(std::numeric_limits<ctype>::epsilon());
│ │ │ -
412 for (int i = 0; i < corners(); ++i) {
│ │ │ -
413 const auto corner = refElement_.position(i,mydimension);
│ │ │ -
414 if ((affineGeo.global(corner) - global(corner)).two_norm() > tol)
│ │ │ -
415 return false;
│ │ │ -
416 }
│ │ │ -
417 return true;
│ │ │ -
418 }
│ │ │ -
419 }
│ │ │ -
420 }
│ │ │ -
421
│ │ │ -
422private:
│ │ │ -
424 ReferenceElement refElement_{};
│ │ │ -
425
│ │ │ -
427 LocalFiniteElement localFE_{};
│ │ │ -
428
│ │ │ -
430 std::vector<GlobalCoordinate> vertices_{};
│ │ │ -
431
│ │ │ -
432 mutable std::optional<bool> affine_ = std::nullopt;
│ │ │ -
433};
│ │ │ -
│ │ │ -
434
│ │ │ -
435namespace Impl {
│ │ │ -
436
│ │ │ -
437// extract the LocalCoordinate type from a LocalFiniteElement
│ │ │ -
438template <class LFE>
│ │ │ -
439using LocalCoordinate_t
│ │ │ -
440 = FieldVector<typename LFE::Traits::LocalBasisType::Traits::DomainFieldType,
│ │ │ -
441 LFE::Traits::LocalBasisType::Traits::dimDomain>;
│ │ │ -
442
│ │ │ -
443} // end namespace Impl
│ │ │ -
444
│ │ │ -
445
│ │ │ -
446// deduction guides
│ │ │ -
447template <class I, class LFE, class GlobalCoordinate>
│ │ │ -
448LocalFiniteElementGeometry (Geo::ReferenceElement<I>, const LFE&, std::vector<GlobalCoordinate>)
│ │ │ - │ │ │ -
450
│ │ │ -
451template <class I, class LFE, class F,
│ │ │ -
452 class Range = std::invoke_result_t<F,Impl::LocalCoordinate_t<LFE>>>
│ │ │ - │ │ │ - │ │ │ -
455
│ │ │ -
456template <class LFE, class GlobalCoordinate>
│ │ │ -
457LocalFiniteElementGeometry (GeometryType, const LFE& localFE, std::vector<GlobalCoordinate>)
│ │ │ - │ │ │ -
459
│ │ │ -
460template <class LFE, class F,
│ │ │ -
461 class Range = std::invoke_result_t<F,Impl::LocalCoordinate_t<LFE>>>
│ │ │ - │ │ │ - │ │ │ -
464
│ │ │ -
465} // namespace Dune
│ │ │ -
466
│ │ │ -
467#endif // DUNE_GEOMETRY_LOCALFINITEELEMENTGEOMETRY_HH
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ - │ │ │ - │ │ │ -
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition type.hh:453
│ │ │ -
STL namespace.
│ │ │ -
Definition affinegeometry.hh:22
│ │ │ -
LocalFiniteElementGeometry(Geo::ReferenceElement< I >, const LFE &, std::vector< GlobalCoordinate >) -> LocalFiniteElementGeometry< LFE, GlobalCoordinate::dimension >
│ │ │ -
This class provides access to geometric and topological properties of a reference element.
Definition referenceelement.hh:52
│ │ │ -
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │ -
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:146
│ │ │ -
Geometry implementation based on local-basis function parametrization.
Definition localfiniteelementgeometry.hh:40
│ │ │ -
GeometryType type() const
Obtain the name of the reference element.
Definition localfiniteelementgeometry.hh:167
│ │ │ -
decltype(power(std::declval< ctype >(), mydimension)) Volume
type of volume
Definition localfiniteelementgeometry.hh:62
│ │ │ -
LocalCoordinate local(const GlobalCoordinate &y, Impl::GaussNewtonOptions< ctype > opts={}) const
Evaluate the inverse coordinate mapping.
Definition localfiniteelementgeometry.hh:232
│ │ │ -
LocalFiniteElementGeometry(const ReferenceElement &refElement, const LocalFiniteElement &localFE, std::vector< GlobalCoordinate > vertices)
Constructor from a vector of coefficients of the LocalBasis parametrizing the geometry.
Definition localfiniteelementgeometry.hh:103
│ │ │ -
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian.
Definition localfiniteelementgeometry.hh:327
│ │ │ -
const LocalBasis & localBasis() const
The local basis of the stored local finite-element.
Definition localfiniteelementgeometry.hh:377
│ │ │ -
typename LocalBasisTraits::DomainFieldType ctype
coordinate type
Definition localfiniteelementgeometry.hh:47
│ │ │ -
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian's inverse.
Definition localfiniteelementgeometry.hh:353
│ │ │ -
friend ReferenceElement referenceElement(const LocalFiniteElementGeometry &geometry)
Obtain the reference-element related to this geometry.
Definition localfiniteelementgeometry.hh:359
│ │ │ -
LocalFiniteElementGeometry()=default
Default constructed geometry results in an empty/invalid representation.
│ │ │ -
bool affine() const
Is this mapping affine? Geometries of order 1 might be affine, but it needs to be checked on non-simp...
Definition localfiniteelementgeometry.hh:159
│ │ │ -
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition localfiniteelementgeometry.hh:307
│ │ │ -
Volume volume(const QuadratureRule< ctype, mydimension > &quadRule) const
Obtain the volume of the mapping's image by given quadrature rules.
Definition localfiniteelementgeometry.hh:294
│ │ │ -
const std::vector< GlobalCoordinate > & coefficients() const
Obtain the coefficients of the parametrization.
Definition localfiniteelementgeometry.hh:371
│ │ │ -
LocalFiniteElementGeometry(GeometryType gt, Args &&... args)
Constructor, forwarding to the other constructors that take a reference-element.
Definition localfiniteelementgeometry.hh:144
│ │ │ -
static const int coorddimension
coordinate dimension
Definition localfiniteelementgeometry.hh:53
│ │ │ -
int corners() const
Obtain number of corners of the corresponding reference element.
Definition localfiniteelementgeometry.hh:173
│ │ │ -
GlobalCoordinate center() const
Obtain the centroid of the mapping's image.
Definition localfiniteelementgeometry.hh:186
│ │ │ -
const LocalFiniteElement & finiteElement() const
Obtain the local finite-element.
Definition localfiniteelementgeometry.hh:365
│ │ │ -
GlobalCoordinate global(const LocalCoordinate &local) const
Evaluate the coordinate mapping.
Definition localfiniteelementgeometry.hh:202
│ │ │ -
Impl::FieldMatrixHelper< ctype > MatrixHelper
Definition localfiniteelementgeometry.hh:82
│ │ │ -
typename ReferenceElements::ReferenceElement ReferenceElement
Definition localfiniteelementgeometry.hh:79
│ │ │ -
GlobalCoordinate corner(int i) const
Obtain coordinates of the i-th corner.
Definition localfiniteelementgeometry.hh:179
│ │ │ -
Volume volume(Impl::ConvergenceOptions< ctype > opts={}) const
Obtain the volume of the mapping's image.
Definition localfiniteelementgeometry.hh:276
│ │ │ -
static const int mydimension
geometry dimension
Definition localfiniteelementgeometry.hh:50
│ │ │ -
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition localfiniteelementgeometry.hh:339
│ │ │ -
FieldVector< ctype, coorddimension > GlobalCoordinate
type of global coordinates
Definition localfiniteelementgeometry.hh:59
│ │ │ -
FieldMatrix< ctype, coorddimension, mydimension > Jacobian
type of jacobian
Definition localfiniteelementgeometry.hh:65
│ │ │ -
FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed
type of jacobian inverse transposed
Definition localfiniteelementgeometry.hh:74
│ │ │ -
Dune::ReferenceElements< ctype, mydimension > ReferenceElements
type of reference element
Definition localfiniteelementgeometry.hh:78
│ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
type of jacobian inverse
Definition localfiniteelementgeometry.hh:71
│ │ │ -
ctype integrationElement(const LocalCoordinate &local) const
Obtain the integration element.
Definition localfiniteelementgeometry.hh:260
│ │ │ -
int order() const
Obtain the (highest) polynomial order of the parametrization.
Definition localfiniteelementgeometry.hh:149
│ │ │ -
FieldVector< ctype, mydimension > LocalCoordinate
type of local coordinates
Definition localfiniteelementgeometry.hh:56
│ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
type of jacobian transposed
Definition localfiniteelementgeometry.hh:68
│ │ │ -
LocalFiniteElementGeometry(const ReferenceElement &refElement, const LocalFiniteElement &localFE, Param &&parametrization)
Constructor from a local parametrization function, mapping local to (curved) global coordinates.
Definition localfiniteelementgeometry.hh:128
│ │ │ -
Abstract base class for quadrature rules.
Definition quadraturerules.hh:214
│ │ │ -
static const QuadratureRule & rule(const GeometryType &t, int p, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
select the appropriate QuadratureRule for GeometryType t and order p
Definition quadraturerules.hh:326
│ │ │ -
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ +
5#ifndef DUNE_GEOMETRY_REFINEMENT_HH
│ │ │ +
6#define DUNE_GEOMETRY_REFINEMENT_HH
│ │ │ +
7
│ │ │ +
13
│ │ │ +
239// The interface (template<...> class StaticRefinement) is not included here
│ │ │ +
240// since it derives from parts which I consider implementation. Look
│ │ │ +
241// into refinement/base.cc if the documentation is above is not enough.
│ │ │ +
242#include "refinement/base.cc"
│ │ │ +
243
│ │ │ +
244#include "refinement/hcube.cc"
│ │ │ +
245#include "refinement/simplex.cc"
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
249
│ │ │ +
250#endif // DUNE_GEOMETRY_REFINEMENT_HH
│ │ │ + │ │ │ +
This file contains the parts independent of a particular Refinement implementation.
│ │ │ +
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │ +
This file contains the Refinement implementation for triangulating hypercubes (quadrilateral -> trian...
│ │ │ + │ │ │ +
This file contains the Refinement implementation for hypercubes (quadrilaterals, hexahedrons,...
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,540 +1,45 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -localfiniteelementgeometry.hh │ │ │ │ +refinement.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_LOCALFINITEELEMENTGEOMETRY_HH │ │ │ │ -6#define DUNE_GEOMETRY_LOCALFINITEELEMENTGEOMETRY_HH │ │ │ │ +5#ifndef DUNE_GEOMETRY_REFINEMENT_HH │ │ │ │ +6#define DUNE_GEOMETRY_REFINEMENT_HH │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ 13 │ │ │ │ -14#include │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ -17#include │ │ │ │ -18#include │ │ │ │ -19 │ │ │ │ -20#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_q_u_a_d_r_a_t_u_r_e_r_u_l_e_s_._h_h> │ │ │ │ -21#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ -22#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -23#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_a_l_g_o_r_i_t_h_m_s_._h_h> │ │ │ │ -24#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_c_o_n_v_e_r_g_e_n_c_e_._h_h> │ │ │ │ -25#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ -26 │ │ │ │ -27namespace _D_u_n_e { │ │ │ │ -28 │ │ │ │ -38template │ │ │ │ -_3_9class _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ -40{ │ │ │ │ -41 using LocalFiniteElement = LFE; │ │ │ │ -42 using LocalBasis = typename LFE::Traits::LocalBasisType; │ │ │ │ -43 using LocalBasisTraits = typename LocalBasis::Traits; │ │ │ │ -44 │ │ │ │ -45public: │ │ │ │ -_4_7 using _c_t_y_p_e = typename LocalBasisTraits::DomainFieldType; │ │ │ │ -48 │ │ │ │ -_5_0 static const int _m_y_d_i_m_e_n_s_i_o_n = LocalBasisTraits::dimDomain; │ │ │ │ -51 │ │ │ │ -_5_3 static const int _c_o_o_r_d_d_i_m_e_n_s_i_o_n = cdim; │ │ │ │ -54 │ │ │ │ -_5_6 using _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e = FieldVector; │ │ │ │ -57 │ │ │ │ -_5_9 using _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e = FieldVector; │ │ │ │ -60 │ │ │ │ -_6_2 using _V_o_l_u_m_e = decltype(power(std::declval(),_m_y_d_i_m_e_n_s_i_o_n)); │ │ │ │ -63 │ │ │ │ -_6_5 using _J_a_c_o_b_i_a_n = FieldMatrix; │ │ │ │ -66 │ │ │ │ -_6_8 using _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d = FieldMatrix; │ │ │ │ -69 │ │ │ │ -_7_1 using _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e = FieldMatrix; │ │ │ │ -72 │ │ │ │ -_7_4 using _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d = FieldMatrix; │ │ │ │ -75 │ │ │ │ -76public: │ │ │ │ -_7_8 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s = _D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>; │ │ │ │ -_7_9 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = typename _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ -80 │ │ │ │ -81protected: │ │ │ │ -_8_2 using _M_a_t_r_i_x_H_e_l_p_e_r = Impl::FieldMatrixHelper; │ │ │ │ -83 │ │ │ │ -84public: │ │ │ │ -_8_6 _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y () = default; │ │ │ │ -87 │ │ │ │ -_1_0_3 _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& refElement, │ │ │ │ -104 const LocalFiniteElement& localFE, │ │ │ │ -105 std::vector vertices) │ │ │ │ -106 : refElement_(refElement) │ │ │ │ -107 , localFE_(localFE) │ │ │ │ -108 , vertices_(_s_t_d::move(vertices)) │ │ │ │ -109 { │ │ │ │ -110 assert(localFE_.size() == vertices_.size()); │ │ │ │ -111 } │ │ │ │ -112 │ │ │ │ -126 template , int> = 0> │ │ │ │ -_1_2_8 _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& refElement, │ │ │ │ -129 const LocalFiniteElement& localFE, │ │ │ │ -130 Param&& parametrization) │ │ │ │ -131 : refElement_(refElement) │ │ │ │ -132 , localFE_(localFE) │ │ │ │ -133 { │ │ │ │ -134 localFE_.localInterpolation().interpolate(parametrization, vertices_); │ │ │ │ -135 } │ │ │ │ -136 │ │ │ │ -143 template │ │ │ │ -_1_4_4 explicit _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_m_e_t_r_y_T_y_p_e gt, Args&&... args) │ │ │ │ -145 : _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y(_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s::general(gt), _s_t_d:: │ │ │ │ -forward(args)...) │ │ │ │ -146 {} │ │ │ │ -147 │ │ │ │ -_1_4_9 int _o_r_d_e_r () const │ │ │ │ -150 { │ │ │ │ -151 return _l_o_c_a_l_B_a_s_i_s().order(); │ │ │ │ -152 } │ │ │ │ -153 │ │ │ │ -_1_5_9 bool _a_f_f_i_n_e () const │ │ │ │ -160 { │ │ │ │ -161 if (!affine_) │ │ │ │ -162 affine_.emplace(affineImpl()); │ │ │ │ -163 return *affine_; │ │ │ │ -164 } │ │ │ │ -165 │ │ │ │ -_1_6_7 _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e () const │ │ │ │ -168 { │ │ │ │ -169 return refElement_.type(); │ │ │ │ -170 } │ │ │ │ -171 │ │ │ │ -_1_7_3 int _c_o_r_n_e_r_s () const │ │ │ │ -174 { │ │ │ │ -175 return refElement_.size(_m_y_d_i_m_e_n_s_i_o_n); │ │ │ │ -176 } │ │ │ │ -177 │ │ │ │ -_1_7_9 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_o_r_n_e_r (int i) const │ │ │ │ -180 { │ │ │ │ -181 assert( (i >= 0) && (i < _c_o_r_n_e_r_s()) ); │ │ │ │ -182 return _g_l_o_b_a_l(refElement_.position(i, _m_y_d_i_m_e_n_s_i_o_n)); │ │ │ │ -183 } │ │ │ │ -184 │ │ │ │ -_1_8_6 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r () const │ │ │ │ -187 { │ │ │ │ -188 return _g_l_o_b_a_l(refElement_.position(0, 0)); │ │ │ │ -189 } │ │ │ │ -190 │ │ │ │ -_2_0_2 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ -203 { │ │ │ │ -204 thread_local std::vector shapeValues; │ │ │ │ -205 _l_o_c_a_l_B_a_s_i_s().evaluateFunction(_l_o_c_a_l, shapeValues); │ │ │ │ -206 assert(shapeValues.size() == vertices_.size()); │ │ │ │ -207 │ │ │ │ -208 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e out(0); │ │ │ │ -209 for (std::size_t i = 0; i < shapeValues.size(); ++i) │ │ │ │ -210 out.axpy(shapeValues[i], vertices_[i]); │ │ │ │ -211 │ │ │ │ -212 return out; │ │ │ │ -213 } │ │ │ │ -214 │ │ │ │ -_2_3_2 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l (const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e& y, Impl:: │ │ │ │ -GaussNewtonOptions opts = {}) const │ │ │ │ -233 { │ │ │ │ -234 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e x = refElement_.position(0,0); │ │ │ │ -235 Impl::GaussNewtonErrorCode err = Impl::gaussNewton( │ │ │ │ -236 [&](const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) { return this->_g_l_o_b_a_l(local); }, │ │ │ │ -237 [&](const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) { return this->_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(local); │ │ │ │ -}, │ │ │ │ -238 y, x, opts │ │ │ │ -239 ); │ │ │ │ -240 │ │ │ │ -241 if (err != Impl::GaussNewtonErrorCode::OK) │ │ │ │ -242 DUNE_THROW(Dune::Exception, │ │ │ │ -243 "Local coordinate can not be recovered from global coordinate, error code = │ │ │ │ -" << int(err) << "\n" │ │ │ │ -244 << " (global(x) - y).two_norm() = " << (_g_l_o_b_a_l(x) - y).two_norm() │ │ │ │ -245 << " > tol = " << opts.absTol); │ │ │ │ -246 │ │ │ │ -247 return x; │ │ │ │ -248 } │ │ │ │ +239// The interface (template<...> class StaticRefinement) is not included here │ │ │ │ +240// since it derives from parts which I consider implementation. Look │ │ │ │ +241// into refinement/base.cc if the documentation is above is not enough. │ │ │ │ +242#include "_r_e_f_i_n_e_m_e_n_t_/_b_a_s_e_._c_c" │ │ │ │ +243 │ │ │ │ +244#include "_r_e_f_i_n_e_m_e_n_t_/_h_c_u_b_e_._c_c" │ │ │ │ +245#include "_r_e_f_i_n_e_m_e_n_t_/_s_i_m_p_l_e_x_._c_c" │ │ │ │ +246#include "_r_e_f_i_n_e_m_e_n_t_/_h_c_u_b_e_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c" │ │ │ │ +247#include "_r_e_f_i_n_e_m_e_n_t_/_p_r_i_s_m_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c" │ │ │ │ +248#include "_r_e_f_i_n_e_m_e_n_t_/_p_y_r_a_m_i_d_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c" │ │ │ │ 249 │ │ │ │ -_2_6_0 _c_t_y_p_e _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ -261 { │ │ │ │ -262 return MatrixHelper::sqrtDetAAT(_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l)); │ │ │ │ -263 } │ │ │ │ -264 │ │ │ │ -_2_7_6 _V_o_l_u_m_e _v_o_l_u_m_e (Impl::ConvergenceOptions opts = {}) const │ │ │ │ -277 { │ │ │ │ -278 _V_o_l_u_m_e vol0 = _v_o_l_u_m_e(_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>_:_:_r_u_l_e(_t_y_p_e(), 1)); │ │ │ │ -279 if (_a_f_f_i_n_e()) │ │ │ │ -280 return vol0; │ │ │ │ -281 │ │ │ │ -282 using std::abs; │ │ │ │ -283 for (int p = 2; p < opts.maxIt; ++p) { │ │ │ │ -284 _V_o_l_u_m_e vol1 = _v_o_l_u_m_e(_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>_:_:_r_u_l_e(_t_y_p_e(), p)); │ │ │ │ -285 if (abs(vol1 - vol0) < opts.absTol) │ │ │ │ -286 return vol1; │ │ │ │ -287 │ │ │ │ -288 vol0 = vol1; │ │ │ │ -289 } │ │ │ │ -290 return vol0; │ │ │ │ -291 } │ │ │ │ -292 │ │ │ │ -_2_9_4 _V_o_l_u_m_e _v_o_l_u_m_e (const _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>& quadRule) const │ │ │ │ -295 { │ │ │ │ -296 _V_o_l_u_m_e vol(0); │ │ │ │ -297 for (const auto& qp : quadRule) │ │ │ │ -298 vol += _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t(qp.position()) * qp.weight(); │ │ │ │ -299 return vol; │ │ │ │ -300 } │ │ │ │ -301 │ │ │ │ -_3_0_7 _J_a_c_o_b_i_a_n _j_a_c_o_b_i_a_n (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ -308 { │ │ │ │ -309 thread_local std::vector │ │ │ │ -shapeJacobians; │ │ │ │ -310 _l_o_c_a_l_B_a_s_i_s().evaluateJacobian(_l_o_c_a_l, shapeJacobians); │ │ │ │ -311 assert(shapeJacobians.size() == vertices_.size()); │ │ │ │ -312 │ │ │ │ -313 _J_a_c_o_b_i_a_n out(0); │ │ │ │ -314 for (std::size_t i = 0; i < shapeJacobians.size(); ++i) { │ │ │ │ -315 for (int j = 0; j < Jacobian::rows; ++j) { │ │ │ │ -316 shapeJacobians[i].umtv(vertices_[i][j], out[j]); │ │ │ │ -317 } │ │ │ │ -318 } │ │ │ │ -319 return out; │ │ │ │ -320 } │ │ │ │ -321 │ │ │ │ -_3_2_7 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ -328 { │ │ │ │ -329 return _j_a_c_o_b_i_a_n(_l_o_c_a_l).transposed(); │ │ │ │ -330 } │ │ │ │ -331 │ │ │ │ -_3_3_9 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ -340 { │ │ │ │ -341 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e out; │ │ │ │ -342 MatrixHelper::leftInvA(_j_a_c_o_b_i_a_n(_l_o_c_a_l), out); │ │ │ │ -343 return out; │ │ │ │ -344 } │ │ │ │ -345 │ │ │ │ -_3_5_3 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& │ │ │ │ -_l_o_c_a_l) const │ │ │ │ -354 { │ │ │ │ -355 return _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e(_l_o_c_a_l).transposed(); │ │ │ │ -356 } │ │ │ │ -357 │ │ │ │ -_3_5_9 friend _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t (const _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y& │ │ │ │ -geometry) │ │ │ │ -360 { │ │ │ │ -361 return geometry.refElement_; │ │ │ │ -362 } │ │ │ │ -363 │ │ │ │ -_3_6_5 const LocalFiniteElement& _f_i_n_i_t_e_E_l_e_m_e_n_t () const │ │ │ │ -366 { │ │ │ │ -367 return localFE_; │ │ │ │ -368 } │ │ │ │ -369 │ │ │ │ -_3_7_1 const std::vector& _c_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ -372 { │ │ │ │ -373 return vertices_; │ │ │ │ -374 } │ │ │ │ -375 │ │ │ │ -_3_7_7 const LocalBasis& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ -378 { │ │ │ │ -379 return localFE_.localBasis(); │ │ │ │ -380 } │ │ │ │ -381 │ │ │ │ -382private: │ │ │ │ -383 │ │ │ │ -384 bool affineImpl () const │ │ │ │ -385 { │ │ │ │ -386 if constexpr(_m_y_d_i_m_e_n_s_i_o_n == 0) │ │ │ │ -387 // point geometries are always affine mappings │ │ │ │ -388 return true; │ │ │ │ -389 else { │ │ │ │ -390 if (_o_r_d_e_r() > 1) │ │ │ │ -391 // higher-order parametrizations are by definition not affine │ │ │ │ -392 return false; │ │ │ │ -393 if constexpr(_m_y_d_i_m_e_n_s_i_o_n == 1) │ │ │ │ -394 // linear line geometries are affine mappings │ │ │ │ -395 return true; │ │ │ │ -396 else { │ │ │ │ -397 if (_t_y_p_e().isSimplex()) │ │ │ │ -398 // linear simplex geometries are affine mappings │ │ │ │ -399 return true; │ │ │ │ -400 │ │ │ │ -401 // multi-linear mappings on non-simplex geometries might be affine │ │ │ │ -402 // as well. This is tested explicitly for all vertices by constructing │ │ │ │ -403 // an affine mapping from dim+1 affine-independent corners and evaluating │ │ │ │ -404 // at the other corners. │ │ │ │ -405 auto refSimplex = _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_c_t_y_p_e_,_m_y_d_i_m_e_n_s_i_o_n_>(_G_e_o_m_e_t_r_y_T_y_p_e_s_:_: │ │ │ │ -_s_i_m_p_l_e_x(_m_y_d_i_m_e_n_s_i_o_n)); │ │ │ │ -406 auto simplexIndices = Dune::range(refSimplex.size(_m_y_d_i_m_e_n_s_i_o_n)); │ │ │ │ -407 auto simplexCorners = Dune::transformedRangeView(simplexIndices, │ │ │ │ -408 [&](int i) { return this->_g_l_o_b_a_l(refSimplex.position(i,_m_y_d_i_m_e_n_s_i_o_n)); }); │ │ │ │ -409 AffineGeometry affineGeo │ │ │ │ -(refSimplex,simplexCorners); │ │ │ │ -410 using std::sqrt; │ │ │ │ -411 const _c_t_y_p_e tol = sqrt(std::numeric_limits::epsilon()); │ │ │ │ -412 for (int i = 0; i < _c_o_r_n_e_r_s(); ++i) { │ │ │ │ -413 const auto _c_o_r_n_e_r = refElement_.position(i,_m_y_d_i_m_e_n_s_i_o_n); │ │ │ │ -414 if ((affineGeo.global(_c_o_r_n_e_r) - _g_l_o_b_a_l(_c_o_r_n_e_r)).two_norm() > tol) │ │ │ │ -415 return false; │ │ │ │ -416 } │ │ │ │ -417 return true; │ │ │ │ -418 } │ │ │ │ -419 } │ │ │ │ -420 } │ │ │ │ -421 │ │ │ │ -422private: │ │ │ │ -424 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t refElement_{}; │ │ │ │ -425 │ │ │ │ -427 LocalFiniteElement localFE_{}; │ │ │ │ -428 │ │ │ │ -430 std::vector vertices_{}; │ │ │ │ -431 │ │ │ │ -432 mutable std::optional affine_ = std::nullopt; │ │ │ │ -433}; │ │ │ │ -434 │ │ │ │ -435namespace Impl { │ │ │ │ -436 │ │ │ │ -437// extract the LocalCoordinate type from a LocalFiniteElement │ │ │ │ -438template │ │ │ │ -439using LocalCoordinate_t │ │ │ │ -440 = FieldVector; │ │ │ │ -442 │ │ │ │ -443} // end namespace Impl │ │ │ │ -444 │ │ │ │ -445 │ │ │ │ -446// deduction guides │ │ │ │ -447template │ │ │ │ -_4_4_8_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_I_>, const LFE&, std:: │ │ │ │ -vector) │ │ │ │ -449 -> _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_<_L_F_E_,_ _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e_:_:_d_i_m_e_n_s_i_o_n_>; │ │ │ │ -450 │ │ │ │ -451template >> │ │ │ │ -_4_5_3_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_I_>, const LFE&, const F&) │ │ │ │ -454 -> _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_<_L_F_E_,_ _R_a_n_g_e_:_:_d_i_m_e_n_s_i_o_n_>; │ │ │ │ -455 │ │ │ │ -456template │ │ │ │ -_4_5_7_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_m_e_t_r_y_T_y_p_e, const LFE& localFE, std:: │ │ │ │ -vector) │ │ │ │ -458 -> _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_<_L_F_E_,_ _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e_:_:_d_i_m_e_n_s_i_o_n_>; │ │ │ │ -459 │ │ │ │ -460template >> │ │ │ │ -_4_6_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_m_e_t_r_y_T_y_p_e, const LFE&, const F&) │ │ │ │ -463 -> _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_<_L_F_E_,_ _R_a_n_g_e_:_:_d_i_m_e_n_s_i_o_n_>; │ │ │ │ -464 │ │ │ │ -465} // namespace Dune │ │ │ │ -466 │ │ │ │ -467#endif // DUNE_GEOMETRY_LOCALFINITEELEMENTGEOMETRY_HH │ │ │ │ -_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h │ │ │ │ -_c_o_n_v_e_r_g_e_n_c_e_._h_h │ │ │ │ -_a_l_g_o_r_i_t_h_m_s_._h_h │ │ │ │ -_t_y_p_e_._h_h │ │ │ │ -A unique label for each type of element that can occur in a grid. │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ -_q_u_a_d_r_a_t_u_r_e_r_u_l_e_s_._h_h │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_s_i_m_p_l_e_x │ │ │ │ -constexpr GeometryType simplex(unsigned int dim) │ │ │ │ -Returns a GeometryType representing a simplex of dimension dim. │ │ │ │ -DDeeffiinniittiioonn type.hh:453 │ │ │ │ -_s_t_d │ │ │ │ -STL namespace. │ │ │ │ -_D_u_n_e │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ -LocalFiniteElementGeometry(Geo::ReferenceElement< I >, const LFE &, std:: │ │ │ │ -vector< GlobalCoordinate >) -> LocalFiniteElementGeometry< LFE, │ │ │ │ -GlobalCoordinate::dimension > │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -This class provides access to geometric and topological properties of a │ │ │ │ -reference element. │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:52 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ -Class providing access to the singletons of the reference elements. │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -typename Container::ReferenceElement ReferenceElement │ │ │ │ -The reference element type. │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:146 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ -Geometry implementation based on local-basis function parametrization. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:40 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_t_y_p_e │ │ │ │ -GeometryType type() const │ │ │ │ -Obtain the name of the reference element. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:167 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_V_o_l_u_m_e │ │ │ │ -decltype(power(std::declval< ctype >(), mydimension)) Volume │ │ │ │ -type of volume │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:62 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l │ │ │ │ -LocalCoordinate local(const GlobalCoordinate &y, Impl::GaussNewtonOptions< │ │ │ │ -ctype > opts={}) const │ │ │ │ -Evaluate the inverse coordinate mapping. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:232 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ -LocalFiniteElementGeometry(const ReferenceElement &refElement, const │ │ │ │ -LocalFiniteElement &localFE, std::vector< GlobalCoordinate > vertices) │ │ │ │ -Constructor from a vector of coefficients of the LocalBasis parametrizing the │ │ │ │ -geometry. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:103 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const │ │ │ │ -Obtain the transposed of the Jacobian. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:327 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ -const LocalBasis & localBasis() const │ │ │ │ -The local basis of the stored local finite-element. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:377 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_c_t_y_p_e │ │ │ │ -typename LocalBasisTraits::DomainFieldType ctype │ │ │ │ -coordinate type │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:47 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate │ │ │ │ -&local) const │ │ │ │ -Obtain the transposed of the Jacobian's inverse. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:353 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -friend ReferenceElement referenceElement(const LocalFiniteElementGeometry │ │ │ │ -&geometry) │ │ │ │ -Obtain the reference-element related to this geometry. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:359 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ -LocalFiniteElementGeometry()=default │ │ │ │ -Default constructed geometry results in an empty/invalid representation. │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ -bool affine() const │ │ │ │ -Is this mapping affine? Geometries of order 1 might be affine, but it needs to │ │ │ │ -be checked on non-simp... │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:159 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n │ │ │ │ -Jacobian jacobian(const LocalCoordinate &local) const │ │ │ │ -Obtain the Jacobian. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:307 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ -Volume volume(const QuadratureRule< ctype, mydimension > &quadRule) const │ │ │ │ -Obtain the volume of the mapping's image by given quadrature rules. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:294 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_c_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ -const std::vector< GlobalCoordinate > & coefficients() const │ │ │ │ -Obtain the coefficients of the parametrization. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:371 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ -LocalFiniteElementGeometry(GeometryType gt, Args &&... args) │ │ │ │ -Constructor, forwarding to the other constructors that take a reference- │ │ │ │ -element. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:144 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ -static const int coorddimension │ │ │ │ -coordinate dimension │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:53 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r_s │ │ │ │ -int corners() const │ │ │ │ -Obtain number of corners of the corresponding reference element. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:173 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_c_e_n_t_e_r │ │ │ │ -GlobalCoordinate center() const │ │ │ │ -Obtain the centroid of the mapping's image. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:186 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_f_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ -const LocalFiniteElement & finiteElement() const │ │ │ │ -Obtain the local finite-element. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:365 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ -GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ -Evaluate the coordinate mapping. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:202 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_M_a_t_r_i_x_H_e_l_p_e_r │ │ │ │ -Impl::FieldMatrixHelper< ctype > MatrixHelper │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:82 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -typename ReferenceElements::ReferenceElement ReferenceElement │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:79 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ -GlobalCoordinate corner(int i) const │ │ │ │ -Obtain coordinates of the i-th corner. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:179 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ -Volume volume(Impl::ConvergenceOptions< ctype > opts={}) const │ │ │ │ -Obtain the volume of the mapping's image. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:276 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ -static const int mydimension │ │ │ │ -geometry dimension │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:50 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ -JacobianInverse jacobianInverse(const LocalCoordinate &local) const │ │ │ │ -Obtain the Jacobian's inverse. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:339 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< ctype, coorddimension > GlobalCoordinate │ │ │ │ -type of global coordinates │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:59 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n │ │ │ │ -FieldMatrix< ctype, coorddimension, mydimension > Jacobian │ │ │ │ -type of jacobian │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:65 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed │ │ │ │ -type of jacobian inverse transposed │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:74 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ -Dune::ReferenceElements< ctype, mydimension > ReferenceElements │ │ │ │ -type of reference element │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:78 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ -FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse │ │ │ │ -type of jacobian inverse │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:71 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ -ctype integrationElement(const LocalCoordinate &local) const │ │ │ │ -Obtain the integration element. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:260 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_o_r_d_e_r │ │ │ │ -int order() const │ │ │ │ -Obtain the (highest) polynomial order of the parametrization. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:149 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< ctype, mydimension > LocalCoordinate │ │ │ │ -type of local coordinates │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:56 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed │ │ │ │ -type of jacobian transposed │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:68 │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ -LocalFiniteElementGeometry(const ReferenceElement &refElement, const │ │ │ │ -LocalFiniteElement &localFE, Param &¶metrization) │ │ │ │ -Constructor from a local parametrization function, mapping local to (curved) │ │ │ │ -global coordinates. │ │ │ │ -DDeeffiinniittiioonn localfiniteelementgeometry.hh:128 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e │ │ │ │ -Abstract base class for quadrature rules. │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:214 │ │ │ │ -_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_:_:_r_u_l_e │ │ │ │ -static const QuadratureRule & rule(const GeometryType &t, int p, │ │ │ │ -QuadratureType::Enum qt=QuadratureType::GaussLegendre) │ │ │ │ -select the appropriate QuadratureRule for GeometryType t and order p │ │ │ │ -DDeeffiinniittiioonn quadraturerules.hh:326 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ -Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ -DDeeffiinniittiioonn type.hh:114 │ │ │ │ +250#endif // DUNE_GEOMETRY_REFINEMENT_HH │ │ │ │ +_p_r_i_s_m_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c │ │ │ │ +_b_a_s_e_._c_c │ │ │ │ +This file contains the parts independent of a particular Refinement │ │ │ │ +implementation. │ │ │ │ +_s_i_m_p_l_e_x_._c_c │ │ │ │ +This file contains the Refinement implementation for simplices (triangles, │ │ │ │ +tetrahedrons.... │ │ │ │ +_h_c_u_b_e_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c │ │ │ │ +This file contains the Refinement implementation for triangulating hypercubes │ │ │ │ +(quadrilateral -> trian... │ │ │ │ +_p_y_r_a_m_i_d_t_r_i_a_n_g_u_l_a_t_i_o_n_._c_c │ │ │ │ +_h_c_u_b_e_._c_c │ │ │ │ +This file contains the Refinement implementation for hypercubes │ │ │ │ +(quadrilaterals, hexahedrons,... │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00242.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: generalvertexorder.hh File Reference │ │ │ +dune-geometry: localfiniteelementgeometry.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -75,44 +75,55 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ Functions
│ │ │ -
generalvertexorder.hh File Reference
│ │ │ +
localfiniteelementgeometry.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <algorithm>
│ │ │ -#include <cassert>
│ │ │ -#include <cstddef>
│ │ │ -#include <iterator>
│ │ │ +
#include <cassert>
│ │ │ +#include <functional>
│ │ │ +#include <limits>
│ │ │ +#include <type_traits>
│ │ │ #include <vector>
│ │ │ -#include <dune/common/iteratorfacades.hh>
│ │ │ -#include "type.hh"
│ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ +#include <dune/common/fvector.hh>
│ │ │ +#include <dune/common/math.hh>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ +#include <dune/common/std/type_traits.hh>
│ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ +#include <dune/geometry/type.hh>
│ │ │ +#include <dune/geometry/utility/algorithms.hh>
│ │ │ +#include <dune/geometry/utility/convergence.hh>
│ │ │ +#include <dune/geometry/utility/defaultmatrixhelper.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::GeneralVertexOrder< dim, Index_ >
 Class providing information on the ordering of vertices. More...
class  Dune::GeneralVertexOrder< dim, Index_ >::iterator
 Iterate over the vertex indices of some sub-entity. More...
class  Dune::LocalFiniteElementGeometry< LFE, cdim >
 Geometry implementation based on local-basis function parametrization. More...
│ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

│ │ │ Functions

template<class InIterator, class OutIterator>
void Dune::reduceOrder (const InIterator &inBegin, const InIterator &inEnd, OutIterator outIt)
 Algorithm to reduce vertex order information.
template<class I, class LFE, class GlobalCoordinate>
 Dune::LocalFiniteElementGeometry (Geo::ReferenceElement< I >, const LFE &, std::vector< GlobalCoordinate >) -> LocalFiniteElementGeometry< LFE, GlobalCoordinate::dimension >
template<class I, class LFE, class F, class Range = std::invoke_result_t<F,Impl::LocalCoordinate_t<LFE>>>
 Dune::LocalFiniteElementGeometry (Geo::ReferenceElement< I >, const LFE &, const F &) -> LocalFiniteElementGeometry< LFE, Range::dimension >
template<class LFE, class GlobalCoordinate>
 Dune::LocalFiniteElementGeometry (GeometryType, const LFE &localFE, std::vector< GlobalCoordinate >) -> LocalFiniteElementGeometry< LFE, GlobalCoordinate::dimension >
template<class LFE, class F, class Range = std::invoke_result_t<F,Impl::LocalCoordinate_t<LFE>>>
 Dune::LocalFiniteElementGeometry (GeometryType, const LFE &, const F &) -> LocalFiniteElementGeometry< LFE, Range::dimension >
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,31 +1,50 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -generalvertexorder.hh File Reference │ │ │ │ -#include │ │ │ │ +localfiniteelementgeometry.hh File Reference │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include "_t_y_p_e_._h_h" │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_q_u_a_d_r_a_t_u_r_e_r_u_l_e_s_._h_h> │ │ │ │ #include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_a_l_g_o_r_i_t_h_m_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_c_o_n_v_e_r_g_e_n_c_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_<_ _d_i_m_,_ _I_n_d_e_x___ _> │ │ │ │ -  Class providing information on the ordering of vertices. _M_o_r_e_._._. │ │ │ │ -class   _D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_<_ _d_i_m_,_ _I_n_d_e_x___ _>_:_:_i_t_e_r_a_t_o_r │ │ │ │ -  Iterate over the vertex indices of some sub-entity. _M_o_r_e_._._. │ │ │ │ +class   _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_<_ _L_F_E_,_ _c_d_i_m_ _> │ │ │ │ +  Geometry implementation based on local-basis function parametrization. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -void  _D_u_n_e_:_:_r_e_d_u_c_e_O_r_d_e_r (const InIterator &inBegin, const InIterator &inEnd, │ │ │ │ - OutIterator outIt) │ │ │ │ -  Algorithm to reduce vertex order information. │ │ │ │ +template │ │ │ │ +  _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t< I >, const LFE &, │ │ │ │ + std::vector< GlobalCoordinate >) -> LocalFiniteElementGeometry< LFE, │ │ │ │ + GlobalCoordinate::dimension > │ │ │ │ +template>> │ │ │ │ +  _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t< I >, const LFE &, │ │ │ │ + const F &) -> LocalFiniteElementGeometry< LFE, Range::dimension > │ │ │ │ +template │ │ │ │ +  _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_m_e_t_r_y_T_y_p_e, const LFE &localFE, std:: │ │ │ │ + vector< GlobalCoordinate >) -> LocalFiniteElementGeometry< LFE, │ │ │ │ + GlobalCoordinate::dimension > │ │ │ │ +template>> │ │ │ │ +  _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_m_e_t_r_y_T_y_p_e, const LFE &, const F &) - │ │ │ │ + > LocalFiniteElementGeometry< LFE, Range::dimension > │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00242_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: generalvertexorder.hh Source File │ │ │ +dune-geometry: localfiniteelementgeometry.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,186 +71,436 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
generalvertexorder.hh
│ │ │ +
localfiniteelementgeometry.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © 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_GEOMETRY_GENERALVERTEXORDER_HH
│ │ │ -
7#define DUNE_GEOMETRY_GENERALVERTEXORDER_HH
│ │ │ -
8
│ │ │ -
9#include <algorithm>
│ │ │ -
10#include <cassert>
│ │ │ -
11#include <cstddef>
│ │ │ -
12#include <iterator>
│ │ │ -
13#include <vector>
│ │ │ -
14
│ │ │ -
15#include <dune/common/iteratorfacades.hh>
│ │ │ -
16
│ │ │ -
17#include "type.hh"
│ │ │ - │ │ │ +
5#ifndef DUNE_GEOMETRY_LOCALFINITEELEMENTGEOMETRY_HH
│ │ │ +
6#define DUNE_GEOMETRY_LOCALFINITEELEMENTGEOMETRY_HH
│ │ │ +
7
│ │ │ +
8#include <cassert>
│ │ │ +
9#include <functional>
│ │ │ +
10#include <limits>
│ │ │ +
11#include <type_traits>
│ │ │ +
12#include <vector>
│ │ │ +
13
│ │ │ +
14#include <dune/common/fmatrix.hh>
│ │ │ +
15#include <dune/common/fvector.hh>
│ │ │ +
16#include <dune/common/math.hh>
│ │ │ +
17#include <dune/common/typetraits.hh>
│ │ │ +
18#include <dune/common/std/type_traits.hh>
│ │ │
19
│ │ │ -
20namespace Dune {
│ │ │ -
21
│ │ │ -
39 template<class InIterator, class OutIterator>
│ │ │ -
│ │ │ -
40 void reduceOrder(const InIterator& inBegin, const InIterator& inEnd,
│ │ │ -
41 OutIterator outIt)
│ │ │ -
42 {
│ │ │ -
43 for(InIterator inIt = inBegin; inIt != inEnd; ++inIt, ++outIt)
│ │ │ -
44 *outIt = std::count_if(inBegin, inEnd, [&](const auto& v)
│ │ │ -
45 {
│ │ │ -
46 return v < *inIt;
│ │ │ -
47 });
│ │ │ -
48 }
│ │ │ -
│ │ │ -
49
│ │ │ + │ │ │ + │ │ │ +
22#include <dune/geometry/type.hh>
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
26
│ │ │ +
27namespace Dune {
│ │ │ +
28
│ │ │ +
38template <class LFE, int cdim>
│ │ │ +
│ │ │ + │ │ │ +
40{
│ │ │ +
41 using LocalFiniteElement = LFE;
│ │ │ +
42 using LocalBasis = typename LFE::Traits::LocalBasisType;
│ │ │ +
43 using LocalBasisTraits = typename LocalBasis::Traits;
│ │ │ +
44
│ │ │ +
45public:
│ │ │ +
47 using ctype = typename LocalBasisTraits::DomainFieldType;
│ │ │ +
48
│ │ │ +
50 static const int mydimension = LocalBasisTraits::dimDomain;
│ │ │
51
│ │ │ -
66 template<std::size_t dim, class Index_ = std::size_t>
│ │ │ -
│ │ │ - │ │ │ -
68 typedef ReferenceElements<double, dim> RefElems;
│ │ │ -
69 typedef typename RefElems::ReferenceElement RefElem;
│ │ │ -
70
│ │ │ -
71 RefElem refelem;
│ │ │ -
72 GeometryType gt;
│ │ │ -
73 std::vector<Index_> vertexOrder;
│ │ │ -
74
│ │ │ -
75 public:
│ │ │ -
77 typedef Index_ Index;
│ │ │ -
78
│ │ │ -
80 class iterator;
│ │ │ -
81
│ │ │ -
83 static const std::size_t dimension = dim;
│ │ │ -
85 const GeometryType &type() const { return gt; }
│ │ │ -
86
│ │ │ -
88
│ │ │ -
96 template<class InIterator>
│ │ │ -
│ │ │ -
97 GeneralVertexOrder(const GeometryType& gt_, const InIterator &inBegin,
│ │ │ -
98 const InIterator &inEnd) :
│ │ │ -
99 refelem(RefElems::general(gt_)), gt(gt_),
│ │ │ -
100 vertexOrder(refelem.size(dim))
│ │ │ -
101 { reduceOrder(inBegin, inEnd, vertexOrder.begin()); }
│ │ │ -
│ │ │ -
102
│ │ │ -
104
│ │ │ -
│ │ │ -
108 iterator begin(std::size_t codim, std::size_t subEntity) const
│ │ │ -
109 { return iterator(*this, codim, subEntity); }
│ │ │ -
│ │ │ -
110
│ │ │ -
111
│ │ │ -
│ │ │ -
115 iterator end(std::size_t codim, std::size_t subEntity) const {
│ │ │ -
116 return iterator(*this, codim, subEntity,
│ │ │ -
117 refelem.size(subEntity, codim, dim));
│ │ │ -
118 }
│ │ │ -
│ │ │ -
119
│ │ │ -
121
│ │ │ +
53 static const int coorddimension = cdim;
│ │ │ +
54
│ │ │ +
56 using LocalCoordinate = FieldVector<ctype, mydimension>;
│ │ │ +
57
│ │ │ +
59 using GlobalCoordinate = FieldVector<ctype, coorddimension>;
│ │ │ +
60
│ │ │ +
62 using Volume = decltype(power(std::declval<ctype>(),mydimension));
│ │ │ +
63
│ │ │ +
65 using Jacobian = FieldMatrix<ctype, coorddimension, mydimension>;
│ │ │ +
66
│ │ │ +
68 using JacobianTransposed = FieldMatrix<ctype, mydimension, coorddimension>;
│ │ │ +
69
│ │ │ +
71 using JacobianInverse = FieldMatrix<ctype, mydimension, coorddimension>;
│ │ │ +
72
│ │ │ +
74 using JacobianInverseTransposed = FieldMatrix<ctype, coorddimension, mydimension>;
│ │ │ +
75
│ │ │ +
76public:
│ │ │ + │ │ │ + │ │ │ +
80
│ │ │ +
81protected:
│ │ │ +
82 using MatrixHelper = Impl::FieldMatrixHelper<ctype>;
│ │ │ +
83
│ │ │ +
84public:
│ │ │ + │ │ │ +
87
│ │ │ +
│ │ │ + │ │ │ +
104 const LocalFiniteElement& localFE,
│ │ │ +
105 std::vector<GlobalCoordinate> vertices)
│ │ │ +
106 : refElement_(refElement)
│ │ │ +
107 , localFE_(localFE)
│ │ │ +
108 , vertices_(std::move(vertices))
│ │ │ +
109 {
│ │ │ +
110 assert(localFE_.size() == vertices_.size());
│ │ │ +
111 }
│ │ │ +
│ │ │ +
112
│ │ │ +
126 template <class Param,
│ │ │ +
127 std::enable_if_t<std::is_invocable_r_v<GlobalCoordinate,Param,LocalCoordinate>, int> = 0>
│ │ │
│ │ │ -
128 void getReduced(std::size_t codim, std::size_t subEntity,
│ │ │ -
129 std::vector<Index>& order) const
│ │ │ -
130 {
│ │ │ -
131 order.resize(refelem.size(subEntity, codim, dim));
│ │ │ -
132 reduceOrder(begin(codim, subEntity), end(codim, subEntity),
│ │ │ -
133 order.begin());
│ │ │ -
134 }
│ │ │ -
│ │ │ -
135 };
│ │ │ + │ │ │ +
129 const LocalFiniteElement& localFE,
│ │ │ +
130 Param&& parametrization)
│ │ │ +
131 : refElement_(refElement)
│ │ │ +
132 , localFE_(localFE)
│ │ │ +
133 {
│ │ │ +
134 localFE_.localInterpolation().interpolate(parametrization, vertices_);
│ │ │ +
135 }
│ │ │
│ │ │
136
│ │ │ -
138
│ │ │ -
141 template<std::size_t dim, class Index_>
│ │ │ -
│ │ │ -
142 class GeneralVertexOrder<dim, Index_>::iterator :
│ │ │ -
143 public Dune::RandomAccessIteratorFacade<iterator, const Index_>
│ │ │ -
144 {
│ │ │ -
145 const GeneralVertexOrder *order;
│ │ │ -
146 std::size_t codim;
│ │ │ -
147 std::size_t subEntity;
│ │ │ -
148 std::size_t vertex;
│ │ │ -
149
│ │ │ -
150 iterator(const GeneralVertexOrder &order_, std::size_t codim_,
│ │ │ -
151 std::size_t subEntity_, std::size_t vertex_ = 0) :
│ │ │ -
152 order(&order_), codim(codim_), subEntity(subEntity_), vertex(vertex_)
│ │ │ -
153 { }
│ │ │ -
154
│ │ │ -
155 public:
│ │ │ -
│ │ │ -
156 const Index &dereference() const {
│ │ │ -
157 return order->vertexOrder[order->refelem.subEntity(subEntity, codim,
│ │ │ -
158 vertex, dim)];
│ │ │ -
159 }
│ │ │ -
│ │ │ -
│ │ │ -
160 const Index &elementAt(std::ptrdiff_t n) const {
│ │ │ -
161 return order->vertexOrder[order->refelem.subEntity(subEntity, codim,
│ │ │ -
162 vertex+n, dim)];
│ │ │ -
163 }
│ │ │ -
│ │ │ -
│ │ │ -
164 bool equals(const iterator &other) const {
│ │ │ -
165 return order == other.order && codim == other.codim &&
│ │ │ -
166 subEntity == other.subEntity && vertex == other.vertex;
│ │ │ -
167 }
│ │ │ -
│ │ │ -
168 void increment() { ++vertex; }
│ │ │ -
169 void decrement() { --vertex; }
│ │ │ -
170 void advance(std::ptrdiff_t n) { vertex += n; }
│ │ │ -
│ │ │ -
171 std::ptrdiff_t distanceTo(const iterator &other) const {
│ │ │ -
172 // make sure we reference the same container
│ │ │ -
173 assert(order == other.order && codim == other.codim &&
│ │ │ -
174 subEntity == other.subEntity);
│ │ │ -
175 if(vertex < other.vertex) return other.vertex - vertex;
│ │ │ -
176 else return -static_cast<std::ptrdiff_t>(vertex - other.vertex);
│ │ │ -
177 }
│ │ │ -
│ │ │ -
178
│ │ │ -
179 friend class GeneralVertexOrder<dim, Index>;
│ │ │ -
180
│ │ │ -
182
│ │ │ - │ │ │ -
188 };
│ │ │ -
│ │ │ -
189} // namespace Dune
│ │ │ -
190
│ │ │ -
191#endif // DUNE_GEOMETRY_GENERALVERTEXORDER_HH
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ - │ │ │ +
143 template <class... Args>
│ │ │ +
│ │ │ +
144 explicit LocalFiniteElementGeometry (GeometryType gt, Args&&... args)
│ │ │ +
145 : LocalFiniteElementGeometry(ReferenceElements::general(gt), std::forward<Args>(args)...)
│ │ │ +
146 {}
│ │ │ +
│ │ │ +
147
│ │ │ +
│ │ │ +
149 int order () const
│ │ │ +
150 {
│ │ │ +
151 return localBasis().order();
│ │ │ +
152 }
│ │ │ +
│ │ │ +
153
│ │ │ +
│ │ │ +
159 bool affine () const
│ │ │ +
160 {
│ │ │ +
161 if (!affine_)
│ │ │ +
162 affine_.emplace(affineImpl());
│ │ │ +
163 return *affine_;
│ │ │ +
164 }
│ │ │ +
│ │ │ +
165
│ │ │ +
│ │ │ + │ │ │ +
168 {
│ │ │ +
169 return refElement_.type();
│ │ │ +
170 }
│ │ │ +
│ │ │ +
171
│ │ │ +
│ │ │ +
173 int corners () const
│ │ │ +
174 {
│ │ │ +
175 return refElement_.size(mydimension);
│ │ │ +
176 }
│ │ │ +
│ │ │ +
177
│ │ │ +
│ │ │ + │ │ │ +
180 {
│ │ │ +
181 assert( (i >= 0) && (i < corners()) );
│ │ │ +
182 return global(refElement_.position(i, mydimension));
│ │ │ +
183 }
│ │ │ +
│ │ │ +
184
│ │ │ +
│ │ │ + │ │ │ +
187 {
│ │ │ +
188 return global(refElement_.position(0, 0));
│ │ │ +
189 }
│ │ │ +
│ │ │ +
190
│ │ │ +
│ │ │ + │ │ │ +
203 {
│ │ │ +
204 thread_local std::vector<typename LocalBasisTraits::RangeType> shapeValues;
│ │ │ +
205 localBasis().evaluateFunction(local, shapeValues);
│ │ │ +
206 assert(shapeValues.size() == vertices_.size());
│ │ │ +
207
│ │ │ +
208 GlobalCoordinate out(0);
│ │ │ +
209 for (std::size_t i = 0; i < shapeValues.size(); ++i)
│ │ │ +
210 out.axpy(shapeValues[i], vertices_[i]);
│ │ │ +
211
│ │ │ +
212 return out;
│ │ │ +
213 }
│ │ │ +
│ │ │ +
214
│ │ │ +
│ │ │ +
232 LocalCoordinate local (const GlobalCoordinate& y, Impl::GaussNewtonOptions<ctype> opts = {}) const
│ │ │ +
233 {
│ │ │ +
234 LocalCoordinate x = refElement_.position(0,0);
│ │ │ +
235 Impl::GaussNewtonErrorCode err = Impl::gaussNewton(
│ │ │ +
236 [&](const LocalCoordinate& local) { return this->global(local); },
│ │ │ +
237 [&](const LocalCoordinate& local) { return this->jacobianTransposed(local); },
│ │ │ +
238 y, x, opts
│ │ │ +
239 );
│ │ │ +
240
│ │ │ +
241 if (err != Impl::GaussNewtonErrorCode::OK)
│ │ │ +
242 DUNE_THROW(Dune::Exception,
│ │ │ +
243 "Local coordinate can not be recovered from global coordinate, error code = " << int(err) << "\n"
│ │ │ +
244 << " (global(x) - y).two_norm() = " << (global(x) - y).two_norm()
│ │ │ +
245 << " > tol = " << opts.absTol);
│ │ │ +
246
│ │ │ +
247 return x;
│ │ │ +
248 }
│ │ │ +
│ │ │ +
249
│ │ │ +
│ │ │ + │ │ │ +
261 {
│ │ │ +
262 return MatrixHelper::sqrtDetAAT(jacobianTransposed(local));
│ │ │ +
263 }
│ │ │ +
│ │ │ +
264
│ │ │ +
│ │ │ +
276 Volume volume (Impl::ConvergenceOptions<ctype> opts = {}) const
│ │ │ +
277 {
│ │ │ + │ │ │ +
279 if (affine())
│ │ │ +
280 return vol0;
│ │ │ +
281
│ │ │ +
282 using std::abs;
│ │ │ +
283 for (int p = 2; p < opts.maxIt; ++p) {
│ │ │ + │ │ │ +
285 if (abs(vol1 - vol0) < opts.absTol)
│ │ │ +
286 return vol1;
│ │ │ +
287
│ │ │ +
288 vol0 = vol1;
│ │ │ +
289 }
│ │ │ +
290 return vol0;
│ │ │ +
291 }
│ │ │ +
│ │ │ +
292
│ │ │ +
│ │ │ + │ │ │ +
295 {
│ │ │ +
296 Volume vol(0);
│ │ │ +
297 for (const auto& qp : quadRule)
│ │ │ +
298 vol += integrationElement(qp.position()) * qp.weight();
│ │ │ +
299 return vol;
│ │ │ +
300 }
│ │ │ +
│ │ │ +
301
│ │ │ +
│ │ │ + │ │ │ +
308 {
│ │ │ +
309 thread_local std::vector<typename LocalBasisTraits::JacobianType> shapeJacobians;
│ │ │ +
310 localBasis().evaluateJacobian(local, shapeJacobians);
│ │ │ +
311 assert(shapeJacobians.size() == vertices_.size());
│ │ │ +
312
│ │ │ +
313 Jacobian out(0);
│ │ │ +
314 for (std::size_t i = 0; i < shapeJacobians.size(); ++i) {
│ │ │ +
315 for (int j = 0; j < Jacobian::rows; ++j) {
│ │ │ +
316 shapeJacobians[i].umtv(vertices_[i][j], out[j]);
│ │ │ +
317 }
│ │ │ +
318 }
│ │ │ +
319 return out;
│ │ │ +
320 }
│ │ │ +
│ │ │ +
321
│ │ │ +
│ │ │ + │ │ │ +
328 {
│ │ │ +
329 return jacobian(local).transposed();
│ │ │ +
330 }
│ │ │ +
│ │ │ +
331
│ │ │ +
│ │ │ + │ │ │ +
340 {
│ │ │ +
341 JacobianInverse out;
│ │ │ +
342 MatrixHelper::leftInvA(jacobian(local), out);
│ │ │ +
343 return out;
│ │ │ +
344 }
│ │ │ +
│ │ │ +
345
│ │ │ +
│ │ │ + │ │ │ +
354 {
│ │ │ +
355 return jacobianInverse(local).transposed();
│ │ │ +
356 }
│ │ │ +
│ │ │ +
357
│ │ │ +
│ │ │ + │ │ │ +
360 {
│ │ │ +
361 return geometry.refElement_;
│ │ │ +
362 }
│ │ │ +
│ │ │ +
363
│ │ │ +
│ │ │ +
365 const LocalFiniteElement& finiteElement () const
│ │ │ +
366 {
│ │ │ +
367 return localFE_;
│ │ │ +
368 }
│ │ │ +
│ │ │ +
369
│ │ │ +
│ │ │ +
371 const std::vector<GlobalCoordinate>& coefficients () const
│ │ │ +
372 {
│ │ │ +
373 return vertices_;
│ │ │ +
374 }
│ │ │ +
│ │ │ +
375
│ │ │ +
│ │ │ +
377 const LocalBasis& localBasis () const
│ │ │ +
378 {
│ │ │ +
379 return localFE_.localBasis();
│ │ │ +
380 }
│ │ │ +
│ │ │ +
381
│ │ │ +
382private:
│ │ │ +
383
│ │ │ +
384 bool affineImpl () const
│ │ │ +
385 {
│ │ │ +
386 if constexpr(mydimension == 0)
│ │ │ +
387 // point geometries are always affine mappings
│ │ │ +
388 return true;
│ │ │ +
389 else {
│ │ │ +
390 if (order() > 1)
│ │ │ +
391 // higher-order parametrizations are by definition not affine
│ │ │ +
392 return false;
│ │ │ +
393 if constexpr(mydimension == 1)
│ │ │ +
394 // linear line geometries are affine mappings
│ │ │ +
395 return true;
│ │ │ +
396 else {
│ │ │ +
397 if (type().isSimplex())
│ │ │ +
398 // linear simplex geometries are affine mappings
│ │ │ +
399 return true;
│ │ │ +
400
│ │ │ +
401 // multi-linear mappings on non-simplex geometries might be affine
│ │ │ +
402 // as well. This is tested explicitly for all vertices by constructing
│ │ │ +
403 // an affine mapping from dim+1 affine-independent corners and evaluating
│ │ │ +
404 // at the other corners.
│ │ │ + │ │ │ +
406 auto simplexIndices = Dune::range(refSimplex.size(mydimension));
│ │ │ +
407 auto simplexCorners = Dune::transformedRangeView(simplexIndices,
│ │ │ +
408 [&](int i) { return this->global(refSimplex.position(i,mydimension)); });
│ │ │ +
409 AffineGeometry<ctype,mydimension,coorddimension> affineGeo(refSimplex,simplexCorners);
│ │ │ +
410 using std::sqrt;
│ │ │ +
411 const ctype tol = sqrt(std::numeric_limits<ctype>::epsilon());
│ │ │ +
412 for (int i = 0; i < corners(); ++i) {
│ │ │ +
413 const auto corner = refElement_.position(i,mydimension);
│ │ │ +
414 if ((affineGeo.global(corner) - global(corner)).two_norm() > tol)
│ │ │ +
415 return false;
│ │ │ +
416 }
│ │ │ +
417 return true;
│ │ │ +
418 }
│ │ │ +
419 }
│ │ │ +
420 }
│ │ │ +
421
│ │ │ +
422private:
│ │ │ +
424 ReferenceElement refElement_{};
│ │ │ +
425
│ │ │ +
427 LocalFiniteElement localFE_{};
│ │ │ +
428
│ │ │ +
430 std::vector<GlobalCoordinate> vertices_{};
│ │ │ +
431
│ │ │ +
432 mutable std::optional<bool> affine_ = std::nullopt;
│ │ │ +
433};
│ │ │ +
│ │ │ +
434
│ │ │ +
435namespace Impl {
│ │ │ +
436
│ │ │ +
437// extract the LocalCoordinate type from a LocalFiniteElement
│ │ │ +
438template <class LFE>
│ │ │ +
439using LocalCoordinate_t
│ │ │ +
440 = FieldVector<typename LFE::Traits::LocalBasisType::Traits::DomainFieldType,
│ │ │ +
441 LFE::Traits::LocalBasisType::Traits::dimDomain>;
│ │ │ +
442
│ │ │ +
443} // end namespace Impl
│ │ │ +
444
│ │ │ +
445
│ │ │ +
446// deduction guides
│ │ │ +
447template <class I, class LFE, class GlobalCoordinate>
│ │ │ +
448LocalFiniteElementGeometry (Geo::ReferenceElement<I>, const LFE&, std::vector<GlobalCoordinate>)
│ │ │ + │ │ │ +
450
│ │ │ +
451template <class I, class LFE, class F,
│ │ │ +
452 class Range = std::invoke_result_t<F,Impl::LocalCoordinate_t<LFE>>>
│ │ │ + │ │ │ + │ │ │ +
455
│ │ │ +
456template <class LFE, class GlobalCoordinate>
│ │ │ +
457LocalFiniteElementGeometry (GeometryType, const LFE& localFE, std::vector<GlobalCoordinate>)
│ │ │ + │ │ │ +
459
│ │ │ +
460template <class LFE, class F,
│ │ │ +
461 class Range = std::invoke_result_t<F,Impl::LocalCoordinate_t<LFE>>>
│ │ │ + │ │ │ + │ │ │ +
464
│ │ │ +
465} // namespace Dune
│ │ │ +
466
│ │ │ +
467#endif // DUNE_GEOMETRY_LOCALFINITEELEMENTGEOMETRY_HH
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition type.hh:453
│ │ │ +
STL namespace.
│ │ │
Definition affinegeometry.hh:22
│ │ │ -
void reduceOrder(const InIterator &inBegin, const InIterator &inEnd, OutIterator outIt)
Algorithm to reduce vertex order information.
Definition generalvertexorder.hh:40
│ │ │ +
LocalFiniteElementGeometry(Geo::ReferenceElement< I >, const LFE &, std::vector< GlobalCoordinate >) -> LocalFiniteElementGeometry< LFE, GlobalCoordinate::dimension >
│ │ │ +
This class provides access to geometric and topological properties of a reference element.
Definition referenceelement.hh:52
│ │ │
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:146
│ │ │ -
Index_ Index
Type of indices.
Definition generalvertexorder.hh:77
│ │ │ -
const GeometryType & type() const
get type of the entity's geometry
Definition generalvertexorder.hh:85
│ │ │ -
static const std::size_t dimension
export the dimension of the entity we provide information for
Definition generalvertexorder.hh:83
│ │ │ -
void getReduced(std::size_t codim, std::size_t subEntity, std::vector< Index > &order) const
get a vector of reduced indices for some sub-entity
Definition generalvertexorder.hh:128
│ │ │ -
iterator end(std::size_t codim, std::size_t subEntity) const
get end iterator for the vertex indices of some sub-entity
Definition generalvertexorder.hh:115
│ │ │ -
GeneralVertexOrder(const GeometryType &gt_, const InIterator &inBegin, const InIterator &inEnd)
construct a GeneralVertexOrder
Definition generalvertexorder.hh:97
│ │ │ -
iterator begin(std::size_t codim, std::size_t subEntity) const
get begin iterator for the vertex indices of some sub-entity
Definition generalvertexorder.hh:108
│ │ │ -
Iterate over the vertex indices of some sub-entity.
Definition generalvertexorder.hh:144
│ │ │ -
iterator()
public default constructor
Definition generalvertexorder.hh:187
│ │ │ -
void decrement()
Definition generalvertexorder.hh:169
│ │ │ -
void advance(std::ptrdiff_t n)
Definition generalvertexorder.hh:170
│ │ │ -
const Index & dereference() const
Definition generalvertexorder.hh:156
│ │ │ -
void increment()
Definition generalvertexorder.hh:168
│ │ │ -
bool equals(const iterator &other) const
Definition generalvertexorder.hh:164
│ │ │ -
std::ptrdiff_t distanceTo(const iterator &other) const
Definition generalvertexorder.hh:171
│ │ │ -
const Index & elementAt(std::ptrdiff_t n) const
Definition generalvertexorder.hh:160
│ │ │ +
Geometry implementation based on local-basis function parametrization.
Definition localfiniteelementgeometry.hh:40
│ │ │ +
GeometryType type() const
Obtain the name of the reference element.
Definition localfiniteelementgeometry.hh:167
│ │ │ +
decltype(power(std::declval< ctype >(), mydimension)) Volume
type of volume
Definition localfiniteelementgeometry.hh:62
│ │ │ +
LocalCoordinate local(const GlobalCoordinate &y, Impl::GaussNewtonOptions< ctype > opts={}) const
Evaluate the inverse coordinate mapping.
Definition localfiniteelementgeometry.hh:232
│ │ │ +
LocalFiniteElementGeometry(const ReferenceElement &refElement, const LocalFiniteElement &localFE, std::vector< GlobalCoordinate > vertices)
Constructor from a vector of coefficients of the LocalBasis parametrizing the geometry.
Definition localfiniteelementgeometry.hh:103
│ │ │ +
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian.
Definition localfiniteelementgeometry.hh:327
│ │ │ +
const LocalBasis & localBasis() const
The local basis of the stored local finite-element.
Definition localfiniteelementgeometry.hh:377
│ │ │ +
typename LocalBasisTraits::DomainFieldType ctype
coordinate type
Definition localfiniteelementgeometry.hh:47
│ │ │ +
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian's inverse.
Definition localfiniteelementgeometry.hh:353
│ │ │ +
friend ReferenceElement referenceElement(const LocalFiniteElementGeometry &geometry)
Obtain the reference-element related to this geometry.
Definition localfiniteelementgeometry.hh:359
│ │ │ +
LocalFiniteElementGeometry()=default
Default constructed geometry results in an empty/invalid representation.
│ │ │ +
bool affine() const
Is this mapping affine? Geometries of order 1 might be affine, but it needs to be checked on non-simp...
Definition localfiniteelementgeometry.hh:159
│ │ │ +
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition localfiniteelementgeometry.hh:307
│ │ │ +
Volume volume(const QuadratureRule< ctype, mydimension > &quadRule) const
Obtain the volume of the mapping's image by given quadrature rules.
Definition localfiniteelementgeometry.hh:294
│ │ │ +
const std::vector< GlobalCoordinate > & coefficients() const
Obtain the coefficients of the parametrization.
Definition localfiniteelementgeometry.hh:371
│ │ │ +
LocalFiniteElementGeometry(GeometryType gt, Args &&... args)
Constructor, forwarding to the other constructors that take a reference-element.
Definition localfiniteelementgeometry.hh:144
│ │ │ +
static const int coorddimension
coordinate dimension
Definition localfiniteelementgeometry.hh:53
│ │ │ +
int corners() const
Obtain number of corners of the corresponding reference element.
Definition localfiniteelementgeometry.hh:173
│ │ │ +
GlobalCoordinate center() const
Obtain the centroid of the mapping's image.
Definition localfiniteelementgeometry.hh:186
│ │ │ +
const LocalFiniteElement & finiteElement() const
Obtain the local finite-element.
Definition localfiniteelementgeometry.hh:365
│ │ │ +
GlobalCoordinate global(const LocalCoordinate &local) const
Evaluate the coordinate mapping.
Definition localfiniteelementgeometry.hh:202
│ │ │ +
Impl::FieldMatrixHelper< ctype > MatrixHelper
Definition localfiniteelementgeometry.hh:82
│ │ │ +
typename ReferenceElements::ReferenceElement ReferenceElement
Definition localfiniteelementgeometry.hh:79
│ │ │ +
GlobalCoordinate corner(int i) const
Obtain coordinates of the i-th corner.
Definition localfiniteelementgeometry.hh:179
│ │ │ +
Volume volume(Impl::ConvergenceOptions< ctype > opts={}) const
Obtain the volume of the mapping's image.
Definition localfiniteelementgeometry.hh:276
│ │ │ +
static const int mydimension
geometry dimension
Definition localfiniteelementgeometry.hh:50
│ │ │ +
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition localfiniteelementgeometry.hh:339
│ │ │ +
FieldVector< ctype, coorddimension > GlobalCoordinate
type of global coordinates
Definition localfiniteelementgeometry.hh:59
│ │ │ +
FieldMatrix< ctype, coorddimension, mydimension > Jacobian
type of jacobian
Definition localfiniteelementgeometry.hh:65
│ │ │ +
FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed
type of jacobian inverse transposed
Definition localfiniteelementgeometry.hh:74
│ │ │ +
Dune::ReferenceElements< ctype, mydimension > ReferenceElements
type of reference element
Definition localfiniteelementgeometry.hh:78
│ │ │ +
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
type of jacobian inverse
Definition localfiniteelementgeometry.hh:71
│ │ │ +
ctype integrationElement(const LocalCoordinate &local) const
Obtain the integration element.
Definition localfiniteelementgeometry.hh:260
│ │ │ +
int order() const
Obtain the (highest) polynomial order of the parametrization.
Definition localfiniteelementgeometry.hh:149
│ │ │ +
FieldVector< ctype, mydimension > LocalCoordinate
type of local coordinates
Definition localfiniteelementgeometry.hh:56
│ │ │ +
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
type of jacobian transposed
Definition localfiniteelementgeometry.hh:68
│ │ │ +
LocalFiniteElementGeometry(const ReferenceElement &refElement, const LocalFiniteElement &localFE, Param &&parametrization)
Constructor from a local parametrization function, mapping local to (curved) global coordinates.
Definition localfiniteelementgeometry.hh:128
│ │ │ +
Abstract base class for quadrature rules.
Definition quadraturerules.hh:214
│ │ │ +
static const QuadratureRule & rule(const GeometryType &t, int p, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
select the appropriate QuadratureRule for GeometryType t and order p
Definition quadraturerules.hh:326
│ │ │
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,214 +1,540 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -generalvertexorder.hh │ │ │ │ +localfiniteelementgeometry.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © 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_GEOMETRY_GENERALVERTEXORDER_HH │ │ │ │ -7#define DUNE_GEOMETRY_GENERALVERTEXORDER_HH │ │ │ │ -8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ -13#include │ │ │ │ -14 │ │ │ │ -15#include │ │ │ │ -16 │ │ │ │ -17#include "_t_y_p_e_._h_h" │ │ │ │ -18#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +5#ifndef DUNE_GEOMETRY_LOCALFINITEELEMENTGEOMETRY_HH │ │ │ │ +6#define DUNE_GEOMETRY_LOCALFINITEELEMENTGEOMETRY_HH │ │ │ │ +7 │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13 │ │ │ │ +14#include │ │ │ │ +15#include │ │ │ │ +16#include │ │ │ │ +17#include │ │ │ │ +18#include │ │ │ │ 19 │ │ │ │ -20namespace _D_u_n_e { │ │ │ │ -21 │ │ │ │ -39 template │ │ │ │ -_4_0 void _r_e_d_u_c_e_O_r_d_e_r(const InIterator& inBegin, const InIterator& inEnd, │ │ │ │ -41 OutIterator outIt) │ │ │ │ -42 { │ │ │ │ -43 for(InIterator inIt = inBegin; inIt != inEnd; ++inIt, ++outIt) │ │ │ │ -44 *outIt = std::count_if(inBegin, inEnd, [&](const auto& v) │ │ │ │ -45 { │ │ │ │ -46 return v < *inIt; │ │ │ │ -47 }); │ │ │ │ -48 } │ │ │ │ -49 │ │ │ │ +20#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_q_u_a_d_r_a_t_u_r_e_r_u_l_e_s_._h_h> │ │ │ │ +21#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +22#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +23#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_a_l_g_o_r_i_t_h_m_s_._h_h> │ │ │ │ +24#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_c_o_n_v_e_r_g_e_n_c_e_._h_h> │ │ │ │ +25#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ +26 │ │ │ │ +27namespace _D_u_n_e { │ │ │ │ +28 │ │ │ │ +38template │ │ │ │ +_3_9class _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ +40{ │ │ │ │ +41 using LocalFiniteElement = LFE; │ │ │ │ +42 using LocalBasis = typename LFE::Traits::LocalBasisType; │ │ │ │ +43 using LocalBasisTraits = typename LocalBasis::Traits; │ │ │ │ +44 │ │ │ │ +45public: │ │ │ │ +_4_7 using _c_t_y_p_e = typename LocalBasisTraits::DomainFieldType; │ │ │ │ +48 │ │ │ │ +_5_0 static const int _m_y_d_i_m_e_n_s_i_o_n = LocalBasisTraits::dimDomain; │ │ │ │ 51 │ │ │ │ -66 template │ │ │ │ -_6_7 class _G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r { │ │ │ │ -68 typedef _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_d_o_u_b_l_e_,_ _d_i_m_> RefElems; │ │ │ │ -69 typedef typename _R_e_f_E_l_e_m_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t RefElem; │ │ │ │ -70 │ │ │ │ -71 RefElem refelem; │ │ │ │ -72 _G_e_o_m_e_t_r_y_T_y_p_e gt; │ │ │ │ -73 std::vector vertexOrder; │ │ │ │ -74 │ │ │ │ -75 public: │ │ │ │ -_7_7 typedef Index_ _I_n_d_e_x; │ │ │ │ -78 │ │ │ │ -80 class _i_t_e_r_a_t_o_r; │ │ │ │ -81 │ │ │ │ -_8_3 static const std::size_t _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ -_8_5 const _G_e_o_m_e_t_r_y_T_y_p_e &_t_y_p_e() const { return gt; } │ │ │ │ -86 │ │ │ │ -88 │ │ │ │ -96 template │ │ │ │ -_9_7 _G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r(const _G_e_o_m_e_t_r_y_T_y_p_e& gt_, const InIterator &inBegin, │ │ │ │ -98 const InIterator &inEnd) : │ │ │ │ -99 refelem(RefElems::general(gt_)), gt(gt_), │ │ │ │ -100 vertexOrder(refelem.size(dim)) │ │ │ │ -101 { _r_e_d_u_c_e_O_r_d_e_r(inBegin, inEnd, vertexOrder.begin()); } │ │ │ │ -102 │ │ │ │ -104 │ │ │ │ -_1_0_8 _i_t_e_r_a_t_o_r _b_e_g_i_n(std::size_t codim, std::size_t subEntity) const │ │ │ │ -109 { return _i_t_e_r_a_t_o_r(*this, codim, subEntity); } │ │ │ │ -110 │ │ │ │ -111 │ │ │ │ -_1_1_5 _i_t_e_r_a_t_o_r _e_n_d(std::size_t codim, std::size_t subEntity) const { │ │ │ │ -116 return _i_t_e_r_a_t_o_r(*this, codim, subEntity, │ │ │ │ -117 refelem.size(subEntity, codim, dim)); │ │ │ │ -118 } │ │ │ │ -119 │ │ │ │ -121 │ │ │ │ -_1_2_8 void _g_e_t_R_e_d_u_c_e_d(std::size_t codim, std::size_t subEntity, │ │ │ │ -129 std::vector& order) const │ │ │ │ -130 { │ │ │ │ -131 order.resize(refelem.size(subEntity, codim, dim)); │ │ │ │ -132 _r_e_d_u_c_e_O_r_d_e_r(_b_e_g_i_n(codim, subEntity), _e_n_d(codim, subEntity), │ │ │ │ -133 order.begin()); │ │ │ │ -134 } │ │ │ │ -135 }; │ │ │ │ +_5_3 static const int _c_o_o_r_d_d_i_m_e_n_s_i_o_n = cdim; │ │ │ │ +54 │ │ │ │ +_5_6 using _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e = FieldVector; │ │ │ │ +57 │ │ │ │ +_5_9 using _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e = FieldVector; │ │ │ │ +60 │ │ │ │ +_6_2 using _V_o_l_u_m_e = decltype(power(std::declval(),_m_y_d_i_m_e_n_s_i_o_n)); │ │ │ │ +63 │ │ │ │ +_6_5 using _J_a_c_o_b_i_a_n = FieldMatrix; │ │ │ │ +66 │ │ │ │ +_6_8 using _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d = FieldMatrix; │ │ │ │ +69 │ │ │ │ +_7_1 using _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e = FieldMatrix; │ │ │ │ +72 │ │ │ │ +_7_4 using _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d = FieldMatrix; │ │ │ │ +75 │ │ │ │ +76public: │ │ │ │ +_7_8 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s = _D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>; │ │ │ │ +_7_9 using _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t = typename _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ +80 │ │ │ │ +81protected: │ │ │ │ +_8_2 using _M_a_t_r_i_x_H_e_l_p_e_r = Impl::FieldMatrixHelper; │ │ │ │ +83 │ │ │ │ +84public: │ │ │ │ +_8_6 _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y () = default; │ │ │ │ +87 │ │ │ │ +_1_0_3 _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& refElement, │ │ │ │ +104 const LocalFiniteElement& localFE, │ │ │ │ +105 std::vector vertices) │ │ │ │ +106 : refElement_(refElement) │ │ │ │ +107 , localFE_(localFE) │ │ │ │ +108 , vertices_(_s_t_d::move(vertices)) │ │ │ │ +109 { │ │ │ │ +110 assert(localFE_.size() == vertices_.size()); │ │ │ │ +111 } │ │ │ │ +112 │ │ │ │ +126 template , int> = 0> │ │ │ │ +_1_2_8 _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (const _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t& refElement, │ │ │ │ +129 const LocalFiniteElement& localFE, │ │ │ │ +130 Param&& parametrization) │ │ │ │ +131 : refElement_(refElement) │ │ │ │ +132 , localFE_(localFE) │ │ │ │ +133 { │ │ │ │ +134 localFE_.localInterpolation().interpolate(parametrization, vertices_); │ │ │ │ +135 } │ │ │ │ 136 │ │ │ │ -138 │ │ │ │ -141 template │ │ │ │ -_1_4_2 class _G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r::iterator : │ │ │ │ -143 public Dune::RandomAccessIteratorFacade │ │ │ │ -144 { │ │ │ │ -145 const _G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r *order; │ │ │ │ -146 std::size_t codim; │ │ │ │ -147 std::size_t subEntity; │ │ │ │ -148 std::size_t vertex; │ │ │ │ -149 │ │ │ │ -150 iterator(const _G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r &order_, std::size_t codim_, │ │ │ │ -151 std::size_t subEntity_, std::size_t vertex_ = 0) : │ │ │ │ -152 order(&order_), codim(codim_), subEntity(subEntity_), vertex(vertex_) │ │ │ │ -153 { } │ │ │ │ -154 │ │ │ │ -155 public: │ │ │ │ -_1_5_6 const _I_n_d_e_x &_d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ -157 return order->vertexOrder[order->refelem.subEntity(subEntity, codim, │ │ │ │ -158 vertex, dim)]; │ │ │ │ -159 } │ │ │ │ -_1_6_0 const _I_n_d_e_x &_e_l_e_m_e_n_t_A_t(std::ptrdiff_t n) const { │ │ │ │ -161 return order->vertexOrder[order->refelem.subEntity(subEntity, codim, │ │ │ │ -162 vertex+n, dim)]; │ │ │ │ -163 } │ │ │ │ -_1_6_4 bool _e_q_u_a_l_s(const iterator &other) const { │ │ │ │ -165 return order == other.order && codim == other.codim && │ │ │ │ -166 subEntity == other.subEntity && vertex == other.vertex; │ │ │ │ -167 } │ │ │ │ -_1_6_8 void _i_n_c_r_e_m_e_n_t() { ++vertex; } │ │ │ │ -_1_6_9 void _d_e_c_r_e_m_e_n_t() { --vertex; } │ │ │ │ -_1_7_0 void _a_d_v_a_n_c_e(std::ptrdiff_t n) { vertex += n; } │ │ │ │ -_1_7_1 std::ptrdiff_t _d_i_s_t_a_n_c_e_T_o(const iterator &other) const { │ │ │ │ -172 // make sure we reference the same container │ │ │ │ -173 assert(order == other.order && codim == other.codim && │ │ │ │ -174 subEntity == other.subEntity); │ │ │ │ -175 if(vertex < other.vertex) return other.vertex - vertex; │ │ │ │ -176 else return -static_cast(vertex - other.vertex); │ │ │ │ -177 } │ │ │ │ -178 │ │ │ │ -179 friend class _G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r; │ │ │ │ -180 │ │ │ │ -182 │ │ │ │ -_1_8_7 _i_t_e_r_a_t_o_r() { } │ │ │ │ -188 }; │ │ │ │ -189} // namespace Dune │ │ │ │ +143 template │ │ │ │ +_1_4_4 explicit _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_m_e_t_r_y_T_y_p_e gt, Args&&... args) │ │ │ │ +145 : _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y(_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s::general(gt), _s_t_d:: │ │ │ │ +forward(args)...) │ │ │ │ +146 {} │ │ │ │ +147 │ │ │ │ +_1_4_9 int _o_r_d_e_r () const │ │ │ │ +150 { │ │ │ │ +151 return _l_o_c_a_l_B_a_s_i_s().order(); │ │ │ │ +152 } │ │ │ │ +153 │ │ │ │ +_1_5_9 bool _a_f_f_i_n_e () const │ │ │ │ +160 { │ │ │ │ +161 if (!affine_) │ │ │ │ +162 affine_.emplace(affineImpl()); │ │ │ │ +163 return *affine_; │ │ │ │ +164 } │ │ │ │ +165 │ │ │ │ +_1_6_7 _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e () const │ │ │ │ +168 { │ │ │ │ +169 return refElement_.type(); │ │ │ │ +170 } │ │ │ │ +171 │ │ │ │ +_1_7_3 int _c_o_r_n_e_r_s () const │ │ │ │ +174 { │ │ │ │ +175 return refElement_.size(_m_y_d_i_m_e_n_s_i_o_n); │ │ │ │ +176 } │ │ │ │ +177 │ │ │ │ +_1_7_9 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_o_r_n_e_r (int i) const │ │ │ │ +180 { │ │ │ │ +181 assert( (i >= 0) && (i < _c_o_r_n_e_r_s()) ); │ │ │ │ +182 return _g_l_o_b_a_l(refElement_.position(i, _m_y_d_i_m_e_n_s_i_o_n)); │ │ │ │ +183 } │ │ │ │ +184 │ │ │ │ +_1_8_6 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r () const │ │ │ │ +187 { │ │ │ │ +188 return _g_l_o_b_a_l(refElement_.position(0, 0)); │ │ │ │ +189 } │ │ │ │ 190 │ │ │ │ -191#endif // DUNE_GEOMETRY_GENERALVERTEXORDER_HH │ │ │ │ +_2_0_2 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +203 { │ │ │ │ +204 thread_local std::vector shapeValues; │ │ │ │ +205 _l_o_c_a_l_B_a_s_i_s().evaluateFunction(_l_o_c_a_l, shapeValues); │ │ │ │ +206 assert(shapeValues.size() == vertices_.size()); │ │ │ │ +207 │ │ │ │ +208 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e out(0); │ │ │ │ +209 for (std::size_t i = 0; i < shapeValues.size(); ++i) │ │ │ │ +210 out.axpy(shapeValues[i], vertices_[i]); │ │ │ │ +211 │ │ │ │ +212 return out; │ │ │ │ +213 } │ │ │ │ +214 │ │ │ │ +_2_3_2 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l (const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e& y, Impl:: │ │ │ │ +GaussNewtonOptions opts = {}) const │ │ │ │ +233 { │ │ │ │ +234 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e x = refElement_.position(0,0); │ │ │ │ +235 Impl::GaussNewtonErrorCode err = Impl::gaussNewton( │ │ │ │ +236 [&](const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) { return this->_g_l_o_b_a_l(local); }, │ │ │ │ +237 [&](const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) { return this->_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(local); │ │ │ │ +}, │ │ │ │ +238 y, x, opts │ │ │ │ +239 ); │ │ │ │ +240 │ │ │ │ +241 if (err != Impl::GaussNewtonErrorCode::OK) │ │ │ │ +242 DUNE_THROW(Dune::Exception, │ │ │ │ +243 "Local coordinate can not be recovered from global coordinate, error code = │ │ │ │ +" << int(err) << "\n" │ │ │ │ +244 << " (global(x) - y).two_norm() = " << (_g_l_o_b_a_l(x) - y).two_norm() │ │ │ │ +245 << " > tol = " << opts.absTol); │ │ │ │ +246 │ │ │ │ +247 return x; │ │ │ │ +248 } │ │ │ │ +249 │ │ │ │ +_2_6_0 _c_t_y_p_e _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +261 { │ │ │ │ +262 return MatrixHelper::sqrtDetAAT(_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l)); │ │ │ │ +263 } │ │ │ │ +264 │ │ │ │ +_2_7_6 _V_o_l_u_m_e _v_o_l_u_m_e (Impl::ConvergenceOptions opts = {}) const │ │ │ │ +277 { │ │ │ │ +278 _V_o_l_u_m_e vol0 = _v_o_l_u_m_e(_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>_:_:_r_u_l_e(_t_y_p_e(), 1)); │ │ │ │ +279 if (_a_f_f_i_n_e()) │ │ │ │ +280 return vol0; │ │ │ │ +281 │ │ │ │ +282 using std::abs; │ │ │ │ +283 for (int p = 2; p < opts.maxIt; ++p) { │ │ │ │ +284 _V_o_l_u_m_e vol1 = _v_o_l_u_m_e(_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>_:_:_r_u_l_e(_t_y_p_e(), p)); │ │ │ │ +285 if (abs(vol1 - vol0) < opts.absTol) │ │ │ │ +286 return vol1; │ │ │ │ +287 │ │ │ │ +288 vol0 = vol1; │ │ │ │ +289 } │ │ │ │ +290 return vol0; │ │ │ │ +291 } │ │ │ │ +292 │ │ │ │ +_2_9_4 _V_o_l_u_m_e _v_o_l_u_m_e (const _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>& quadRule) const │ │ │ │ +295 { │ │ │ │ +296 _V_o_l_u_m_e vol(0); │ │ │ │ +297 for (const auto& qp : quadRule) │ │ │ │ +298 vol += _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t(qp.position()) * qp.weight(); │ │ │ │ +299 return vol; │ │ │ │ +300 } │ │ │ │ +301 │ │ │ │ +_3_0_7 _J_a_c_o_b_i_a_n _j_a_c_o_b_i_a_n (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +308 { │ │ │ │ +309 thread_local std::vector │ │ │ │ +shapeJacobians; │ │ │ │ +310 _l_o_c_a_l_B_a_s_i_s().evaluateJacobian(_l_o_c_a_l, shapeJacobians); │ │ │ │ +311 assert(shapeJacobians.size() == vertices_.size()); │ │ │ │ +312 │ │ │ │ +313 _J_a_c_o_b_i_a_n out(0); │ │ │ │ +314 for (std::size_t i = 0; i < shapeJacobians.size(); ++i) { │ │ │ │ +315 for (int j = 0; j < Jacobian::rows; ++j) { │ │ │ │ +316 shapeJacobians[i].umtv(vertices_[i][j], out[j]); │ │ │ │ +317 } │ │ │ │ +318 } │ │ │ │ +319 return out; │ │ │ │ +320 } │ │ │ │ +321 │ │ │ │ +_3_2_7 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +328 { │ │ │ │ +329 return _j_a_c_o_b_i_a_n(_l_o_c_a_l).transposed(); │ │ │ │ +330 } │ │ │ │ +331 │ │ │ │ +_3_3_9 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +340 { │ │ │ │ +341 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e out; │ │ │ │ +342 MatrixHelper::leftInvA(_j_a_c_o_b_i_a_n(_l_o_c_a_l), out); │ │ │ │ +343 return out; │ │ │ │ +344 } │ │ │ │ +345 │ │ │ │ +_3_5_3 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& │ │ │ │ +_l_o_c_a_l) const │ │ │ │ +354 { │ │ │ │ +355 return _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e(_l_o_c_a_l).transposed(); │ │ │ │ +356 } │ │ │ │ +357 │ │ │ │ +_3_5_9 friend _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t (const _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y& │ │ │ │ +geometry) │ │ │ │ +360 { │ │ │ │ +361 return geometry.refElement_; │ │ │ │ +362 } │ │ │ │ +363 │ │ │ │ +_3_6_5 const LocalFiniteElement& _f_i_n_i_t_e_E_l_e_m_e_n_t () const │ │ │ │ +366 { │ │ │ │ +367 return localFE_; │ │ │ │ +368 } │ │ │ │ +369 │ │ │ │ +_3_7_1 const std::vector& _c_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ +372 { │ │ │ │ +373 return vertices_; │ │ │ │ +374 } │ │ │ │ +375 │ │ │ │ +_3_7_7 const LocalBasis& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ +378 { │ │ │ │ +379 return localFE_.localBasis(); │ │ │ │ +380 } │ │ │ │ +381 │ │ │ │ +382private: │ │ │ │ +383 │ │ │ │ +384 bool affineImpl () const │ │ │ │ +385 { │ │ │ │ +386 if constexpr(_m_y_d_i_m_e_n_s_i_o_n == 0) │ │ │ │ +387 // point geometries are always affine mappings │ │ │ │ +388 return true; │ │ │ │ +389 else { │ │ │ │ +390 if (_o_r_d_e_r() > 1) │ │ │ │ +391 // higher-order parametrizations are by definition not affine │ │ │ │ +392 return false; │ │ │ │ +393 if constexpr(_m_y_d_i_m_e_n_s_i_o_n == 1) │ │ │ │ +394 // linear line geometries are affine mappings │ │ │ │ +395 return true; │ │ │ │ +396 else { │ │ │ │ +397 if (_t_y_p_e().isSimplex()) │ │ │ │ +398 // linear simplex geometries are affine mappings │ │ │ │ +399 return true; │ │ │ │ +400 │ │ │ │ +401 // multi-linear mappings on non-simplex geometries might be affine │ │ │ │ +402 // as well. This is tested explicitly for all vertices by constructing │ │ │ │ +403 // an affine mapping from dim+1 affine-independent corners and evaluating │ │ │ │ +404 // at the other corners. │ │ │ │ +405 auto refSimplex = _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_c_t_y_p_e_,_m_y_d_i_m_e_n_s_i_o_n_>(_G_e_o_m_e_t_r_y_T_y_p_e_s_:_: │ │ │ │ +_s_i_m_p_l_e_x(_m_y_d_i_m_e_n_s_i_o_n)); │ │ │ │ +406 auto simplexIndices = Dune::range(refSimplex.size(_m_y_d_i_m_e_n_s_i_o_n)); │ │ │ │ +407 auto simplexCorners = Dune::transformedRangeView(simplexIndices, │ │ │ │ +408 [&](int i) { return this->_g_l_o_b_a_l(refSimplex.position(i,_m_y_d_i_m_e_n_s_i_o_n)); }); │ │ │ │ +409 AffineGeometry affineGeo │ │ │ │ +(refSimplex,simplexCorners); │ │ │ │ +410 using std::sqrt; │ │ │ │ +411 const _c_t_y_p_e tol = sqrt(std::numeric_limits::epsilon()); │ │ │ │ +412 for (int i = 0; i < _c_o_r_n_e_r_s(); ++i) { │ │ │ │ +413 const auto _c_o_r_n_e_r = refElement_.position(i,_m_y_d_i_m_e_n_s_i_o_n); │ │ │ │ +414 if ((affineGeo.global(_c_o_r_n_e_r) - _g_l_o_b_a_l(_c_o_r_n_e_r)).two_norm() > tol) │ │ │ │ +415 return false; │ │ │ │ +416 } │ │ │ │ +417 return true; │ │ │ │ +418 } │ │ │ │ +419 } │ │ │ │ +420 } │ │ │ │ +421 │ │ │ │ +422private: │ │ │ │ +424 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t refElement_{}; │ │ │ │ +425 │ │ │ │ +427 LocalFiniteElement localFE_{}; │ │ │ │ +428 │ │ │ │ +430 std::vector vertices_{}; │ │ │ │ +431 │ │ │ │ +432 mutable std::optional affine_ = std::nullopt; │ │ │ │ +433}; │ │ │ │ +434 │ │ │ │ +435namespace Impl { │ │ │ │ +436 │ │ │ │ +437// extract the LocalCoordinate type from a LocalFiniteElement │ │ │ │ +438template │ │ │ │ +439using LocalCoordinate_t │ │ │ │ +440 = FieldVector; │ │ │ │ +442 │ │ │ │ +443} // end namespace Impl │ │ │ │ +444 │ │ │ │ +445 │ │ │ │ +446// deduction guides │ │ │ │ +447template │ │ │ │ +_4_4_8_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_I_>, const LFE&, std:: │ │ │ │ +vector) │ │ │ │ +449 -> _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_<_L_F_E_,_ _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e_:_:_d_i_m_e_n_s_i_o_n_>; │ │ │ │ +450 │ │ │ │ +451template >> │ │ │ │ +_4_5_3_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_I_>, const LFE&, const F&) │ │ │ │ +454 -> _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_<_L_F_E_,_ _R_a_n_g_e_:_:_d_i_m_e_n_s_i_o_n_>; │ │ │ │ +455 │ │ │ │ +456template │ │ │ │ +_4_5_7_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_m_e_t_r_y_T_y_p_e, const LFE& localFE, std:: │ │ │ │ +vector) │ │ │ │ +458 -> _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_<_L_F_E_,_ _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e_:_:_d_i_m_e_n_s_i_o_n_>; │ │ │ │ +459 │ │ │ │ +460template >> │ │ │ │ +_4_6_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y (_G_e_o_m_e_t_r_y_T_y_p_e, const LFE&, const F&) │ │ │ │ +463 -> _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_<_L_F_E_,_ _R_a_n_g_e_:_:_d_i_m_e_n_s_i_o_n_>; │ │ │ │ +464 │ │ │ │ +465} // namespace Dune │ │ │ │ +466 │ │ │ │ +467#endif // DUNE_GEOMETRY_LOCALFINITEELEMENTGEOMETRY_HH │ │ │ │ _t_y_p_e_._h_h │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ _r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ +_c_o_n_v_e_r_g_e_n_c_e_._h_h │ │ │ │ +_a_l_g_o_r_i_t_h_m_s_._h_h │ │ │ │ +_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h │ │ │ │ +_q_u_a_d_r_a_t_u_r_e_r_u_l_e_s_._h_h │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_s_i_m_p_l_e_x │ │ │ │ +constexpr GeometryType simplex(unsigned int dim) │ │ │ │ +Returns a GeometryType representing a simplex of dimension dim. │ │ │ │ +DDeeffiinniittiioonn type.hh:453 │ │ │ │ +_s_t_d │ │ │ │ +STL namespace. │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_r_e_d_u_c_e_O_r_d_e_r │ │ │ │ -void reduceOrder(const InIterator &inBegin, const InIterator &inEnd, │ │ │ │ -OutIterator outIt) │ │ │ │ -Algorithm to reduce vertex order information. │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:40 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ +LocalFiniteElementGeometry(Geo::ReferenceElement< I >, const LFE &, std:: │ │ │ │ +vector< GlobalCoordinate >) -> LocalFiniteElementGeometry< LFE, │ │ │ │ +GlobalCoordinate::dimension > │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +This class provides access to geometric and topological properties of a │ │ │ │ +reference element. │ │ │ │ +DDeeffiinniittiioonn referenceelement.hh:52 │ │ │ │ _D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ Class providing access to the singletons of the reference elements. │ │ │ │ DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ _D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ typename Container::ReferenceElement ReferenceElement │ │ │ │ The reference element type. │ │ │ │ DDeeffiinniittiioonn referenceelements.hh:146 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_I_n_d_e_x │ │ │ │ -Index_ Index │ │ │ │ -Type of indices. │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:77 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_t_y_p_e │ │ │ │ -const GeometryType & type() const │ │ │ │ -get type of the entity's geometry │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:85 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static const std::size_t dimension │ │ │ │ -export the dimension of the entity we provide information for │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:83 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_g_e_t_R_e_d_u_c_e_d │ │ │ │ -void getReduced(std::size_t codim, std::size_t subEntity, std::vector< Index > │ │ │ │ -&order) const │ │ │ │ -get a vector of reduced indices for some sub-entity │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:128 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_e_n_d │ │ │ │ -iterator end(std::size_t codim, std::size_t subEntity) const │ │ │ │ -get end iterator for the vertex indices of some sub-entity │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:115 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r │ │ │ │ -GeneralVertexOrder(const GeometryType >_, const InIterator &inBegin, const │ │ │ │ -InIterator &inEnd) │ │ │ │ -construct a GeneralVertexOrder │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:97 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_b_e_g_i_n │ │ │ │ -iterator begin(std::size_t codim, std::size_t subEntity) const │ │ │ │ -get begin iterator for the vertex indices of some sub-entity │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:108 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r │ │ │ │ -Iterate over the vertex indices of some sub-entity. │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:144 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_i_t_e_r_a_t_o_r │ │ │ │ -iterator() │ │ │ │ -public default constructor │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:187 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_d_e_c_r_e_m_e_n_t │ │ │ │ -void decrement() │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:169 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_a_d_v_a_n_c_e │ │ │ │ -void advance(std::ptrdiff_t n) │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:170 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ -const Index & dereference() const │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:156 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ -void increment() │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:168 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const iterator &other) const │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:164 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_d_i_s_t_a_n_c_e_T_o │ │ │ │ -std::ptrdiff_t distanceTo(const iterator &other) const │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:171 │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_a_l_V_e_r_t_e_x_O_r_d_e_r_:_:_i_t_e_r_a_t_o_r_:_:_e_l_e_m_e_n_t_A_t │ │ │ │ -const Index & elementAt(std::ptrdiff_t n) const │ │ │ │ -DDeeffiinniittiioonn generalvertexorder.hh:160 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ +Geometry implementation based on local-basis function parametrization. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:40 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_t_y_p_e │ │ │ │ +GeometryType type() const │ │ │ │ +Obtain the name of the reference element. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:167 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_V_o_l_u_m_e │ │ │ │ +decltype(power(std::declval< ctype >(), mydimension)) Volume │ │ │ │ +type of volume │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:62 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l │ │ │ │ +LocalCoordinate local(const GlobalCoordinate &y, Impl::GaussNewtonOptions< │ │ │ │ +ctype > opts={}) const │ │ │ │ +Evaluate the inverse coordinate mapping. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:232 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ +LocalFiniteElementGeometry(const ReferenceElement &refElement, const │ │ │ │ +LocalFiniteElement &localFE, std::vector< GlobalCoordinate > vertices) │ │ │ │ +Constructor from a vector of coefficients of the LocalBasis parametrizing the │ │ │ │ +geometry. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:103 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const │ │ │ │ +Obtain the transposed of the Jacobian. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:327 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ +const LocalBasis & localBasis() const │ │ │ │ +The local basis of the stored local finite-element. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:377 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_c_t_y_p_e │ │ │ │ +typename LocalBasisTraits::DomainFieldType ctype │ │ │ │ +coordinate type │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:47 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate │ │ │ │ +&local) const │ │ │ │ +Obtain the transposed of the Jacobian's inverse. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:353 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +friend ReferenceElement referenceElement(const LocalFiniteElementGeometry │ │ │ │ +&geometry) │ │ │ │ +Obtain the reference-element related to this geometry. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:359 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ +LocalFiniteElementGeometry()=default │ │ │ │ +Default constructed geometry results in an empty/invalid representation. │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ +bool affine() const │ │ │ │ +Is this mapping affine? Geometries of order 1 might be affine, but it needs to │ │ │ │ +be checked on non-simp... │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:159 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n │ │ │ │ +Jacobian jacobian(const LocalCoordinate &local) const │ │ │ │ +Obtain the Jacobian. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:307 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ +Volume volume(const QuadratureRule< ctype, mydimension > &quadRule) const │ │ │ │ +Obtain the volume of the mapping's image by given quadrature rules. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:294 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_c_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ +const std::vector< GlobalCoordinate > & coefficients() const │ │ │ │ +Obtain the coefficients of the parametrization. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:371 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ +LocalFiniteElementGeometry(GeometryType gt, Args &&... args) │ │ │ │ +Constructor, forwarding to the other constructors that take a reference- │ │ │ │ +element. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:144 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ +static const int coorddimension │ │ │ │ +coordinate dimension │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:53 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r_s │ │ │ │ +int corners() const │ │ │ │ +Obtain number of corners of the corresponding reference element. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:173 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_c_e_n_t_e_r │ │ │ │ +GlobalCoordinate center() const │ │ │ │ +Obtain the centroid of the mapping's image. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:186 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_f_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ +const LocalFiniteElement & finiteElement() const │ │ │ │ +Obtain the local finite-element. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:365 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ +GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ +Evaluate the coordinate mapping. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:202 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_M_a_t_r_i_x_H_e_l_p_e_r │ │ │ │ +Impl::FieldMatrixHelper< ctype > MatrixHelper │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:82 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +typename ReferenceElements::ReferenceElement ReferenceElement │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:79 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ +GlobalCoordinate corner(int i) const │ │ │ │ +Obtain coordinates of the i-th corner. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:179 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ +Volume volume(Impl::ConvergenceOptions< ctype > opts={}) const │ │ │ │ +Obtain the volume of the mapping's image. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:276 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ +static const int mydimension │ │ │ │ +geometry dimension │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:50 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ +JacobianInverse jacobianInverse(const LocalCoordinate &local) const │ │ │ │ +Obtain the Jacobian's inverse. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:339 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +FieldVector< ctype, coorddimension > GlobalCoordinate │ │ │ │ +type of global coordinates │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:59 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n │ │ │ │ +FieldMatrix< ctype, coorddimension, mydimension > Jacobian │ │ │ │ +type of jacobian │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:65 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed │ │ │ │ +type of jacobian inverse transposed │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:74 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ +Dune::ReferenceElements< ctype, mydimension > ReferenceElements │ │ │ │ +type of reference element │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:78 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ +FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse │ │ │ │ +type of jacobian inverse │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:71 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ +ctype integrationElement(const LocalCoordinate &local) const │ │ │ │ +Obtain the integration element. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:260 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_o_r_d_e_r │ │ │ │ +int order() const │ │ │ │ +Obtain the (highest) polynomial order of the parametrization. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:149 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +FieldVector< ctype, mydimension > LocalCoordinate │ │ │ │ +type of local coordinates │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:56 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed │ │ │ │ +type of jacobian transposed │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:68 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_G_e_o_m_e_t_r_y │ │ │ │ +LocalFiniteElementGeometry(const ReferenceElement &refElement, const │ │ │ │ +LocalFiniteElement &localFE, Param &¶metrization) │ │ │ │ +Constructor from a local parametrization function, mapping local to (curved) │ │ │ │ +global coordinates. │ │ │ │ +DDeeffiinniittiioonn localfiniteelementgeometry.hh:128 │ │ │ │ +_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e │ │ │ │ +Abstract base class for quadrature rules. │ │ │ │ +DDeeffiinniittiioonn quadraturerules.hh:214 │ │ │ │ +_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_:_:_r_u_l_e │ │ │ │ +static const QuadratureRule & rule(const GeometryType &t, int p, │ │ │ │ +QuadratureType::Enum qt=QuadratureType::GaussLegendre) │ │ │ │ +select the appropriate QuadratureRule for GeometryType t and order p │ │ │ │ +DDeeffiinniittiioonn quadraturerules.hh:326 │ │ │ │ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ DDeeffiinniittiioonn type.hh:114 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00245.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: dimension.hh File Reference │ │ │ +dune-geometry: mappedgeometry.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -73,32 +73,54 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
dimension.hh File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
mappedgeometry.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <type_traits>
│ │ │ +
#include <cassert>
│ │ │ +#include <limits>
│ │ │ +#include <optional>
│ │ │ +#include <stdexcept>
│ │ │ +#include <type_traits>
│ │ │ +#include <dune/common/copyableoptional.hh>
│ │ │ +#include <dune/common/exceptions.hh>
│ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ +#include <dune/common/fvector.hh>
│ │ │ +#include <dune/common/math.hh>
│ │ │ +#include <dune/common/transpose.hh>
│ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ +#include <dune/geometry/type.hh>
│ │ │ +#include <dune/geometry/utility/algorithms.hh>
│ │ │ +#include <dune/geometry/utility/convergence.hh>
│ │ │ +#include <dune/geometry/utility/defaultmatrixhelper.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

struct  Dune::Dim< dim >
 Static tag representing a dimension. More...
struct  Dune::Codim< codim >
 Static tag representing a codimension. More...
class  Dune::MappedGeometry< Map, Geo >
 Geometry parametrized by a LocalFunction and a LocalGeometry. More...
│ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Functions

template<class Map, class Geo>
 Dune::MappedGeometry (const Map &, const Geo &) -> MappedGeometry< Map, Geo >
template<class Map, class Geo>
 Dune::MappedGeometry (const Map &, const Geo &, bool) -> MappedGeometry< Map, Geo >
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,19 +1,39 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -dimension.hh File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +mappedgeometry.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_q_u_a_d_r_a_t_u_r_e_r_u_l_e_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_a_l_g_o_r_i_t_h_m_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_c_o_n_v_e_r_g_e_n_c_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_D_i_m_<_ _d_i_m_ _> │ │ │ │ -  Static tag representing a dimension. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_C_o_d_i_m_<_ _c_o_d_i_m_ _> │ │ │ │ -  Static tag representing a codimension. _M_o_r_e_._._. │ │ │ │ +class   _D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_<_ _M_a_p_,_ _G_e_o_ _> │ │ │ │ +  _G_e_o_m_e_t_r_y parametrized by a LocalFunction and a LocalGeometry. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +  _D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y (const Map &, const _G_e_o &) -> MappedGeometry< Map, _G_e_o > │ │ │ │ +template │ │ │ │ +  _D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y (const Map &, const _G_e_o &, bool) -> MappedGeometry< Map, │ │ │ │ + _G_e_o > │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00245_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: dimension.hh Source File │ │ │ +dune-geometry: mappedgeometry.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,54 +71,329 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
dimension.hh
│ │ │ +
mappedgeometry.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_DIMENSION_HH
│ │ │ -
6#define DUNE_GEOMETRY_DIMENSION_HH
│ │ │ +
5#ifndef DUNE_GEOMETRY_MAPPEDGEOMETRY_HH
│ │ │ +
6#define DUNE_GEOMETRY_MAPPEDGEOMETRY_HH
│ │ │
7
│ │ │ -
8#include <type_traits>
│ │ │ -
9
│ │ │ -
10namespace Dune {
│ │ │ -
11
│ │ │ -
13 template<int dim>
│ │ │ -
│ │ │ -
14 struct Dim
│ │ │ -
15 : public std::integral_constant<int,dim>
│ │ │ -
16 {
│ │ │ -
17 typedef Dim type;
│ │ │ -
18 };
│ │ │ -
│ │ │ -
19
│ │ │ -
21 template<int codim>
│ │ │ -
│ │ │ -
22 struct Codim
│ │ │ -
23 : public std::integral_constant<int,codim>
│ │ │ -
24 {
│ │ │ -
25 typedef Codim type;
│ │ │ -
26 };
│ │ │ -
│ │ │ -
27
│ │ │ -
28}
│ │ │ -
29
│ │ │ -
30#endif // DUNE_GEOMETRY_DIMENSION_HH
│ │ │ +
8#include <cassert>
│ │ │ +
9#include <limits>
│ │ │ +
10#include <optional>
│ │ │ +
11#include <stdexcept>
│ │ │ +
12#include <type_traits>
│ │ │ +
13
│ │ │ +
14#include <dune/common/copyableoptional.hh>
│ │ │ +
15#include <dune/common/exceptions.hh>
│ │ │ +
16#include <dune/common/fmatrix.hh>
│ │ │ +
17#include <dune/common/fvector.hh>
│ │ │ +
18#include <dune/common/math.hh>
│ │ │ +
19#include <dune/common/transpose.hh>
│ │ │ + │ │ │ + │ │ │ +
22#include <dune/geometry/type.hh>
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
26
│ │ │ +
27namespace Dune {
│ │ │ +
28
│ │ │ +
63template <class Map, class Geo>
│ │ │ +
│ │ │ + │ │ │ +
65{
│ │ │ +
66public:
│ │ │ +
68 using LocalCoordinate = typename Geo::LocalCoordinate;
│ │ │ +
69
│ │ │ +
71 using GlobalCoordinate = std::remove_reference_t<decltype(std::declval<Map>()(std::declval<typename Geo::GlobalCoordinate>()))>;
│ │ │ +
72
│ │ │ +
74 using ctype = typename Geo::ctype;
│ │ │ +
75
│ │ │ +
77 static constexpr int mydimension = LocalCoordinate::size();
│ │ │ +
78
│ │ │ +
80 static constexpr int coorddimension = GlobalCoordinate::size();
│ │ │ +
81
│ │ │ +
83 using Volume = std::remove_reference_t<decltype(Dune::power(std::declval<ctype>(),mydimension))>;
│ │ │ +
84
│ │ │ +
86 using Jacobian = FieldMatrix<ctype, coorddimension, mydimension>;
│ │ │ +
87
│ │ │ +
89 using JacobianTransposed = FieldMatrix<ctype, mydimension, coorddimension>;
│ │ │ +
90
│ │ │ +
92 using JacobianInverse = FieldMatrix<ctype, mydimension, coorddimension>;
│ │ │ +
93
│ │ │ +
95 using JacobianInverseTransposed = FieldMatrix<ctype, coorddimension, mydimension>;
│ │ │ +
96
│ │ │ +
97private:
│ │ │ +
98 using ReferenceElements = Dune::ReferenceElements<ctype, mydimension>;
│ │ │ +
99 using ReferenceElement = typename ReferenceElements::ReferenceElement;
│ │ │ +
100
│ │ │ +
101protected:
│ │ │ +
102 using MatrixHelper = Impl::FieldMatrixHelper<ctype>;
│ │ │ +
103
│ │ │ +
104 // type of the mapping representation the geometry parametrization
│ │ │ +
105 using Mapping = Map;
│ │ │ +
106
│ │ │ +
107 // type of the geometry that is wrapped
│ │ │ +
108 using Geometry = Geo;
│ │ │ +
109
│ │ │ +
110 // type of a mapping representing the derivative of `Map` w.r.t. `GlobalCoordinate`
│ │ │ +
111 using DerivativeMapping = std::remove_reference_t<decltype(derivative(std::declval<Map>()))>;
│ │ │ +
112
│ │ │ +
113public:
│ │ │ +
122 template <class Geo_, class Map_,
│ │ │ +
123 std::enable_if_t<Dune::IsInteroperable<Map, Map_>::value, int> = 0,
│ │ │ +
124 std::enable_if_t<Dune::IsInteroperable<Geo, Geo_>::value, int> = 0>
│ │ │ +
│ │ │ +
125 MappedGeometry (Map_&& mapping, Geo_&& geometry, bool affine = false)
│ │ │ +
126 : mapping_(std::forward<Map_>(mapping))
│ │ │ +
127 , dMapping_(derivative(*mapping_))
│ │ │ +
128 , geometry_(std::forward<Geo_>(geometry))
│ │ │ +
129 , affine_(affine)
│ │ │ +
130 {}
│ │ │ +
│ │ │ +
131
│ │ │ +
│ │ │ +
137 bool affine () const
│ │ │ +
138 {
│ │ │ +
139 return affine_;
│ │ │ +
140 }
│ │ │ +
│ │ │ +
141
│ │ │ +
│ │ │ + │ │ │ +
144 {
│ │ │ +
145 return geometry_.type();
│ │ │ +
146 }
│ │ │ +
│ │ │ +
147
│ │ │ +
│ │ │ +
149 int corners () const
│ │ │ +
150 {
│ │ │ +
151 return geometry_.corners();
│ │ │ +
152 }
│ │ │ +
│ │ │ +
153
│ │ │ +
│ │ │ + │ │ │ +
156 {
│ │ │ +
157 assert( (i >= 0) && (i < corners()) );
│ │ │ +
158 return mapping()(geometry_.corner(i));
│ │ │ +
159 }
│ │ │ +
│ │ │ +
160
│ │ │ +
│ │ │ + │ │ │ +
163 {
│ │ │ +
164 return mapping()(geometry_.center());
│ │ │ +
165 }
│ │ │ +
│ │ │ +
166
│ │ │ +
│ │ │ + │ │ │ +
177 {
│ │ │ +
178 return mapping()(geometry_.global(local));
│ │ │ +
179 }
│ │ │ +
│ │ │ +
180
│ │ │ +
│ │ │ +
197 LocalCoordinate local (const GlobalCoordinate& y, Impl::GaussNewtonOptions<ctype> opts = {}) const
│ │ │ +
198 {
│ │ │ +
199 LocalCoordinate x = refElement().position(0,0);
│ │ │ +
200 Impl::GaussNewtonErrorCode err = Impl::gaussNewton(
│ │ │ +
201 [&](const LocalCoordinate& local) { return this->global(local); },
│ │ │ +
202 [&](const LocalCoordinate& local) { return this->jacobianTransposed(local); },
│ │ │ +
203 y, x, opts
│ │ │ +
204 );
│ │ │ +
205
│ │ │ +
206 if (err != Impl::GaussNewtonErrorCode::OK)
│ │ │ +
207 DUNE_THROW(Dune::Exception,
│ │ │ +
208 "Local coordinate can not be recovered from global coordinate, error code = " << int(err) << "\n"
│ │ │ +
209 << " (global(x) - y).two_norm() = " << (global(x) - y).two_norm()
│ │ │ +
210 << " > tol = " << opts.absTol);
│ │ │ +
211
│ │ │ +
212 return x;
│ │ │ +
213 }
│ │ │ +
│ │ │ +
214
│ │ │ +
│ │ │ + │ │ │ +
226 {
│ │ │ +
227 return MatrixHelper::sqrtDetAAT(jacobianTransposed(local));
│ │ │ +
228 }
│ │ │ +
│ │ │ +
229
│ │ │ +
│ │ │ +
241 Volume volume (Impl::ConvergenceOptions<ctype> opts = {}) const
│ │ │ +
242 {
│ │ │ + │ │ │ +
244 if (affine())
│ │ │ +
245 return vol0;
│ │ │ +
246
│ │ │ +
247 using std::abs;
│ │ │ +
248 for (int p = 2; p < opts.maxIt; ++p) {
│ │ │ + │ │ │ +
250 if (abs(vol1 - vol0) < opts.absTol)
│ │ │ +
251 return vol1;
│ │ │ +
252
│ │ │ +
253 vol0 = vol1;
│ │ │ +
254 }
│ │ │ +
255 return vol0;
│ │ │ +
256 }
│ │ │ +
│ │ │ +
257
│ │ │ +
│ │ │ + │ │ │ +
260 {
│ │ │ +
261 Volume vol(0);
│ │ │ +
262 for (const auto& qp : quadRule)
│ │ │ +
263 vol += integrationElement(qp.position()) * qp.weight();
│ │ │ +
264 return vol;
│ │ │ +
265 }
│ │ │ +
│ │ │ +
266
│ │ │ +
│ │ │ + │ │ │ +
273 {
│ │ │ +
274 auto&& jLocal = geometry_.jacobian(local);
│ │ │ +
275 auto&& jMapping = (*dMapping_)(geometry_.global(local));
│ │ │ +
276 return jMapping * jLocal;
│ │ │ +
277 }
│ │ │ +
│ │ │ +
278
│ │ │ +
│ │ │ + │ │ │ +
285 {
│ │ │ +
286 return transpose(jacobian(local));
│ │ │ +
287 }
│ │ │ +
│ │ │ +
288
│ │ │ +
│ │ │ + │ │ │ +
297 {
│ │ │ +
298 JacobianInverse out;
│ │ │ +
299 MatrixHelper::leftInvA(jacobian(local), out);
│ │ │ +
300 return out;
│ │ │ +
301 }
│ │ │ +
│ │ │ +
302
│ │ │ +
│ │ │ + │ │ │ +
311 {
│ │ │ +
312 return transpose(jacobianInverse(local));
│ │ │ +
313 }
│ │ │ +
│ │ │ +
314
│ │ │ +
│ │ │ +
316 friend ReferenceElement referenceElement (const MappedGeometry& geometry)
│ │ │ +
317 {
│ │ │ +
318 return geometry.refElement();
│ │ │ +
319 }
│ │ │ +
│ │ │ +
320
│ │ │ +
321protected:
│ │ │ +
322 // the internal stored reference element
│ │ │ +
│ │ │ +
323 ReferenceElement refElement () const
│ │ │ +
324 {
│ │ │ +
325 return referenceElement(geometry_);
│ │ │ +
326 }
│ │ │ +
│ │ │ +
327
│ │ │ +
328private:
│ │ │ +
329 // internal reference to the stored mapping
│ │ │ +
330 const Mapping& mapping () const
│ │ │ +
331 {
│ │ │ +
332 return *mapping_;
│ │ │ +
333 }
│ │ │ +
334
│ │ │ +
335 // internal reference to the wrapped geometry
│ │ │ +
336 const Geometry& geometry () const
│ │ │ +
337 {
│ │ │ +
338 return geometry_;
│ │ │ +
339 }
│ │ │ +
340
│ │ │ +
341private:
│ │ │ +
343 CopyableOptional<Mapping> mapping_;
│ │ │ +
344
│ │ │ +
346 CopyableOptional<DerivativeMapping> dMapping_;
│ │ │ +
347
│ │ │ +
349 Geometry geometry_;
│ │ │ +
350
│ │ │ +
352 bool affine_;
│ │ │ +
353};
│ │ │ +
│ │ │ +
354
│ │ │ +
355// deduction guides
│ │ │ +
356template <class Map, class Geo>
│ │ │ +
357MappedGeometry (const Map&, const Geo&)
│ │ │ + │ │ │ +
359
│ │ │ +
360template <class Map, class Geo>
│ │ │ +
361MappedGeometry (const Map&, const Geo&, bool)
│ │ │ + │ │ │ +
363
│ │ │ +
364} // end namespace Dune
│ │ │ +
365
│ │ │ +
366#endif // DUNE_GEOMETRY_MAPPEDGEOMETRY_HH
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
STL namespace.
│ │ │
Definition affinegeometry.hh:22
│ │ │ -
Static tag representing a dimension.
Definition dimension.hh:16
│ │ │ -
Dim type
Definition dimension.hh:17
│ │ │ -
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │ -
Codim type
Definition dimension.hh:25
│ │ │ +
MappedGeometry(const Map &, const Geo &) -> MappedGeometry< Map, Geo >
│ │ │ +
Definition affinegeometry.hh:28
│ │ │ +
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │ +
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:146
│ │ │ +
Geometry parametrized by a LocalFunction and a LocalGeometry.
Definition mappedgeometry.hh:65
│ │ │ +
std::remove_reference_t< decltype(std::declval< Map >()(std::declval< typename Geo::GlobalCoordinate >()))> GlobalCoordinate
type of global coordinates
Definition mappedgeometry.hh:71
│ │ │ +
GlobalCoordinate center() const
Map the center of the wrapped geometry.
Definition mappedgeometry.hh:162
│ │ │ +
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian's inverse.
Definition mappedgeometry.hh:310
│ │ │ +
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition mappedgeometry.hh:296
│ │ │ +
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian.
Definition mappedgeometry.hh:284
│ │ │ +
MappedGeometry(Map_ &&mapping, Geo_ &&geometry, bool affine=false)
Constructor from mapping to parametrize the geometry.
Definition mappedgeometry.hh:125
│ │ │ +
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
type of jacobian transposed
Definition mappedgeometry.hh:89
│ │ │ +
static constexpr int mydimension
geometry dimension
Definition mappedgeometry.hh:77
│ │ │ +
GeometryType type() const
Obtain the geometry type from the reference element.
Definition mappedgeometry.hh:143
│ │ │ +
typename Geo::LocalCoordinate LocalCoordinate
type of local coordinates
Definition mappedgeometry.hh:68
│ │ │ +
typename Geo::ctype ctype
coordinate type
Definition mappedgeometry.hh:74
│ │ │ +
LocalCoordinate local(const GlobalCoordinate &y, Impl::GaussNewtonOptions< ctype > opts={}) const
Evaluate the inverse coordinate mapping.
Definition mappedgeometry.hh:197
│ │ │ +
Geo Geometry
Definition mappedgeometry.hh:108
│ │ │ +
GlobalCoordinate corner(int i) const
Obtain coordinates of the i-th corner.
Definition mappedgeometry.hh:155
│ │ │ +
static constexpr int coorddimension
coordinate dimension
Definition mappedgeometry.hh:80
│ │ │ +
FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed
type of jacobian inverse transposed
Definition mappedgeometry.hh:95
│ │ │ +
Map Mapping
Definition mappedgeometry.hh:105
│ │ │ +
GlobalCoordinate global(const LocalCoordinate &local) const
Evaluate the coordinate mapping.
Definition mappedgeometry.hh:176
│ │ │ +
ReferenceElement refElement() const
Definition mappedgeometry.hh:323
│ │ │ +
Volume volume(const QuadratureRule< ctype, mydimension > &quadRule) const
Obtain the volume of the mapping's image by given quadrature rules.
Definition mappedgeometry.hh:259
│ │ │ +
int corners() const
Obtain number of corners of the corresponding reference element.
Definition mappedgeometry.hh:149
│ │ │ +
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
type of jacobian inverse
Definition mappedgeometry.hh:92
│ │ │ +
friend ReferenceElement referenceElement(const MappedGeometry &geometry)
Obtain the reference-element related to this geometry.
Definition mappedgeometry.hh:316
│ │ │ +
Volume volume(Impl::ConvergenceOptions< ctype > opts={}) const
Obtain the volume of the mapping's image.
Definition mappedgeometry.hh:241
│ │ │ +
std::remove_reference_t< decltype(Dune::power(std::declval< ctype >(), mydimension))> Volume
type of volume
Definition mappedgeometry.hh:83
│ │ │ +
bool affine() const
Is this mapping affine? Not in general, since we don't know anything about the mapping....
Definition mappedgeometry.hh:137
│ │ │ +
std::remove_reference_t< decltype(derivative(std::declval< Map >()))> DerivativeMapping
Definition mappedgeometry.hh:111
│ │ │ +
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition mappedgeometry.hh:272
│ │ │ +
Impl::FieldMatrixHelper< ctype > MatrixHelper
Definition mappedgeometry.hh:102
│ │ │ +
FieldMatrix< ctype, coorddimension, mydimension > Jacobian
type of jacobian
Definition mappedgeometry.hh:86
│ │ │ +
ctype integrationElement(const LocalCoordinate &local) const
Obtain the integration element.
Definition mappedgeometry.hh:225
│ │ │ +
Abstract base class for quadrature rules.
Definition quadraturerules.hh:214
│ │ │ +
static const QuadratureRule & rule(const GeometryType &t, int p, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
select the appropriate QuadratureRule for GeometryType t and order p
Definition quadraturerules.hh:326
│ │ │ +
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,53 +1,410 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -dimension.hh │ │ │ │ +mappedgeometry.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_DIMENSION_HH │ │ │ │ -6#define DUNE_GEOMETRY_DIMENSION_HH │ │ │ │ +5#ifndef DUNE_GEOMETRY_MAPPEDGEOMETRY_HH │ │ │ │ +6#define DUNE_GEOMETRY_MAPPEDGEOMETRY_HH │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ -9 │ │ │ │ -10namespace _D_u_n_e { │ │ │ │ -11 │ │ │ │ -13 template │ │ │ │ -_1_4 struct _D_i_m │ │ │ │ -15 : public std::integral_constant │ │ │ │ -16 { │ │ │ │ -_1_7 typedef _D_i_m _t_y_p_e; │ │ │ │ -18 }; │ │ │ │ -19 │ │ │ │ -21 template │ │ │ │ -_2_2 struct _C_o_d_i_m │ │ │ │ -23 : public std::integral_constant │ │ │ │ -24 { │ │ │ │ -_2_5 typedef _C_o_d_i_m _t_y_p_e; │ │ │ │ -26 }; │ │ │ │ -27 │ │ │ │ -28} │ │ │ │ -29 │ │ │ │ -30#endif // DUNE_GEOMETRY_DIMENSION_HH │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13 │ │ │ │ +14#include │ │ │ │ +15#include │ │ │ │ +16#include │ │ │ │ +17#include │ │ │ │ +18#include │ │ │ │ +19#include │ │ │ │ +20#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_q_u_a_d_r_a_t_u_r_e_r_u_l_e_s_._h_h> │ │ │ │ +21#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ +22#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +23#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_a_l_g_o_r_i_t_h_m_s_._h_h> │ │ │ │ +24#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_c_o_n_v_e_r_g_e_n_c_e_._h_h> │ │ │ │ +25#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ +26 │ │ │ │ +27namespace _D_u_n_e { │ │ │ │ +28 │ │ │ │ +63template │ │ │ │ +_6_4class _M_a_p_p_e_d_G_e_o_m_e_t_r_y │ │ │ │ +65{ │ │ │ │ +66public: │ │ │ │ +_6_8 using _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e = typename Geo::LocalCoordinate; │ │ │ │ +69 │ │ │ │ +_7_1 using _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e = std::remove_reference_t │ │ │ │ +()(std::declval()))>; │ │ │ │ +72 │ │ │ │ +_7_4 using _c_t_y_p_e = typename Geo::ctype; │ │ │ │ +75 │ │ │ │ +_7_7 static constexpr int _m_y_d_i_m_e_n_s_i_o_n = LocalCoordinate::size(); │ │ │ │ +78 │ │ │ │ +_8_0 static constexpr int _c_o_o_r_d_d_i_m_e_n_s_i_o_n = GlobalCoordinate::size(); │ │ │ │ +81 │ │ │ │ +_8_3 using _V_o_l_u_m_e = std::remove_reference_t(),_m_y_d_i_m_e_n_s_i_o_n))>; │ │ │ │ +84 │ │ │ │ +_8_6 using _J_a_c_o_b_i_a_n = FieldMatrix; │ │ │ │ +87 │ │ │ │ +_8_9 using _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d = FieldMatrix; │ │ │ │ +90 │ │ │ │ +_9_2 using _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e = FieldMatrix; │ │ │ │ +93 │ │ │ │ +_9_5 using _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d = FieldMatrix; │ │ │ │ +96 │ │ │ │ +97private: │ │ │ │ +98 using ReferenceElements = _D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>; │ │ │ │ +99 using ReferenceElement = typename _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ +100 │ │ │ │ +101protected: │ │ │ │ +_1_0_2 using _M_a_t_r_i_x_H_e_l_p_e_r = Impl::FieldMatrixHelper; │ │ │ │ +103 │ │ │ │ +104 // type of the mapping representation the geometry parametrization │ │ │ │ +_1_0_5 using _M_a_p_p_i_n_g = Map; │ │ │ │ +106 │ │ │ │ +107 // type of the geometry that is wrapped │ │ │ │ +_1_0_8 using _G_e_o_m_e_t_r_y = _G_e_o; │ │ │ │ +109 │ │ │ │ +110 // type of a mapping representing the derivative of `Map` w.r.t. │ │ │ │ +`GlobalCoordinate` │ │ │ │ +_1_1_1 using _D_e_r_i_v_a_t_i_v_e_M_a_p_p_i_n_g = std::remove_reference_t()))>; │ │ │ │ +112 │ │ │ │ +113public: │ │ │ │ +122 template ::value, int> = 0, │ │ │ │ +124 std::enable_if_t::value, int> = 0> │ │ │ │ +_1_2_5 _M_a_p_p_e_d_G_e_o_m_e_t_r_y (Map_&& mapping, Geo_&& geometry, bool _a_f_f_i_n_e = false) │ │ │ │ +126 : mapping_(_s_t_d::forward(mapping)) │ │ │ │ +127 , dMapping_(derivative(*mapping_)) │ │ │ │ +128 , geometry_(_s_t_d::forward(geometry)) │ │ │ │ +129 , affine_(_a_f_f_i_n_e) │ │ │ │ +130 {} │ │ │ │ +131 │ │ │ │ +_1_3_7 bool _a_f_f_i_n_e () const │ │ │ │ +138 { │ │ │ │ +139 return affine_; │ │ │ │ +140 } │ │ │ │ +141 │ │ │ │ +_1_4_3 _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e () const │ │ │ │ +144 { │ │ │ │ +145 return geometry_.type(); │ │ │ │ +146 } │ │ │ │ +147 │ │ │ │ +_1_4_9 int _c_o_r_n_e_r_s () const │ │ │ │ +150 { │ │ │ │ +151 return geometry_.corners(); │ │ │ │ +152 } │ │ │ │ +153 │ │ │ │ +_1_5_5 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_o_r_n_e_r (int i) const │ │ │ │ +156 { │ │ │ │ +157 assert( (i >= 0) && (i < _c_o_r_n_e_r_s()) ); │ │ │ │ +158 return mapping()(geometry_.corner(i)); │ │ │ │ +159 } │ │ │ │ +160 │ │ │ │ +_1_6_2 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r () const │ │ │ │ +163 { │ │ │ │ +164 return mapping()(geometry_.center()); │ │ │ │ +165 } │ │ │ │ +166 │ │ │ │ +_1_7_6 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +177 { │ │ │ │ +178 return mapping()(geometry_.global(_l_o_c_a_l)); │ │ │ │ +179 } │ │ │ │ +180 │ │ │ │ +_1_9_7 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l (const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e& y, Impl:: │ │ │ │ +GaussNewtonOptions opts = {}) const │ │ │ │ +198 { │ │ │ │ +199 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e x = _r_e_f_E_l_e_m_e_n_t().position(0,0); │ │ │ │ +200 Impl::GaussNewtonErrorCode err = Impl::gaussNewton( │ │ │ │ +201 [&](const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) { return this->_g_l_o_b_a_l(local); }, │ │ │ │ +202 [&](const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) { return this->_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(local); │ │ │ │ +}, │ │ │ │ +203 y, x, opts │ │ │ │ +204 ); │ │ │ │ +205 │ │ │ │ +206 if (err != Impl::GaussNewtonErrorCode::OK) │ │ │ │ +207 DUNE_THROW(Dune::Exception, │ │ │ │ +208 "Local coordinate can not be recovered from global coordinate, error code = │ │ │ │ +" << int(err) << "\n" │ │ │ │ +209 << " (global(x) - y).two_norm() = " << (_g_l_o_b_a_l(x) - y).two_norm() │ │ │ │ +210 << " > tol = " << opts.absTol); │ │ │ │ +211 │ │ │ │ +212 return x; │ │ │ │ +213 } │ │ │ │ +214 │ │ │ │ +_2_2_5 _c_t_y_p_e _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +226 { │ │ │ │ +227 return MatrixHelper::sqrtDetAAT(_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d(_l_o_c_a_l)); │ │ │ │ +228 } │ │ │ │ +229 │ │ │ │ +_2_4_1 _V_o_l_u_m_e _v_o_l_u_m_e (Impl::ConvergenceOptions opts = {}) const │ │ │ │ +242 { │ │ │ │ +243 _V_o_l_u_m_e vol0 = _v_o_l_u_m_e(_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>_:_:_r_u_l_e(_t_y_p_e(), 1)); │ │ │ │ +244 if (_a_f_f_i_n_e()) │ │ │ │ +245 return vol0; │ │ │ │ +246 │ │ │ │ +247 using std::abs; │ │ │ │ +248 for (int p = 2; p < opts.maxIt; ++p) { │ │ │ │ +249 _V_o_l_u_m_e vol1 = _v_o_l_u_m_e(_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>_:_:_r_u_l_e(_t_y_p_e(), p)); │ │ │ │ +250 if (abs(vol1 - vol0) < opts.absTol) │ │ │ │ +251 return vol1; │ │ │ │ +252 │ │ │ │ +253 vol0 = vol1; │ │ │ │ +254 } │ │ │ │ +255 return vol0; │ │ │ │ +256 } │ │ │ │ +257 │ │ │ │ +_2_5_9 _V_o_l_u_m_e _v_o_l_u_m_e (const _Q_u_a_d_r_a_t_u_r_e_R_u_l_e_<_c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_>& quadRule) const │ │ │ │ +260 { │ │ │ │ +261 _V_o_l_u_m_e vol(0); │ │ │ │ +262 for (const auto& qp : quadRule) │ │ │ │ +263 vol += _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t(qp.position()) * qp.weight(); │ │ │ │ +264 return vol; │ │ │ │ +265 } │ │ │ │ +266 │ │ │ │ +_2_7_2 _J_a_c_o_b_i_a_n _j_a_c_o_b_i_a_n (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +273 { │ │ │ │ +274 auto&& jLocal = geometry_.jacobian(_l_o_c_a_l); │ │ │ │ +275 auto&& jMapping = (*dMapping_)(geometry_.global(_l_o_c_a_l)); │ │ │ │ +276 return jMapping * jLocal; │ │ │ │ +277 } │ │ │ │ +278 │ │ │ │ +_2_8_4 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +285 { │ │ │ │ +286 return transpose(_j_a_c_o_b_i_a_n(_l_o_c_a_l)); │ │ │ │ +287 } │ │ │ │ +288 │ │ │ │ +_2_9_6 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ +297 { │ │ │ │ +298 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e out; │ │ │ │ +299 MatrixHelper::leftInvA(_j_a_c_o_b_i_a_n(_l_o_c_a_l), out); │ │ │ │ +300 return out; │ │ │ │ +301 } │ │ │ │ +302 │ │ │ │ +_3_1_0 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d (const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& │ │ │ │ +_l_o_c_a_l) const │ │ │ │ +311 { │ │ │ │ +312 return transpose(_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e(_l_o_c_a_l)); │ │ │ │ +313 } │ │ │ │ +314 │ │ │ │ +_3_1_6 friend ReferenceElement _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t (const _M_a_p_p_e_d_G_e_o_m_e_t_r_y& geometry) │ │ │ │ +317 { │ │ │ │ +318 return geometry.refElement(); │ │ │ │ +319 } │ │ │ │ +320 │ │ │ │ +321protected: │ │ │ │ +322 // the internal stored reference element │ │ │ │ +_3_2_3 ReferenceElement _r_e_f_E_l_e_m_e_n_t () const │ │ │ │ +324 { │ │ │ │ +325 return _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t(geometry_); │ │ │ │ +326 } │ │ │ │ +327 │ │ │ │ +328private: │ │ │ │ +329 // internal reference to the stored mapping │ │ │ │ +330 const _M_a_p_p_i_n_g& mapping () const │ │ │ │ +331 { │ │ │ │ +332 return *mapping_; │ │ │ │ +333 } │ │ │ │ +334 │ │ │ │ +335 // internal reference to the wrapped geometry │ │ │ │ +336 const _G_e_o_m_e_t_r_y& geometry () const │ │ │ │ +337 { │ │ │ │ +338 return geometry_; │ │ │ │ +339 } │ │ │ │ +340 │ │ │ │ +341private: │ │ │ │ +343 CopyableOptional mapping_; │ │ │ │ +344 │ │ │ │ +346 CopyableOptional dMapping_; │ │ │ │ +347 │ │ │ │ +349 _G_e_o_m_e_t_r_y geometry_; │ │ │ │ +350 │ │ │ │ +352 bool affine_; │ │ │ │ +353}; │ │ │ │ +354 │ │ │ │ +355// deduction guides │ │ │ │ +356template │ │ │ │ +_3_5_7_M_a_p_p_e_d_G_e_o_m_e_t_r_y (const Map&, const _G_e_o&) │ │ │ │ +358 -> _M_a_p_p_e_d_G_e_o_m_e_t_r_y_<_M_a_p_,_G_e_o_>; │ │ │ │ +359 │ │ │ │ +360template │ │ │ │ +_3_6_1_M_a_p_p_e_d_G_e_o_m_e_t_r_y (const Map&, const _G_e_o&, bool) │ │ │ │ +362 -> _M_a_p_p_e_d_G_e_o_m_e_t_r_y_<_M_a_p_,_G_e_o_>; │ │ │ │ +363 │ │ │ │ +364} // end namespace Dune │ │ │ │ +365 │ │ │ │ +366#endif // DUNE_GEOMETRY_MAPPEDGEOMETRY_HH │ │ │ │ +_t_y_p_e_._h_h │ │ │ │ +A unique label for each type of element that can occur in a grid. │ │ │ │ +_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ +_c_o_n_v_e_r_g_e_n_c_e_._h_h │ │ │ │ +_a_l_g_o_r_i_t_h_m_s_._h_h │ │ │ │ +_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h │ │ │ │ +_q_u_a_d_r_a_t_u_r_e_r_u_l_e_s_._h_h │ │ │ │ +_s_t_d │ │ │ │ +STL namespace. │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_D_i_m │ │ │ │ -Static tag representing a dimension. │ │ │ │ -DDeeffiinniittiioonn dimension.hh:16 │ │ │ │ -_D_u_n_e_:_:_D_i_m_:_:_t_y_p_e │ │ │ │ -Dim type │ │ │ │ -DDeeffiinniittiioonn dimension.hh:17 │ │ │ │ -_D_u_n_e_:_:_C_o_d_i_m │ │ │ │ -Static tag representing a codimension. │ │ │ │ -DDeeffiinniittiioonn dimension.hh:24 │ │ │ │ -_D_u_n_e_:_:_C_o_d_i_m_:_:_t_y_p_e │ │ │ │ -Codim type │ │ │ │ -DDeeffiinniittiioonn dimension.hh:25 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y │ │ │ │ +MappedGeometry(const Map &, const Geo &) -> MappedGeometry< Map, Geo > │ │ │ │ +_D_u_n_e_:_:_G_e_o │ │ │ │ +DDeeffiinniittiioonn affinegeometry.hh:28 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ +Class providing access to the singletons of the reference elements. │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ +_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +typename Container::ReferenceElement ReferenceElement │ │ │ │ +The reference element type. │ │ │ │ +DDeeffiinniittiioonn referenceelements.hh:146 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y │ │ │ │ +Geometry parametrized by a LocalFunction and a LocalGeometry. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:65 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +std::remove_reference_t< decltype(std::declval< Map >()(std::declval< typename │ │ │ │ +Geo::GlobalCoordinate >()))> GlobalCoordinate │ │ │ │ +type of global coordinates │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:71 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_c_e_n_t_e_r │ │ │ │ +GlobalCoordinate center() const │ │ │ │ +Map the center of the wrapped geometry. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:162 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate │ │ │ │ +&local) const │ │ │ │ +Obtain the transposed of the Jacobian's inverse. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:310 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ +JacobianInverse jacobianInverse(const LocalCoordinate &local) const │ │ │ │ +Obtain the Jacobian's inverse. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:296 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const │ │ │ │ +Obtain the transposed of the Jacobian. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:284 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y │ │ │ │ +MappedGeometry(Map_ &&mapping, Geo_ &&geometry, bool affine=false) │ │ │ │ +Constructor from mapping to parametrize the geometry. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:125 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed │ │ │ │ +type of jacobian transposed │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:89 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ +static constexpr int mydimension │ │ │ │ +geometry dimension │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:77 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_t_y_p_e │ │ │ │ +GeometryType type() const │ │ │ │ +Obtain the geometry type from the reference element. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:143 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ +typename Geo::LocalCoordinate LocalCoordinate │ │ │ │ +type of local coordinates │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:68 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_c_t_y_p_e │ │ │ │ +typename Geo::ctype ctype │ │ │ │ +coordinate type │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:74 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l │ │ │ │ +LocalCoordinate local(const GlobalCoordinate &y, Impl::GaussNewtonOptions< │ │ │ │ +ctype > opts={}) const │ │ │ │ +Evaluate the inverse coordinate mapping. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:197 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_G_e_o_m_e_t_r_y │ │ │ │ +Geo Geometry │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:108 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ +GlobalCoordinate corner(int i) const │ │ │ │ +Obtain coordinates of the i-th corner. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:155 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ +static constexpr int coorddimension │ │ │ │ +coordinate dimension │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:80 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed │ │ │ │ +type of jacobian inverse transposed │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:95 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_M_a_p_p_i_n_g │ │ │ │ +Map Mapping │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:105 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ +GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ +Evaluate the coordinate mapping. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:176 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_r_e_f_E_l_e_m_e_n_t │ │ │ │ +ReferenceElement refElement() const │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:323 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ +Volume volume(const QuadratureRule< ctype, mydimension > &quadRule) const │ │ │ │ +Obtain the volume of the mapping's image by given quadrature rules. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:259 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r_s │ │ │ │ +int corners() const │ │ │ │ +Obtain number of corners of the corresponding reference element. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:149 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ +FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse │ │ │ │ +type of jacobian inverse │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:92 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ +friend ReferenceElement referenceElement(const MappedGeometry &geometry) │ │ │ │ +Obtain the reference-element related to this geometry. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:316 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ +Volume volume(Impl::ConvergenceOptions< ctype > opts={}) const │ │ │ │ +Obtain the volume of the mapping's image. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:241 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_V_o_l_u_m_e │ │ │ │ +std::remove_reference_t< decltype(Dune::power(std::declval< ctype >(), │ │ │ │ +mydimension))> Volume │ │ │ │ +type of volume │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:83 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ +bool affine() const │ │ │ │ +Is this mapping affine? Not in general, since we don't know anything about the │ │ │ │ +mapping.... │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:137 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_D_e_r_i_v_a_t_i_v_e_M_a_p_p_i_n_g │ │ │ │ +std::remove_reference_t< decltype(derivative(std::declval< Map >()))> │ │ │ │ +DerivativeMapping │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:111 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n │ │ │ │ +Jacobian jacobian(const LocalCoordinate &local) const │ │ │ │ +Obtain the Jacobian. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:272 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_M_a_t_r_i_x_H_e_l_p_e_r │ │ │ │ +Impl::FieldMatrixHelper< ctype > MatrixHelper │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:102 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n │ │ │ │ +FieldMatrix< ctype, coorddimension, mydimension > Jacobian │ │ │ │ +type of jacobian │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:86 │ │ │ │ +_D_u_n_e_:_:_M_a_p_p_e_d_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ +ctype integrationElement(const LocalCoordinate &local) const │ │ │ │ +Obtain the integration element. │ │ │ │ +DDeeffiinniittiioonn mappedgeometry.hh:225 │ │ │ │ +_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e │ │ │ │ +Abstract base class for quadrature rules. │ │ │ │ +DDeeffiinniittiioonn quadraturerules.hh:214 │ │ │ │ +_D_u_n_e_:_:_Q_u_a_d_r_a_t_u_r_e_R_u_l_e_s_:_:_r_u_l_e │ │ │ │ +static const QuadratureRule & rule(const GeometryType &t, int p, │ │ │ │ +QuadratureType::Enum qt=QuadratureType::GaussLegendre) │ │ │ │ +select the appropriate QuadratureRule for GeometryType t and order p │ │ │ │ +DDeeffiinniittiioonn quadraturerules.hh:326 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ +Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ +DDeeffiinniittiioonn type.hh:114 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00248.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: axisalignedcubegeometry.hh File Reference │ │ │ +dune-geometry: dimension.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,41 +74,33 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
axisalignedcubegeometry.hh File Reference
│ │ │ +
dimension.hh File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

A geometry implementation for axis-aligned hypercubes. │ │ │ -More...

│ │ │ -
#include <bitset>
│ │ │ -#include <dune/common/fvector.hh>
│ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ -#include <dune/common/diagonalmatrix.hh>
│ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ +
#include <type_traits>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::AxisAlignedCubeGeometry< CoordType, dim, coorddim >
 A geometry implementation for axis-aligned hypercubes. More...
struct  Dune::Dim< dim >
 Static tag representing a dimension. More...
struct  Dune::Codim< codim >
 Static tag representing a codimension. More...
│ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
│ │ │ -

Detailed Description

│ │ │ -

A geometry implementation for axis-aligned hypercubes.

│ │ │ -
│ │ │ +
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,25 +1,19 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -axisalignedcubegeometry.hh File Reference │ │ │ │ -A geometry implementation for axis-aligned hypercubes. _M_o_r_e_._._. │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ +dimension.hh File Reference │ │ │ │ +#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_<_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_,_ _c_o_o_r_d_d_i_m_ _> │ │ │ │ -  A geometry implementation for axis-aligned hypercubes. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_D_i_m_<_ _d_i_m_ _> │ │ │ │ +  Static tag representing a dimension. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_C_o_d_i_m_<_ _c_o_d_i_m_ _> │ │ │ │ +  Static tag representing a codimension. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A geometry implementation for axis-aligned hypercubes. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00248_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: axisalignedcubegeometry.hh Source File │ │ │ +dune-geometry: dimension.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,361 +71,54 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
axisalignedcubegeometry.hh
│ │ │ +
dimension.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © 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_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH
│ │ │ -
7#define DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH
│ │ │ -
8
│ │ │ -
12
│ │ │ -
13#include <bitset>
│ │ │ -
14
│ │ │ -
15#include <dune/common/fvector.hh>
│ │ │ -
16#include <dune/common/fmatrix.hh>
│ │ │ -
17#include <dune/common/diagonalmatrix.hh>
│ │ │ -
18
│ │ │ - │ │ │ -
20#include <dune/geometry/type.hh>
│ │ │ -
21
│ │ │ -
22
│ │ │ -
23namespace Dune {
│ │ │ -
24
│ │ │ -
48 template <class CoordType, unsigned int dim, unsigned int coorddim>
│ │ │ -
│ │ │ - │ │ │ -
50 {
│ │ │ -
51
│ │ │ -
52
│ │ │ -
53 public:
│ │ │ -
54
│ │ │ -
56 constexpr static int mydimension = dim;
│ │ │ -
57
│ │ │ -
59 constexpr static int coorddimension = coorddim;
│ │ │ -
60
│ │ │ -
62 typedef CoordType ctype;
│ │ │ -
63
│ │ │ -
65 typedef FieldVector<ctype,dim> LocalCoordinate;
│ │ │ -
66
│ │ │ -
68 typedef FieldVector<ctype,coorddim> GlobalCoordinate;
│ │ │ -
69
│ │ │ -
71 typedef ctype Volume;
│ │ │ -
72
│ │ │ -
79 typedef typename std::conditional<dim==coorddim,
│ │ │ -
80 DiagonalMatrix<ctype,dim>,
│ │ │ -
81 FieldMatrix<ctype,dim,coorddim> >::type JacobianTransposed;
│ │ │ -
82
│ │ │ -
89 typedef typename std::conditional<dim==coorddim,
│ │ │ -
90 DiagonalMatrix<ctype,dim>,
│ │ │ -
91 FieldMatrix<ctype,coorddim,dim> >::type JacobianInverseTransposed;
│ │ │ -
92
│ │ │ -
100 using Jacobian = std::conditional_t<dim==coorddim, DiagonalMatrix<ctype,dim>, FieldMatrix<ctype,coorddim,dim> >;
│ │ │ -
101
│ │ │ -
109 using JacobianInverse = std::conditional_t<dim==coorddim, DiagonalMatrix<ctype,dim>, FieldMatrix<ctype,dim,coorddim> >;
│ │ │ -
110
│ │ │ - │ │ │ -
119
│ │ │ -
│ │ │ -
124 AxisAlignedCubeGeometry(const Dune::FieldVector<ctype,coorddim> lower,
│ │ │ -
125 const Dune::FieldVector<ctype,coorddim> upper)
│ │ │ -
126 : lower_(lower),
│ │ │ -
127 upper_(upper),
│ │ │ -
128 axes_()
│ │ │ -
129 {
│ │ │ -
130 static_assert(dim==coorddim, "Use this constructor only if dim==coorddim!");
│ │ │ -
131 // all 'true', but is never actually used
│ │ │ -
132 axes_ = (1<<coorddim)-1;
│ │ │ -
133 }
│ │ │ -
│ │ │ -
134
│ │ │ -
│ │ │ -
142 AxisAlignedCubeGeometry(const Dune::FieldVector<ctype,coorddim> lower,
│ │ │ -
143 const Dune::FieldVector<ctype,coorddim> upper,
│ │ │ -
144 const std::bitset<coorddim>& axes)
│ │ │ -
145 : lower_(lower),
│ │ │ -
146 upper_(upper),
│ │ │ -
147 axes_(axes)
│ │ │ -
148 {
│ │ │ -
149 assert(axes.count()==dim);
│ │ │ -
150 for (size_t i=0; i<coorddim; i++)
│ │ │ -
151 if (not axes_[i])
│ │ │ -
152 upper_[i] = lower_[i];
│ │ │ -
153 }
│ │ │ -
│ │ │ -
154
│ │ │ -
│ │ │ -
159 AxisAlignedCubeGeometry(const Dune::FieldVector<ctype,coorddim> lower)
│ │ │ -
160 : lower_(lower)
│ │ │ -
161 {}
│ │ │ -
│ │ │ -
162
│ │ │ -
│ │ │ - │ │ │ -
165 {
│ │ │ -
166 return GeometryTypes::cube(dim);
│ │ │ -
167 }
│ │ │ -
│ │ │ -
168
│ │ │ -
│ │ │ - │ │ │ -
171 {
│ │ │ -
172 GlobalCoordinate result;
│ │ │ -
173 if (dim == coorddim) { // fast case
│ │ │ -
174 for (size_t i=0; i<coorddim; i++)
│ │ │ -
175 result[i] = lower_[i] + local[i]*(upper_[i] - lower_[i]);
│ │ │ -
176 } else if (dim == 0) { // a vertex -- the other fast case
│ │ │ -
177 result = lower_; // hope for named-return-type-optimization
│ │ │ -
178 } else { // slow case
│ │ │ -
179 size_t lc=0;
│ │ │ -
180 for (size_t i=0; i<coorddim; i++)
│ │ │ -
181 result[i] = (axes_[i])
│ │ │ -
182 ? lower_[i] + local[lc++]*(upper_[i] - lower_[i])
│ │ │ -
183 : lower_[i];
│ │ │ -
184 }
│ │ │ -
185 return result;
│ │ │ -
186 }
│ │ │ -
│ │ │ -
187
│ │ │ -
│ │ │ - │ │ │ -
190 {
│ │ │ -
191 LocalCoordinate result;
│ │ │ -
192 if (dim == coorddim) { // fast case
│ │ │ -
193 for (size_t i=0; i<dim; i++)
│ │ │ -
194 result[i] = (global[i] - lower_[i]) / (upper_[i] - lower_[i]);
│ │ │ -
195 } else if (dim != 0) { // slow case
│ │ │ -
196 size_t lc=0;
│ │ │ -
197 for (size_t i=0; i<coorddim; i++)
│ │ │ -
198 if (axes_[i])
│ │ │ -
199 result[lc++] = (global[i] - lower_[i]) / (upper_[i] - lower_[i]);
│ │ │ -
200 }
│ │ │ -
201 return result;
│ │ │ -
202 }
│ │ │ -
│ │ │ -
203
│ │ │ -
│ │ │ - │ │ │ -
206 {
│ │ │ -
207 JacobianTransposed result;
│ │ │ -
208
│ │ │ -
209 // Actually compute the result. Uses different methods depending
│ │ │ -
210 // on what kind of matrix JacobianTransposed is.
│ │ │ -
211 jacobianTransposed(result);
│ │ │ -
212
│ │ │ -
213 return result;
│ │ │ -
214 }
│ │ │ -
│ │ │ -
215
│ │ │ -
│ │ │ - │ │ │ -
218 {
│ │ │ - │ │ │ -
220
│ │ │ -
221 // Actually compute the result. Uses different methods depending
│ │ │ -
222 // on what kind of matrix JacobianTransposed is.
│ │ │ - │ │ │ -
224
│ │ │ -
225 return result;
│ │ │ -
226 }
│ │ │ -
│ │ │ -
227
│ │ │ -
│ │ │ -
229 Jacobian jacobian([[maybe_unused]] const LocalCoordinate& local) const
│ │ │ -
230 {
│ │ │ -
231 return jacobianTransposed(local).transposed();
│ │ │ -
232 }
│ │ │ -
│ │ │ -
233
│ │ │ -
│ │ │ - │ │ │ -
236 {
│ │ │ -
237 return jacobianInverseTransposed(local).transposed();
│ │ │ -
238 }
│ │ │ -
│ │ │ -
239
│ │ │ -
│ │ │ -
243 Volume integrationElement([[maybe_unused]] const LocalCoordinate& local) const
│ │ │ -
244 {
│ │ │ -
245 return volume();
│ │ │ -
246 }
│ │ │ -
│ │ │ -
247
│ │ │ -
│ │ │ - │ │ │ -
250 {
│ │ │ -
251 GlobalCoordinate result;
│ │ │ -
252 if (dim==0)
│ │ │ -
253 result = lower_;
│ │ │ -
254 else {
│ │ │ -
255 // Since lower_==upper_ for unused coordinates, this always does the right thing
│ │ │ -
256 for (size_t i=0; i<coorddim; i++)
│ │ │ -
257 result[i] = CoordType(0.5) * (lower_[i] + upper_[i]);
│ │ │ -
258 }
│ │ │ -
259 return result;
│ │ │ -
260 }
│ │ │ -
│ │ │ -
261
│ │ │ -
│ │ │ -
263 int corners() const
│ │ │ -
264 {
│ │ │ -
265 return 1<<dim;
│ │ │ -
266 }
│ │ │ -
│ │ │ -
267
│ │ │ -
│ │ │ - │ │ │ -
270 {
│ │ │ -
271 GlobalCoordinate result;
│ │ │ -
272 if (dim == coorddim) { // fast case
│ │ │ -
273 for (size_t i=0; i<coorddim; i++)
│ │ │ -
274 result[i] = (k & (1<<i)) ? upper_[i] : lower_[i];
│ │ │ -
275 } else if (dim == 0) { // vertex
│ │ │ -
276 result = lower_; // rely on named return-type optimization
│ │ │ -
277 } else { // slow case
│ │ │ -
278 unsigned int mask = 1;
│ │ │ -
279
│ │ │ -
280 for (size_t i=0; i<coorddim; i++) {
│ │ │ -
281 if (not axes_[i])
│ │ │ -
282 result[i] = lower_[i];
│ │ │ -
283 else {
│ │ │ -
284 result[i] = (k & mask) ? upper_[i] : lower_[i];
│ │ │ -
285 mask = (mask<<1);
│ │ │ -
286 }
│ │ │ -
287 }
│ │ │ -
288 }
│ │ │ -
289
│ │ │ -
290
│ │ │ -
291 return result;
│ │ │ -
292 }
│ │ │ -
│ │ │ -
293
│ │ │ -
│ │ │ - │ │ │ -
296 {
│ │ │ -
297 ctype vol = 1;
│ │ │ -
298 if (dim == coorddim) { // fast case
│ │ │ -
299 for (size_t i=0; i<dim; i++)
│ │ │ -
300 vol *= upper_[i] - lower_[i];
│ │ │ -
301 // do nothing if dim == 0
│ │ │ -
302 } else if (dim != 0) { // slow case
│ │ │ -
303 for (size_t i=0; i<coorddim; i++)
│ │ │ -
304 if (axes_[i])
│ │ │ -
305 vol *= upper_[i] - lower_[i];
│ │ │ -
306 }
│ │ │ -
307 return vol;
│ │ │ -
308 }
│ │ │ -
│ │ │ -
309
│ │ │ -
│ │ │ -
311 bool affine() const
│ │ │ -
312 {
│ │ │ -
313 return true;
│ │ │ -
314 }
│ │ │ -
│ │ │ -
315
│ │ │ -
│ │ │ - │ │ │ -
317 {
│ │ │ - │ │ │ -
319 }
│ │ │ -
│ │ │ -
320
│ │ │ -
321 private:
│ │ │ -
322 // jacobianTransposed: fast case --> diagonal matrix
│ │ │ -
323 void jacobianTransposed ( DiagonalMatrix<ctype,dim> &jacobianTransposed ) const
│ │ │ -
324 {
│ │ │ -
325 for (size_t i=0; i<dim; i++)
│ │ │ -
326 jacobianTransposed.diagonal()[i] = upper_[i] - lower_[i];
│ │ │ -
327 }
│ │ │ -
328
│ │ │ -
329 // jacobianTransposed: slow case --> dense matrix
│ │ │ -
330 void jacobianTransposed ( FieldMatrix<ctype,dim,coorddim> &jacobianTransposed ) const
│ │ │ -
331 {
│ │ │ -
332 if (dim==0)
│ │ │ -
333 return;
│ │ │ -
334
│ │ │ -
335 size_t lc = 0;
│ │ │ -
336 for (size_t i=0; i<coorddim; i++)
│ │ │ -
337 if (axes_[i])
│ │ │ -
338 jacobianTransposed[lc++][i] = upper_[i] - lower_[i];
│ │ │ -
339 }
│ │ │ -
340
│ │ │ -
341 // jacobianInverseTransposed: fast case --> diagonal matrix
│ │ │ -
342 void jacobianInverseTransposed ( DiagonalMatrix<ctype,dim> &jacobianInverseTransposed ) const
│ │ │ -
343 {
│ │ │ -
344 for (size_t i=0; i<dim; i++)
│ │ │ -
345 jacobianInverseTransposed.diagonal()[i] = CoordType(1.0) / (upper_[i] - lower_[i]);
│ │ │ -
346 }
│ │ │ -
347
│ │ │ -
348 // jacobianInverseTransposed: slow case --> dense matrix
│ │ │ -
349 void jacobianInverseTransposed ( FieldMatrix<ctype,coorddim,dim> &jacobianInverseTransposed ) const
│ │ │ -
350 {
│ │ │ -
351 if (dim==0)
│ │ │ -
352 return;
│ │ │ -
353
│ │ │ -
354 size_t lc = 0;
│ │ │ -
355 for (size_t i=0; i<coorddim; i++)
│ │ │ -
356 if (axes_[i])
│ │ │ -
357 jacobianInverseTransposed[i][lc++] = CoordType(1.0) / (upper_[i] - lower_[i]);
│ │ │ -
358 }
│ │ │ -
359
│ │ │ -
360 Dune::FieldVector<ctype,coorddim> lower_;
│ │ │ -
361
│ │ │ -
362 Dune::FieldVector<ctype,coorddim> upper_;
│ │ │ -
363
│ │ │ -
364 std::bitset<coorddim> axes_;
│ │ │ -
365 };
│ │ │ -
│ │ │ -
366
│ │ │ -
367} // namespace Dune
│ │ │ -
368#endif
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ - │ │ │ -
constexpr GeometryType cube(unsigned int dim)
Returns a GeometryType representing a hypercube of dimension dim.
Definition type.hh:462
│ │ │ +
5#ifndef DUNE_GEOMETRY_DIMENSION_HH
│ │ │ +
6#define DUNE_GEOMETRY_DIMENSION_HH
│ │ │ +
7
│ │ │ +
8#include <type_traits>
│ │ │ +
9
│ │ │ +
10namespace Dune {
│ │ │ +
11
│ │ │ +
13 template<int dim>
│ │ │ +
│ │ │ +
14 struct Dim
│ │ │ +
15 : public std::integral_constant<int,dim>
│ │ │ +
16 {
│ │ │ +
17 typedef Dim type;
│ │ │ +
18 };
│ │ │ +
│ │ │ +
19
│ │ │ +
21 template<int codim>
│ │ │ +
│ │ │ +
22 struct Codim
│ │ │ +
23 : public std::integral_constant<int,codim>
│ │ │ +
24 {
│ │ │ +
25 typedef Codim type;
│ │ │ +
26 };
│ │ │ +
│ │ │ +
27
│ │ │ +
28}
│ │ │ +
29
│ │ │ +
30#endif // DUNE_GEOMETRY_DIMENSION_HH
│ │ │
Definition affinegeometry.hh:22
│ │ │ -
Volume volume() const
Return the element volume.
Definition axisalignedcubegeometry.hh:295
│ │ │ -
AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower, const Dune::FieldVector< ctype, coorddim > upper, const std::bitset< coorddim > &axes)
Constructor from a lower left and an upper right corner.
Definition axisalignedcubegeometry.hh:142
│ │ │ -
AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower, const Dune::FieldVector< ctype, coorddim > upper)
Constructor from a lower left and an upper right corner.
Definition axisalignedcubegeometry.hh:124
│ │ │ -
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Inverse Jacobian of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:235
│ │ │ -
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Inverse Jacobian transposed of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:217
│ │ │ -
std::conditional< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, dim, coorddim > >::type JacobianTransposed
Return type of jacobianTransposed.
Definition axisalignedcubegeometry.hh:81
│ │ │ -
AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower)
Constructor from a single point only.
Definition axisalignedcubegeometry.hh:159
│ │ │ -
static constexpr int mydimension
Definition axisalignedcubegeometry.hh:56
│ │ │ -
friend Dune::ReferenceElements< ctype, dim >::ReferenceElement referenceElement(const AxisAlignedCubeGeometry &)
Definition axisalignedcubegeometry.hh:316
│ │ │ -
static constexpr int coorddimension
Definition axisalignedcubegeometry.hh:59
│ │ │ -
GlobalCoordinate corner(int k) const
Return world coordinates of the k-th corner of the element.
Definition axisalignedcubegeometry.hh:269
│ │ │ -
ctype Volume
Type used for volume.
Definition axisalignedcubegeometry.hh:71
│ │ │ -
FieldVector< ctype, dim > LocalCoordinate
Type used for a vector of element coordinates.
Definition axisalignedcubegeometry.hh:65
│ │ │ -
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Jacobian transposed of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:205
│ │ │ -
FieldVector< ctype, coorddim > GlobalCoordinate
Type used for a vector of world coordinates.
Definition axisalignedcubegeometry.hh:68
│ │ │ -
LocalCoordinate local(const GlobalCoordinate &global) const
Definition axisalignedcubegeometry.hh:189
│ │ │ -
CoordType ctype
Type used for single coordinate coefficients.
Definition axisalignedcubegeometry.hh:62
│ │ │ -
std::conditional_t< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, coorddim, dim > > Jacobian
Return type of jacobian.
Definition axisalignedcubegeometry.hh:100
│ │ │ -
GeometryType type() const
Type of the cube. Here: a hypercube of the correct dimension.
Definition axisalignedcubegeometry.hh:164
│ │ │ -
int corners() const
Return the number of corners of the element.
Definition axisalignedcubegeometry.hh:263
│ │ │ -
Jacobian jacobian(const LocalCoordinate &local) const
Jacobian of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:229
│ │ │ -
std::conditional< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, coorddim, dim > >::type JacobianInverseTransposed
Return type of jacobianInverseTransposed.
Definition axisalignedcubegeometry.hh:91
│ │ │ -
Volume integrationElement(const LocalCoordinate &local) const
Return the integration element, i.e., the determinant term in the integral transformation formula.
Definition axisalignedcubegeometry.hh:243
│ │ │ -
GlobalCoordinate center() const
Return center of mass of the element.
Definition axisalignedcubegeometry.hh:249
│ │ │ -
AxisAlignedCubeGeometry()=default
Constructs an empty geometry.
│ │ │ -
bool affine() const
Return if the element is affine. Here: yes.
Definition axisalignedcubegeometry.hh:311
│ │ │ -
std::conditional_t< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, dim, coorddim > > JacobianInverse
Return type of jacobianInverse.
Definition axisalignedcubegeometry.hh:109
│ │ │ -
GlobalCoordinate global(const LocalCoordinate &local) const
Map a point in local (element) coordinates to world coordinates.
Definition axisalignedcubegeometry.hh:170
│ │ │ -
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ -
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:146
│ │ │ -
static const ReferenceElement & cube()
get hypercube reference elements
Definition referenceelements.hh:168
│ │ │ +
Static tag representing a dimension.
Definition dimension.hh:16
│ │ │ +
Dim type
Definition dimension.hh:17
│ │ │ +
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │ +
Codim type
Definition dimension.hh:25
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,440 +1,53 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -axisalignedcubegeometry.hh │ │ │ │ +dimension.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © 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_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH │ │ │ │ -7#define DUNE_GEOMETRY_AXISALIGNED_CUBE_GEOMETRY_HH │ │ │ │ -8 │ │ │ │ -12 │ │ │ │ -13#include │ │ │ │ -14 │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ -17#include │ │ │ │ -18 │ │ │ │ -19#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h> │ │ │ │ -20#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -21 │ │ │ │ -22 │ │ │ │ -23namespace _D_u_n_e { │ │ │ │ -24 │ │ │ │ -48 template │ │ │ │ -_4_9 class _A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y │ │ │ │ -50 { │ │ │ │ -51 │ │ │ │ -52 │ │ │ │ -53 public: │ │ │ │ -54 │ │ │ │ -_5_6 constexpr static int _m_y_d_i_m_e_n_s_i_o_n = dim; │ │ │ │ -57 │ │ │ │ -_5_9 constexpr static int _c_o_o_r_d_d_i_m_e_n_s_i_o_n = coorddim; │ │ │ │ -60 │ │ │ │ -_6_2 typedef CoordType _c_t_y_p_e; │ │ │ │ -63 │ │ │ │ -_6_5 typedef FieldVector _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ -66 │ │ │ │ -_6_8 typedef FieldVector _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ -69 │ │ │ │ -_7_1 typedef _c_t_y_p_e _V_o_l_u_m_e; │ │ │ │ -72 │ │ │ │ -79 typedef typename std::conditional, │ │ │ │ -_8_1 FieldMatrix >_:_:_t_y_p_e _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ -82 │ │ │ │ -89 typedef typename std::conditional, │ │ │ │ -_9_1 FieldMatrix >_:_:_t_y_p_e _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d; │ │ │ │ -92 │ │ │ │ -_1_0_0 using _J_a_c_o_b_i_a_n = std::conditional_t, FieldMatrix >; │ │ │ │ -101 │ │ │ │ -_1_0_9 using _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e = std::conditional_t, FieldMatrix >; │ │ │ │ -110 │ │ │ │ -_1_1_8 _A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y () = default; │ │ │ │ -119 │ │ │ │ -_1_2_4 _A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y(const Dune::FieldVector lower, │ │ │ │ -125 const Dune::FieldVector upper) │ │ │ │ -126 : lower_(lower), │ │ │ │ -127 upper_(upper), │ │ │ │ -128 axes_() │ │ │ │ -129 { │ │ │ │ -130 static_assert(dim==coorddim, "Use this constructor only if │ │ │ │ -dim==coorddim!"); │ │ │ │ -131 // all 'true', but is never actually used │ │ │ │ -132 axes_ = (1< lower, │ │ │ │ -143 const Dune::FieldVector upper, │ │ │ │ -144 const std::bitset& axes) │ │ │ │ -145 : lower_(lower), │ │ │ │ -146 upper_(upper), │ │ │ │ -147 axes_(axes) │ │ │ │ -148 { │ │ │ │ -149 assert(axes.count()==dim); │ │ │ │ -150 for (size_t i=0; i lower) │ │ │ │ -160 : lower_(lower) │ │ │ │ -161 {} │ │ │ │ -162 │ │ │ │ -_1_6_4 _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e() const │ │ │ │ -165 { │ │ │ │ -166 return _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_u_b_e(dim); │ │ │ │ -167 } │ │ │ │ -168 │ │ │ │ -_1_7_0 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l(const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e& _l_o_c_a_l) const │ │ │ │ -171 { │ │ │ │ -172 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e result; │ │ │ │ -173 if (dim == coorddim) { // fast case │ │ │ │ -174 for (size_t i=0; i_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t ( const _A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y & /* geometry */ ) │ │ │ │ -317 { │ │ │ │ -318 return _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _d_i_m_ _>_:_:_c_u_b_e(); │ │ │ │ -319 } │ │ │ │ -320 │ │ │ │ -321 private: │ │ │ │ -322 // jacobianTransposed: fast case --> diagonal matrix │ │ │ │ -323 void _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( DiagonalMatrix &_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ) │ │ │ │ -const │ │ │ │ -324 { │ │ │ │ -325 for (size_t i=0; i dense matrix │ │ │ │ -330 void _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( FieldMatrix │ │ │ │ -&_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ) const │ │ │ │ -331 { │ │ │ │ -332 if (dim==0) │ │ │ │ -333 return; │ │ │ │ -334 │ │ │ │ -335 size_t lc = 0; │ │ │ │ -336 for (size_t i=0; i diagonal matrix │ │ │ │ -342 void _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ( DiagonalMatrix │ │ │ │ -&_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ) const │ │ │ │ -343 { │ │ │ │ -344 for (size_t i=0; i dense matrix │ │ │ │ -349 void _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ( FieldMatrix │ │ │ │ -&_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ) const │ │ │ │ -350 { │ │ │ │ -351 if (dim==0) │ │ │ │ -352 return; │ │ │ │ -353 │ │ │ │ -354 size_t lc = 0; │ │ │ │ -355 for (size_t i=0; i lower_; │ │ │ │ -361 │ │ │ │ -362 Dune::FieldVector upper_; │ │ │ │ -363 │ │ │ │ -364 std::bitset axes_; │ │ │ │ -365 }; │ │ │ │ -366 │ │ │ │ -367} // namespace Dune │ │ │ │ -368#endif │ │ │ │ -_t_y_p_e_._h_h │ │ │ │ -A unique label for each type of element that can occur in a grid. │ │ │ │ -_r_e_f_e_r_e_n_c_e_e_l_e_m_e_n_t_s_._h_h │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_c_u_b_e │ │ │ │ -constexpr GeometryType cube(unsigned int dim) │ │ │ │ -Returns a GeometryType representing a hypercube of dimension dim. │ │ │ │ -DDeeffiinniittiioonn type.hh:462 │ │ │ │ +5#ifndef DUNE_GEOMETRY_DIMENSION_HH │ │ │ │ +6#define DUNE_GEOMETRY_DIMENSION_HH │ │ │ │ +7 │ │ │ │ +8#include │ │ │ │ +9 │ │ │ │ +10namespace _D_u_n_e { │ │ │ │ +11 │ │ │ │ +13 template │ │ │ │ +_1_4 struct _D_i_m │ │ │ │ +15 : public std::integral_constant │ │ │ │ +16 { │ │ │ │ +_1_7 typedef _D_i_m _t_y_p_e; │ │ │ │ +18 }; │ │ │ │ +19 │ │ │ │ +21 template │ │ │ │ +_2_2 struct _C_o_d_i_m │ │ │ │ +23 : public std::integral_constant │ │ │ │ +24 { │ │ │ │ +_2_5 typedef _C_o_d_i_m _t_y_p_e; │ │ │ │ +26 }; │ │ │ │ +27 │ │ │ │ +28} │ │ │ │ +29 │ │ │ │ +30#endif // DUNE_GEOMETRY_DIMENSION_HH │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ -Volume volume() const │ │ │ │ -Return the element volume. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:295 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y │ │ │ │ -AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower, const │ │ │ │ -Dune::FieldVector< ctype, coorddim > upper, const std::bitset< coorddim > │ │ │ │ -&axes) │ │ │ │ -Constructor from a lower left and an upper right corner. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:142 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y │ │ │ │ -AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower, const │ │ │ │ -Dune::FieldVector< ctype, coorddim > upper) │ │ │ │ -Constructor from a lower left and an upper right corner. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:124 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ -JacobianInverse jacobianInverse(const LocalCoordinate &local) const │ │ │ │ -Inverse Jacobian of the transformation from local to global coordinates. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:235 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate │ │ │ │ -&local) const │ │ │ │ -Inverse Jacobian transposed of the transformation from local to global │ │ │ │ -coordinates. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:217 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -std::conditional< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< │ │ │ │ -ctype, dim, coorddim > >::type JacobianTransposed │ │ │ │ -Return type of jacobianTransposed. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:81 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y │ │ │ │ -AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower) │ │ │ │ -Constructor from a single point only. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:159 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_<_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_-_c_o_d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ -_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int mydimension │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:56 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -friend Dune::ReferenceElements< ctype, dim >::ReferenceElement referenceElement │ │ │ │ -(const AxisAlignedCubeGeometry &) │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:316 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_<_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_-_c_o_d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ -_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int coorddimension │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:59 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ -GlobalCoordinate corner(int k) const │ │ │ │ -Return world coordinates of the k-th corner of the element. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:269 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_V_o_l_u_m_e │ │ │ │ -ctype Volume │ │ │ │ -Type used for volume. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:71 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< ctype, dim > LocalCoordinate │ │ │ │ -Type used for a vector of element coordinates. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:65 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const │ │ │ │ -Jacobian transposed of the transformation from local to global coordinates. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:205 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< ctype, coorddim > GlobalCoordinate │ │ │ │ -Type used for a vector of world coordinates. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:68 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_<_ _C_o_o_r_d_T_y_p_e_,_ _d_i_m_e_n_s_i_o_n_-_c_o_d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_ _>_:_: │ │ │ │ -_l_o_c_a_l │ │ │ │ -LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:189 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_c_t_y_p_e │ │ │ │ -CoordType ctype │ │ │ │ -Type used for single coordinate coefficients. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:62 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n │ │ │ │ -std::conditional_t< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< │ │ │ │ -ctype, coorddim, dim > > Jacobian │ │ │ │ -Return type of jacobian. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:100 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_t_y_p_e │ │ │ │ -GeometryType type() const │ │ │ │ -Type of the cube. Here: a hypercube of the correct dimension. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:164 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r_s │ │ │ │ -int corners() const │ │ │ │ -Return the number of corners of the element. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:263 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n │ │ │ │ -Jacobian jacobian(const LocalCoordinate &local) const │ │ │ │ -Jacobian of the transformation from local to global coordinates. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:229 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -std::conditional< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< │ │ │ │ -ctype, coorddim, dim > >::type JacobianInverseTransposed │ │ │ │ -Return type of jacobianInverseTransposed. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:91 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ -Volume integrationElement(const LocalCoordinate &local) const │ │ │ │ -Return the integration element, i.e., the determinant term in the integral │ │ │ │ -transformation formula. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:243 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_c_e_n_t_e_r │ │ │ │ -GlobalCoordinate center() const │ │ │ │ -Return center of mass of the element. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:249 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y │ │ │ │ -AxisAlignedCubeGeometry()=default │ │ │ │ -Constructs an empty geometry. │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ -bool affine() const │ │ │ │ -Return if the element is affine. Here: yes. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:311 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ -std::conditional_t< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< │ │ │ │ -ctype, dim, coorddim > > JacobianInverse │ │ │ │ -Return type of jacobianInverse. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:109 │ │ │ │ -_D_u_n_e_:_:_A_x_i_s_A_l_i_g_n_e_d_C_u_b_e_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ -GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ -Map a point in local (element) coordinates to world coordinates. │ │ │ │ -DDeeffiinniittiioonn axisalignedcubegeometry.hh:170 │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ -Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ -DDeeffiinniittiioonn type.hh:114 │ │ │ │ -_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -typename Container::ReferenceElement ReferenceElement │ │ │ │ -The reference element type. │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:146 │ │ │ │ -_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_:_:_c_u_b_e │ │ │ │ -static const ReferenceElement & cube() │ │ │ │ -get hypercube reference elements │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:168 │ │ │ │ +_D_u_n_e_:_:_D_i_m │ │ │ │ +Static tag representing a dimension. │ │ │ │ +DDeeffiinniittiioonn dimension.hh:16 │ │ │ │ +_D_u_n_e_:_:_D_i_m_:_:_t_y_p_e │ │ │ │ +Dim type │ │ │ │ +DDeeffiinniittiioonn dimension.hh:17 │ │ │ │ +_D_u_n_e_:_:_C_o_d_i_m │ │ │ │ +Static tag representing a codimension. │ │ │ │ +DDeeffiinniittiioonn dimension.hh:24 │ │ │ │ +_D_u_n_e_:_:_C_o_d_i_m_:_:_t_y_p_e │ │ │ │ +Codim type │ │ │ │ +DDeeffiinniittiioonn dimension.hh:25 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00251.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: affinegeometry.hh File Reference │ │ │ +dune-geometry: typeindex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,41 +74,40 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
affinegeometry.hh File Reference
│ │ │ +
typeindex.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

An implementation of the Geometry interface for affine geometries. │ │ │ +

Helper classes to provide indices for geometrytypes for use in a vector. │ │ │ More...

│ │ │ -
#include <cmath>
│ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ -#include <dune/common/fvector.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ -#include <dune/geometry/utility/defaultmatrixhelper.hh>
│ │ │ +
#include <cstddef>
│ │ │ +#include <dune/common/indices.hh>
│ │ │ +#include <dune/common/hybridutilities.hh>
│ │ │ +#include "type.hh"
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::AffineGeometry< ct, mydim, cdim >
 Implementation of the Geometry interface for affine geometries. More...
class  Dune::LocalGeometryTypeIndex
 Compute per-dimension indices for geometry types. More...
class  Dune::GlobalGeometryTypeIndex
 Compute indices for geometry types, taking the dimension into account. More...
│ │ │ │ │ │ │ │ │ - │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::Geo
│ │ │

Detailed Description

│ │ │ -

An implementation of the Geometry interface for affine geometries.

│ │ │ -
Author
Martin Nolte
│ │ │ +

Helper classes to provide indices for geometrytypes for use in a vector.

│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,27 +1,27 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -affinegeometry.hh File Reference │ │ │ │ -An implementation of the Geometry interface for affine geometries. _M_o_r_e_._._. │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ +typeindex.hh File Reference │ │ │ │ +Helper classes to provide indices for geometrytypes for use in a vector. │ │ │ │ +_M_o_r_e_._._. │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include "_t_y_p_e_._h_h" │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_<_ _c_t_,_ _m_y_d_i_m_,_ _c_d_i_m_ _> │ │ │ │ -  Implementation of the Geometry interface for affine geometries. _M_o_r_e_._._. │ │ │ │ +class   _D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x │ │ │ │ +  Compute per-dimension indices for geometry types. _M_o_r_e_._._. │ │ │ │ +class   _D_u_n_e_:_:_G_l_o_b_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x │ │ │ │ +  Compute indices for geometry types, taking the dimension into account. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ -namespace   _D_u_n_e_:_:_G_e_o │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -An implementation of the Geometry interface for affine geometries. │ │ │ │ - Author │ │ │ │ - Martin Nolte │ │ │ │ +Helper classes to provide indices for geometrytypes for use in a vector. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00251_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-geometry: affinegeometry.hh Source File │ │ │ +dune-geometry: typeindex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,261 +71,163 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
affinegeometry.hh
│ │ │ +
typeindex.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ -
5#ifndef DUNE_GEOMETRY_AFFINEGEOMETRY_HH
│ │ │ -
6#define DUNE_GEOMETRY_AFFINEGEOMETRY_HH
│ │ │ +
5#ifndef DUNE_GEOMETRY_TYPEINDEX_HH
│ │ │ +
6#define DUNE_GEOMETRY_TYPEINDEX_HH
│ │ │
7
│ │ │ -
12
│ │ │ -
13#include <cmath>
│ │ │ -
14
│ │ │ -
15#include <dune/common/fmatrix.hh>
│ │ │ -
16#include <dune/common/fvector.hh>
│ │ │ -
17
│ │ │ -
18#include <dune/geometry/type.hh>
│ │ │ - │ │ │ +
13
│ │ │ +
14#include <cstddef>
│ │ │ +
15
│ │ │ +
16#include <dune/common/indices.hh>
│ │ │ +
17#include <dune/common/hybridutilities.hh>
│ │ │ +
18
│ │ │ +
19#include "type.hh"
│ │ │
20
│ │ │ -
│ │ │ -
21namespace Dune
│ │ │ +
21namespace Dune
│ │ │
22{
│ │ │ -
23
│ │ │ -
24 // External Forward Declarations
│ │ │ -
25 // -----------------------------
│ │ │ -
26
│ │ │ -
│ │ │ -
27 namespace Geo
│ │ │ -
28 {
│ │ │ -
29
│ │ │ -
30 template< typename Implementation >
│ │ │ -
31 class ReferenceElement;
│ │ │ -
32
│ │ │ -
33 template< class ctype, int dim >
│ │ │ - │ │ │ -
35
│ │ │ -
36 template< class ctype, int dim >
│ │ │ -
37 struct ReferenceElements;
│ │ │ -
38
│ │ │ -
39 }
│ │ │ -
│ │ │ -
40
│ │ │ -
41
│ │ │ -
47 template< class ct, int mydim, int cdim>
│ │ │ -
│ │ │ - │ │ │ -
49 {
│ │ │ -
50 public:
│ │ │ -
51
│ │ │ -
53 typedef ct ctype;
│ │ │ -
54
│ │ │ -
56 static const int mydimension= mydim;
│ │ │ -
57
│ │ │ -
59 static const int coorddimension = cdim;
│ │ │ -
60
│ │ │ -
62 typedef FieldVector< ctype, mydimension > LocalCoordinate;
│ │ │ -
63
│ │ │ -
65 typedef FieldVector< ctype, coorddimension > GlobalCoordinate;
│ │ │ +
│ │ │ + │ │ │ +
25 {
│ │ │ +
32 inline static constexpr std::size_t regular_size(std::size_t dim)
│ │ │ +
33 {
│ │ │ +
34 // The following expression is derived from the expression for
│ │ │ +
35 // GlobalGeometryTypeIndex::regular_offset(). Subtracting
│ │ │ +
36 // regular_offset(dim+1)-regular_offset(dim) we get:
│ │ │ +
37 //
│ │ │ +
38 // ((1 << dim+1) >> 1) - ((1 << dim) >> 1)
│ │ │ +
39 //
│ │ │ +
40 // We always have
│ │ │ +
41 //
│ │ │ +
42 // dim >= 0,
│ │ │ +
43 //
│ │ │ +
44 // so
│ │ │ +
45 //
│ │ │ +
46 // (1 << dim+1) >= 2 and (1 << dim+2) % 2 == 0.
│ │ │ +
47 //
│ │ │ +
48 // So if we apply a single right-shift to that, we will never lose any
│ │ │ +
49 // set bits, thus
│ │ │ +
50 //
│ │ │ +
51 // ((1 << dim+1) >> 1) == (1 << dim)
│ │ │ +
52 return (1 << dim) - ((1 << dim) >> 1);
│ │ │ +
53 }
│ │ │ +
54
│ │ │ +
55 public:
│ │ │ +
│ │ │ +
61 inline static constexpr std::size_t size(std::size_t dim)
│ │ │ +
62 {
│ │ │ +
63 // one for "none"
│ │ │ +
64 return regular_size(dim) + 1;
│ │ │ +
65 }
│ │ │ +
│ │ │
66
│ │ │ -
68 typedef ctype Volume;
│ │ │ -
69
│ │ │ -
71 typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed;
│ │ │ -
72
│ │ │ -
74 typedef FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed;
│ │ │ -
75
│ │ │ -
77 typedef FieldMatrix< ctype, coorddimension, mydimension > Jacobian;
│ │ │ -
78
│ │ │ -
80 typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse;
│ │ │ -
81
│ │ │ -
82 private:
│ │ │ - │ │ │ -
85
│ │ │ -
86 typedef Geo::ReferenceElements< ctype, mydimension > ReferenceElements;
│ │ │ -
87
│ │ │ -
88 // Helper class to compute a matrix pseudo inverse
│ │ │ -
89 typedef Impl::FieldMatrixHelper< ct > MatrixHelper;
│ │ │ -
90
│ │ │ -
91 public:
│ │ │ -
98 AffineGeometry () = default;
│ │ │ -
99
│ │ │ -
│ │ │ -
101 AffineGeometry ( const ReferenceElement &refElement, const GlobalCoordinate &origin,
│ │ │ -
102 const JacobianTransposed &jt )
│ │ │ -
103 : refElement_(refElement), origin_(origin), jacobianTransposed_(jt)
│ │ │ -
104 {
│ │ │ -
105 integrationElement_ = MatrixHelper::rightInvA( jacobianTransposed_, jacobianInverseTransposed_ );
│ │ │ +
│ │ │ +
73 inline static constexpr std::size_t index(const GeometryType &gt)
│ │ │ +
74 {
│ │ │ +
75 return gt.isNone() ? regular_size(gt.dim()) : (gt.id() >> 1);
│ │ │ +
76 }
│ │ │ +
│ │ │ +
77
│ │ │ +
│ │ │ +
79 inline static constexpr GeometryType type(std::size_t dim, std::size_t index) {
│ │ │ +
80 return (index == regular_size(dim)) ?
│ │ │ + │ │ │ +
82 // the cast to unsigned makes sure this is interpreted as the topology
│ │ │ +
83 // ID constructor
│ │ │ +
84 GeometryType(static_cast< unsigned int >(index << 1), dim);
│ │ │ +
85 }
│ │ │ +
│ │ │ +
86 };
│ │ │ +
│ │ │ +
87
│ │ │ +
│ │ │ + │ │ │ +
90 {
│ │ │ +
98 inline static constexpr std::size_t regular_offset(std::size_t dim)
│ │ │ +
99 {
│ │ │ +
100 // The number of regular geometry types in a given dimension is
│ │ │ +
101 // 2^(dim-1). For dim==0 this would yield 1/2 geometry types (which is
│ │ │ +
102 // obviously bogus, dim==0 has one regular geometry type, the point).
│ │ │ +
103 // The following expression relies on 1 >> 1 == 0 to treat dim==0
│ │ │ +
104 // specially.
│ │ │ +
105 return (1 << dim) >> 1;
│ │ │
106 }
│ │ │ -
│ │ │ -
107
│ │ │ -
│ │ │ - │ │ │ -
110 const JacobianTransposed &jt )
│ │ │ -
111 : AffineGeometry(ReferenceElements::general( gt ), origin, jt)
│ │ │ -
112 { }
│ │ │ -
│ │ │ -
113
│ │ │ -
115 template< class CoordVector >
│ │ │ -
│ │ │ -
116 AffineGeometry ( const ReferenceElement &refElement, const CoordVector &coordVector )
│ │ │ -
117 : refElement_(refElement), origin_(coordVector[0])
│ │ │ -
118 {
│ │ │ -
119 for( int i = 0; i < mydimension; ++i )
│ │ │ -
120 jacobianTransposed_[ i ] = coordVector[ i+1 ] - origin_;
│ │ │ -
121 integrationElement_ = MatrixHelper::rightInvA( jacobianTransposed_, jacobianInverseTransposed_ );
│ │ │ -
122 }
│ │ │ -
│ │ │ -
123
│ │ │ -
125 template< class CoordVector >
│ │ │ -
│ │ │ -
126 AffineGeometry ( Dune::GeometryType gt, const CoordVector &coordVector )
│ │ │ -
127 : AffineGeometry(ReferenceElements::general( gt ), coordVector)
│ │ │ -
128 { }
│ │ │ +
107
│ │ │ +
108 public:
│ │ │ +
│ │ │ +
113 inline static constexpr std::size_t offset(std::size_t dim)
│ │ │ +
114 {
│ │ │ +
115 // dim times "none"
│ │ │ +
116 return regular_offset(dim) + dim;
│ │ │ +
117 }
│ │ │ +
│ │ │ +
118
│ │ │ +
│ │ │ +
125 inline static constexpr std::size_t size(std::size_t maxdim)
│ │ │ +
126 {
│ │ │ +
127 return offset(maxdim+1);
│ │ │ +
128 }
│ │ │
│ │ │
129
│ │ │ -
131 bool affine () const { return true; }
│ │ │ -
132
│ │ │ -
134 Dune::GeometryType type () const { return refElement_.type(); }
│ │ │ -
135
│ │ │ -
137 int corners () const { return refElement_.size( mydimension ); }
│ │ │ -
138
│ │ │ -
│ │ │ -
140 GlobalCoordinate corner ( int i ) const
│ │ │ -
141 {
│ │ │ -
142 return global( refElement_.position( i, mydimension ) );
│ │ │ -
143 }
│ │ │ -
│ │ │ -
144
│ │ │ -
146 GlobalCoordinate center () const { return global( refElement_.position( 0, 0 ) ); }
│ │ │ -
147
│ │ │ -
│ │ │ - │ │ │ -
155 {
│ │ │ -
156 GlobalCoordinate global( origin_ );
│ │ │ -
157 jacobianTransposed_.umtv( local, global );
│ │ │ -
158 return global;
│ │ │ +
│ │ │ +
138 inline static constexpr std::size_t index(const GeometryType &gt)
│ │ │ +
139 {
│ │ │ +
140 return offset(gt.dim()) + LocalGeometryTypeIndex::index(gt);
│ │ │ +
141 }
│ │ │ +
│ │ │ +
142 };
│ │ │ +
│ │ │ +
143
│ │ │ +
144 namespace Impl {
│ │ │ +
145
│ │ │ +
146 // Map a dynamic GeometryType to a static integral_constant<GeometryType::Id, ...>
│ │ │ +
147 template<int dim, class F>
│ │ │ +
148 static auto toGeometryTypeIdConstant(const GeometryType& gt, F&& f) {
│ │ │ +
149 // Transform LocalGeometryTypeIndex to GeometryType::Id
│ │ │ +
150 auto callWithId = [&](auto index) {
│ │ │ +
151 static constexpr auto id = LocalGeometryTypeIndex::type(dim, decltype(index)::value).toId();
│ │ │ +
152 return f(std::integral_constant<GeometryType::Id, id>{});
│ │ │ +
153 };
│ │ │ +
154 // switchCases needs a fallback to determine the return type.
│ │ │ +
155 auto fallBack = [&]() { return callWithId(Dune::Indices::_0); };
│ │ │ +
156 // Iterate over all _regular_ GeometryType indices for given dimension
│ │ │ +
157 auto allIndices = std::make_index_sequence<LocalGeometryTypeIndex::size(dim)-1>{};
│ │ │ +
158 return Dune::Hybrid::switchCases(allIndices, LocalGeometryTypeIndex::index(gt), callWithId, fallBack);
│ │ │
159 }
│ │ │ -
│ │ │ -
160
│ │ │ -
│ │ │ - │ │ │ -
175 {
│ │ │ - │ │ │ -
177 jacobianInverseTransposed_.mtv( global - origin_, local );
│ │ │ -
178 return local;
│ │ │ -
179 }
│ │ │ -
│ │ │ -
180
│ │ │ -
│ │ │ -
191 ctype integrationElement ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ -
192 {
│ │ │ -
193 return integrationElement_;
│ │ │ -
194 }
│ │ │ -
│ │ │ -
195
│ │ │ -
│ │ │ -
197 Volume volume () const
│ │ │ -
198 {
│ │ │ -
199 return integrationElement_ * refElement_.volume();
│ │ │ -
200 }
│ │ │ -
│ │ │ -
201
│ │ │ -
│ │ │ -
208 const JacobianTransposed &jacobianTransposed ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ -
209 {
│ │ │ -
210 return jacobianTransposed_;
│ │ │ -
211 }
│ │ │ -
│ │ │ -
212
│ │ │ -
│ │ │ - │ │ │ -
220 {
│ │ │ -
221 return jacobianInverseTransposed_;
│ │ │ -
222 }
│ │ │ -
│ │ │ -
223
│ │ │ -
│ │ │ -
230 Jacobian jacobian ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ -
231 {
│ │ │ -
232 return jacobianTransposed_.transposed();
│ │ │ -
233 }
│ │ │ -
│ │ │ -
234
│ │ │ -
│ │ │ -
241 JacobianInverse jacobianInverse ([[maybe_unused]] const LocalCoordinate &local) const
│ │ │ -
242 {
│ │ │ -
243 return jacobianInverseTransposed_.transposed();
│ │ │ -
244 }
│ │ │ -
│ │ │ -
245
│ │ │ -
│ │ │ -
246 friend ReferenceElement referenceElement ( const AffineGeometry &geometry )
│ │ │ -
247 {
│ │ │ -
248 return geometry.refElement_;
│ │ │ -
249 }
│ │ │ -
│ │ │ -
250
│ │ │ -
251 private:
│ │ │ -
252 ReferenceElement refElement_;
│ │ │ -
253 GlobalCoordinate origin_;
│ │ │ -
254 JacobianTransposed jacobianTransposed_;
│ │ │ -
255 JacobianInverseTransposed jacobianInverseTransposed_;
│ │ │ -
256 ctype integrationElement_;
│ │ │ -
257 };
│ │ │ -
│ │ │ -
258
│ │ │ -
259} // namespace Dune
│ │ │ -
│ │ │ -
260
│ │ │ -
261#endif // #ifndef DUNE_GEOMETRY_AFFINEGEOMETRY_HH
│ │ │ - │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ +
160
│ │ │ +
161 } // namespace Impl
│ │ │ +
162} // namespace Dune
│ │ │ +
163
│ │ │ +
164#endif // DUNE_GEOMETRY_TYPEINDEX_HH
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ +
constexpr GeometryType none(unsigned int dim)
Returns a GeometryType representing a singular of dimension dim.
Definition type.hh:471
│ │ │
Definition affinegeometry.hh:22
│ │ │ -
decltype(referenceElement(std::declval< T >()...)) ReferenceElement
Definition referenceelements.hh:291
│ │ │ -
Definition affinegeometry.hh:28
│ │ │ -
This class provides access to geometric and topological properties of a reference element.
Definition referenceelement.hh:52
│ │ │ -
Definition affinegeometry.hh:34
│ │ │ -
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │ -
AffineGeometry(const ReferenceElement &refElement, const CoordVector &coordVector)
Create affine geometry from reference element and a vector of vertex coordinates.
Definition affinegeometry.hh:116
│ │ │ -
AffineGeometry()=default
Constructs an empty geometry.
│ │ │ -
AffineGeometry(Dune::GeometryType gt, const GlobalCoordinate &origin, const JacobianTransposed &jt)
Create affine geometry from GeometryType, one vertex, and the Jacobian matrix.
Definition affinegeometry.hh:109
│ │ │ -
FieldVector< ctype, mydimension > LocalCoordinate
Type for local coordinate vector.
Definition affinegeometry.hh:62
│ │ │ -
Dune::GeometryType type() const
Obtain the type of the reference element.
Definition affinegeometry.hh:134
│ │ │ -
static const int mydimension
Dimension of the geometry.
Definition affinegeometry.hh:56
│ │ │ -
AffineGeometry(const ReferenceElement &refElement, const GlobalCoordinate &origin, const JacobianTransposed &jt)
Create affine geometry from reference element, one vertex, and the Jacobian matrix.
Definition affinegeometry.hh:101
│ │ │ -
ctype Volume
Type used for volume.
Definition affinegeometry.hh:68
│ │ │ -
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition affinegeometry.hh:241
│ │ │ -
friend ReferenceElement referenceElement(const AffineGeometry &geometry)
Definition affinegeometry.hh:246
│ │ │ -
AffineGeometry(Dune::GeometryType gt, const CoordVector &coordVector)
Create affine geometry from GeometryType and a vector of vertex coordinates.
Definition affinegeometry.hh:126
│ │ │ -
ctype integrationElement(const LocalCoordinate &local) const
Obtain the integration element.
Definition affinegeometry.hh:191
│ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
Type for the inverse Jacobian matrix.
Definition affinegeometry.hh:80
│ │ │ -
FieldMatrix< ctype, coorddimension, mydimension > Jacobian
Type for the Jacobian matrix.
Definition affinegeometry.hh:77
│ │ │ -
const JacobianInverseTransposed & jacobianInverseTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian's inverse.
Definition affinegeometry.hh:219
│ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
Type for the transposed Jacobian matrix.
Definition affinegeometry.hh:71
│ │ │ -
GlobalCoordinate corner(int i) const
Obtain coordinates of the i-th corner.
Definition affinegeometry.hh:140
│ │ │ -
int corners() const
Obtain number of corners of the corresponding reference element.
Definition affinegeometry.hh:137
│ │ │ -
LocalCoordinate local(const GlobalCoordinate &global) const
Evaluate the inverse mapping.
Definition affinegeometry.hh:174
│ │ │ -
FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed
Type for the transposed inverse Jacobian matrix.
Definition affinegeometry.hh:74
│ │ │ -
static const int coorddimension
Dimension of the world space.
Definition affinegeometry.hh:59
│ │ │ -
GlobalCoordinate global(const LocalCoordinate &local) const
Evaluate the mapping.
Definition affinegeometry.hh:154
│ │ │ -
GlobalCoordinate center() const
Obtain the centroid of the mapping's image.
Definition affinegeometry.hh:146
│ │ │ -
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition affinegeometry.hh:230
│ │ │ -
ct ctype
Type used for coordinates.
Definition affinegeometry.hh:53
│ │ │ -
FieldVector< ctype, coorddimension > GlobalCoordinate
Type for coordinate vector in world space.
Definition affinegeometry.hh:65
│ │ │ -
bool affine() const
Always true: this is an affine geometry.
Definition affinegeometry.hh:131
│ │ │ -
const JacobianTransposed & jacobianTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian.
Definition affinegeometry.hh:208
│ │ │ -
Volume volume() const
Obtain the volume of the element.
Definition affinegeometry.hh:197
│ │ │
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ +
constexpr Id toId() const
Create an Id representation of this GeometryType.
Definition type.hh:210
│ │ │ +
constexpr unsigned int dim() const
Return dimension of the type.
Definition type.hh:360
│ │ │ +
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:365
│ │ │ +
constexpr bool isNone() const
Return true if entity is a singular of any dimension.
Definition type.hh:355
│ │ │ +
Compute per-dimension indices for geometry types.
Definition typeindex.hh:25
│ │ │ +
static constexpr std::size_t size(std::size_t dim)
Compute total number of geometry types for the given dimension.
Definition typeindex.hh:61
│ │ │ +
static constexpr GeometryType type(std::size_t dim, std::size_t index)
compute the geometry type for the given local index and dimension
Definition typeindex.hh:79
│ │ │ +
static constexpr std::size_t index(const GeometryType &gt)
Compute the index for the given geometry type within its dimension.
Definition typeindex.hh:73
│ │ │ +
Compute indices for geometry types, taking the dimension into account.
Definition typeindex.hh:90
│ │ │ +
static constexpr std::size_t index(const GeometryType &gt)
Compute the index for the given geometry type over all dimensions.
Definition typeindex.hh:138
│ │ │ +
static constexpr std::size_t offset(std::size_t dim)
Compute the starting index for a given dimension including irregular geometry types.
Definition typeindex.hh:113
│ │ │ +
static constexpr std::size_t size(std::size_t maxdim)
Compute total number of geometry types up to and including the given dimension.
Definition typeindex.hh:125
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,338 +1,188 @@ │ │ │ │ dune-geometry 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ -affinegeometry.hh │ │ │ │ +typeindex.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ -5#ifndef DUNE_GEOMETRY_AFFINEGEOMETRY_HH │ │ │ │ -6#define DUNE_GEOMETRY_AFFINEGEOMETRY_HH │ │ │ │ +5#ifndef DUNE_GEOMETRY_TYPEINDEX_HH │ │ │ │ +6#define DUNE_GEOMETRY_TYPEINDEX_HH │ │ │ │ 7 │ │ │ │ -12 │ │ │ │ -13#include │ │ │ │ -14 │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ -17 │ │ │ │ -18#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_t_y_p_e_._h_h> │ │ │ │ -19#include <_d_u_n_e_/_g_e_o_m_e_t_r_y_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h> │ │ │ │ +13 │ │ │ │ +14#include │ │ │ │ +15 │ │ │ │ +16#include │ │ │ │ +17#include │ │ │ │ +18 │ │ │ │ +19#include "_t_y_p_e_._h_h" │ │ │ │ 20 │ │ │ │ -_2_1namespace _D_u_n_e │ │ │ │ +21namespace _D_u_n_e │ │ │ │ 22{ │ │ │ │ -23 │ │ │ │ -24 // External Forward Declarations │ │ │ │ -25 // ----------------------------- │ │ │ │ -26 │ │ │ │ -_2_7 namespace _G_e_o │ │ │ │ -28 { │ │ │ │ -29 │ │ │ │ -30 template< typename Implementation > │ │ │ │ -31 class _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t; │ │ │ │ -32 │ │ │ │ -33 template< class ctype, int dim > │ │ │ │ -_3_4 class _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n; │ │ │ │ -35 │ │ │ │ -36 template< class ctype, int dim > │ │ │ │ -37 struct _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s; │ │ │ │ -38 │ │ │ │ -39 } │ │ │ │ -40 │ │ │ │ -41 │ │ │ │ -47 template< class ct, int mydim, int cdim> │ │ │ │ -_4_8 class _A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ -49 { │ │ │ │ -50 public: │ │ │ │ -51 │ │ │ │ -_5_3 typedef ct _c_t_y_p_e; │ │ │ │ +_2_4 class _L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x │ │ │ │ +25 { │ │ │ │ +32 inline static constexpr std::size_t regular_size(std::size_t dim) │ │ │ │ +33 { │ │ │ │ +34 // The following expression is derived from the expression for │ │ │ │ +35 // GlobalGeometryTypeIndex::regular_offset(). Subtracting │ │ │ │ +36 // regular_offset(dim+1)-regular_offset(dim) we get: │ │ │ │ +37 // │ │ │ │ +38 // ((1 << dim+1) >> 1) - ((1 << dim) >> 1) │ │ │ │ +39 // │ │ │ │ +40 // We always have │ │ │ │ +41 // │ │ │ │ +42 // dim >= 0, │ │ │ │ +43 // │ │ │ │ +44 // so │ │ │ │ +45 // │ │ │ │ +46 // (1 << dim+1) >= 2 and (1 << dim+2) % 2 == 0. │ │ │ │ +47 // │ │ │ │ +48 // So if we apply a single right-shift to that, we will never lose any │ │ │ │ +49 // set bits, thus │ │ │ │ +50 // │ │ │ │ +51 // ((1 << dim+1) >> 1) == (1 << dim) │ │ │ │ +52 return (1 << dim) - ((1 << dim) >> 1); │ │ │ │ +53 } │ │ │ │ 54 │ │ │ │ -_5_6 static const int _m_y_d_i_m_e_n_s_i_o_n= mydim; │ │ │ │ -57 │ │ │ │ -_5_9 static const int _c_o_o_r_d_d_i_m_e_n_s_i_o_n = cdim; │ │ │ │ -60 │ │ │ │ -_6_2 typedef FieldVector< ctype, mydimension > _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ -63 │ │ │ │ -_6_5 typedef FieldVector< ctype, coorddimension > _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e; │ │ │ │ +55 public: │ │ │ │ +_6_1 inline static constexpr std::size_t _s_i_z_e(std::size_t dim) │ │ │ │ +62 { │ │ │ │ +63 // one for "none" │ │ │ │ +64 return regular_size(dim) + 1; │ │ │ │ +65 } │ │ │ │ 66 │ │ │ │ -_6_8 typedef _c_t_y_p_e _V_o_l_u_m_e; │ │ │ │ -69 │ │ │ │ -_7_1 typedef FieldMatrix< ctype, mydimension, coorddimension > │ │ │ │ -_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ -72 │ │ │ │ -_7_4 typedef FieldMatrix< ctype, coorddimension, mydimension > │ │ │ │ -_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d; │ │ │ │ -75 │ │ │ │ -_7_7 typedef FieldMatrix< ctype, coorddimension, mydimension > _J_a_c_o_b_i_a_n; │ │ │ │ -78 │ │ │ │ -_8_0 typedef FieldMatrix< ctype, mydimension, coorddimension > _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e; │ │ │ │ -81 │ │ │ │ -82 private: │ │ │ │ -84 typedef _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_<_ _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n_<_ _c_t_y_p_e_, │ │ │ │ -_m_y_d_i_m_e_n_s_i_o_n_ _> > ReferenceElement; │ │ │ │ -85 │ │ │ │ -86 typedef _G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s_<_ _c_t_y_p_e_,_ _m_y_d_i_m_e_n_s_i_o_n_ _> ReferenceElements; │ │ │ │ +_7_3 inline static constexpr std::size_t _i_n_d_e_x(const _G_e_o_m_e_t_r_y_T_y_p_e >) │ │ │ │ +74 { │ │ │ │ +75 return gt._i_s_N_o_n_e() ? regular_size(gt._d_i_m()) : (gt._i_d() >> 1); │ │ │ │ +76 } │ │ │ │ +77 │ │ │ │ +_7_9 inline static constexpr _G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e(std::size_t dim, std::size_t │ │ │ │ +_i_n_d_e_x) { │ │ │ │ +80 return (_i_n_d_e_x == regular_size(dim)) ? │ │ │ │ +81 _G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_n_o_n_e(dim) : │ │ │ │ +82 // the cast to unsigned makes sure this is interpreted as the topology │ │ │ │ +83 // ID constructor │ │ │ │ +84 _G_e_o_m_e_t_r_y_T_y_p_e(static_cast< unsigned int >(_i_n_d_e_x << 1), dim); │ │ │ │ +85 } │ │ │ │ +86 }; │ │ │ │ 87 │ │ │ │ -88 // Helper class to compute a matrix pseudo inverse │ │ │ │ -89 typedef Impl::FieldMatrixHelper< ct > MatrixHelper; │ │ │ │ -90 │ │ │ │ -91 public: │ │ │ │ -_9_8 _A_f_f_i_n_e_G_e_o_m_e_t_r_y () = default; │ │ │ │ -99 │ │ │ │ -_1_0_1 _A_f_f_i_n_e_G_e_o_m_e_t_r_y ( const ReferenceElement &refElement, const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -&origin, │ │ │ │ -102 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ -103 : refElement_(refElement), origin_(origin), jacobianTransposed_(jt) │ │ │ │ -104 { │ │ │ │ -105 integrationElement_ = MatrixHelper::rightInvA( jacobianTransposed_, │ │ │ │ -jacobianInverseTransposed_ ); │ │ │ │ +_8_9 class _G_l_o_b_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x │ │ │ │ +90 { │ │ │ │ +98 inline static constexpr std::size_t regular_offset(std::size_t dim) │ │ │ │ +99 { │ │ │ │ +100 // The number of regular geometry types in a given dimension is │ │ │ │ +101 // 2^(dim-1). For dim==0 this would yield 1/2 geometry types (which is │ │ │ │ +102 // obviously bogus, dim==0 has one regular geometry type, the point). │ │ │ │ +103 // The following expression relies on 1 >> 1 == 0 to treat dim==0 │ │ │ │ +104 // specially. │ │ │ │ +105 return (1 << dim) >> 1; │ │ │ │ 106 } │ │ │ │ 107 │ │ │ │ -_1_0_9 _A_f_f_i_n_e_G_e_o_m_e_t_r_y ( _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e gt, const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &origin, │ │ │ │ -110 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &jt ) │ │ │ │ -111 : _A_f_f_i_n_e_G_e_o_m_e_t_r_y(ReferenceElements::general( gt ), origin, jt) │ │ │ │ -112 { } │ │ │ │ -113 │ │ │ │ -115 template< class CoordVector > │ │ │ │ -_1_1_6 _A_f_f_i_n_e_G_e_o_m_e_t_r_y ( const ReferenceElement &refElement, const CoordVector │ │ │ │ -&coordVector ) │ │ │ │ -117 : refElement_(refElement), origin_(coordVector[0]) │ │ │ │ -118 { │ │ │ │ -119 for( int i = 0; i < _m_y_d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ -120 jacobianTransposed_[ i ] = coordVector[ i+1 ] - origin_; │ │ │ │ -121 integrationElement_ = MatrixHelper::rightInvA( jacobianTransposed_, │ │ │ │ -jacobianInverseTransposed_ ); │ │ │ │ -122 } │ │ │ │ -123 │ │ │ │ -125 template< class CoordVector > │ │ │ │ -_1_2_6 _A_f_f_i_n_e_G_e_o_m_e_t_r_y ( _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e gt, const CoordVector &coordVector ) │ │ │ │ -127 : _A_f_f_i_n_e_G_e_o_m_e_t_r_y(ReferenceElements::general( gt ), coordVector) │ │ │ │ -128 { } │ │ │ │ +108 public: │ │ │ │ +_1_1_3 inline static constexpr std::size_t _o_f_f_s_e_t(std::size_t dim) │ │ │ │ +114 { │ │ │ │ +115 // dim times "none" │ │ │ │ +116 return regular_offset(dim) + dim; │ │ │ │ +117 } │ │ │ │ +118 │ │ │ │ +_1_2_5 inline static constexpr std::size_t _s_i_z_e(std::size_t maxdim) │ │ │ │ +126 { │ │ │ │ +127 return _o_f_f_s_e_t(maxdim+1); │ │ │ │ +128 } │ │ │ │ 129 │ │ │ │ -_1_3_1 bool _a_f_f_i_n_e () const { return true; } │ │ │ │ -132 │ │ │ │ -_1_3_4 _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e _t_y_p_e () const { return refElement_.type(); } │ │ │ │ -135 │ │ │ │ -_1_3_7 int _c_o_r_n_e_r_s () const { return refElement_.size( _m_y_d_i_m_e_n_s_i_o_n ); } │ │ │ │ -138 │ │ │ │ -_1_4_0 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_o_r_n_e_r ( int i ) const │ │ │ │ -141 { │ │ │ │ -142 return _g_l_o_b_a_l( refElement_.position( i, _m_y_d_i_m_e_n_s_i_o_n ) ); │ │ │ │ -143 } │ │ │ │ -144 │ │ │ │ -_1_4_6 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _c_e_n_t_e_r () const { return _g_l_o_b_a_l( refElement_.position( 0, │ │ │ │ -0 ) ); } │ │ │ │ -147 │ │ │ │ -_1_5_4 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l ( const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l ) const │ │ │ │ -155 { │ │ │ │ -156 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e _g_l_o_b_a_l( origin_ ); │ │ │ │ -157 jacobianTransposed_.umtv( _l_o_c_a_l, _g_l_o_b_a_l ); │ │ │ │ -158 return _g_l_o_b_a_l; │ │ │ │ +_1_3_8 inline static constexpr std::size_t _i_n_d_e_x(const _G_e_o_m_e_t_r_y_T_y_p_e >) │ │ │ │ +139 { │ │ │ │ +140 return _o_f_f_s_e_t(gt._d_i_m()) + _L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_i_n_d_e_x(gt); │ │ │ │ +141 } │ │ │ │ +142 }; │ │ │ │ +143 │ │ │ │ +144 namespace Impl { │ │ │ │ +145 │ │ │ │ +146 // Map a dynamic GeometryType to a static integral_constant │ │ │ │ +147 template │ │ │ │ +148 static auto toGeometryTypeIdConstant(const GeometryType& gt, F&& f) { │ │ │ │ +149 // Transform LocalGeometryTypeIndex to GeometryType::Id │ │ │ │ +150 auto callWithId = [&](auto index) { │ │ │ │ +151 static constexpr auto id = _L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_t_y_p_e(dim, decltype │ │ │ │ +(index)::value)._t_o_I_d(); │ │ │ │ +152 return f(std::integral_constant{}); │ │ │ │ +153 }; │ │ │ │ +154 // switchCases needs a fallback to determine the return type. │ │ │ │ +155 auto fallBack = [&]() { return callWithId(Dune::Indices::_0); }; │ │ │ │ +156 // Iterate over all _regular_ GeometryType indices for given dimension │ │ │ │ +157 auto allIndices = std::make_index_sequence<_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_s_i_z_e │ │ │ │ +(dim)-1>{}; │ │ │ │ +158 return Dune::Hybrid::switchCases(allIndices, _L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_i_n_d_e_x │ │ │ │ +(gt), callWithId, fallBack); │ │ │ │ 159 } │ │ │ │ 160 │ │ │ │ -_1_7_4 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l ( const _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e &_g_l_o_b_a_l ) const │ │ │ │ -175 { │ │ │ │ -176 _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e _l_o_c_a_l; │ │ │ │ -177 jacobianInverseTransposed_.mtv( _g_l_o_b_a_l - origin_, _l_o_c_a_l ); │ │ │ │ -178 return _l_o_c_a_l; │ │ │ │ -179 } │ │ │ │ -180 │ │ │ │ -_1_9_1 _c_t_y_p_e _i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t ([[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) │ │ │ │ -const │ │ │ │ -192 { │ │ │ │ -193 return integrationElement_; │ │ │ │ -194 } │ │ │ │ -195 │ │ │ │ -_1_9_7 _V_o_l_u_m_e _v_o_l_u_m_e () const │ │ │ │ -198 { │ │ │ │ -199 return integrationElement_ * refElement_.volume(); │ │ │ │ -200 } │ │ │ │ -201 │ │ │ │ -_2_0_8 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ([[maybe_unused]] const │ │ │ │ -_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ -209 { │ │ │ │ -210 return jacobianTransposed_; │ │ │ │ -211 } │ │ │ │ -212 │ │ │ │ -_2_1_9 const _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d &_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ([ │ │ │ │ -[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ -220 { │ │ │ │ -221 return jacobianInverseTransposed_; │ │ │ │ -222 } │ │ │ │ -223 │ │ │ │ -_2_3_0 _J_a_c_o_b_i_a_n _j_a_c_o_b_i_a_n ([[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e &_l_o_c_a_l) const │ │ │ │ -231 { │ │ │ │ -232 return jacobianTransposed_.transposed(); │ │ │ │ -233 } │ │ │ │ -234 │ │ │ │ -_2_4_1 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e ([[maybe_unused]] const _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -&_l_o_c_a_l) const │ │ │ │ -242 { │ │ │ │ -243 return jacobianInverseTransposed_.transposed(); │ │ │ │ -244 } │ │ │ │ -245 │ │ │ │ -_2_4_6 friend ReferenceElement _r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t ( const _A_f_f_i_n_e_G_e_o_m_e_t_r_y &geometry ) │ │ │ │ -247 { │ │ │ │ -248 return geometry.refElement_; │ │ │ │ -249 } │ │ │ │ -250 │ │ │ │ -251 private: │ │ │ │ -252 _R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t refElement_; │ │ │ │ -253 _G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e origin_; │ │ │ │ -254 _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d jacobianTransposed_; │ │ │ │ -255 _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d jacobianInverseTransposed_; │ │ │ │ -256 _c_t_y_p_e integrationElement_; │ │ │ │ -257 }; │ │ │ │ -258 │ │ │ │ -259} // namespace Dune │ │ │ │ -260 │ │ │ │ -261#endif // #ifndef DUNE_GEOMETRY_AFFINEGEOMETRY_HH │ │ │ │ -_d_e_f_a_u_l_t_m_a_t_r_i_x_h_e_l_p_e_r_._h_h │ │ │ │ +161 } // namespace Impl │ │ │ │ +162} // namespace Dune │ │ │ │ +163 │ │ │ │ +164#endif // DUNE_GEOMETRY_TYPEINDEX_HH │ │ │ │ _t_y_p_e_._h_h │ │ │ │ A unique label for each type of element that can occur in a grid. │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_s_:_:_n_o_n_e │ │ │ │ +constexpr GeometryType none(unsigned int dim) │ │ │ │ +Returns a GeometryType representing a singular of dimension dim. │ │ │ │ +DDeeffiinniittiioonn type.hh:471 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn affinegeometry.hh:22 │ │ │ │ -_D_u_n_e_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -decltype(referenceElement(std::declval< T >()...)) ReferenceElement │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:291 │ │ │ │ -_D_u_n_e_:_:_G_e_o │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:28 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -This class provides access to geometric and topological properties of a │ │ │ │ -reference element. │ │ │ │ -DDeeffiinniittiioonn referenceelement.hh:52 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_I_m_p_l_e_m_e_n_t_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:34 │ │ │ │ -_D_u_n_e_:_:_G_e_o_:_:_R_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t_s │ │ │ │ -Class providing access to the singletons of the reference elements. │ │ │ │ -DDeeffiinniittiioonn referenceelements.hh:128 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ -AffineGeometry(const ReferenceElement &refElement, const CoordVector │ │ │ │ -&coordVector) │ │ │ │ -Create affine geometry from reference element and a vector of vertex │ │ │ │ -coordinates. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:116 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ -AffineGeometry()=default │ │ │ │ -Constructs an empty geometry. │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ -AffineGeometry(Dune::GeometryType gt, const GlobalCoordinate &origin, const │ │ │ │ -JacobianTransposed &jt) │ │ │ │ -Create affine geometry from GeometryType, one vertex, and the Jacobian matrix. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:109 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< ctype, mydimension > LocalCoordinate │ │ │ │ -Type for local coordinate vector. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:62 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_t_y_p_e │ │ │ │ -Dune::GeometryType type() const │ │ │ │ -Obtain the type of the reference element. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:134 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ -static const int mydimension │ │ │ │ -Dimension of the geometry. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:56 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ -AffineGeometry(const ReferenceElement &refElement, const GlobalCoordinate │ │ │ │ -&origin, const JacobianTransposed &jt) │ │ │ │ -Create affine geometry from reference element, one vertex, and the Jacobian │ │ │ │ -matrix. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:101 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_V_o_l_u_m_e │ │ │ │ -ctype Volume │ │ │ │ -Type used for volume. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:68 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ -JacobianInverse jacobianInverse(const LocalCoordinate &local) const │ │ │ │ -Obtain the Jacobian's inverse. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:241 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t │ │ │ │ -friend ReferenceElement referenceElement(const AffineGeometry &geometry) │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:246 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y │ │ │ │ -AffineGeometry(Dune::GeometryType gt, const CoordVector &coordVector) │ │ │ │ -Create affine geometry from GeometryType and a vector of vertex coordinates. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:126 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ -ctype integrationElement(const LocalCoordinate &local) const │ │ │ │ -Obtain the integration element. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:191 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e │ │ │ │ -FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse │ │ │ │ -Type for the inverse Jacobian matrix. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:80 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n │ │ │ │ -FieldMatrix< ctype, coorddimension, mydimension > Jacobian │ │ │ │ -Type for the Jacobian matrix. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:77 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -const JacobianInverseTransposed & jacobianInverseTransposed(const │ │ │ │ -LocalCoordinate &local) const │ │ │ │ -Obtain the transposed of the Jacobian's inverse. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:219 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed │ │ │ │ -Type for the transposed Jacobian matrix. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:71 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r │ │ │ │ -GlobalCoordinate corner(int i) const │ │ │ │ -Obtain coordinates of the i-th corner. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:140 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_c_o_r_n_e_r_s │ │ │ │ -int corners() const │ │ │ │ -Obtain number of corners of the corresponding reference element. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:137 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l │ │ │ │ -LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ -Evaluate the inverse mapping. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:174 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed │ │ │ │ -Type for the transposed inverse Jacobian matrix. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:74 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_c_o_o_r_d_d_i_m_e_n_s_i_o_n │ │ │ │ -static const int coorddimension │ │ │ │ -Dimension of the world space. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:59 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ -GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ -Evaluate the mapping. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:154 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_c_e_n_t_e_r │ │ │ │ -GlobalCoordinate center() const │ │ │ │ -Obtain the centroid of the mapping's image. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:146 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n │ │ │ │ -Jacobian jacobian(const LocalCoordinate &local) const │ │ │ │ -Obtain the Jacobian. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:230 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_c_t_y_p_e │ │ │ │ -ct ctype │ │ │ │ -Type used for coordinates. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:53 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< ctype, coorddimension > GlobalCoordinate │ │ │ │ -Type for coordinate vector in world space. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:65 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_a_f_f_i_n_e │ │ │ │ -bool affine() const │ │ │ │ -Always true: this is an affine geometry. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:131 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -const JacobianTransposed & jacobianTransposed(const LocalCoordinate &local) │ │ │ │ -const │ │ │ │ -Obtain the transposed of the Jacobian. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:208 │ │ │ │ -_D_u_n_e_:_:_A_f_f_i_n_e_G_e_o_m_e_t_r_y_:_:_v_o_l_u_m_e │ │ │ │ -Volume volume() const │ │ │ │ -Obtain the volume of the element. │ │ │ │ -DDeeffiinniittiioonn affinegeometry.hh:197 │ │ │ │ _D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e │ │ │ │ Unique label for each type of entities that can occur in DUNE grids. │ │ │ │ DDeeffiinniittiioonn type.hh:114 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_t_o_I_d │ │ │ │ +constexpr Id toId() const │ │ │ │ +Create an Id representation of this GeometryType. │ │ │ │ +DDeeffiinniittiioonn type.hh:210 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_d_i_m │ │ │ │ +constexpr unsigned int dim() const │ │ │ │ +Return dimension of the type. │ │ │ │ +DDeeffiinniittiioonn type.hh:360 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_d │ │ │ │ +constexpr unsigned int id() const │ │ │ │ +Return the topology id of the type. │ │ │ │ +DDeeffiinniittiioonn type.hh:365 │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_T_y_p_e_:_:_i_s_N_o_n_e │ │ │ │ +constexpr bool isNone() const │ │ │ │ +Return true if entity is a singular of any dimension. │ │ │ │ +DDeeffiinniittiioonn type.hh:355 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x │ │ │ │ +Compute per-dimension indices for geometry types. │ │ │ │ +DDeeffiinniittiioonn typeindex.hh:25 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_s_i_z_e │ │ │ │ +static constexpr std::size_t size(std::size_t dim) │ │ │ │ +Compute total number of geometry types for the given dimension. │ │ │ │ +DDeeffiinniittiioonn typeindex.hh:61 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_t_y_p_e │ │ │ │ +static constexpr GeometryType type(std::size_t dim, std::size_t index) │ │ │ │ +compute the geometry type for the given local index and dimension │ │ │ │ +DDeeffiinniittiioonn typeindex.hh:79 │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_i_n_d_e_x │ │ │ │ +static constexpr std::size_t index(const GeometryType >) │ │ │ │ +Compute the index for the given geometry type within its dimension. │ │ │ │ +DDeeffiinniittiioonn typeindex.hh:73 │ │ │ │ +_D_u_n_e_:_:_G_l_o_b_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x │ │ │ │ +Compute indices for geometry types, taking the dimension into account. │ │ │ │ +DDeeffiinniittiioonn typeindex.hh:90 │ │ │ │ +_D_u_n_e_:_:_G_l_o_b_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_i_n_d_e_x │ │ │ │ +static constexpr std::size_t index(const GeometryType >) │ │ │ │ +Compute the index for the given geometry type over all dimensions. │ │ │ │ +DDeeffiinniittiioonn typeindex.hh:138 │ │ │ │ +_D_u_n_e_:_:_G_l_o_b_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_o_f_f_s_e_t │ │ │ │ +static constexpr std::size_t offset(std::size_t dim) │ │ │ │ +Compute the starting index for a given dimension including irregular geometry │ │ │ │ +types. │ │ │ │ +DDeeffiinniittiioonn typeindex.hh:113 │ │ │ │ +_D_u_n_e_:_:_G_l_o_b_a_l_G_e_o_m_e_t_r_y_T_y_p_e_I_n_d_e_x_:_:_s_i_z_e │ │ │ │ +static constexpr std::size_t size(std::size_t maxdim) │ │ │ │ +Compute total number of geometry types up to and including the given dimension. │ │ │ │ +DDeeffiinniittiioonn typeindex.hh:125 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00262.html │ │ │ @@ -268,15 +268,15 @@ │ │ │
GeometryTypes::cube(2), 2>
│ │ │
{
│ │ │
typedef SquaringTheCircle::RefinementImp<CoordType> Imp;
│ │ │
};
│ │ │
}
│ │ │
This namespace contains the implementation of Refinement.
Definition base.cc:29
│ │ │
If you implement a template class, you have to specialise struct RefinementImp::Traits for every possible combination of topologyId and coerceToId that your implementation supports. │ │ │ -
  • #include "refinement/squaringthecircle.cc" from refinement.hh.
  • │ │ │ +
  • #include "refinement/squaringthecircle.cc" from refinement.hh.
  • │ │ │ │ │ │

    This is enough to integrate your implementation into the Refinement system. You probably want to include it into VirtualRefinement also.

    │ │ │

    │ │ │ Namespaces

    │ │ │

    The (non-virtual) Refinement system is organized in the following way into namespaces:

      │ │ │
    • Only template class StaticRefinement lives directly in namespace Dune.
    • │ │ │
    • Use namespace Dune::RefinementImp for all the Implementation.
    • │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a00265.html │ │ │ @@ -513,16 +513,16 @@ │ │ │ │ │ │ OutIterator outIt ) │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │

    Algorithm to reduce vertex order information.

    │ │ │ -
    │ │ │ - │ │ │ +
    │ │ │ + │ │ │
    Parameters
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    inBeginStart of the range of ids to reduce.
    inEndEnd of the range of ids to reduce.
    outItStart of the sequence where to store the result.
    │ │ │
    │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01096.html │ │ │ @@ -85,15 +85,15 @@ │ │ │
    Dune::Geo::ReferenceElement< Implementation > Class Template Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │

    This class provides access to geometric and topological properties of a reference element. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/referenceelement.hh>

    │ │ │ +

    #include <dune/geometry/referenceelement.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::Geo::ReferenceElement< Implementation >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -855,16 +855,16 @@ │ │ │
    │ │ │ │ │ │

    The dimension of the reference element.

    │ │ │ │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following files: │ │ │
    │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01100.html │ │ │ @@ -75,15 +75,15 @@ │ │ │ │ │ │
    │ │ │
    │ │ │
    Dune::Geo::ReferenceElementImplementation< ctype, dim > Class Template Reference
    │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following file: │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01104.html │ │ │ @@ -83,15 +83,15 @@ │ │ │
    Dune::Geo::ReferenceElements< ctype_, dim > Struct Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Class providing access to the singletons of the reference elements. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/referenceelements.hh>

    │ │ │ +

    #include <dune/geometry/referenceelements.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::Geo::ReferenceElements< ctype_, dim >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -389,16 +389,16 @@ │ │ │
    │ │ │ │ │ │

    The dimension of the contained reference elements.

    │ │ │ │ │ │
    │ │ │
    │ │ │
    The documentation for this struct was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01108.html │ │ │ @@ -84,15 +84,15 @@ │ │ │
    Dune::AffineGeometry< ct, mydim, cdim > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Implementation of the Geometry interface for affine geometries. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/affinegeometry.hh>

    │ │ │ +

    #include <dune/geometry/affinegeometry.hh>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -997,15 +997,15 @@ │ │ │
    │ │ │ │ │ │

    Dimension of the geometry.

    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01112.html │ │ │ @@ -84,15 +84,15 @@ │ │ │
    Dune::AxisAlignedCubeGeometry< CoordType, dim, coorddim > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    A geometry implementation for axis-aligned hypercubes. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/axisalignedcubegeometry.hh>

    │ │ │ +

    #include <dune/geometry/axisalignedcubegeometry.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::AxisAlignedCubeGeometry< CoordType, dim, coorddim >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -927,15 +927,15 @@ │ │ │
    │ │ │ │ │ │

    Dimension of the cube element.

    │ │ │ │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01116.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
    Dune::Dim< dim > Struct Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Static tag representing a dimension. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/dimension.hh>

    │ │ │ +

    #include <dune/geometry/dimension.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::Dim< dim >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -118,15 +118,15 @@ │ │ │ │ │ │

    │ │ │ Public Types

    typedef ct ctype
     Type used for coordinates.
    typedef FieldVector< ctype, mydimensionLocalCoordinate
     Type for local coordinate vector.
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01120.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
    Dune::Codim< codim > Struct Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Static tag representing a codimension. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/dimension.hh>

    │ │ │ +

    #include <dune/geometry/dimension.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::Codim< codim >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -124,15 +124,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01124.html │ │ │ @@ -84,15 +84,15 @@ │ │ │
    Dune::GeneralVertexOrder< dim, Index_ > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Class providing information on the ordering of vertices. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/generalvertexorder.hh>

    │ │ │ +

    #include <dune/geometry/generalvertexorder.hh>

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

    │ │ │ Classes

    class  iterator
     Iterate over the vertex indices of some sub-entity. More...
    │ │ │ │ │ │

    │ │ │ @@ -381,15 +381,15 @@ │ │ │
    │ │ │ │ │ │

    export the dimension of the entity we provide information for

    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01128.html │ │ │ @@ -82,15 +82,15 @@ │ │ │
    Dune::GeneralVertexOrder< dim, Index_ >::iterator Class Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Iterate over the vertex indices of some sub-entity. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/generalvertexorder.hh>

    │ │ │ +

    #include <dune/geometry/generalvertexorder.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::GeneralVertexOrder< dim, Index_ >::iterator:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -361,15 +361,15 @@ │ │ │

    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01132.html │ │ │ @@ -85,15 +85,15 @@ │ │ │
    Dune::LocalFiniteElementGeometry< LFE, cdim > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Geometry implementation based on local-basis function parametrization. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/localfiniteelementgeometry.hh>

    │ │ │ +

    #include <dune/geometry/localfiniteelementgeometry.hh>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1231,15 +1231,15 @@ │ │ │
    │ │ │ │ │ │

    geometry dimension

    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01136.html │ │ │ @@ -86,15 +86,15 @@ │ │ │
    Dune::MappedGeometry< Map, Geo > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Geometry parametrized by a LocalFunction and a LocalGeometry. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/mappedgeometry.hh>

    │ │ │ +

    #include <dune/geometry/mappedgeometry.hh>

    │ │ │

    │ │ │ Public Types

    using ctype = typename LocalBasisTraits::DomainFieldType
     coordinate type
    using LocalCoordinate = FieldVector<ctype, mydimension>
     type of local coordinates
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1058,15 +1058,15 @@ │ │ │
    │ │ │ │ │ │

    geometry dimension

    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01140.html │ │ │ @@ -83,15 +83,15 @@ │ │ │
    Dune::MultiLinearGeometryTraits< ct > Struct Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    default traits class for MultiLinearGeometry │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │ +

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │

    │ │ │ Public Types

    using LocalCoordinate = typename Geo::LocalCoordinate
     type of local coordinates
    using GlobalCoordinate = std::remove_reference_t<decltype(std::declval<Map>()(std::declval<typename Geo::GlobalCoordinate>()))>
     type of global coordinates
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -174,15 +174,15 @@ │ │ │
    │ │ │ │ │ │

    tolerance to numerical algorithms

    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01144.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
    Dune::MultiLinearGeometryTraits< ct >::CornerStorage< mydim, cdim > Struct Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    template specifying the storage for the corners │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │ +

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │

    │ │ │ Classes

    struct  CornerStorage
     template specifying the storage for the corners More...
    struct  hasSingleGeometryType
     will there be only one geometry type for a dimension? More...
    │ │ │ │ │ │ │ │ │

    │ │ │ Public Types

    typedef std::vector< FieldVector< ct, cdim > > Type
    │ │ │

    Detailed Description

    │ │ │
    template<class ct>
    │ │ │ @@ -144,15 +144,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │
    The documentation for this struct was generated from the following file: │ │ │
    │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01148.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
    Dune::MultiLinearGeometryTraits< ct >::hasSingleGeometryType< dim > Struct Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    will there be only one geometry type for a dimension? │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │ +

    #include <dune/geometry/multilineargeometry.hh>

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

    │ │ │ Static Public Attributes

    static const bool v = false
    static const unsigned int topologyId = ~0u
    │ │ │

    Detailed Description

    │ │ │ @@ -151,15 +151,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01152.html │ │ │ @@ -88,15 +88,15 @@ │ │ │
    Dune::MultiLinearGeometry< ct, mydim, cdim, Traits > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    generic geometry implementation based on corner coordinates │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │ +

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -1438,15 +1438,15 @@ │ │ │
    │ │ │ │ │ │

    geometry dimension

    │ │ │ │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01156.html │ │ │ @@ -75,17 +75,17 @@ │ │ │ │ │ │
    │ │ │
    │ │ │
    Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed Class Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │ +

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │
    The documentation for this class was generated from the following file: │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01160.html │ │ │ @@ -85,15 +85,15 @@ │ │ │
    Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Implement a MultiLinearGeometry with additional caching. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │ +

    #include <dune/geometry/multilineargeometry.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -988,15 +988,15 @@ │ │ │
    │ │ │ │ │ │

    geometry dimension

    │ │ │ │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01164.html │ │ │ @@ -84,15 +84,15 @@ │ │ │
    Dune::QuadraturePoint< ct, dim > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Single evaluation point in a quadrature rule. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -378,15 +378,15 @@ │ │ │ │ │ │

    │ │ │ Public Types

    typedef ct Field
     Number type used for coordinates and quadrature weights.
    typedef Dune::FieldVector< ct, dim > Vector
     Type used for the position of a quadrature point.
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01168.html │ │ │ @@ -75,27 +75,27 @@ │ │ │ │ │ │
    │ │ │
    │ │ │
    std::tuple_size< Dune::QuadraturePoint< ct, dim > > Struct Template Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

    │ │ │
    │ │ │ Inheritance diagram for std::tuple_size< Dune::QuadraturePoint< ct, dim > >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    The documentation for this struct was generated from the following file: │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01172.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
    │ │ │ Public Types | │ │ │ List of all members
    │ │ │
    std::tuple_element< 0, Dune::QuadraturePoint< ct, dim > > Struct Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

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

    │ │ │ Public Types

    using type = Dune::FieldVector<ct, dim>
    │ │ │

    Member Typedef Documentation

    │ │ │ │ │ │ @@ -102,15 +102,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01176.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
    │ │ │ Public Types | │ │ │ List of all members
    │ │ │
    std::tuple_element< 1, Dune::QuadraturePoint< ct, dim > > Struct Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

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

    │ │ │ Public Types

    using type = ct
    │ │ │

    Member Typedef Documentation

    │ │ │ │ │ │ @@ -102,15 +102,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01180.html │ │ │ @@ -78,29 +78,29 @@ │ │ │
    Dune::QuadratureOrderOutOfRange Class Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Exception thrown if a desired QuadratureRule is not available, because the requested order is to high. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::QuadratureOrderOutOfRange:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │

    Detailed Description

    │ │ │

    Exception thrown if a desired QuadratureRule is not available, because the requested order is to high.

    │ │ │

    The documentation for this class was generated from the following file: │ │ │
    │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01184.html │ │ │ @@ -86,15 +86,15 @@ │ │ │
    Dune::QuadratureRule< ct, dim > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Abstract base class for quadrature rules. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::QuadratureRule< ct, dim >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -464,15 +464,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01188.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
    Dune::QuadratureRuleFactory< ctype, dim > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Factory class for creation of quadrature rules, depending on GeometryType, order and QuadratureType. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::QuadratureRuleFactory< ctype, dim >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -133,15 +133,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01192.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
    Dune::QuadratureRules< ctype, dim > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    A container for all quadrature rules of dimension dim. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -206,15 +206,15 @@ │ │ │
    │ │ │ │ │ │

    select the appropriate QuadratureRule for GeometryType t and order p

    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01196.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
    │ │ │ Friends | │ │ │ List of all members
    │ │ │
    Dune::QuadratureRuleFactory< ctype, 0 > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::QuadratureRuleFactory< ctype, 0 >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -120,15 +120,15 @@ │ │ │ │ │ │

    │ │ │ Static Public Member Functions

    static unsigned maxOrder (const GeometryType &t, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
     maximum quadrature order for given geometry type and quadrature type
    static const QuadratureRule & rule (const GeometryType &t, int p, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
     select the appropriate QuadratureRule for GeometryType t and order p
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01200.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
    │ │ │ Friends | │ │ │ List of all members
    │ │ │
    Dune::QuadratureRuleFactory< ctype, 1 > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::QuadratureRuleFactory< ctype, 1 >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -120,15 +120,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01204.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
    │ │ │ Friends | │ │ │ List of all members
    │ │ │
    Dune::QuadratureRuleFactory< ctype, 2 > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::QuadratureRuleFactory< ctype, 2 >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -120,15 +120,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01208.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
    │ │ │ Friends | │ │ │ List of all members
    │ │ │
    Dune::QuadratureRuleFactory< ctype, 3 > Class Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    #include <dune/geometry/quadraturerules.hh>

    │ │ │ +

    #include <dune/geometry/quadraturerules.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::QuadratureRuleFactory< ctype, 3 >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -120,15 +120,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01216.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
    Dune::Geo::ReferenceElement< Implementation >::Codim< codim > Struct Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Collection of types depending on the codimension. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/referenceelement.hh>

    │ │ │ +

    #include <dune/geometry/referenceelement.hh>

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

    │ │ │ Public Types

    using Geometry = implementation-defined
     type of geometry embedding a subentity into the reference element
    │ │ │

    Detailed Description

    │ │ │ @@ -114,15 +114,15 @@ │ │ │
    │ │ │ │ │ │

    type of geometry embedding a subentity into the reference element

    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01220.html │ │ │ @@ -113,15 +113,15 @@ │ │ │

    Each specialisation should contain a single member typedef Imp, e.g.:

    template<class CoordType>
    │ │ │
    struct Traits<sphereTopologyId, CoordType, Impl::CubeToplogy<2>::id, 2>
    │ │ │
    {
    │ │ │
    typedef SquaringTheCircle::Refinement Imp;
    │ │ │
    };
    │ │ │
    Mapping from geometryType, CoordType and coerceTo to a particular Refinement implementation.
    Definition base.cc:70
    │ │ │

    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01224.html │ │ │ @@ -142,15 +142,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01228.html │ │ │ @@ -449,15 +449,15 @@ │ │ │ │ │ │

    The IndexVector of the Refinement.

    │ │ │

    This is always a typedef to a FieldVector

    │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01232.html │ │ │ @@ -131,15 +131,15 @@ │ │ │ │ │ │

    The SubEntityIterator for each codim.

    │ │ │

    This is some sort of type, not necessarily a typedef

    │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01260.html │ │ │ @@ -89,15 +89,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01264.html │ │ │ @@ -444,15 +444,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01268.html │ │ │ @@ -114,15 +114,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01272.html │ │ │ @@ -442,15 +442,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01276.html │ │ │ @@ -499,15 +499,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01280.html │ │ │ @@ -75,15 +75,15 @@ │ │ │ │ │ │
    │ │ │
    │ │ │
    Dune::RefinementImp::HCubeTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension > Class Template Reference
    │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following file: │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01284.html │ │ │ @@ -89,15 +89,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01288.html │ │ │ @@ -451,15 +451,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01292.html │ │ │ @@ -114,15 +114,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01296.html │ │ │ @@ -442,15 +442,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01300.html │ │ │ @@ -479,15 +479,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01304.html │ │ │ @@ -75,15 +75,15 @@ │ │ │ │ │ │
    │ │ │
    │ │ │
    Dune::RefinementImp::PrismTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension > Class Template Reference
    │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following file: │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01308.html │ │ │ @@ -89,15 +89,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01312.html │ │ │ @@ -451,15 +451,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01316.html │ │ │ @@ -114,15 +114,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01320.html │ │ │ @@ -442,15 +442,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01324.html │ │ │ @@ -479,15 +479,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01328.html │ │ │ @@ -75,15 +75,15 @@ │ │ │ │ │ │
    │ │ │
    │ │ │
    Dune::RefinementImp::PyramidTriangulation::RefinementImp< dimension_, CoordType >::Codim< codimension > Class Template Reference
    │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following file: │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01332.html │ │ │ @@ -389,15 +389,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01336.html │ │ │ @@ -87,15 +87,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01340.html │ │ │ @@ -89,15 +89,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01344.html │ │ │ @@ -375,15 +375,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01348.html │ │ │ @@ -490,15 +490,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01352.html │ │ │ @@ -75,15 +75,15 @@ │ │ │ │ │ │
    │ │ │
    │ │ │
    Dune::RefinementImp::Simplex::RefinementImp< dimension_, CoordType >::Codim< codimension > Class Template Reference
    │ │ │
    │ │ │
    │ │ │
    The documentation for this class was generated from the following file: │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01356.html │ │ │ @@ -83,15 +83,15 @@ │ │ │
    Dune::TopologyFactory< Traits > Struct Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Provide a factory over the generic topologies. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/topologyfactory.hh>

    │ │ │ +

    #include <dune/geometry/topologyfactory.hh>

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

    │ │ │ Public Types

    typedef Traits::Key Key
    typedef Traits::Object Object
    typedef Traits::Factory Factory
    │ │ │ @@ -312,15 +312,15 @@ │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01360.html │ │ │ @@ -83,15 +83,15 @@ │ │ │
    Dune::TopologySingletonFactory< Factory > Struct Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    A wrapper for a TopologyFactory providing singleton storage. Same usage as TopologyFactory but with empty release method an internal storage. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/topologyfactory.hh>

    │ │ │ +

    #include <dune/geometry/topologyfactory.hh>

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

    │ │ │ Public Types

    typedef Factory::Key Key
    typedef const Factory::Object Object
    │ │ │ │ │ │

    │ │ │ @@ -291,15 +291,15 @@ │ │ │

    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01368.html │ │ │ @@ -82,15 +82,15 @@ │ │ │
    Dune::GeometryType Class Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Unique label for each type of entities that can occur in DUNE grids. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/type.hh>

    │ │ │ +

    #include <dune/geometry/type.hh>

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

    │ │ │ Public Types

    enum  BasicType {
    │ │ │   simplex │ │ │ , cube │ │ │ , pyramid │ │ │ @@ -1010,15 +1010,15 @@ │ │ │

    Create an Id representation of this GeometryType.

    │ │ │

    The returned Id encapsulates the whole information of this GeometryType into an enum suitable for being used as template parameter. The GeometryType can be reconstructed from the Id using GeometryType{id}.

    │ │ │

    This function was mainly introduced to support older GCC versions (<10.2). There the implicit conversion from GeometryType to Id failed if a pure r-value template argument based on a static class member was used. (See dune/geometry/test/test-geometrytype-id.cc)

    │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01380.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
    Dune::LocalGeometryTypeIndex Class Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Compute per-dimension indices for geometry types. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/typeindex.hh>

    │ │ │ +

    #include <dune/geometry/typeindex.hh>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -183,15 +183,15 @@ │ │ │
    │ │ │ │ │ │

    compute the geometry type for the given local index and dimension

    │ │ │ │ │ │
    │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a01384.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
    Dune::GlobalGeometryTypeIndex Class Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Compute indices for geometry types, taking the dimension into account. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/typeindex.hh>

    │ │ │ +

    #include <dune/geometry/typeindex.hh>

    │ │ │

    │ │ │ Static Public Member Functions

    static constexpr std::size_t size (std::size_t dim)
     Compute total number of geometry types for the given dimension.
    static constexpr std::size_t index (const GeometryType &gt)
     Compute the index for the given geometry type within its dimension.
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -179,15 +179,15 @@ │ │ │ │ │ │

    Compute total number of geometry types up to and including the given dimension.

    │ │ │

    This includes irregular geometry types such as "None".

    │ │ │ │ │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/a02225.html │ │ │ @@ -83,15 +83,15 @@ │ │ │
    Dune::ReferenceElements< ctype_, dim > Struct Template Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Class providing access to the singletons of the reference elements. │ │ │ More...

    │ │ │ │ │ │ -

    #include <dune/geometry/referenceelements.hh>

    │ │ │ +

    #include <dune/geometry/referenceelements.hh>

    │ │ │
    │ │ │ Inheritance diagram for Dune::ReferenceElements< ctype_, dim >:
    │ │ │
    │ │ │
    Inheritance graph
    │ │ │ │ │ │ │ │ │ │ │ │ @@ -390,16 +390,16 @@ │ │ │
    │ │ │ │ │ │

    The dimension of the contained reference elements.

    │ │ │ │ │ │
    │ │ │
    │ │ │
    The documentation for this struct was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/dir_000004_000006.html │ │ │ @@ -71,15 +71,15 @@ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -

    geometry → refinement Relation

    │ │ │ Static Public Member Functions

    static constexpr std::size_t offset (std::size_t dim)
     Compute the starting index for a given dimension including irregular geometry types.
    static constexpr std::size_t size (std::size_t maxdim)
     Compute total number of geometry types up to and including the given dimension.
    File in dune/geometryIncludes file in dune/geometry/refinement
    refinement.hhbase.cc
    refinement.hhhcube.cc
    refinement.hhhcubetriangulation.cc
    refinement.hhprismtriangulation.cc
    refinement.hhpyramidtriangulation.cc
    refinement.hhsimplex.cc
    │ │ │ +

    geometry → refinement Relation

    File in dune/geometryIncludes file in dune/geometry/refinement
    refinement.hhbase.cc
    refinement.hhhcube.cc
    refinement.hhhcubetriangulation.cc
    refinement.hhprismtriangulation.cc
    refinement.hhpyramidtriangulation.cc
    refinement.hhsimplex.cc
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/dir_000004_000007.html │ │ │ @@ -71,15 +71,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/dir_18620fa9f137864b479f21357cfac10d.html │ │ │ @@ -97,35 +97,35 @@ │ │ │

    │ │ │ Directories

     
    refinement
     
    utility
    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Files

     
    affinegeometry.hh
     An implementation of the Geometry interface for affine geometries.
     
    axisalignedcubegeometry.hh
     A geometry implementation for axis-aligned hypercubes.
     
    dimension.hh
     
    generalvertexorder.hh
     
    localfiniteelementgeometry.hh
     
    mappedgeometry.hh
     
    multilineargeometry.hh
     
    quadraturerules.hh
     
    referenceelement.hh
     
    referenceelementimplementation.cc
     
    referenceelementimplementation.hh
     
    referenceelements.hh
     
    refinement.hh
     This file simply includes all Refinement implementations so you don't have to do them separately.
     
    topologyfactory.hh
     
    type.hh
     A unique label for each type of element that can occur in a grid.
     
    typeindex.hh
     Helper classes to provide indices for geometrytypes for use in a vector.
     
    affinegeometry.hh
     An implementation of the Geometry interface for affine geometries.
     
    axisalignedcubegeometry.hh
     A geometry implementation for axis-aligned hypercubes.
     
    dimension.hh
     
    generalvertexorder.hh
     
    localfiniteelementgeometry.hh
     
    mappedgeometry.hh
     
    multilineargeometry.hh
     
    quadraturerules.hh
     
    referenceelement.hh
     
    referenceelementimplementation.cc
     
    referenceelementimplementation.hh
     
    referenceelements.hh
     
    refinement.hh
     This file simply includes all Refinement implementations so you don't have to do them separately.
     
    topologyfactory.hh
     
    type.hh
     A unique label for each type of element that can occur in a grid.
     
    typeindex.hh
     Helper classes to provide indices for geometrytypes for use in a vector.
     
    virtualrefinement.cc
     This file contains the virtual wrapper around refinement.
     
    virtualrefinement.hh
     This file contains the virtual wrapper around refinement.
    │ │ │
    │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/dir_428ed1c935e77406fcbfdccd4ee3f7a2.html │ │ │ @@ -86,18 +86,18 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ Files

     
    algorithms.hh
     
    convergence.hh
     
    defaultmatrixhelper.hh
     
    typefromvertexcount.hh
     
    algorithms.hh
     
    convergence.hh
     
    defaultmatrixhelper.hh
     
    typefromvertexcount.hh
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/dir_b609f53bbb5e26b8e9292001c59476a3.html │ │ │ @@ -86,24 +86,24 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ Files

     
    base.cc
     This file contains the parts independent of a particular Refinement implementation.
     
    base.cc
     This file contains the parts independent of a particular Refinement implementation.
     
    hcube.cc
     This file contains the Refinement implementation for hypercubes (quadrilaterals, hexahedrons, etc.).
     
    hcubetriangulation.cc
     This file contains the Refinement implementation for triangulating hypercubes (quadrilateral -> triangle, hexahedron -> tetrahedron).
     
    prismtriangulation.cc
     
    pyramidtriangulation.cc
     
    simplex.cc
     This file contains the Refinement implementation for simplices (triangles, tetrahedrons...).
     
    hcubetriangulation.cc
     This file contains the Refinement implementation for triangulating hypercubes (quadrilateral -> triangle, hexahedron -> tetrahedron).
     
    prismtriangulation.cc
     
    pyramidtriangulation.cc
     
    simplex.cc
     This file contains the Refinement implementation for simplices (triangles, tetrahedrons...).
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/doxygen_crawl.html │ │ │ @@ -4,15 +4,15 @@ │ │ │ Validator / crawler helper │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -23,46 +23,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ │ │ + │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/dune-geometry.tag.gz │ │ │ ├── dune-geometry.tag │ │ │ │ ├── dune-geometry.tag │ │ │ │ │ @@ -1,108 +1,108 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ referenceelementspage.txt │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/doc/appl/refelements/ │ │ │ │ │ - a00002.html │ │ │ │ │ + a00128.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ mainpage.txt │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/doc/doxygen/ │ │ │ │ │ a00164.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ modules.txt │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/doc/doxygen/ │ │ │ │ │ a00167.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ affinegeometry.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00251.html │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ - dune/geometry/utility/defaultmatrixhelper.hh │ │ │ │ │ + a00230.html │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ + dune/geometry/utility/defaultmatrixhelper.hh │ │ │ │ │ Dune::AffineGeometry │ │ │ │ │ Dune │ │ │ │ │ Dune::Geo │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ axisalignedcubegeometry.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00248.html │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ + a00233.html │ │ │ │ │ + dune/geometry/referenceelements.hh │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ Dune::AxisAlignedCubeGeometry │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dimension.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00245.html │ │ │ │ │ + a00248.html │ │ │ │ │ Dune::Dim │ │ │ │ │ Dune::Codim │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ generalvertexorder.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00242.html │ │ │ │ │ - type.hh │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ + a00188.html │ │ │ │ │ + type.hh │ │ │ │ │ + dune/geometry/referenceelements.hh │ │ │ │ │ Dune::GeneralVertexOrder │ │ │ │ │ Dune::GeneralVertexOrder::iterator │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ localfiniteelementgeometry.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00239.html │ │ │ │ │ - dune/geometry/quadraturerules.hh │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ - dune/geometry/utility/algorithms.hh │ │ │ │ │ - dune/geometry/utility/convergence.hh │ │ │ │ │ - dune/geometry/utility/defaultmatrixhelper.hh │ │ │ │ │ + a00242.html │ │ │ │ │ + dune/geometry/quadraturerules.hh │ │ │ │ │ + dune/geometry/referenceelements.hh │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ + dune/geometry/utility/algorithms.hh │ │ │ │ │ + dune/geometry/utility/convergence.hh │ │ │ │ │ + dune/geometry/utility/defaultmatrixhelper.hh │ │ │ │ │ Dune::LocalFiniteElementGeometry │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ mappedgeometry.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00236.html │ │ │ │ │ - dune/geometry/quadraturerules.hh │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ - dune/geometry/utility/algorithms.hh │ │ │ │ │ - dune/geometry/utility/convergence.hh │ │ │ │ │ - dune/geometry/utility/defaultmatrixhelper.hh │ │ │ │ │ + a00245.html │ │ │ │ │ + dune/geometry/quadraturerules.hh │ │ │ │ │ + dune/geometry/referenceelements.hh │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ + dune/geometry/utility/algorithms.hh │ │ │ │ │ + dune/geometry/utility/convergence.hh │ │ │ │ │ + dune/geometry/utility/defaultmatrixhelper.hh │ │ │ │ │ Dune::MappedGeometry │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ multilineargeometry.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00233.html │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ - dune/geometry/utility/defaultmatrixhelper.hh │ │ │ │ │ + a00227.html │ │ │ │ │ + dune/geometry/referenceelements.hh │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ + dune/geometry/utility/defaultmatrixhelper.hh │ │ │ │ │ Dune::MultiLinearGeometryTraits │ │ │ │ │ Dune::MultiLinearGeometryTraits::CornerStorage │ │ │ │ │ Dune::MultiLinearGeometryTraits::hasSingleGeometryType │ │ │ │ │ Dune::MultiLinearGeometry │ │ │ │ │ Dune::MultiLinearGeometry::JacobianInverseTransposed │ │ │ │ │ Dune::CachedMultiLinearGeometry │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ quadraturerules.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00230.html │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ - dune/geometry/typeindex.hh │ │ │ │ │ + a00224.html │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ + dune/geometry/typeindex.hh │ │ │ │ │ std::tuple_size< Dune::QuadraturePoint< ct, dim > > │ │ │ │ │ std::tuple_element< 0, Dune::QuadraturePoint< ct, dim > > │ │ │ │ │ std::tuple_element< 1, Dune::QuadraturePoint< ct, dim > > │ │ │ │ │ Dune::QuadratureOrderOutOfRange │ │ │ │ │ Dune::QuadraturePoint │ │ │ │ │ Dune::QuadratureRule │ │ │ │ │ Dune::QuadratureRules │ │ │ │ │ @@ -113,97 +113,97 @@ │ │ │ │ │ Dune::QuadratureRuleFactory< ctype, 3 > │ │ │ │ │ Dune │ │ │ │ │ std │ │ │ │ │ Dune::QuadratureType │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ DUNE_INCLUDING_IMPLEMENTATION │ │ │ │ │ - a00230.html │ │ │ │ │ + a00224.html │ │ │ │ │ a0aeda817d7161b7c1afd8dd15ff12f17 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ referenceelement.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00227.html │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ + a00179.html │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ Dune::Geo::ReferenceElement │ │ │ │ │ Dune::Geo::ReferenceElement::Codim │ │ │ │ │ Dune │ │ │ │ │ Dune::Geo │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ referenceelementimplementation.cc │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00224.html │ │ │ │ │ - dune/geometry/referenceelementimplementation.hh │ │ │ │ │ + a00191.html │ │ │ │ │ + dune/geometry/referenceelementimplementation.hh │ │ │ │ │ Dune │ │ │ │ │ Dune::Geo │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ referenceelementimplementation.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00221.html │ │ │ │ │ - dune/geometry/referenceelement.hh │ │ │ │ │ - dune/geometry/affinegeometry.hh │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ + a00236.html │ │ │ │ │ + dune/geometry/referenceelement.hh │ │ │ │ │ + dune/geometry/affinegeometry.hh │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ Dune │ │ │ │ │ Dune::Geo │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ referenceelements.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00218.html │ │ │ │ │ - dune/geometry/dimension.hh │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ - dune/geometry/referenceelement.hh │ │ │ │ │ - dune/geometry/referenceelementimplementation.hh │ │ │ │ │ + a00185.html │ │ │ │ │ + dune/geometry/dimension.hh │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ + dune/geometry/referenceelement.hh │ │ │ │ │ + dune/geometry/referenceelementimplementation.hh │ │ │ │ │ Dune::Geo::ReferenceElements │ │ │ │ │ Dune::ReferenceElements │ │ │ │ │ Dune │ │ │ │ │ Dune::Geo │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ refinement.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00215.html │ │ │ │ │ - refinement/base.cc │ │ │ │ │ + a00239.html │ │ │ │ │ + refinement/base.cc │ │ │ │ │ refinement/hcube.cc │ │ │ │ │ - refinement/simplex.cc │ │ │ │ │ - refinement/hcubetriangulation.cc │ │ │ │ │ - refinement/prismtriangulation.cc │ │ │ │ │ - refinement/pyramidtriangulation.cc │ │ │ │ │ + refinement/simplex.cc │ │ │ │ │ + refinement/hcubetriangulation.cc │ │ │ │ │ + refinement/prismtriangulation.cc │ │ │ │ │ + refinement/pyramidtriangulation.cc │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ base.cc │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/refinement/ │ │ │ │ │ - a00212.html │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ + a00197.html │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ Dune::RefinementImp::Traits │ │ │ │ │ Dune::RefinementIntervals │ │ │ │ │ Dune::StaticRefinement │ │ │ │ │ Dune::StaticRefinement::Codim │ │ │ │ │ Dune │ │ │ │ │ Dune::RefinementImp │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ DUNE_GEOMETRY_REFINEMENT_BASE_CC │ │ │ │ │ - a00212.html │ │ │ │ │ + a00197.html │ │ │ │ │ ab8232ef779e57c3676c54a73bd759f72 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ hcube.cc │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/refinement/ │ │ │ │ │ a00209.html │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ - dune/geometry/axisalignedcubegeometry.hh │ │ │ │ │ - base.cc │ │ │ │ │ + dune/geometry/referenceelements.hh │ │ │ │ │ + dune/geometry/axisalignedcubegeometry.hh │ │ │ │ │ + base.cc │ │ │ │ │ Dune::RefinementImp::HCube::RefinementImp │ │ │ │ │ Dune::RefinementImp::HCube::RefinementImp::Codim │ │ │ │ │ Dune::RefinementImp::HCube::RefinementSubEntityIteratorSpecial │ │ │ │ │ Dune::RefinementImp::HCube::RefinementSubEntityIteratorSpecial< dimension, CoordType, dimension > │ │ │ │ │ Dune::RefinementImp::HCube::RefinementSubEntityIteratorSpecial< dimension, CoordType, 0 > │ │ │ │ │ Dune::RefinementImp::HCube::RefinementImp::Codim< codimension > │ │ │ │ │ Dune │ │ │ │ │ @@ -216,103 +216,103 @@ │ │ │ │ │ a2be7a03e64dedaaa1cf5c7c8e2a9cf60 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ hcubetriangulation.cc │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/refinement/ │ │ │ │ │ - a00206.html │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ - base.cc │ │ │ │ │ - simplex.cc │ │ │ │ │ + a00203.html │ │ │ │ │ + dune/geometry/referenceelements.hh │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ + base.cc │ │ │ │ │ + simplex.cc │ │ │ │ │ Dune::RefinementImp::HCubeTriangulation::RefinementImp │ │ │ │ │ Dune::RefinementImp::HCubeTriangulation::RefinementImp::Codim │ │ │ │ │ Dune::RefinementImp::HCubeTriangulation::RefinementIteratorSpecial< dimension, CoordType, dimension > │ │ │ │ │ Dune::RefinementImp::HCubeTriangulation::RefinementIteratorSpecial< dimension, CoordType, 0 > │ │ │ │ │ Dune::RefinementImp::HCubeTriangulation::RefinementImp::Codim< codimension > │ │ │ │ │ Dune │ │ │ │ │ Dune::RefinementImp │ │ │ │ │ Dune::RefinementImp::HCubeTriangulation │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ DUNE_GEOMETRY_REFINEMENT_HCUBETRIANGULATION_CC │ │ │ │ │ - a00206.html │ │ │ │ │ + a00203.html │ │ │ │ │ a3fe24de9b756cd18f014979a41cb0843 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ prismtriangulation.cc │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/refinement/ │ │ │ │ │ - a00203.html │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ - base.cc │ │ │ │ │ - simplex.cc │ │ │ │ │ + a00194.html │ │ │ │ │ + dune/geometry/referenceelements.hh │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ + base.cc │ │ │ │ │ + simplex.cc │ │ │ │ │ Dune::RefinementImp::PrismTriangulation::RefinementImp │ │ │ │ │ Dune::RefinementImp::PrismTriangulation::RefinementImp::Codim │ │ │ │ │ Dune::RefinementImp::PrismTriangulation::RefinementIteratorSpecial< dimension, CoordType, dimension > │ │ │ │ │ Dune::RefinementImp::PrismTriangulation::RefinementIteratorSpecial< dimension, CoordType, 0 > │ │ │ │ │ Dune::RefinementImp::PrismTriangulation::RefinementImp::Codim< codimension > │ │ │ │ │ Dune │ │ │ │ │ Dune::RefinementImp │ │ │ │ │ Dune::RefinementImp::PrismTriangulation │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC │ │ │ │ │ - a00203.html │ │ │ │ │ + a00194.html │ │ │ │ │ ae56eb72b98f97f57cc224eb9b4394ef8 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ pyramidtriangulation.cc │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/refinement/ │ │ │ │ │ - a00200.html │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ - base.cc │ │ │ │ │ - simplex.cc │ │ │ │ │ + a00206.html │ │ │ │ │ + dune/geometry/referenceelements.hh │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ + base.cc │ │ │ │ │ + simplex.cc │ │ │ │ │ Dune::RefinementImp::PyramidTriangulation::RefinementImp │ │ │ │ │ Dune::RefinementImp::PyramidTriangulation::RefinementImp::Codim │ │ │ │ │ Dune::RefinementImp::PyramidTriangulation::RefinementIteratorSpecial< dimension, CoordType, dimension > │ │ │ │ │ Dune::RefinementImp::PyramidTriangulation::RefinementIteratorSpecial< dimension, CoordType, 0 > │ │ │ │ │ Dune::RefinementImp::PyramidTriangulation::RefinementImp::Codim< codimension > │ │ │ │ │ Dune │ │ │ │ │ Dune::RefinementImp │ │ │ │ │ Dune::RefinementImp::PyramidTriangulation │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ DUNE_GEOMETRY_REFINEMENT_PYRAMIDTRIANGULATION_CC │ │ │ │ │ - a00200.html │ │ │ │ │ + a00206.html │ │ │ │ │ a5f431ee98541c17b3d9aea2dbc726941 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ simplex.cc │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/refinement/ │ │ │ │ │ - a00197.html │ │ │ │ │ - dune/geometry/multilineargeometry.hh │ │ │ │ │ - dune/geometry/referenceelements.hh │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ - base.cc │ │ │ │ │ + a00200.html │ │ │ │ │ + dune/geometry/multilineargeometry.hh │ │ │ │ │ + dune/geometry/referenceelements.hh │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ + base.cc │ │ │ │ │ Dune::RefinementImp::Simplex::RefinementImp │ │ │ │ │ Dune::RefinementImp::Simplex::RefinementImp::Codim │ │ │ │ │ Dune::RefinementImp::Simplex::RefinementIteratorSpecial< dimension, CoordType, dimension > │ │ │ │ │ Dune::RefinementImp::Simplex::RefinementIteratorSpecial< dimension, CoordType, 0 > │ │ │ │ │ Dune::RefinementImp::Simplex::RefinementImp::Codim< codimension > │ │ │ │ │ Dune │ │ │ │ │ Dune::RefinementImp │ │ │ │ │ Dune::RefinementImp::Simplex │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC │ │ │ │ │ - a00197.html │ │ │ │ │ + a00200.html │ │ │ │ │ a944407dc4f6f9a372b10b69bbb5a0792 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ int │ │ │ │ │ pointIndex │ │ │ │ │ a00275.html │ │ │ │ │ @@ -368,70 +368,70 @@ │ │ │ │ │ afd47205aa1691498b073d9681fb23f6d │ │ │ │ │ (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ topologyfactory.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00194.html │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ - dune/geometry/typeindex.hh │ │ │ │ │ + a00176.html │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ + dune/geometry/typeindex.hh │ │ │ │ │ Dune::TopologyFactory │ │ │ │ │ Dune::TopologySingletonFactory │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ type.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00191.html │ │ │ │ │ + a00182.html │ │ │ │ │ Dune::GeometryType │ │ │ │ │ Dune │ │ │ │ │ Dune::GeometryTypes │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ typeindex.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ - a00188.html │ │ │ │ │ - type.hh │ │ │ │ │ + a00251.html │ │ │ │ │ + type.hh │ │ │ │ │ Dune::LocalGeometryTypeIndex │ │ │ │ │ Dune::GlobalGeometryTypeIndex │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ algorithms.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/utility/ │ │ │ │ │ - a00185.html │ │ │ │ │ - dune/geometry/utility/defaultmatrixhelper.hh │ │ │ │ │ + a00218.html │ │ │ │ │ + dune/geometry/utility/defaultmatrixhelper.hh │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ convergence.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/utility/ │ │ │ │ │ - a00182.html │ │ │ │ │ + a00212.html │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ defaultmatrixhelper.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/utility/ │ │ │ │ │ - a00179.html │ │ │ │ │ + a00221.html │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ typefromvertexcount.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/utility/ │ │ │ │ │ - a00176.html │ │ │ │ │ - dune/geometry/type.hh │ │ │ │ │ + a00215.html │ │ │ │ │ + dune/geometry/type.hh │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ virtualrefinement.cc │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ a00173.html │ │ │ │ │ - type.hh │ │ │ │ │ - refinement.hh │ │ │ │ │ + type.hh │ │ │ │ │ + refinement.hh │ │ │ │ │ Dune::VirtualRefinementSubEntityIteratorSpecial< dimension, CoordType, dimension > │ │ │ │ │ Dune::VirtualRefinementSubEntityIteratorSpecial< dimension, CoordType, 0 > │ │ │ │ │ Dune::VirtualRefinement::Codim< codimension > │ │ │ │ │ Dune::VirtualRefinementSubEntityIteratorBackSpecial< dimension, CoordType, dimension > │ │ │ │ │ Dune::VirtualRefinementSubEntityIteratorBackSpecial< dimension, CoordType, 0 > │ │ │ │ │ Dune::VirtualRefinement::SubEntityIteratorBack │ │ │ │ │ Dune::VirtualRefinementImp │ │ │ │ │ @@ -450,16 +450,16 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ virtualrefinement.hh │ │ │ │ │ /build/reproducible-path/dune-geometry-2.11.0/dune/geometry/ │ │ │ │ │ a00170.html │ │ │ │ │ - refinement.hh │ │ │ │ │ - type.hh │ │ │ │ │ + refinement.hh │ │ │ │ │ + type.hh │ │ │ │ │ virtualrefinement.cc │ │ │ │ │ Dune::VirtualRefinement │ │ │ │ │ Dune::VirtualRefinement::Codim │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Dune::AffineGeometry │ │ ├── ./usr/share/doc/libdune-geometry-doc/doxygen/files.html │ │ │ @@ -79,41 +79,41 @@ │ │ │  
    doc │ │ │  
    appl │ │ │  
    refelements │ │ │  
    doxygen │ │ │  
    dune │ │ │  
    geometry │ │ │  
    refinement │ │ │ - 
    base.ccThis file contains the parts independent of a particular Refinement implementation │ │ │ + 
    base.ccThis file contains the parts independent of a particular Refinement implementation │ │ │  
    hcube.ccThis file contains the Refinement implementation for hypercubes (quadrilaterals, hexahedrons, etc.) │ │ │ - 
    hcubetriangulation.ccThis file contains the Refinement implementation for triangulating hypercubes (quadrilateral -> triangle, hexahedron -> tetrahedron) │ │ │ - 
    prismtriangulation.cc │ │ │ - 
    pyramidtriangulation.cc │ │ │ - 
    simplex.ccThis file contains the Refinement implementation for simplices (triangles, tetrahedrons...) │ │ │ + 
    hcubetriangulation.ccThis file contains the Refinement implementation for triangulating hypercubes (quadrilateral -> triangle, hexahedron -> tetrahedron) │ │ │ + 
    prismtriangulation.cc │ │ │ + 
    pyramidtriangulation.cc │ │ │ + 
    simplex.ccThis file contains the Refinement implementation for simplices (triangles, tetrahedrons...) │ │ │  
    utility │ │ │ - 
    algorithms.hh │ │ │ - 
    convergence.hh │ │ │ - 
    defaultmatrixhelper.hh │ │ │ - 
    typefromvertexcount.hh │ │ │ - 
    affinegeometry.hhAn implementation of the Geometry interface for affine geometries │ │ │ - 
    axisalignedcubegeometry.hhA geometry implementation for axis-aligned hypercubes │ │ │ - 
    dimension.hh │ │ │ - 
    generalvertexorder.hh │ │ │ - 
    localfiniteelementgeometry.hh │ │ │ - 
    mappedgeometry.hh │ │ │ - 
    multilineargeometry.hh │ │ │ - 
    quadraturerules.hh │ │ │ - 
    referenceelement.hh │ │ │ - 
    referenceelementimplementation.cc │ │ │ - 
    referenceelementimplementation.hh │ │ │ - 
    referenceelements.hh │ │ │ - 
    refinement.hhThis file simply includes all Refinement implementations so you don't have to do them separately │ │ │ - 
    topologyfactory.hh │ │ │ - 
    type.hhA unique label for each type of element that can occur in a grid │ │ │ - 
    typeindex.hhHelper classes to provide indices for geometrytypes for use in a vector │ │ │ + 
    algorithms.hh │ │ │ + 
    convergence.hh │ │ │ + 
    defaultmatrixhelper.hh │ │ │ + 
    typefromvertexcount.hh │ │ │ + 
    affinegeometry.hhAn implementation of the Geometry interface for affine geometries │ │ │ + 
    axisalignedcubegeometry.hhA geometry implementation for axis-aligned hypercubes │ │ │ + 
    dimension.hh │ │ │ + 
    generalvertexorder.hh │ │ │ + 
    localfiniteelementgeometry.hh │ │ │ + 
    mappedgeometry.hh │ │ │ + 
    multilineargeometry.hh │ │ │ + 
    quadraturerules.hh │ │ │ + 
    referenceelement.hh │ │ │ + 
    referenceelementimplementation.cc │ │ │ + 
    referenceelementimplementation.hh │ │ │ + 
    referenceelements.hh │ │ │ + 
    refinement.hhThis file simply includes all Refinement implementations so you don't have to do them separately │ │ │ + 
    topologyfactory.hh │ │ │ + 
    type.hhA unique label for each type of element that can occur in a grid │ │ │ + 
    typeindex.hhHelper classes to provide indices for geometrytypes for use in a vector │ │ │  
    virtualrefinement.ccThis file contains the virtual wrapper around refinement │ │ │  
    virtualrefinement.hhThis file contains the virtual wrapper around refinement │ │ │ │ │ │ │ │ │ │ │ │ │ │ │